linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: zhouchuangao <zhouchuangao@vivo.com>
To: Jens Axboe <axboe@kernel.dk>, Oleg Nesterov <oleg@redhat.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Collingbourne <pcc@google.com>,
	Marco Elver <elver@google.com>,
	linux-kernel@vger.kernel.org
Cc: zhouchuangao <zhouchuangao@vivo.com>
Subject: [PATCH] kernel/signal: Modify the comment of function check_kill_permission
Date: Sun,  9 May 2021 18:26:20 -0700	[thread overview]
Message-ID: <1620609982-25340-1-git-send-email-zhouchuangao@vivo.com> (raw)

Maybe it's easier for us to understand the function of
check_kill_permission().

Signed-off-by: zhouchuangao <zhouchuangao@vivo.com>
---
 kernel/signal.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/signal.c b/kernel/signal.c
index 66e8864..8335f17 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -861,8 +861,10 @@ static bool kill_ok_by_cred(struct task_struct *t)
 }
 
 /*
- * Bad permissions for sending the signal
- * - the caller must hold the RCU read lock
+ * Check whether the caller has permissions to send the signal.
+ * - The caller must hold the RCU read lock;
+ * - Return 0 means permission is allowed, otherwise returns the
+ *   corresponding error number.
  */
 static int check_kill_permission(int sig, struct kernel_siginfo *info,
 				 struct task_struct *t)
-- 
2.7.4


             reply	other threads:[~2021-05-10  1:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10  1:26 zhouchuangao [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-23  8:03 [PATCH] kernel/signal: Modify the comment of function check_kill_permission zhouchuangao
2021-03-23  8: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=1620609982-25340-1-git-send-email-zhouchuangao@vivo.com \
    --to=zhouchuangao@vivo.com \
    --cc=axboe@kernel.dk \
    --cc=ebiederm@xmission.com \
    --cc=elver@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=pcc@google.com \
    --cc=peterz@infradead.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).