]> git.baikalelectronics.ru Git - kernel.git/commit
zram: set physical queue limits to avoid array out of bounds accesses
authorJohannes Thumshirn <jthumshirn@suse.de>
Mon, 6 Mar 2017 10:23:35 +0000 (11:23 +0100)
committerJens Axboe <axboe@fb.com>
Wed, 8 Mar 2017 16:56:12 +0000 (09:56 -0700)
commitecb78bc19587eb042096b7ac35a0e0306e329b3d
tree8292ccdcd3838b732b0f1eea955508d48209f07e
parent694a86023121a4cb6a98318d5e609c700bc12933
zram: set physical queue limits to avoid array out of bounds accesses

zram can handle at most SECTORS_PER_PAGE sectors in a bio's bvec. When using
the NVMe over Fabrics loopback target which potentially sends a huge bulk of
pages attached to the bio's bvec this results in a kernel panic because of
array out of bounds accesses in zram_decompress_page().

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/zram/zram_drv.c