diff options
author | 2021-12-21 17:18:51 +0100 | |
---|---|---|
committer | 2021-12-21 09:31:51 -0700 | |
commit | 99d8690aae4b2f0d1d90075de355ac087f820a66 (patch) | |
tree | 602e947ef3c103a6be94489d84cb1e8da3523aa9 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | block: call blk_exit_queue() before freeing q->stats (diff) | |
download | wireguard-linux-99d8690aae4b2f0d1d90075de355ac087f820a66.tar.xz wireguard-linux-99d8690aae4b2f0d1d90075de355ac087f820a66.zip |
block: fix error unwinding in device_add_disk
One device_add is called disk->ev will be freed by disk_release, so we
should free it twice. Fix this by allocating disk->ev after device_add
so that the extra local unwinding can be removed entirely.
Based on an earlier patch from Tetsuo Handa.
Reported-by: syzbot <syzbot+28a66a9fbc621c939000@syzkaller.appspotmail.com>
Tested-by: syzbot <syzbot+28a66a9fbc621c939000@syzkaller.appspotmail.com>
Fixes: 83cbce9574462c6b ("block: add error handling for device_add_disk / add_disk")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211221161851.788424-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions