]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: protect target type list with correct locks
authorRakesh Pandit <rakesh@tuxera.com>
Fri, 13 Oct 2017 12:45:52 +0000 (14:45 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 Oct 2017 14:34:57 +0000 (08:34 -0600)
commit9ac04c17edf3372bf1343bb7fed53b0455ee6e32
tree21493fab751ba4bbe1c06571f3948cc8358ec04d
parent1d172695d98fe1400d61f60f224ac38b7a4f3cd4
lightnvm: protect target type list with correct locks

nvm_tgt_types list was protected by wrong lock for NVM_INFO ioctl call
and can race with addition or removal of target types.  Also
unregistering target type was not protected correctly.

Fixes: 9e03d6575 ("lightnvm: remove nested lock conflict with mm")
Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Reviewed-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/core.c