[LU-15509] Ping buffer reference leaks in lnet_peer_data_present() Created: 01/Feb/22 Updated: 15/Jun/22 Resolved: 11/Jun/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.16.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Chris Horn | Assignee: | Chris Horn |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
There are some additional places where ping buffer reference will leak in lnet_peer_data_present(). These are error paths so they should be rare. static int lnet_peer_data_present(struct lnet_peer *lp)
__must_hold(&lp->lp_lock)
{
...
if (list_empty(&lp->lp_peer_list))
goto out; <<< Ref leak
...
if (nid_is_lo0(&lp->lp_primary_nid)) {
rc = lnet_peer_set_primary_nid(lp, nid, flags);
if (!rc) <<< ref leak if rc is non-zero
rc = lnet_peer_merge_data(lp, pbuf);
...
if (!lpni || lp == lpni->lpni_peer_net->lpn_peer) {
rc = lnet_peer_set_primary_nid(lp, nid, flags);
if (rc) {
CERROR("Primary NID error %s versus %s: %d\n",
libcfs_nidstr(&lp->lp_primary_nid),
libcfs_nid2str(nid), rc); <<< ref leak
} else {
rc = lnet_peer_merge_data(lp, pbuf);
}
...
|
| Comments |
| Comment by Gerrit Updater [ 02/Feb/22 ] |
|
"Chris Horn <chris.horn@hpe.com>" uploaded a new patch: https://review.whamcloud.com/46431 |
| Comment by Gerrit Updater [ 11/Jun/22 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/46431/ |
| Comment by Peter Jones [ 11/Jun/22 ] |
|
Landed for 2.16 |
| Comment by Gerrit Updater [ 13/Jun/22 ] |
|
"Olaf Faaland-LLNL <faaland1@llnl.gov>" uploaded a new patch: https://review.whamcloud.com/47613 |
| Comment by Olaf Faaland [ 13/Jun/22 ] |
|
Seems like this should be landed to 2.15 as well, at some point, so I pushed a backport. Should this issue get label "LTS15"? |
| Comment by Gerrit Updater [ 15/Jun/22 ] |
|
"Olaf Faaland-LLNL <faaland1@llnl.gov>" uploaded a new patch: https://review.whamcloud.com/47639 |