> 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/
This archive was generated by hypermail 2b29 : Sat Sep 15 2001 - 21:00:17 EST