Skip to content

Commit 140c7bc

Browse files
tititiou36kuba-moo
authored andcommitted
ionic: Initialize the 'lif->dbid_inuse' bitmap
When allocated, this bitmap is not initialized. Only the first bit is set a few lines below. Use bitmap_zalloc() to make sure that it is cleared before being used. Fixes: 6461b44 ("ionic: Add interrupts and doorbells") Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> Link: https://lore.kernel.org/r/6a478eae0b5e6c63774e1f0ddb1a3f8c38fa8ade.1640527506.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 16fa29a commit 140c7bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/pensando/ionic/ionic_lif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3135,7 +3135,7 @@ int ionic_lif_init(struct ionic_lif *lif)
31353135
return -EINVAL;
31363136
}
31373137

3138-
lif->dbid_inuse = bitmap_alloc(lif->dbid_count, GFP_KERNEL);
3138+
lif->dbid_inuse = bitmap_zalloc(lif->dbid_count, GFP_KERNEL);
31393139
if (!lif->dbid_inuse) {
31403140
dev_err(dev, "Failed alloc doorbell id bitmap, aborting\n");
31413141
return -ENOMEM;

0 commit comments

Comments
 (0)