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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:17:11 +0000 (19:17 +0100)
commitfea0b9507bb7e03a9414301fe8c09e44f7f70a13
tree68430d4bf6c5e603a007c0d15c30d065861e9b57
parent0bf8323e2c74012d38a61d4f9470fe7f33376bd4
gve: Fix off by one in gve_tx_timeout()

[ 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>
drivers/net/ethernet/google/gve/gve_main.c