]> git.baikalelectronics.ru Git - kernel.git/commit
bcache: memset on stack variables in bch_btree_check() and bch_sectors_dirty_init()
authorColy Li <colyli@suse.de>
Fri, 27 May 2022 15:28:16 +0000 (23:28 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 27 May 2022 15:49:48 +0000 (09:49 -0600)
commitd15f7e51e3bbcf24195e4a1ebc99965d03eed2e6
tree1916bed2cf5994d69a0042b71b78bca492bc22f1
parent5f4e67bf47bfb7d7556622b32a5656861f41e155
bcache: memset on stack variables in bch_btree_check() and bch_sectors_dirty_init()

The local variables check_state (in bch_btree_check()) and state (in
bch_sectors_dirty_init()) should be fully filled by 0, because before
allocating them on stack, they were dynamically allocated by kzalloc().

Signed-off-by: Coly Li <colyli@suse.de>
Link: https://lore.kernel.org/r/20220527152818.27545-2-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/btree.c
drivers/md/bcache/writeback.c