]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
RDMA/irdma: Fix possible crash due to NULL netdev in notifier
authorMustafa Ismail <mustafa.ismail@intel.com>
Mon, 25 Apr 2022 18:17:03 +0000 (13:17 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 22 Jun 2022 12:23:17 +0000 (14:23 +0200)
commitac2965d5d8c9d48232412e042a47e5a42e9e86a0
tree0cab85e9441990c906769e025145136ac556cc8c
parentb34f29cd64c74a479d69feca5ce9f0bd2bcce5f3
RDMA/irdma: Fix possible crash due to NULL netdev in notifier

BugLink: https://bugs.launchpad.net/bugs/1978240
commit 1c9043ae0667a43bd87beeebbdd4bed674713629 upstream.

For some net events in irdma_net_event notifier, the netdev can be NULL
which will cause a crash in rdma_vlan_dev_real_dev.  Fix this by moving
all processing to the NETEVENT_NEIGH_UPDATE case where the netdev is
guaranteed to not be NULL.

Fixes: 6702bc147448 ("RDMA/irdma: Fix netdev notifications for vlan's")
Link: https://lore.kernel.org/r/20220425181703.1634-4-shiraz.saleem@intel.com
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/infiniband/hw/irdma/utils.c