* accept should return ENFILE if it runs out of inodes
@ 2004-10-21 0:41 Andrea Arcangeli
2004-10-25 23:36 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Andrea Arcangeli @ 2004-10-21 0:41 UTC (permalink / raw)
To: Andrew Morton, Marcelo Tosatti; +Cc: linux-kernel
EMFILE is only for the per-process fds limit, all other cases where
sock_alloc fails already returns -ENFILE too, must have been a typo.
patch for 2.4:
--- 2.4.23aa3/net/socket.c.~1~ 2004-07-04 02:09:33.000000000 +0200
+++ 2.4.23aa3/net/socket.c 2004-10-21 02:36:45.704715960 +0200
@@ -1068,7 +1068,7 @@ asmlinkage long sys_accept(int fd, struc
if (!sock)
goto out;
- err = -EMFILE;
+ err = -ENFILE;
if (!(newsock = sock_alloc()))
goto out_put;
patch for 2.6:
Index: linux-2.5/net/socket.c
===================================================================
RCS file: /home/andrea/crypto/cvs/linux-2.5/net/socket.c,v
retrieving revision 1.90
diff -u -p -r1.90 socket.c
--- linux-2.5/net/socket.c 8 Aug 2004 02:05:19 -0000 1.90
+++ linux-2.5/net/socket.c 21 Oct 2004 00:37:12 -0000
@@ -1354,7 +1354,7 @@ asmlinkage long sys_accept(int fd, struc
if (!sock)
goto out;
- err = -EMFILE;
+ err = -ENFILE;
if (!(newsock = sock_alloc()))
goto out_put;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-26 1:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-21 0:41 accept should return ENFILE if it runs out of inodes Andrea Arcangeli
2004-10-25 23:36 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®