Commit d52c499b authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Jens Axboe

lightnvm: pblk: fix use-after-free bug

Remove one of the calls to function bio_put(), so *bio* is only
freed once.

Notice that bio is being dereferenced in bio_put(), hence leading to
a use-after-free bug once *bio* has already been freed.

Addresses-Coverity-ID: 1475952 ("Use after free")
Fixes: 55d8ec35 ("lightnvm: pblk: support packed metadata")
Signed-off-by: default avatarGustavo A. R. Silva <>
Signed-off-by: default avatarJens Axboe <>
parent 93f87a74
......@@ -418,7 +418,6 @@ static int pblk_recov_scan_oob(struct pblk *pblk, struct pblk_line *line,
if (ret) {
pblk_err(pblk, "I/O submission failed: %d\n", ret);
return ret;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment