lkml.org 
[lkml]   [2009]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2009-11-09 01:15    [W:0.111 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site