aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strlcpy-src.c
diff options
context:
space:
mode:
authorYu Kuai <[email protected]>2023-06-18 22:04:02 +0800
committerJens Axboe <[email protected]>2023-06-20 07:17:46 -0600
commit985958b8584cc143555f1bd735e7ab5066c944a7 (patch)
tree376818f581df1bd6058ee53dcfdb00ef66ce42b7 /lib/test_fortify/write_overflow-strlcpy-src.c
parente89e001f24bf7bc558d9ebccb97fd559443021da (diff)
block: fix wrong mode for blkdev_get_by_dev() from disk_scan_partitions()
After commit 2736e8eeb0cc ("block: use the holder as indication for exclusive opens"), blkdev_get_by_dev() will warn if holder is NULL and mode contains 'FMODE_EXCL'. holder from blkdev_get_by_dev() from disk_scan_partitions() is always NULL, hence it should not use 'FMODE_EXCL', which is broben by the commit. For consequence, WARN_ON_ONCE() will be triggered from blkdev_get_by_dev() if user scan partitions with device opened exclusively. Fix this problem by removing 'FMODE_EXCL' from disk_scan_partitions(), as it used to be. Reported-by: [email protected] Link: https://syzkaller.appspot.com/bug?extid=00cd27751f78817f167b Fixes: 2736e8eeb0cc ("block: use the holder as indication for exclusive opens") Signed-off-by: Yu Kuai <[email protected]> Reviewed-by: Christian Brauner <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions