X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=ipc%2Fmsg.c;h=649853105a5d773d30fac9929327030cad118a67;hb=3573d3869de475cca9f2d4998fc3c2871a4cc2db;hp=245db1140ad66a2be47744f02ef0d80deea5006f;hpb=95959e6a06720834fc80a210e37898341c63cb91;p=karo-tx-linux.git diff --git a/ipc/msg.c b/ipc/msg.c index 245db1140ad6..649853105a5d 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -901,6 +901,8 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, int msgfl return -EINVAL; if (msgflg & MSG_COPY) { + if ((msgflg & MSG_EXCEPT) || !(msgflg & IPC_NOWAIT)) + return -EINVAL; copy = prepare_copy(buf, min_t(size_t, bufsz, ns->msg_ctlmax)); if (IS_ERR(copy)) return PTR_ERR(copy);