blk-cgroup: fix disk reference leak in blkcg_maybe_throttle_current()#709
blk-cgroup: fix disk reference leak in blkcg_maybe_throttle_current()#709blktests-ci[bot] wants to merge 1 commit intolinus-master_basefrom
Conversation
|
Upstream branch: 7aaa804 |
c781e1e to
255b4bf
Compare
|
Upstream branch: d0c3bcd |
a8744b3 to
79d2c0f
Compare
|
Upstream branch: d0c3bcd |
79d2c0f to
00bac35
Compare
|
Upstream branch: d0c3bcd |
00bac35 to
cb873bb
Compare
255b4bf to
3236861
Compare
|
Upstream branch: 9147566 |
cb873bb to
0107a7f
Compare
ecbdbb4 to
480b162
Compare
|
Upstream branch: 9147566 |
0107a7f to
9048efe
Compare
a96fba7 to
0cd6ac2
Compare
|
Upstream branch: 9147566 |
9048efe to
303f96d
Compare
0cd6ac2 to
910d344
Compare
|
Upstream branch: d8a9a4b |
303f96d to
a220e45
Compare
910d344 to
ed862bc
Compare
|
Upstream branch: 7ca6d1c |
a220e45 to
8e93348
Compare
ed862bc to
2d0c3d5
Compare
|
Upstream branch: 3aae938 |
8e93348 to
3ad2a72
Compare
2d0c3d5 to
931d9b0
Compare
|
Upstream branch: 3036cd0 |
3ad2a72 to
15eacad
Compare
931d9b0 to
78a4682
Compare
Add the missing put_disk() on the error path in blkcg_maybe_throttle_current(). When blkcg lookup, blkg lookup, or blkg_tryget() fails, the function jumps to the out label which only calls rcu_read_unlock() but does not release the disk reference acquired by blkcg_schedule_throttle() via get_device(). Since current->throttle_disk is already set to NULL before the lookup, blkcg_exit() cannot release this reference either, causing the disk to never be freed. Restore the reference release that was present as blk_put_queue() in the original code but was inadvertently dropped during the conversion from request_queue to gendisk. Fixes: f05837e ("blk-cgroup: store a gendisk to throttle in struct task_struct") Signed-off-by: Jackie Liu <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Acked-by: Tejun Heo <[email protected]>
|
Upstream branch: 9a9c8ce |
15eacad to
0165191
Compare
Pull request for series with
subject: blk-cgroup: fix disk reference leak in blkcg_maybe_throttle_current()
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1075055