diff options
author | Coly Li <colyli@suse.de> | 2020-01-23 20:01:30 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-01-23 21:40:01 +0300 |
commit | ae3cd299919af6eb670d5af0bc9d7ba14086bd8e (patch) | |
tree | c7d1875cd935ab39b4ad62a2c819838bf013f8b6 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 29cda393bcaad160c4bf3676ddd99855adafc72f (diff) | |
download | linux-ae3cd299919af6eb670d5af0bc9d7ba14086bd8e.tar.xz |
bcache: fix use-after-free in register_bcache()
The patch "bcache: rework error unwinding in register_bcache" introduces
a use-after-free regression in register_bcache(). Here are current code,
2510 out_free_path:
2511 kfree(path);
2512 out_module_put:
2513 module_put(THIS_MODULE);
2514 out:
2515 pr_info("error %s: %s", path, err);
2516 return ret;
If some error happens and the above code path is executed, at line 2511
path is released, but referenced at line 2515. Then KASAN reports a use-
after-free error message.
This patch changes line 2515 in the following way to fix the problem,
2515 pr_info("error %s: %s", path?path:"", err);
Signed-off-by: Coly Li <colyli@suse.de>
Cc: Christoph Hellwig <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