Re: [PATCH 0/3] extend get/setrlimit to support setting rlimitsexternal to a process (v7)

From: Neil Horman
Date: Sun Nov 08 2009 - 19:10:41 EST


On Sun, Nov 08, 2009 at 11:36:29AM +0100, Ingo Molnar wrote:
>
> * Jiri Slaby <jirislaby@xxxxxxxxx> wrote:
>
> > On 11/06/2009 10:26 AM, Ingo Molnar wrote:
> > > Jiri, i think your patches are incomplete for the same reasons i
> > > outlined to Neil.
> >
> > I'll examine that. Thanks for pointing out.
> >
> > > Also, the locking there looks messy:
> > >
> > > + /* optimization: 'current' doesn't need locking, e.g. setrlimit */
> > > + if (tsk != current) {
> > > + /* protect tsk->signal and tsk->sighand from disappearing */
> > > + read_lock(&tasklist_lock);
> > > + if (!tsk->sighand) {
> > > + retval = -ESRCH;
> > > + goto out;
> > > + }
> > > }
> > >
> > > Neil's splitup into a helper function looks _far_ cleaner.
> >
> > Then, I think, we should join our efforts.
>
> i think your commits could be enhanced to include Neil's splitup (and
> keeping your write extension for /proc/*/limits), and the new syscall
> (with a security check), hm?
>
> Without dropping your current commits - they already have testing value.
>
That seems like a reasonable approach to me. Jiri, would you like to do that or
shall I? I'm happy to but it will take me a few days (I've got a bug I need to
focus on first).

Regards
Neil

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