LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: akpm@linux-foundation.org
Cc: viro@zeniv.linux.org.uk, gorcunov@openvz.org, oleg@redhat.com,
	koct9i@gmail.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] prctl: move MMF_EXE_FILE_CHANGED into exe_file struct
Date: Sat, 14 Mar 2015 19:13:00 -0700	[thread overview]
Message-ID: <1426385580.28068.74.camel@stgolabs.net> (raw)
In-Reply-To: <1426372766-3029-4-git-send-email-dave@stgolabs.net>

On Sat, 2015-03-14 at 15:39 -0700, Davidlohr Bueso wrote:
> +	if (test_and_set_mm_exe_file(mm, exefd.file))
> +		return 0;
> +	return -EPERM;

Bah, this is obviously bogus. We'd need the following folded in:

diff --git a/kernel/sys.c b/kernel/sys.c
index a82d0c4..41b27bd 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1694,8 +1694,8 @@ set_file:
         * This grabs a reference to exefd.file.
         */
        if (test_and_set_mm_exe_file(mm, exefd.file))
-               return 0;
-       return -EPERM;
+               return -EPERM;
+       return 0;
 }



  reply	other threads:[~2015-03-15  2:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-14 22:39 [PATCH -next v2 0/4] mm: replace mmap_sem for mm->exe_file serialization Davidlohr Bueso
2015-03-14 22:39 ` [PATCH 1/4] " Davidlohr Bueso
2015-03-14 22:39 ` [PATCH 2/4] mm: introduce struct exe_file Davidlohr Bueso
2015-03-14 22:39 ` [PATCH 3/4] prctl: move MMF_EXE_FILE_CHANGED into exe_file struct Davidlohr Bueso
2015-03-15  2:13   ` Davidlohr Bueso [this message]
2015-03-14 22:39 ` [PATCH 4/4] kernel/fork: use pr_alert() for rss counter bugs Davidlohr Bueso
2015-03-16 11:30   ` Konstantin Khlebnikov
2015-03-15 14:21 ` [PATCH -next v2 0/4] mm: replace mmap_sem for mm->exe_file serialization Oleg Nesterov
2015-03-15 14:54   ` Davidlohr Bueso
2015-03-15 15:26     ` Oleg Nesterov
2015-03-15 15:42       ` Davidlohr Bueso
2015-03-15 17:05         ` Cyrill Gorcunov
2015-03-15 17:34           ` Davidlohr Bueso
2015-03-16 22:08           ` Kees Cook
2015-03-20 16:09             ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426385580.28068.74.camel@stgolabs.net \
    --to=dave@stgolabs.net \
    --cc=akpm@linux-foundation.org \
    --cc=gorcunov@openvz.org \
    --cc=koct9i@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=oleg@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    --subject='Re: [PATCH 3/4] prctl: move MMF_EXE_FILE_CHANGED into exe_file struct' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).