From: Oleg Nesterov <oleg@redhat.com>
To: David Howells <dhowells@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, David Smith <dsmith@redhat.com>,
"Frank Ch. Eigler" <fche@redhat.com>,
Larry Woodman <lwoodman@redhat.com>,
Peter Zijlstra <peterz@infradead.org>, Tejun Heo <tj@kernel.org>
Subject: [RFC PATCH 0/1] task_work_queue: add generic process-context callbacks
Date: Tue, 10 Apr 2012 03:05:47 +0200 [thread overview]
Message-ID: <20120410010547.GA18358@redhat.com> (raw)
In-Reply-To: <20120409190350.GA14716@redhat.com>
Hello.
I didn't read the "v3.4-rc2 out-of-memory problems" thread yet, but
I noticed how much Linus loves the
yet-another-random-notifier-for-some-random-reason idea.
Yet I am going to suggest another one, please see the patch.
But. To defence this change, please note that de-facto the notifier
is already here.
On 04/09, Oleg Nesterov wrote:
>
> Note: initially this was 1/2. The usage of >replacement_session_keyring
> is racy, although the problem is minor. I think that instead of fixing
> a lot of key_replace_session_keyring's callers in arch/ we can add the
> simple abstraction layer and kill ->replacement_session_keyring. I'll
> try to send the patches tomorrow.
Yes. the callers of key_replace_session_keyring() and
keyctl_session_to_parent() lack the barriers and can race with each other.
And keyctl_session_to_parent() probably needs kick_process(). Yes, the
problem is minor, but still.
To me, the main problem is task->->replacement_session_keyring itself.
I mean, imho it should not be that limited, we should generalize this
logic.
And potentially (I hope) it can have more users besides
KEYCTL_SESSION_TO_PARENT. Say, we can remove do_exit()->exit_irq_thread()
and task->irq_thread. The creator of irq thread can do
task_queue_work(exit_irq_thread).
What do you think?
Oleg.
next prev parent reply other threads:[~2012-04-10 1:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-09 19:03 [PATCH 0/1] cred: copy_process() should clear child->replacement_session_keyring Oleg Nesterov
2012-04-09 19:03 ` [PATCH 1/1] " Oleg Nesterov
2012-04-10 1:05 ` Oleg Nesterov [this message]
2012-04-10 1:06 ` [RFC PATCH 1/1] task_work_queue: add generic process-context callbacks Oleg Nesterov
2012-04-11 10:47 ` [PATCH 1/1] cred: copy_process() should clear child->replacement_session_keyring David Howells
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=20120410010547.GA18358@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=dsmith@redhat.com \
--cc=fche@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lwoodman@redhat.com \
--cc=peterz@infradead.org \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).