]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit11926b296d57e342e2014c07c0bc1738110b038e
tree6db95079aaf1583b7c72a3095e312473eecd5ea5
parentaa8af2cfecd9a6e7a2b1e7fd19d4f810bf74f751
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