Messages in this thread | | | Date | Sun, 8 Nov 2009 19:10:03 -0500 | From | Neil Horman <> | Subject | Re: [PATCH 0/3] extend get/setrlimit to support setting rlimits external to a process (v7) |
| |
On Sun, Nov 08, 2009 at 11:36:29AM +0100, Ingo Molnar wrote: > > * Jiri Slaby <jirislaby@gmail.com> 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
| |