staging: lustre: o2iblnd: fix race at kiblnd_connect_peer
PATCH 1/1 staging: lustre: o2iblnd: fix race at kiblnd_connect_peer
From: Alexander Boyko <[email protected]>
cmid will be destroyed at OFED if kiblnd_cm_callback return error. if error happen before the end of kiblnd_connect_peer, it will touch destroyed cmid and fail as (o2iblnd_cb.c:1315:kiblnd_connect_peer())
ASSERTION( cmid->device != ((void *)0) ) failed:
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-10015
--- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +12 -6
@@ -1290,11 +1290,6 @@ static int kiblnd_resolve_addr(struct rdma_cm_id *cmid, goto failed2; } -LASSERT (cmid->device); -CDEBUG (D_NET ,"%s: connection bound to %s:%pI4h:%s\n" , -libcfs_nid2str (peer->ibp_nid), dev->ibd_ifname, - &dev->ibd_ifip, cmid->device->name); -return ; failed2:
@@ -2996,8 +2991,19 @@ static int kiblnd_resolve_addr(struct rdma_cm_id *cmid, }else { rc =rdma_resolve_route ( cmid, *kiblnd_tunables.kib_timeout *1000 ); -if (!rc) +if (!rc) { +kib_net_t *net = peer_ni->ibp_ni->ni_data; +kib_dev_t *dev = net->ibn_dev; + +CDEBUG (D_NET ,"%s: connection bound to " \ +"%s:%pI4h:%s\n" , +libcfs_nid2str (peer_ni->ibp_nid), + dev->ibd_ifname, + &dev->ibd_ifip, cmid->device->name); +return 0 ; + } +/* Can't initiate route resolution */ CERROR ("Can't resolve route for %s: %d\n" ,libcfs_nid2str (peer->ibp_nid), rc);
Signature · 1 line
1.8.3.1
Greg Kroah-Hartman
maintainerQuoted 6 lines · Doug Oucharek
From: Alexander Boyko <[email protected]>
cmid will be destroyed at OFED if
kiblnd_cm_callbackreturn error. if error happen before the end ofkiblnd_connect_peer, it will touch destroyed cmid and fail as (o2iblnd_cb.c:1315:kiblnd_connect_peer())
Quoted 8 lines
ASSERTION( cmid->device != ((void *)0) ) failed:Signed-off-by Alexander Boyko <[email protected]>Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-10015
Reviewed-by Alexey Lyashkov <[email protected]>Reviewed-by Doug Oucharek <[email protected]>Reviewed-by John L. Hammond <[email protected]>Signed-off-by Doug Oucharek <[email protected]>
Your email address here does not match the From: line :(
Please fix up and resend...
thanks,
greg k-h
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel