Revision 7ff57e98fb78ad94edafbdc7435f2d745e9e6bb5 authored by Fabio M. De Francesco on 23 February 2022, 10:02:52 UTC, committed by Jakub Kicinski on 24 February 2022, 17:09:33 UTC
smc_pnetid_by_table_ib() uses read_lock() and then it calls smc_pnet_apply_ib()
which, in turn, calls mutex_lock(&smc_ib_devices.mutex).

read_lock() disables preemption. Therefore, the code acquires a mutex while in
atomic context and it leads to a SAC bug.

Fix this bug by replacing the rwlock with a mutex.

Reported-and-tested-by: syzbot+4f322a6d84e991c38775@syzkaller.appspotmail.com
Fixes: 64e28b52c7a6 ("net/smc: add pnet table namespace support")
Confirmed-by: Tony Lu <tonylu@linux.alibaba.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Acked-by: Karsten Graul <kgraul@linux.ibm.com>
Link: https://lore.kernel.org/r/20220223100252.22562-1-fmdefrancesco@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent e13ad14
History
File Mode Size
1.Intro.rst -rw-r--r-- 14.3 KB
2.Process.rst -rw-r--r-- 23.7 KB
3.Early-stage.rst -rw-r--r-- 10.7 KB
4.Coding.rst -rw-r--r-- 21.1 KB
5.Posting.rst -rw-r--r-- 16.7 KB
6.Followthrough.rst -rw-r--r-- 11.8 KB
7.AdvancedTopics.rst -rw-r--r-- 9.5 KB
8.Conclusion.rst -rw-r--r-- 3.1 KB
adding-syscalls.rst -rw-r--r-- 26.6 KB
applying-patches.rst -rw-r--r-- 17.0 KB
botching-up-ioctls.rst -rw-r--r-- 11.3 KB
changes.rst -rw-r--r-- 13.1 KB
clang-format.rst -rw-r--r-- 6.4 KB
code-of-conduct-interpretation.rst -rw-r--r-- 7.2 KB
code-of-conduct.rst -rw-r--r-- 3.2 KB
coding-style.rst -rw-r--r-- 41.1 KB
deprecated.rst -rw-r--r-- 14.8 KB
development-process.rst -rw-r--r-- 810 bytes
email-clients.rst -rw-r--r-- 11.0 KB
embargoed-hardware-issues.rst -rw-r--r-- 13.1 KB
howto.rst -rw-r--r-- 27.0 KB
index.rst -rw-r--r-- 1.5 KB
kernel-docs.rst -rw-r--r-- 23.8 KB
kernel-driver-statement.rst -rw-r--r-- 4.1 KB
kernel-enforcement-statement.rst -rw-r--r-- 4.9 KB
license-rules.rst -rw-r--r-- 17.6 KB
magic-number.rst -rw-r--r-- 9.4 KB
maintainer-handbooks.rst -rw-r--r-- 472 bytes
maintainer-pgp-guide.rst -rw-r--r-- 37.3 KB
maintainer-tip.rst -rw-r--r-- 24.9 KB
maintainers.rst -rw-r--r-- 25 bytes
management-style.rst -rw-r--r-- 13.1 KB
programming-language.rst -rw-r--r-- 2.0 KB
stable-api-nonsense.rst -rw-r--r-- 9.2 KB
stable-kernel-rules.rst -rw-r--r-- 6.4 KB
submit-checklist.rst -rw-r--r-- 4.9 KB
submitting-drivers.rst -rw-r--r-- 6.8 KB
submitting-patches.rst -rw-r--r-- 36.3 KB
volatile-considered-harmful.rst -rw-r--r-- 5.6 KB

back to top