Files
Centos-kernel-stream-9/block
Ming Lei f260be4b5b block: fix memory leak in __blkdev_issue_zero_pages
JIRA: https://issues.redhat.com/browse/RHEL-137854

commit f7e3f852a42d7cd8f1af2c330d9d153e30c8adcf
Author: Shaurya Rane <ssrane_b23@ee.vjti.ac.in>
Date:   Thu Dec 4 23:42:59 2025 +0530

    block: fix memory leak in __blkdev_issue_zero_pages

    Move the fatal signal check before bio_alloc() to prevent a memory
    leak when BLKDEV_ZERO_KILLABLE is set and a fatal signal is pending.

    Previously, the bio was allocated before checking for a fatal signal.
    If a signal was pending, the code would break out of the loop without
    freeing or chaining the just-allocated bio, causing a memory leak.

    This matches the pattern already used in __blkdev_issue_write_zeroes()
    where the signal check precedes the allocation.

    Fixes: bf86bcdb4012 ("blk-lib: check for kill signal in ioctl BLKZEROOUT")
    Reported-by: syzbot+527a7e48a3d3d315d862@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=527a7e48a3d3d315d862
    Signed-off-by: Shaurya Rane <ssrane_b23@ee.vjti.ac.in>
    Reviewed-by: Keith Busch <kbusch@kernel.org>
    Tested-by: syzbot+527a7e48a3d3d315d862@syzkaller.appspotmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Ming Lei <ming.lei@redhat.com>
2026-02-06 08:51:19 +08:00
..
2025-09-12 00:28:08 +08:00
2025-09-16 18:11:38 +08:00