Re: [PATCH] fcntl returns wrong error code (Updated)

From: Christopher Yeoh (cyeoh@samba.org)
Date: Thu Mar 21 2002 - 21:56:33 EST


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/



This archive was generated by hypermail 2b29 : Sat Mar 23 2002 - 22:00:26 EST