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
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 3.3 KB |
Makefile | -rw-r--r-- | 1.1 KB |
bat_algo.c | -rw-r--r-- | 5.2 KB |
bat_algo.h | -rw-r--r-- | 713 bytes |
bat_iv_ogm.c | -rw-r--r-- | 73.3 KB |
bat_iv_ogm.h | -rw-r--r-- | 292 bytes |
bat_v.c | -rw-r--r-- | 23.2 KB |
bat_v.h | -rw-r--r-- | 816 bytes |
bat_v_elp.c | -rw-r--r-- | 16.5 KB |
bat_v_elp.h | -rw-r--r-- | 821 bytes |
bat_v_ogm.c | -rw-r--r-- | 32.8 KB |
bat_v_ogm.h | -rw-r--r-- | 914 bytes |
bitarray.c | -rw-r--r-- | 2.6 KB |
bitarray.h | -rw-r--r-- | 1.5 KB |
bridge_loop_avoidance.c | -rw-r--r-- | 69.4 KB |
bridge_loop_avoidance.h | -rw-r--r-- | 3.4 KB |
distributed-arp-table.c | -rw-r--r-- | 50.4 KB |
distributed-arp-table.h | -rw-r--r-- | 4.7 KB |
fragmentation.c | -rw-r--r-- | 15.8 KB |
fragmentation.h | -rw-r--r-- | 1.3 KB |
gateway_client.c | -rw-r--r-- | 20.7 KB |
gateway_client.h | -rw-r--r-- | 1.8 KB |
gateway_common.c | -rw-r--r-- | 7.2 KB |
gateway_common.h | -rw-r--r-- | 1.0 KB |
hard-interface.c | -rw-r--r-- | 26.8 KB |
hard-interface.h | -rw-r--r-- | 3.2 KB |
hash.c | -rw-r--r-- | 1.7 KB |
hash.h | -rw-r--r-- | 3.9 KB |
log.c | -rw-r--r-- | 637 bytes |
log.h | -rw-r--r-- | 4.0 KB |
main.c | -rw-r--r-- | 19.9 KB |
main.h | -rw-r--r-- | 12.1 KB |
multicast.c | -rw-r--r-- | 68.6 KB |
multicast.h | -rw-r--r-- | 2.8 KB |
netlink.c | -rw-r--r-- | 41.2 KB |
netlink.h | -rw-r--r-- | 944 bytes |
network-coding.c | -rw-r--r-- | 55.5 KB |
network-coding.h | -rw-r--r-- | 2.7 KB |
originator.c | -rw-r--r-- | 36.6 KB |
originator.h | -rw-r--r-- | 4.9 KB |
routing.c | -rw-r--r-- | 36.3 KB |
routing.h | -rw-r--r-- | 1.6 KB |
send.c | -rw-r--r-- | 34.1 KB |
send.h | -rw-r--r-- | 4.3 KB |
soft-interface.c | -rw-r--r-- | 31.1 KB |
soft-interface.h | -rw-r--r-- | 1.2 KB |
tp_meter.c | -rw-r--r-- | 42.2 KB |
tp_meter.h | -rw-r--r-- | 618 bytes |
trace.c | -rw-r--r-- | 153 bytes |
trace.h | -rw-r--r-- | 1.6 KB |
translation-table.c | -rw-r--r-- | 125.8 KB |
translation-table.h | -rw-r--r-- | 2.8 KB |
tvlv.c | -rw-r--r-- | 18.7 KB |
tvlv.h | -rw-r--r-- | 1.7 KB |
types.h | -rw-r--r-- | 60.9 KB |
Computing file changes ...