lkml.org 
[lkml]   [2002]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] fcntl returns wrong error code (Updated)
At 2002/3/22 00:58+1100  Christopher Yeoh writes:
> btw Stephen Rothwell pointed out that there is a much neater way to
> achieve the same change. I'll post a new patch in the morning.

This is the updated patch.

--- linux-2.4.18/fs/fcntl.c~ Fri Mar 22 11:54:35 2002
+++ linux-2.4.18/fs/fcntl.c Fri Mar 22 12:31:18 2002
@@ -66,6 +66,10 @@

write_lock(&files->file_lock);

+ error = -EINVAL;
+ if (orig_start >= current->rlim[RLIMIT_NOFILE].rlim_cur)
+ goto out;
+
repeat:
/*
* Someone might have closed fd's in the range
-
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:25    [from the cache]
©2003-2011 Jasper Spaans