lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <201306240921544358210@gmail.com>
Date:	Mon, 24 Jun 2013 09:22:19 +0800
From:	majianpeng <majianpeng@...il.com>
To:	"Sage Weil" <sage@...tank.com>, davem <davem@...emloft.net>
Cc:	ceph-devel <ceph-devel@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	davem <davem@...emloft.net>
Subject: [PATCH] libceph: Call con->ops->put(con) if cancel_delayed_work(&con->work) worked.

Because in func queue_con_delay, it will call con->ops->get(con).
So if we cancel the work successfully,we must call con->ops->put(con).
Otherwise some resource can't free like 'struct ceph_mds_session'.

Signed-off-by: Jianpeng Ma <majianpeng@...il.com>
---
 net/ceph/messenger.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index eb0a46a..8207b37 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -661,7 +661,8 @@ void ceph_con_close(struct ceph_connection *con)
 
 	reset_connection(con);
 	con->peer_global_seq = 0;
-	cancel_delayed_work(&con->work);
+	if (cancel_delayed_work(&con->work))
+		con->ops->put(con);
 	con_close_socket(con);
 	mutex_unlock(&con->mutex);
 }
-- 
1.8.1.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ