OSDN Git Service

gve: Add NULL pointer checks when freeing irqs.
authorDavid Awogbemila <awogbemila@google.com>
Mon, 17 May 2021 21:08:13 +0000 (14:08 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 May 2021 22:38:40 +0000 (15:38 -0700)
commit5218e919c8d06279884aa0baf76778a6817d5b93
tree0dafc60fe20fd26cceb19f60731471462aae9114
parente96b491a0ffa35a8a9607c193fa4d894ca9fb32f
gve: Add NULL pointer checks when freeing irqs.

When freeing notification blocks, we index priv->msix_vectors.
If we failed to allocate priv->msix_vectors (see abort_with_msix_vectors)
this could lead to a NULL pointer dereference if the driver is unloaded.

Fixes: 893ce44df565 ("gve: Add basic driver framework for Compute Engine Virtual NIC")
Signed-off-by: David Awogbemila <awogbemila@google.com>
Acked-by: Willem de Brujin <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/google/gve/gve_main.c