LU-9549 lnet: prevent assert on ln_state
lnet_peer_primary_nid() is called from lnet_parse. It checks ln_state outside the net lock, causing a race condition during shutdown where the code expects the state to be running, but it's stopping or shutdown. Fixed the issue by renaming lnet_peer_primary_nid() to lnet_peer_primary_nid_locked(). This function is now called when lnet_net_lock is held in lnet_parse(). In lnet_create_reply_msg() we already have access to the msg_txpeer, so we lookup the primary_nid directly Signed-off-by:Amir Shehata <amir.shehata@intel.com> Change-Id: I0518cdbec95b38bd8690517320b601676ae259f0 Reviewed-on: https://review.whamcloud.com/27262 Tested-by: Jenkins Tested-by:
Maloo <hpdd-maloo@intel.com> Reviewed-by:
Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by:
Sonia Sharma <sonia.sharma@intel.com> Reviewed-by:
Olaf Weber <olaf.weber@hpe.com> Reviewed-by:
Oleg Drokin <oleg.drokin@intel.com>
Please register or sign in to comment