Re: [PATCH] 2.4.9-ac10 but not only, locks_alloc_lock()

From: Francis Galiegue (fg@mandrakesoft.com)
Date: Sun Sep 09 2001 - 05:33:24 EST


On Sun, 9 Sep 2001, Manfred Spraul wrote:

>
> > Not sure about one thing, though: what error code to return for
> > locks_mandatory_area() on failure. It's invoked from some of the
> > {do,sys}_*{read,write}*() routines and nowhere else AFAICT. I set it
> > to -ENOMEM, maybe this is not the right thing to do.
>
> I'd put the file_lock structure on the stack. It's ~ 90 bytes long, not
> too large.
> Returning -ENOMEM is imho not acceptable: -ENOMEM is not listed in
> SusV2, and locks_alloc_lock() internally checks for rlimits (setting
> RLIM_NLIMITS to 0 and execing another app might have dangerous
> sideeffects).
>

Not sure about what you mean wrt RLIM_NLIMITS, anyway a new patch is
attached with follows your suggestion. Does it look correct?

-- 
Francis Galiegue, fg@mandrakesoft.com - Normand et fier de l'être
"Programming is a race between programmers, who try and make more and more
idiot-proof software, and universe, which produces more and more remarkable
idiots. Until now, universe leads the race"  -- R. Cook


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 15 2001 - 21:00:18 EST