Skip to content
Commit f8790566 authored by tangzhenhao's avatar tangzhenhao Committed by Jens Axboe
Browse files

drivers/lightnvm: fix a null-ptr-deref bug in pblk-core.c



At line 294 in drivers/lightnvm/pblk-write.c, function pblk_gen_run_ws is
called with actual param GFP_ATOMIC. pblk_gen_run_ws call mempool_alloc
using "GFP_ATOMIC" flag, so mempool_alloc can return null. So we need to
check the return-val of mempool_alloc to avoid null-ptr-deref bug.

Signed-off-by: default avatartangzhenhao <tzh18@mails.tsinghua.edu.cn>
Reviewed-by: default avatarMatias Bjørling <mb@lightnvm.io>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent eebf34a8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment