Re: [tip:sched/core] sched, autogroup: Fix reference leak

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

 



On Tue, 2011-01-04 at 15:57 +0100, Oleg Nesterov wrote:

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

Yeah, it was only about the autogroup reference leak.

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

OK, I'll send a move it patchlet.

	-Mike

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


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux