blk-cgroup: fix use-after-free in blkg_conf_open_bdev - #1143
blk-cgroup: fix use-after-free in blkg_conf_open_bdev#1143blktests-ci-kpd[bot] wants to merge 1 commit into
Conversation
|
Upstream branch: 3aa1dca |
d89ab11 to
fdba928
Compare
|
Upstream branch: fd923b3 |
4c1f92f to
4c01fef
Compare
fdba928 to
60442a3
Compare
|
Upstream branch: 8d3ae59 |
4c01fef to
aae5820
Compare
60442a3 to
3df366e
Compare
|
Upstream branch: bd5f485 |
aae5820 to
ba854f7
Compare
3df366e to
5dd70cb
Compare
|
Upstream branch: 66498c7 |
ba854f7 to
f824259
Compare
5dd70cb to
055a766
Compare
|
Upstream branch: 502d457 |
f824259 to
4d3cf2a
Compare
055a766 to
341ae8c
Compare
|
Upstream branch: cf72cbb |
4d3cf2a to
aa0883f
Compare
341ae8c to
940e422
Compare
|
Upstream branch: cee9395 |
aa0883f to
6139bb4
Compare
940e422 to
3cab524
Compare
|
Upstream branch: 89a3129 |
6139bb4 to
31b0812
Compare
3cab524 to
8242bf1
Compare
|
Upstream branch: bc35965 |
31b0812 to
9c8efe4
Compare
8242bf1 to
5b28f57
Compare
|
Upstream branch: df29080 Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/series/1146329/ conflict: |
5b28f57 to
4ddd216
Compare
|
Upstream branch: 28924df |
9c8efe4 to
f31d69b
Compare
4ddd216 to
00cc4ca
Compare
|
Upstream branch: 893e117 |
f31d69b to
edcc452
Compare
00cc4ca to
7efd8cd
Compare
|
Upstream branch: 50d05c7 |
edcc452 to
11f42fb
Compare
7efd8cd to
a0aeca9
Compare
blkg_conf_open_bdev() holds rq_qos_mutex while checking whether the disk is still live. On the dead-disk error path, it drops the bdev reference before unlocking the mutex. Once that reference is dropped, a concurrent put_disk() can release the remaining device reference and free the bdev. The subsequent mutex_unlock() then dereferences bdev->bd_queue from the freed object. Unlock rq_qos_mutex while the local bdev reference still pins the object. Drop the reference only after the final bdev access. Fixes: a13bd91 ("block/rq_qos: protect rq_qos apis with a new lock") Cc: stable@vger.kernel.org Signed-off-by: Shuangpeng Bai <shuangpeng.kernel@gmail.com>
|
Upstream branch: 5225b8e |
11f42fb to
d2a5b66
Compare
Pull request for series with
subject: blk-cgroup: fix use-after-free in blkg_conf_open_bdev
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1146329