Re: [RFC] sys_setrlimit() in 2.6.16




* Andrew Morton <akpm@xxxxxxxx> wrote:

This has to be considered a bug. The spec certainly implies that a
limit of zero should be honoured and, probably more importantly,
that's how it works in 2.4.

Problem is, the code in there all assumes that an it_prof_expires of
zero means "it was never set", and changing that (add a yes-it-has
flag?) would be less than trivial.

So I think the path of least resistance here is to just convert the
caller's zero seconds into one second. That in fact gives the same
behaviour as 2.4: you get whacked after one second or more CPU time.

(This is not a final patch - that revolting expression in
sys_setrlimit() needs help first).

your approach looks good to me. It doesnt make much sense anyway to have
a task whacked right after startup ... so adding a common-sense "the
user must have meant some really small value" thing doesnt look all that
wrong.

Acked-by: Ingo Molnar <mingo@xxxxxxx>

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



Relevant Pages

  • Re: Allow Zero Length in ADO with VB6
    ... I set the Allow Zero Length to True, but it still doesnt show up in my ... Are you confusing zero-length strings with null ("required" ... Please reply to the newsgroup. ...
    (microsoft.public.data.ado)
  • Re: XP Installation problem (Data error cyclic redundancy check)
    ... Your version of winxp doesnt have big lba enabled ... installing xp on it now so there u go... ... manufacturer's web site and get their zero write utility. ... An error has been encounered that prevents setup from continuing. ...
    (microsoft.public.windowsxp.general)
  • Re: I cant do change string to int.
    ... emre esirik(hacettepe computer science and engineering) ... only do if part which if z==0 but why it doesnt do 'else' part???? ... Because 'z' is always zero. ... code changes it, so the if part of the if/else statement is always ...
    (comp.lang.c)
  • Allow Zero Length in ADO with VB6
    ... is a great help when applying autoincrement, ... I set the Allow Zero Length to True, but it still doesnt show up in my ...
    (microsoft.public.data.ado)
  • Re: TomTom pub address!
    ... > Now what do i do, i have tried putting in zero but then says select ... > it doesnt appear to let me type in the white swan?, ... try the royal mail web site, it might have the number AND name for the ... Prev by Date: ...
    (uk.rec.cars.misc)