]> git.baikalelectronics.ru Git - 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)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 2 May 2022 14:10:33 +0000 (11:10 -0300)
commit61d9f48de4b8425cf5ca703cdc8ea21805c853a1
tree2d6d661faa453a694ed316e7a957ce10504fa3b2
parentaae1c2ee6452de2284931b5b8a54048d79540f5e
RDMA/irdma: Fix possible crash due to NULL netdev in notifier

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: c38cfa119734 ("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>
drivers/infiniband/hw/irdma/utils.c