qede: Fix memset corruption
authorShai Malin <smalin@marvell.com>
Tue, 24 Aug 2021 16:52:49 +0000 (19:52 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Aug 2021 10:07:55 +0000 (11:07 +0100)
commite543468869e2532f5d7926e8f417782b48eca3dc
tree6db95079aaf1583b7c72a3095e312473eecd5ea5
parent2b9fff64f03219d78044d1ab40dde8e3d42e968a
qede: Fix memset corruption

Thanks to Kees Cook who detected the problem of memset that starting
from not the first member, but sized for the whole struct.
The better change will be to remove the redundant memset and to clear
only the msix_cnt member.

Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: Shai Malin <smalin@marvell.com>
Reported-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qede/qede_main.c