Skip to content
Snippets Groups Projects
Commit 10097449 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Yang Yingliang
Browse files

block: take bd_mutex around delete_partitions in del_gendisk


mainline inclusion
from mainline-v5.13-rc1
commit c76f48eb5c084b1e15c931ae8cc1826cd771d70d
category: bugfix
bugzilla: 55097
CVE: NA

--------------------------------

There is nothing preventing an ioctl from trying do delete partition
concurrenly with del_gendisk, so take open_mutex to serialize against
that.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210406062303.811835-6-hch@lst.de


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Conflicts:
	block/genhd.c
	block/partitions/core.c
[Yufen: linux-4.19 have not extract blk_drop_partitions().]
Signed-off-by: default avatarYufen Yu <yuyufen@huawei.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 01f9b568
No related branches found
No related tags found
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment