diff options
author | Fabio M. De Francesco <[email protected]> | 2022-02-23 11:02:52 +0100 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2022-02-24 09:09:33 -0800 |
commit | 7ff57e98fb78ad94edafbdc7435f2d745e9e6bb5 (patch) | |
tree | 5f10cee5c7b7c8db519d917e50e056c2770f613a /lib/test_overflow.c | |
parent | e13ad1443684f7afaff24cf207e85e97885256bd (diff) |
net/smc: Use a mutex for locking "struct smc_pnettable"
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: [email protected]
Fixes: 64e28b52c7a6 ("net/smc: add pnet table namespace support")
Confirmed-by: Tony Lu <[email protected]>
Signed-off-by: Fabio M. De Francesco <[email protected]>
Acked-by: Karsten Graul <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions