]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
gve: Fix off by one in gve_tx_timeout()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 9 Nov 2021 11:47:36 +0000 (14:47 +0300)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:37 +0000 (09:48 +0100)
commit86fac9c64d01809ceeafd11154ad2b4e461506e4
tree2531111262507d820b0919365f6265f9786060b0
parent4e1ee7b04cc4f925ef2e69be3a51b0ac7ea5322d
gve: Fix off by one in gve_tx_timeout()

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit 1c360cc1cc883fbdf0a258b4df376571fbeac5ee ]

The priv->ntfy_blocks[] has "priv->num_ntfy_blks" elements so this >
needs to be >= to prevent an off by one bug.  The priv->ntfy_blocks[]
array is allocated in gve_alloc_notify_blocks().

Fixes: 87a7f321bb6a ("gve: Recover from queue stall due to missed IRQ")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/ethernet/google/gve/gve_main.c