diff options
| author | Dominique Martinet <[email protected]> | 2022-09-04 11:17:49 +0000 |
|---|---|---|
| committer | Dominique Martinet <[email protected]> | 2022-10-07 12:22:48 +0000 |
| commit | 296ab4a813841ba1d5f40b03190fd1bd8f25aab0 (patch) | |
| tree | 2c9c562f9a1ceb01cba3459295738a3663b61d11 /lib/fault-inject.c | |
| parent | 9p/trans_fd: always use O_NONBLOCK read/write (diff) | |
| download | kernel-296ab4a813841ba1d5f40b03190fd1bd8f25aab0.tar.gz kernel-296ab4a813841ba1d5f40b03190fd1bd8f25aab0.zip | |
net/9p: use a dedicated spinlock for trans_fd
Shamelessly copying the explanation from Tetsuo Handa's suggested
patch[1] (slightly reworded):
syzbot is reporting inconsistent lock state in p9_req_put()[2],
for p9_tag_remove() from p9_req_put() from IRQ context is using
spin_lock_irqsave() on "struct p9_client"->lock but trans_fd
(not from IRQ context) is using spin_lock().
Since the locks actually protect different things in client.c and in
trans_fd.c, just replace trans_fd.c's lock by a new one specific to the
transport (client.c's protect the idr for fid/tag allocations,
while trans_fd.c's protects its own req list and request status field
that acts as the transport's state machine)
Link: https://lore.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected] [1]
Link: https://syzkaller.appspot.com/bug?extid=2f20b523930c32c160cc [2]
Reported-by: syzbot <[email protected]>
Reported-by: Tetsuo Handa <[email protected]>
Reviewed-by: Christian Schoenebeck <[email protected]>
Signed-off-by: Dominique Martinet <[email protected]>
Diffstat (limited to 'lib/fault-inject.c')
0 files changed, 0 insertions, 0 deletions
