bcache: memset on stack variables in bch_btree_check() and bch_sectors_dirty_init()
[platform/kernel/linux-starfive.git] / drivers / md / bcache / writeback.c
index 75b7119..d138a2d 100644 (file)
@@ -950,6 +950,7 @@ void bch_sectors_dirty_init(struct bcache_device *d)
                return;
        }
 
+       memset(&state, 0, sizeof(struct bch_dirty_init_state));
        state.c = c;
        state.d = d;
        state.total_threads = bch_btre_dirty_init_thread_nr();