android_kernel_xiaomi_sm8350/drivers/infiniband/ulp/ipoib
Roland Dreier 6ef190cc92 IPoIB: Fix crash when path record fails after path flush
Commit ee1e2c82 ("IPoIB: Refresh paths instead of flushing them on SM
change events") changed how paths are flushed on an SM event.  This
change introduces a problem if the path record query triggered by
fails, causing path->ah to become NULL.  A later successful path query
will then trigger WARN_ON() in path_rec_completion(), and crash
because path->ah has already been freed, so the ipoib_put_ah() inside
the lock in path_rec_completion() may actually drop the last reference
(contrary to the comment that claims this is safe).

Fix this by updating path->ah and freeing old_ah only when the path
record query is successful.  This prevents the neighbour AH and that
path AH from getting out of sync.

This fixes <https://bugs.openfabrics.org/show_bug.cgi?id=1194>

Reported-by: Rabah Salem <ravah@mellanox.com>
Debugged-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-25 16:37:03 -07:00
..
ipoib_cm.c IPoIB/cm: Use vmalloc() to allocate rx_rings 2008-08-08 15:51:29 -07:00
ipoib_ethtool.c IPoIB: add LRO support 2008-07-14 23:48:48 -07:00
ipoib_fs.c
ipoib_ib.c IPoIB: Refresh paths instead of flushing them on SM change events 2008-07-14 23:48:49 -07:00
ipoib_main.c IPoIB: Fix crash when path record fails after path flush 2008-09-25 16:37:03 -07:00
ipoib_multicast.c IPoIB: Fix deadlock on RTNL between bcast join comp and ipoib_stop() 2008-09-16 11:57:45 -07:00
ipoib_verbs.c IPoIB: Get rid of ipoib_mcast_detach() wrapper 2008-07-14 23:48:50 -07:00
ipoib_vlan.c
ipoib.h IPoIB: Fix deadlock on RTNL between bcast join comp and ipoib_stop() 2008-09-16 11:57:45 -07:00
Kconfig IPoIB: Correct help text for INFINIBAND_IPOIB_DEBUG 2008-07-24 20:37:25 -07:00
Makefile