+ ocfs2-free-dummy_sc-in-sc_fop_release-in-case-of-memory-leak.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: ocfs2: free 'dummy_sc' in sc_fop_release() to prevent memory leak
has been added to the -mm tree.  Its filename is
     ocfs2-free-dummy_sc-in-sc_fop_release-in-case-of-memory-leak.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/ocfs2-free-dummy_sc-in-sc_fop_release-in-case-of-memory-leak.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/ocfs2-free-dummy_sc-in-sc_fop_release-in-case-of-memory-leak.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: piaojun <piaojun@xxxxxxxxxx>
Subject: ocfs2: free 'dummy_sc' in sc_fop_release() to prevent memory leak

'sd->dbg_sock' is malloced in sc_common_open(), but not freed at the end
of sc_fop_release().

Link: http://lkml.kernel.org/r/594FB0A4.2050105@xxxxxxxxxx
Signed-off-by: Jun Piao <piaojun@xxxxxxxxxx>
Reviewed-by: Joseph Qi <jiangqi903@xxxxxxxxx>
Cc: Mark Fasheh <mfasheh@xxxxxxxxxxx>
Cc: Joel Becker <jlbec@xxxxxxxxxxxx>
Cc: Junxiao Bi <junxiao.bi@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/ocfs2/cluster/netdebug.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN fs/ocfs2/cluster/netdebug.c~ocfs2-free-dummy_sc-in-sc_fop_release-in-case-of-memory-leak fs/ocfs2/cluster/netdebug.c
--- a/fs/ocfs2/cluster/netdebug.c~ocfs2-free-dummy_sc-in-sc_fop_release-in-case-of-memory-leak
+++ a/fs/ocfs2/cluster/netdebug.c
@@ -426,6 +426,7 @@ static int sc_fop_release(struct inode *
 	struct o2net_sock_container *dummy_sc = sd->dbg_sock;
 
 	o2net_debug_del_sc(dummy_sc);
+	kfree(dummy_sc);
 	return seq_release_private(inode, file);
 }
 
_

Patches currently in -mm which might be from piaojun@xxxxxxxxxx are

ocfs2-free-dummy_sc-in-sc_fop_release-in-case-of-memory-leak.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux