aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/fpga-mgr.c
diff options
context:
space:
mode:
authorMiklos Szeredi <[email protected]>2021-07-28 08:38:43 +0000
committerMiklos Szeredi <[email protected]>2021-08-10 08:21:30 +0000
commit9b91b6b019fda817eb52f728eb9c79b3579760bc (patch)
treeff9d912e8f6943cc084d9a8160def07e50225378 /drivers/fpga/fpga-mgr.c
parentovl: skip stale entries in merge dir cache iteration (diff)
downloadkernel-9b91b6b019fda817eb52f728eb9c79b3579760bc.tar.gz
kernel-9b91b6b019fda817eb52f728eb9c79b3579760bc.zip
ovl: fix deadlock in splice write
There's possibility of an ABBA deadlock in case of a splice write to an overlayfs file and a concurrent splice write to a corresponding real file. The call chain for splice to an overlay file: -> do_splice [takes sb_writers on overlay file] -> do_splice_from -> iter_file_splice_write [takes pipe->mutex] -> vfs_iter_write ... -> ovl_write_iter [takes sb_writers on real file] And the call chain for splice to a real file: -> do_splice [takes sb_writers on real file] -> do_splice_from -> iter_file_splice_write [takes pipe->mutex] Syzbot successfully bisected this to commit 82a763e61e2b ("ovl: simplify file splice"). Fix by reverting the write part of the above commit and by adding missing bits from ovl_write_iter() into ovl_splice_write(). Fixes: 82a763e61e2b ("ovl: simplify file splice") Reported-and-tested-by: [email protected] Signed-off-by: Miklos Szeredi <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions