lkml.org 
[lkml]   [2022]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net/smc: Use a mutex for locking "struct smc_pnettable"
From
On 23/02/2022 11:02, Fabio M. De Francesco wrote:
> 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>
> ---

Thank you Fabio!

This should go to the net tree...

Acked-by: Karsten Graul <kgraul@linux.ibm.com>

\
 
 \ /
  Last update: 2022-02-23 18:59    [W:0.019 / U:2.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site