blk-cgroup: fix use-after-free in blkg_conf_open_bdev - #108
blk-cgroup: fix use-after-free in blkg_conf_open_bdev#108blktests-ci-block-trial[bot] wants to merge 2 commits into
Conversation
|
Upstream branch: 8d3ae59 |
2225f0a to
c64cb66
Compare
|
Upstream branch: ff68e5f |
37852f9 to
99be120
Compare
c64cb66 to
f44f344
Compare
|
Upstream branch: 0f23d56 |
99be120 to
93f8640
Compare
f44f344 to
9bee990
Compare
|
Upstream branch: 1200d84 |
93f8640 to
bf4d20e
Compare
9bee990 to
87a06b3
Compare
|
Upstream branch: 3a0dd7b |
bf4d20e to
b29dc78
Compare
87a06b3 to
f2b91d1
Compare
|
Upstream branch: b126f6f |
b29dc78 to
cb87951
Compare
f2b91d1 to
da1ee34
Compare
|
Upstream branch: bd5f485 |
cb87951 to
dc25685
Compare
da1ee34 to
45acce2
Compare
|
Upstream branch: 59e6295 |
dc25685 to
4103c79
Compare
45acce2 to
c54091c
Compare
|
Upstream branch: 98f21c5 |
4103c79 to
b89debd
Compare
c54091c to
f28d8dc
Compare
|
Upstream branch: cb8a75e |
b89debd to
61163f8
Compare
f28d8dc to
3705daf
Compare
|
Upstream branch: a4ff2be |
61163f8 to
4520852
Compare
3705daf to
98a2d8e
Compare
|
Upstream branch: 9d2ed02 |
4520852 to
efb6f3a
Compare
98a2d8e to
96fc384
Compare
|
Upstream branch: c84d3e3 |
efb6f3a to
889eef1
Compare
96fc384 to
deee96f
Compare
|
Upstream branch: 77ae27f |
889eef1 to
a39d41d
Compare
deee96f to
7d4b639
Compare
|
Upstream branch: 7f063b2 |
a39d41d to
3bd3a9c
Compare
7d4b639 to
e00fc7c
Compare
|
Upstream branch: 818bebe |
3bd3a9c to
b690f29
Compare
e00fc7c to
787bdf5
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: 531ed94 |
b690f29 to
d591ed5
Compare
234c2d8 to
7759c50
Compare
Pull request for series with
subject: blk-cgroup: fix use-after-free in blkg_conf_open_bdev
version: 1
url: http://redsun45:8000/project/linux-block/list/?series=627