Thread (175 messages) 175 messages, 3 authors, 2012-11-26

[ 115/171] libceph: fix NULL dereference in reset_connection()

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2012-11-22 18:42:24
Also in: lkml

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Dan Carpenter <redacted>

(cherry picked from commit 26ce171915f348abd1f41da1ed139d93750d987f)

We dereference "con->in_msg" on the line after it was set to NULL.

Signed-off-by: Dan Carpenter <redacted>
Reviewed-by: Alex Elder <redacted>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ceph/messenger.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -440,7 +440,7 @@ static void reset_connection(struct ceph
 		con->in_msg->con = NULL;
 		ceph_msg_put(con->in_msg);
 		con->in_msg = NULL;
-		ceph_con_put(con->in_msg->con);
+		ceph_con_put(con);
 	}
 
 	con->connect_seq = 0;

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help