net/bnxt: fix initialization of filter struct
PATCH 1/1 net/bnxt: fix initialization of filter struct
Initialize filter structure to all zeroes on allocation.
Fixes 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")
Signed-off-by Lance Richardson <[email protected]>
Reviewed-by Ajit Kumar Khaparde <[email protected]>
--- drivers/net/bnxt/bnxt_filter.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/bnxt/bnxt_filter.c +1 -0
@@ -188,6 +188,7 @@ struct bnxt_filter_info *bnxt_get_unused_filter(struct bnxt *bp)return NULL ; }STAILQ_REMOVE_HEAD (&bp->free_filter_list, next); +memset (filter,0 ,sizeof (*filter));return filter; }
Signature · 1 line
2.25.1
Quoted 24 lines · Lance Richardson
Initialize filter structure to all zeroes on allocation.
Fixes 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")Signed-off-by Lance Richardson <[email protected]>Reviewed-by Ajit Kumar Khaparde <[email protected]>--- drivers/net/bnxt/bnxt_filter.c | 1 + 1 file changed, 1 insertion(+)drivers/net/bnxt/bnxt_filter.c +1
-1@@ -188,6 +188,7 @@ struct bnxt_filter_info *bnxt_get_unused_filter(struct bnxt *bp)return NULL ; }STAILQ_REMOVE_HEAD (&bp->free_filter_list, next); +memset (filter,0 ,sizeof (*filter));return filter; } --
Quoted 2 lines
2.25.1
Self-NAK, will send a v2 shortly.
Quoted 24 lines · Lance Richardson
Quoted 21 lines · Lance Richardson
Initialize filter structure to all zeroes on allocation.
Fixes 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")Signed-off-by Lance Richardson <[email protected]>Reviewed-by Ajit Kumar Khaparde <[email protected]>--- drivers/net/bnxt/bnxt_filter.c | 1 + 1 file changed, 1 insertion(+)drivers/net/bnxt/bnxt_filter.c +1
-0@@ -188,6 +188,7 @@ struct bnxt_filter_info *bnxt_get_unused_filter(struct bnxt *bp)return NULL ; }STAILQ_REMOVE_HEAD (&bp->free_filter_list, next); +memset (filter,0 ,sizeof (*filter));
Quoted 6 lines
Quoted 5 lines
drivers/net/bnxt/bnxt_filter.c +0
-1return filter; } --2.25.1
Self-NAK, will send a v2 shortly.
Let's drop this patch, this is already fixed in upstream via commit 7105de7085b0 ("net/bnxt: reset filter indices on free"), but that commit should be applied to -stable branches.