Skip to content
Commit 60ae36ad authored by Josef Bacik's avatar Josef Bacik Committed by Jens Axboe
Browse files

nbd: fix use after free on module unload



list_for_each_entry() isn't super safe if we're freeing the objects
while we traverse the list.  Also don't bother taking the extra
reference, the module refcounting stuff will save us from having anybody
messing with the device while we're trying to unload.

Reported-by: default avatarMing Lei <ming.lei@redhat.com>
Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent bf290f8f
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