]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: fix out of bound ppa lun id on bb tbl
authorMatias Bjørling <m@bjorling.me>
Fri, 6 May 2016 18:03:10 +0000 (20:03 +0200)
committerJens Axboe <axboe@fb.com>
Fri, 6 May 2016 18:51:10 +0000 (12:51 -0600)
commitec42ec2227ee7031a94b4c6f5fbd08d557e9f9e0
tree997fc5890a47675065b345fd87adcab455fd451a
parentf402b3f273a9796217e4dd9a7170d53b1bde31b6
lightnvm: fix out of bound ppa lun id on bb tbl

The ppa configured for retrieving the bad block table uses the internal
lun id to setup the get bad block ppa. This increases monotonically
with the number luns available. When configuring a ppa, the channel and
lun must be specified separately, leading to an out of bound memory
access in gennvm_block_bb when lun id goes beyond the luns available
within a channel.

Additional, remove out of bound check in gennvm_block_bb(), as it was a
buggy to begin with.

Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/gennvm.c