From: trix@redhat.com
To: bigeasy@linutronix.de, tglx@linutronix.de, rostedt@goodmis.org,
linux-kernel@vger.kernel.org
Cc: Tom Rix <trix@redhat.com>
Subject: [PATCH RT 5.2] signal: remove noop call to __sigqueue_free
Date: Wed, 4 Dec 2019 09:22:42 -0800 [thread overview]
Message-ID: <20191204172242.21058-1-trix@redhat.com> (raw)
From: Tom Rix <trix@redhat.com>
By inspection, this call does not do anything.
static void __sigqueue_free(struct sigqueue *q)
{
if (q->flags & SIGQUEUE_PREALLOC) <-- redundant flag check --+
return; |
atomic_dec(&q->user->sigpending); |
free_uid(q->user); |
kmem_cache_free(sigqueue_cachep, q); |
} |
|
static void sigqueue_free_current(struct sigqueue *q) |
{ |
struct user_struct *up; |
|
if (q->flags & SIGQUEUE_PREALLOC) <-- first flag check ------+
return; |
|
up = q->user; |
if (rt_prio(current->normal_prio) && !put_task_cache(current, |
atomic_dec(&up->sigpending); |
free_uid(up); |
} else |
__sigqueue_free(q); <--- this call will noop --------+
}
Signed-off-by: Tom Rix <trix@redhat.com>
---
kernel/signal.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c
index 7bf4b399d307..4389cfde3f86 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -486,8 +486,7 @@ static void sigqueue_free_current(struct sigqueue *q)
if (rt_prio(current->normal_prio) && !put_task_cache(current, q)) {
atomic_dec(&up->sigpending);
free_uid(up);
- } else
- __sigqueue_free(q);
+ }
}
void flush_sigqueue(struct sigpending *queue)
--
2.18.1
reply other threads:[~2019-12-04 17:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20191204172242.21058-1-trix@redhat.com \
--to=trix@redhat.com \
--cc=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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).