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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <516F4A28.2050806@gmail.com>
Date:	Thu, 18 Apr 2013 09:19:36 +0800
From:	Chen Gang F T <chen.gang.flying.transformer@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Chen Gang <gang.chen@...anux.com>, Eric Paris <eparis@...hat.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] kernel: audit_tree: resource management: need put_tree
 and goto Err when failure occures

On 2013年04月18日 04:07, Andrew Morton wrote:
> On Wed, 17 Apr 2013 12:04:02 +0800 Chen Gang <gang.chen@...anux.com> wrote:
> 
>> >   since "normally audit_add_tree_rule() will free it on failure",
>> >   need free it completely, when failure occures.
>> > 
>> >     need additional put_tree before return, since get_tree was called.
>> >     always need goto error processing area for list_del_init.
> Isn't that get_tree() in audit_add_tree_rule() simply unneeded?  In
> other words, is this patch correct:
> 

  excuse me:
    I am not quite familiar with it, and also have to do another things.
    so I have to spend additional time resource to make sure about it.

  is it ok ?
    I should make sure about it within this week (2013-04-21)
    I should finish related test (if need), within next week (2013-4-28)

  if have additional suggestions or completions, please reply.
    (if no reply, I will follow the time point above)

  thanks.

gchen.


> --- a/kernel/audit_tree.c~a
> +++ a/kernel/audit_tree.c
> @@ -682,7 +682,6 @@ int audit_add_tree_rule(struct audit_kru
>  		goto Err;
>  	}
>  
> -	get_tree(tree);
>  	err = iterate_mounts(tag_mount, tree, mnt);
>  	drop_collected_mounts(mnt);
>  
> @@ -703,7 +702,6 @@ int audit_add_tree_rule(struct audit_kru
>  		return -ENOENT;
>  	}
>  	rule->tree = tree;
> -	put_tree(tree);
>  
>  	return 0;
>  Err:
> _
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


-- 
Chen Gang

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ