Skip to content

block/loop: Fix NULL pointer dereference in lo_rw_aio()#851

Open
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1097014=>linus-master
Open

block/loop: Fix NULL pointer dereference in lo_rw_aio()#851
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1097014=>linus-master

Conversation

@blktests-ci
Copy link
Copy Markdown

@blktests-ci blktests-ci Bot commented May 19, 2026

Pull request for series with
subject: block/loop: Fix NULL pointer dereference in lo_rw_aio()
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1097014

lo->lo_backing_file can be NULL when the loop device is being cleared,
causing NULL pointer dereference in lo_rw_aio(). Add a defensive check
to prevent kernel crash.

Also fix loop_attr_backing_file_show() to use PTR_ERR_OR_ZERO()
for correct NULL pointer handling.

Fixes: bc07c10 ("block: loop: support DIO & AIO")
Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn>
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 19, 2026

Upstream branch: 70eda68
series: https://patchwork.kernel.org/project/linux-block/list/?series=1097014
version: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant