[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20221005170730.835761-1-legion@kernel.org>
Date: Wed, 5 Oct 2022 19:07:30 +0200
From: Alexey Gladkov <legion@...nel.org>
To: kernel test robot <yujie.liu@...el.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Alexey Gladkov <legion@...nel.org>
Cc: lkp@...ts.01.org, lkp@...el.com,
Linux Memory Management List <linux-mm@...ck.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH] sysctl: Fix mq permission check
The kernel test robot found a typo that causes mq_permissions() to return a
useless value.
Reported-by: kernel test robot <yujie.liu@...el.com>
Link: https://lore.kernel.org/r/202210052100.86dbb00a-yujie.liu@intel.com
Fixes: 7608b6a72ed0 ("sysctl: Allow to change limits for posix messages queues")
Signed-off-by: Alexey Gladkov <legion@...nel.org>
---
ipc/mq_sysctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ipc/mq_sysctl.c b/ipc/mq_sysctl.c
index ff1054fbbacc..ce03930aced5 100644
--- a/ipc/mq_sysctl.c
+++ b/ipc/mq_sysctl.c
@@ -102,7 +102,7 @@ static int mq_permissions(struct ctl_table_header *head, struct ctl_table *table
if (uid_eq(current_euid(), ns_root_uid))
mode >>= 6;
- if (in_egroup_p(ns_root_gid))
+ else if (in_egroup_p(ns_root_gid))
mode >>= 3;
mode &= 7;
--
2.33.4
Powered by blists - more mailing lists