summaryrefslogtreecommitdiff
path: root/net/devlink/Makefile
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2024-12-25 19:06:40 +0800
committerJens Axboe <axboe@kernel.dk>2024-12-26 06:42:55 -0700
commit75cd4005da5492129917a4a4ee45e81660556104 (patch)
treea74812e05a2ad1a767e955e691696980ca3940c5 /net/devlink/Makefile
parent85672ca9ceeaa1dcf2777a7048af5f4aee3fd02b (diff)
downloadlwn-75cd4005da5492129917a4a4ee45e81660556104.tar.gz
lwn-75cd4005da5492129917a4a4ee45e81660556104.zip
ublk: detach gendisk from ublk device if add_disk() fails
Inside ublk_abort_requests(), gendisk is grabbed for aborting all inflight requests. And ublk_abort_requests() is called when exiting the uring context or handling timeout. If add_disk() fails, the gendisk may have been freed when calling ublk_abort_requests(), so use-after-free can be caused when getting disk's reference in ublk_abort_requests(). Fixes the bug by detaching gendisk from ublk device if add_disk() fails. Fixes: bd23f6c2c2d0 ("ublk: quiesce request queue when aborting queue") Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20241225110640.351531-1-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'net/devlink/Makefile')
0 files changed, 0 insertions, 0 deletions