Skip to contentSkip to conversation

+ fs-ocfs2-cluster-tcpc-free-sc-sc_page-in-sc_kref_release.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Jun 18, 2013 OCFS2

lore
Share & tools
lore
#0 lore raw

Subject: + fs-ocfs2-cluster-tcpc-free-sc-sc_page-in-sc_kref_release.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 18 Jun 2013 13:41:57 -0700

The patch titled

     Subject: fs/ocfs2/cluster/tcp.c: free sc->sc_page in sc_kref_release()

has been added to the -mm tree. Its filename is
fs-ocfs2-cluster-tcpc-free-sc-sc_page-in-sc_kref_release.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Younger Liu <[email protected]>
Subject: fs/ocfs2/cluster/tcp.c: free sc->sc_page in sc_kref_release()

There is a memory leak in sc_kref_release(). When free struct o2net_sock_container (sc), we should release sc->sc_page.

---

 fs/ocfs2/cluster/tcp.c |    3 +++
 1 file changed, 3 insertions(+)
fs/ocfs2/cluster/tcp.c renamed from fs/ocfs2/cluster/tcp.c~fs-ocfs2-cluster-tcpc-free-sc-sc_page-in-sc_kref_release +3 -0
diff -puN fs/ocfs2/cluster/tcp.c~fs-ocfs2-cluster-tcpc-free-sc-sc_page-in-sc_kref_release fs/ocfs2/cluster/tcp.c
@@ -406,6 +406,9 @@ static void sc_kref_release(struct kref
 	sc->sc_node = NULL;
 
 	o2net_debug_del_sc(sc);
+
+	if (sc->sc_page)
+		__free_page(sc->sc_page);
 	kfree(sc);
 }
 

_

Patches currently in -mm which might be from [email protected] are

fs-ocfs2-cluster-tcpc-free-sc-sc_page-in-sc_kref_release.patch