mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 03:35:32 -04:00
mqueue: reject mq_notify with signo 0
valid_signal(0) is true; __do_notify() skips signo 0 anyway. Signed-off-by: Yi Xie <xieyi@kylinos.cn> Link: https://patch.msgid.link/20260603020936.54508-1-xieyi@kylinos.cn Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
committed by
Christian Brauner
parent
dc59e4fea9
commit
1184f5e820
@@ -790,7 +790,6 @@ static void __do_notify(struct mqueue_inode_info *info)
|
||||
struct kernel_siginfo sig_i;
|
||||
struct task_struct *task;
|
||||
|
||||
/* do_mq_notify() accepts sigev_signo == 0, why?? */
|
||||
if (!info->notify.sigev_signo)
|
||||
break;
|
||||
|
||||
@@ -1281,9 +1280,9 @@ static int do_mq_notify(mqd_t mqdes, const struct sigevent *notification)
|
||||
notification->sigev_notify != SIGEV_THREAD))
|
||||
return -EINVAL;
|
||||
if (notification->sigev_notify == SIGEV_SIGNAL &&
|
||||
!valid_signal(notification->sigev_signo)) {
|
||||
(!notification->sigev_signo ||
|
||||
!valid_signal(notification->sigev_signo)))
|
||||
return -EINVAL;
|
||||
}
|
||||
if (notification->sigev_notify == SIGEV_THREAD) {
|
||||
long timeo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user