summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2020-07-01 08:52:48 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-03 12:22:27 +0300
commit24cea2ec68a04cf51021d1ad5b3b8e34dc5fa90a (patch)
treedf71cbe5e9f8251ff1d5c4fad570b8167c293241 /drivers/scsi
parenta5de479530d3294643980c3190f94a25c9011da4 (diff)
downloadlinux-24cea2ec68a04cf51021d1ad5b3b8e34dc5fa90a.tar.xz
ceph: fix potential mdsc use-after-free crash
[ Upstream commit fa9967734227b44acb1b6918033f9122dc7825b9 ] Make sure the delayed work stopped before releasing the resources. cancel_delayed_work_sync() will only guarantee that the work finishes executing if the work is already in the ->worklist. That means after the cancel_delayed_work_sync() returns, it will leave the work requeued if it was rearmed at the end. That can lead to a use after free once the work struct is freed. Fix it by flushing the delayed work instead of trying to cancel it, and ensure that the work doesn't rearm if the mdsc is stopping. URL: https://tracker.ceph.com/issues/46293 Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/scsi')
0 files changed, 0 insertions, 0 deletions