aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/fpga-bridge.c
diff options
context:
space:
mode:
authorTetsuo Handa <[email protected]>2021-10-02 09:23:02 +0000
committerJens Axboe <[email protected]>2021-10-02 13:29:20 +0000
commit06cc978d3ff226072780f74897800b33e78abb57 (patch)
treef8a7767f98974d2bea074848be82708931e5795a /drivers/fpga/fpga-bridge.c
parentnbd: use shifts rather than multiplies (diff)
downloadkernel-06cc978d3ff226072780f74897800b33e78abb57.tar.gz
kernel-06cc978d3ff226072780f74897800b33e78abb57.zip
block: genhd: fix double kfree() in __alloc_disk_node()
syzbot is reporting use-after-free read at bdev_free_inode() [1], for kfree() from __alloc_disk_node() is called before bdev_free_inode() (which is called after RCU grace period) reads bdev->bd_disk and calls kfree(bdev->bd_disk). Fix use-after-free read followed by double kfree() problem by making sure that bdev->bd_disk is NULL when calling iput(). Link: https://syzkaller.appspot.com/bug?extid=8281086e8a6fbfbd952a [1] Reported-by: syzbot <[email protected]> Signed-off-by: Tetsuo Handa <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions