summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d95cad8)
error handler of lnet_create_reply_msg() didn't release lnet_res_lock
if lnet_msg_alloc() failed.
It can be fixed by moving validation check of msg out from lock.
Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: I5a25b7e07d24f5c4f165a3266cca6e79dffc1461
Reviewed-on: http://review.whamcloud.com/7659
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LASSERT(!getmsg->msg_target_is_router);
LASSERT(!getmsg->msg_routing);
LASSERT(!getmsg->msg_target_is_router);
LASSERT(!getmsg->msg_routing);
+ if (msg == NULL) {
+ CERROR("%s: Dropping REPLY from %s: can't allocate msg\n",
+ libcfs_nid2str(ni->ni_nid), libcfs_id2str(peer_id));
+ goto drop;
+ }
+
cpt = lnet_cpt_of_cookie(getmd->md_lh.lh_cookie);
lnet_res_lock(cpt);
cpt = lnet_cpt_of_cookie(getmd->md_lh.lh_cookie);
lnet_res_lock(cpt);
- LASSERT (getmd->md_refcount > 0);
-
- if (msg == NULL) {
- CERROR ("%s: Dropping REPLY from %s: can't allocate msg\n",
- libcfs_nid2str(ni->ni_nid), libcfs_id2str(peer_id));
- goto drop;
- }
+ LASSERT(getmd->md_refcount > 0);
if (getmd->md_threshold == 0) {
CERROR ("%s: Dropping REPLY from %s for inactive MD %p\n",
if (getmd->md_threshold == 0) {
CERROR ("%s: Dropping REPLY from %s for inactive MD %p\n",