linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhiqiang Liu <liuzhiqiang26@huawei.com>
To: <ebiederm@xmission.com>, <oleg@redhat.com>,
	<christian.brauner@ubuntu.com>, <tj@kernel.org>,
	<akpm@linux-foundation.org>, <guro@fb.com>,
	<joel@joelfernandes.org>, <linux-kernel@vger.kernel.org>
Cc: Mingfangsen <mingfangsen@huawei.com>,
	linfeilong <linfeilong@huawei.com>, <liuzhiqiang26@huawei.com>
Subject: [PATCH] signal: use kill_proc_info instead of kill_pid_info in kill_something_info
Date: Mon, 30 Mar 2020 10:44:43 +0800	[thread overview]
Message-ID: <80236965-f0b5-c888-95ff-855bdec75bb3@huawei.com> (raw)


signal.c provides kill_proc_info, we can use it instead of kill_pid_info
in kill_something_info func gracefully.

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
---
 kernel/signal.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/kernel/signal.c b/kernel/signal.c
index 9ad8dea93dbb..33c70f9f1728 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1552,12 +1552,8 @@ static int kill_something_info(int sig, struct kernel_siginfo *info, pid_t pid)
 {
 	int ret;

-	if (pid > 0) {
-		rcu_read_lock();
-		ret = kill_pid_info(sig, info, find_vpid(pid));
-		rcu_read_unlock();
-		return ret;
-	}
+	if (pid > 0)
+		return kill_proc_info(sig, info, pid);

 	/* -INT_MIN is undefined.  Exclude this case to avoid a UBSAN warning */
 	if (pid == INT_MIN)
-- 
2.19.1


             reply	other threads:[~2020-03-30  2:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30  2:44 Zhiqiang Liu [this message]
2020-03-30  8:46 ` [PATCH] signal: use kill_proc_info instead of kill_pid_info in kill_something_info Oleg Nesterov
2020-03-30  8:48 ` Christian Brauner
2020-04-09  3:26   ` Zhiqiang Liu
2020-04-09  6:53     ` Christian Brauner
2020-04-12 20:59 ` Christian Brauner

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=80236965-f0b5-c888-95ff-855bdec75bb3@huawei.com \
    --to=liuzhiqiang26@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=christian.brauner@ubuntu.com \
    --cc=ebiederm@xmission.com \
    --cc=guro@fb.com \
    --cc=joel@joelfernandes.org \
    --cc=linfeilong@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingfangsen@huawei.com \
    --cc=oleg@redhat.com \
    --cc=tj@kernel.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).