Patchwork [3.5.yuz,extended,stable] Patch "libceph: fix NULL dereference in reset_connection()" has been added to staging queue

login
register
mail settings
Submitter Herton Ronaldo Krzesinski
Date Nov. 20, 2012, 5:16 p.m.
Message ID <1353431781-8285-1-git-send-email-herton.krzesinski@canonical.com>
Download mbox | patch
Permalink /patch/200430/
State New
Headers show

Comments

Herton Ronaldo Krzesinski - Nov. 20, 2012, 5:16 p.m.
This is a note to let you know that I have just added a patch titled

    libceph: fix NULL dereference in reset_connection()

to the linux-3.5.y-queue branch of the 3.5.yuz extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.yuz tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Herton

------

From d597e720f9a6b3937984bf4af1b43223f3f84a72 Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Tue, 19 Jun 2012 08:52:33 -0500
Subject: [PATCH 23/78] libceph: fix NULL dereference in reset_connection()

commit 26ce171915f348abd1f41da1ed139d93750d987f upstream.

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

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Alex Elder <elder@inktank.com>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
---
 net/ceph/messenger.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
1.7.9.5

Patch

diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index c52d587..0a6fdf8 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -440,7 +440,7 @@  static void reset_connection(struct ceph_connection *con)
 		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;