[LU-9921] LNet peer discovery list handling Created: 25/Aug/17  Updated: 05/Aug/20  Resolved: 28/Mar/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.11.0

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: Amir Shehata (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by LU-9928 conf-sanity: test_32d IP: [<ffffffffc... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

In lnet_destroy_peer_locked() we should add an assertion that the lp_dc_pendq list is empty. Similarly for lnet_destroy_peer_ni_locked() and lpni_peer_nis, lpni_on_remote_peer_ni_list, .... The list heads added and modified by the dynamic discovery series should be audited.

In lnet_peer_discovery_complete() the list handing appears unsafe. lnet_send() and lnet_finalize() may/will modify msg_list. So list_for_each_entry_safe() must be used. Based on how other code used msg_list, it looks like we need to call list_del() or list_del_init() before calling either function. At the end of lnet_peer_discovery_complete() we should assert that pending_msgs is empty. The dynamic discovery series should be audited for similarly unsafe list handling.

List heads in the_lnet should be statically initialized.



 Comments   
Comment by Gerrit Updater [ 26/Aug/17 ]

Amir Shehata (amir.shehata@intel.com) uploaded a new patch: https://review.whamcloud.com/28723
Subject: LU-9921 lnet: resolve unsafe list access
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 9dc66d8b1bf5a26ab32bc333039ea4059a516938

Comment by Gerrit Updater [ 13/Sep/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28723/
Subject: LU-9921 lnet: resolve unsafe list access
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 62c3c8d148563781198abe11b2be213708b165cb

Comment by Joseph Gmitter (Inactive) [ 28/Mar/18 ]

Patch has landed to master for 2.11.0

Generated at Sat Feb 10 02:30:29 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.