block: clear ia_ranges on sysfs registration failure - #1142
block: clear ia_ranges on sysfs registration failure#1142blktests-ci-kpd[bot] wants to merge 1 commit into
Conversation
|
Upstream branch: 3aa1dca |
d89ab11 to
fdba928
Compare
|
Upstream branch: fd923b3 |
fb4d437 to
680de08
Compare
|
Upstream branch: fd923b3 |
680de08 to
790e26c
Compare
fdba928 to
60442a3
Compare
|
Upstream branch: 8d3ae59 |
790e26c to
9969805
Compare
60442a3 to
3df366e
Compare
|
Upstream branch: bd5f485 |
9969805 to
4f08f92
Compare
3df366e to
5dd70cb
Compare
|
Upstream branch: 66498c7 |
4f08f92 to
c7a2e9b
Compare
5dd70cb to
055a766
Compare
|
Upstream branch: 502d457 |
c7a2e9b to
4a06a75
Compare
055a766 to
341ae8c
Compare
|
Upstream branch: cf72cbb |
4a06a75 to
d5c73ce
Compare
341ae8c to
940e422
Compare
|
Upstream branch: cee9395 |
d5c73ce to
28d8d65
Compare
940e422 to
3cab524
Compare
|
Upstream branch: 89a3129 |
28d8d65 to
cb2a0a1
Compare
3cab524 to
8242bf1
Compare
|
Upstream branch: bc35965 |
cb2a0a1 to
3a2c6ad
Compare
8242bf1 to
5b28f57
Compare
|
Upstream branch: df29080 Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/series/1146317/ conflict: |
5b28f57 to
4ddd216
Compare
|
Upstream branch: 28924df |
3a2c6ad to
be04b19
Compare
4ddd216 to
00cc4ca
Compare
|
Upstream branch: 893e117 |
disk_register_independent_access_ranges() clears disk->ia_ranges when creating the top-level kobject fails. However, if adding one of the range kobjects fails, the cleanup drops the final reference to iars and frees it while disk->ia_ranges still points at it. A concurrent disk revalidation can wait for q->sysfs_lock and then call disk_unregister_independent_access_ranges(), which dereferences the stale pointer after registration releases the mutex. Clear disk->ia_ranges before dropping the kobject references on the child registration error path, matching the top-level error handling. Fixes: a2247f1 ("block: Add independent access ranges support") Cc: stable@vger.kernel.org Signed-off-by: Shuangpeng Bai <shuangpeng.kernel@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
be04b19 to
487b7d8
Compare
Pull request for series with
subject: block: clear ia_ranges on sysfs registration failure
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1146317