]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Nov 2021 13:58:46 +0000 (13:58 +0000)
commite430f652aed5b421386dc03d06af7149564333fb
tree8a56e2969d64c6e9a0f2e0ff768a2c6dd2ad37d4
parent9371cd9fc2872abbe9bae8b3dde3330940b94949
gve: Fix off by one in gve_tx_timeout()

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: c6ea64fb0ddc ("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>
drivers/net/ethernet/google/gve/gve_main.c