From e67eee8619c521eee00cd6c8e2b984b304d831a1 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Sun, 25 Jan 2004 16:52:24 -0800 Subject: [PATCH] [PATCH] Fix error checking in IPC_SET The LSM changes broke the error checking for queue lengths in IPC_SET. The LSM check would set set err to 0, but the next check expected it to still be -EPERM. Result was that no error was reported, but the new parameters weren't correctly set. --- ipc/msg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ipc/msg.c b/ipc/msg.c index 76c1207b8c898..709ff71bf5c1c 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -557,6 +557,7 @@ asmlinkage long sys_msgctl (int msqid, int cmd, struct msqid_ds *buf) switch (cmd) { case IPC_SET: { + err = -EPERM; if (setbuf.qbytes > msg_ctlmnb && !capable(CAP_SYS_RESOURCE)) goto out_unlock_up; -- 2.53.0