From: Oleg Nesterov <oleg@redhat.com>
To: akpm@linux-foundation.org
Cc: arnd@arndb.de, christian.brauner@ubuntu.com,
deepa.kernel@gmail.com, ebiederm@xmission.com, guro@fb.com,
linux-kernel@vger.kernel.org, trix@redhat.com
Subject: Re: + signal-move-print_dropped_signal.patch added to -mm tree
Date: Fri, 3 Jan 2020 11:06:28 +0100 [thread overview]
Message-ID: <20200103100628.GA16577@redhat.com> (raw)
In-Reply-To: <20200102215029.PWaCMXI_O%akpm@linux-foundation.org>
> From: Tom Rix <trix@redhat.com>
> Subject: kernel/signal.c: move print_dropped_signal
>
> If the allocation of 'q' fails, the signal will be dropped.
Well, not necessarily... See the comment above TRACE_SIGNAL_LOSE_INFO
in __send_signal().
> To ensure
> that this is reported, move print_dropped_signal to be inside the '(q ==
> NULL)' if-check.
OK, but print_dropped_signal() says "reached RLIMIT_SIGPENDING", this
is misleading if kmem_cache_alloc() fails.
> Link: http://lkml.kernel.org/r/20191203180221.7038-1-trix@redhat.com
> Signed-off-by: Tom Rix <trix@redhat.com>
> Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
> Cc: "Eric W. Biederman" <ebiederm@xmission.com>
> Cc: Christian Brauner <christian.brauner@ubuntu.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Roman Gushchin <guro@fb.com>
> Cc: Deepa Dinamani <deepa.kernel@gmail.com>
> Cc: Oleg Nesterov <oleg@redhat.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> kernel/signal.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> --- a/kernel/signal.c~signal-move-print_dropped_signal
> +++ a/kernel/signal.c
> @@ -427,11 +427,10 @@ __sigqueue_alloc(int sig, struct task_st
> atomic_read(&user->sigpending) <=
> task_rlimit(t, RLIMIT_SIGPENDING)) {
> q = kmem_cache_alloc(sigqueue_cachep, flags);
> - } else {
> - print_dropped_signal(sig);
> }
>
> if (unlikely(q == NULL)) {
> + print_dropped_signal(sig);
> atomic_dec(&user->sigpending);
> free_uid(user);
> } else {
> _
>
> Patches currently in -mm which might be from trix@redhat.com are
>
> signal-move-print_dropped_signal.patch
>
parent reply other threads:[~2020-01-03 10:06 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20200102215029.PWaCMXI_O%akpm@linux-foundation.org>]
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=20200103100628.GA16577@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=christian.brauner@ubuntu.com \
--cc=deepa.kernel@gmail.com \
--cc=ebiederm@xmission.com \
--cc=guro@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=trix@redhat.com \
/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