]> git.ipfire.org Git - people/arne_f/kernel.git/commit
qede: Fix memset corruption
authorShai Malin <smalin@marvell.com>
Tue, 24 Aug 2021 16:52:49 +0000 (19:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Sep 2021 06:49:00 +0000 (08:49 +0200)
commit0e74bba60452150016864095b4896cd6d6cd2af9
tree087f55b314e0bdf4a635633e6a4ee1401011a022
parent35f223cb21b1cb75175e736cb5b1b2615ae6d342
qede: Fix memset corruption

[ Upstream commit e543468869e2532f5d7926e8f417782b48eca3dc ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/qede/qede_main.c