lkml.org 
[lkml]   [2001]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] 2.4.9-ac10 but not only, locks_alloc_lock()
Date
> 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).

--
Manfred




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

\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.061 / U:6.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site