linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] kernel/signal: Modify the comment of function check_kill_permission()
@ 2021-03-23 11:56 zhouchuangao
  0 siblings, 0 replies; only message in thread
From: zhouchuangao @ 2021-03-23 11:56 UTC (permalink / raw)
  To: Jens Axboe, Christian Brauner, Eric W. Biederman, Oleg Nesterov,
	Thomas Gleixner, Peter Collingbourne, Zhiqiang Liu, linux-kernel
  Cc: zhouchuangao

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 f2a1b89..e6b6277 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -823,8 +823,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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-23 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 11:56 [PATCH v2] kernel/signal: Modify the comment of function check_kill_permission() zhouchuangao

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).