]> 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)
commit6691f762d0fb58d8e90fb470db7ad10a589c0884
tree6db95079aaf1583b7c72a3095e312473eecd5ea5
parent406dd7fe20f05cae7acce05af917f493591d6ae7
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