Greeting,
FYI, we noticed the following commit (built with gcc-11):
commit: 7608b6a72ed04607cc832248cbd52fb5e68bd42c ("sysctl: Allow to change limits for posix messages queues")
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master
in testcase: kernel-selftests
version: kernel-selftests-x86_64-700a8991-1_20220823
with following parameters:
group: group-02
test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
test-url: https://www.kernel.org/doc/Documentation/kselftest.txt
on test machine: 4 threads Intel(R) Xeon(R) CPU E3-1225 v5 @ 3.30GHz (Skylake) with 16G memory
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
2022-10-04 04:47:26 make -C mqueue
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-7608b6a72ed04607cc832248cbd52fb5e68bd42c/tools/testing/selftests/mqueue'
gcc -O2 mq_open_tests.c -lrt -lpthread -lpopt -o /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-7608b6a72ed04607cc832248cbd52fb5e68bd42c/tools/testing/selftests/mqueue/mq_open_tests
gcc -O2 mq_perf_tests.c -lrt -lpthread -lpopt -o /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-7608b6a72ed04607cc832248cbd52fb5e68bd42c/tools/testing/selftests/mqueue/mq_perf_tests
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-7608b6a72ed04607cc832248cbd52fb5e68bd42c/tools/testing/selftests/mqueue'
2022-10-04 04:47:27 make quicktest=1 run_tests -C mqueue
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-7608b6a72ed04607cc832248cbd52fb5e68bd42c/tools/testing/selftests/mqueue'
TAP version 13
1..2
# selftests: mqueue: mq_open_tests
# Using Default queue path - /test1
# ./mq_open_tests: Failed to open msg_max at 279: No such file or directory
not ok 1 selftests: mqueue: mq_open_tests # exit=2
# selftests: mqueue: mq_perf_tests
# ./mq_perf_tests: Failed to open msg_max at 643: Permission denied
not ok 2 selftests: mqueue: mq_perf_tests # exit=2
If you fix the issue, kindly add following tag
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/r/[email protected]
To reproduce:
git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
sudo bin/lkp install job.yaml # job file is attached in this email
bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
sudo bin/lkp run generated-yaml-file
# if come across any failure that blocks the test,
# please remove ~/.lkp and /lkp dir to run from a clean state.
--
0-DAY CI Kernel Test Service
https://01.org/lkp
The kernel test robot found a typo that causes mq_permissions() to return a
useless value.
Reported-by: kernel test robot <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Fixes: 7608b6a72ed0 ("sysctl: Allow to change limits for posix messages queues")
Signed-off-by: Alexey Gladkov <[email protected]>
---
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