summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ipc/mqueue.c5
-rw-r--r--kernel/exit.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 4798b375972b..fa0b02c68cf1 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -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;
diff --git a/kernel/exit.c b/kernel/exit.c
index 2c0b1c02920f..f812df279ea7 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1116,7 +1116,7 @@ void __noreturn make_task_dead(int signr)
SYSCALL_DEFINE1(exit, int, error_code)
{
- do_exit((error_code&0xff)<<8);
+ do_exit((error_code & 0xff) << 8);
}
/*