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]
Date:	Tue, 4 Jan 2011 15:57:22 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	tip-bot for Mike Galbraith <efault@....de>
Cc:	linux-tip-commits@...r.kernel.org, linux-kernel@...r.kernel.org,
	hpa@...or.com, mingo@...hat.com, a.p.zijlstra@...llo.nl,
	tglx@...utronix.de, mingo@...e.hu
Subject: Re: [tip:sched/core] sched, autogroup: Fix reference leak

On 01/04, tip-bot for Mike Galbraith wrote:
>
> The cgroup exit mess also uncovered a struct autogroup reference leak.
> copy_process() was simply freeing vs putting the signal_struct,
> stranding a reference.
>
> Signed-off-by: Mike Galbraith <efault@....de>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: Oleg Nesterov <oleg@...hat.com>
> LKML-Reference: <1293784350.6839.2.camel@...ge.simson.net>
> Signed-off-by: Ingo Molnar <mingo@...e.hu>
> ---
>  kernel/fork.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/fork.c b/kernel/fork.c
> index b6f2475..0672444 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -1317,7 +1317,7 @@ bad_fork_cleanup_mm:
>  	}
>  bad_fork_cleanup_signal:
>  	if (!(clone_flags & CLONE_THREAD))
> -		free_signal_struct(p->signal);
> +		put_signal_struct(p->signal);

Well, free_signal_struct() was correct. Without CLONE_THREAD
sig->sigcnt must be equal to 1.

But yes, autogroup puts sched_autogroup_exit() into put_signal_struct(),
so this patch looks fine.

Although I must admit, to me it would be more clean to simply move
sched_autogroup_exit() from put_signal_struct() into free_signal_struct()
instead.

Oleg.	

--
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