From: nathan Date: Mon, 19 Mar 2007 23:11:10 +0000 (+0000) Subject: b=11013 X-Git-Tag: v1_7_100~245 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=79e6f0e38a1c532e069246f79cc5ebe1189eb4e9;hp=18f19045904ae09104a3f9bcbe9e99f345e421b4 b=11013 This is a potential null pointer dereference. Caught by HEAD's conf_sanity test 29 --- diff --git a/lustre/ptlrpc/connection.c b/lustre/ptlrpc/connection.c index 23acbd7..7c31d4a 100644 --- a/lustre/ptlrpc/connection.c +++ b/lustre/ptlrpc/connection.c @@ -135,7 +135,7 @@ out_conn: int ptlrpc_put_connection(struct ptlrpc_connection *c) { int rc = 0; - lnet_process_id_t peer = c->c_peer; + lnet_process_id_t peer; ENTRY; if (c == NULL) { @@ -143,6 +143,8 @@ int ptlrpc_put_connection(struct ptlrpc_connection *c) RETURN(0); } + peer = c->c_peer; + CDEBUG (D_INFO, "connection=%p refcount %d to %s\n", c, atomic_read(&c->c_refcount) - 1, libcfs_nid2str(c->c_peer.nid));