This is a note to let you know that I've just added the patch titled

    kernel/audit_tree.c: tree will leak memory when failure occurs in 
audit_trim_trees()

to the 3.9-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     
kernel-audit_tree.c-tree-will-leak-memory-when-failure-occurs-in-audit_trim_trees.patch
and it can be found in the queue-3.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 12b2f117f3bf738c1a00a6f64393f1953a740bd4 Mon Sep 17 00:00:00 2001
From: Chen Gang <[email protected]>
Date: Mon, 29 Apr 2013 15:05:19 -0700
Subject: kernel/audit_tree.c: tree will leak memory when failure occurs in 
audit_trim_trees()

From: Chen Gang <[email protected]>

commit 12b2f117f3bf738c1a00a6f64393f1953a740bd4 upstream.

audit_trim_trees() calls get_tree().  If a failure occurs we must call
put_tree().

[[email protected]: run put_tree() before mutex_lock() for small 
scalability improvement]
Signed-off-by: Chen Gang <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Eric Paris <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Jonghwan Choi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 kernel/audit_tree.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -617,9 +617,9 @@ void audit_trim_trees(void)
                }
                spin_unlock(&hash_lock);
                trim_marked(tree);
-               put_tree(tree);
                drop_collected_mounts(root_mnt);
 skip_it:
+               put_tree(tree);
                mutex_lock(&audit_filter_mutex);
        }
        list_del(&cursor);


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

queue-3.9/kernel-audit_tree.c-tree-will-leak-memory-when-failure-occurs-in-audit_trim_trees.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to