Re: [PATCH v2] kernel: audit_tree: resource management: needput_tree and goto Err when failure occures

From: Andrew Morton
Date: Thu May 09 2013 - 16:11:32 EST


On Thu, 09 May 2013 20:53:06 +0800 Chen Gang <gang.chen@xxxxxxxxxxx> wrote:

> get_tree() in audit_add_tree_rule() is needed (my original conclusion is incorrect).

OK..

> But we need let 'rule->tree = NULL;' firstly, so can protect rule itself freed in kill_rules().

I'll believe you ;) I turned this into a proper patch and added your
(missed) Signed-off-by:.

> For me, after 'rule->tree = NULL', all things seems fine !!

Well, what was wrong before? Is there some user-triggerable
misbehaviour which you observed? If so, please describe it.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/