accept should return ENFILE if it runs out of inodes
Subsystems (2)
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:
net/socket.c renamed from net/socket.c.~1~ +1 -1
@@ -1068,7 +1068,7 @@ asmlinkage long sys_accept(int fd, strucif (!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
net/socket.c +1 -1
@@ -1354,7 +1354,7 @@ asmlinkage long sys_accept(int fd, strucif (!sock) goto out; - err = -EMFILE ; + err = -ENFILE ;if (!(newsock =sock_alloc ())) goto out_put;
David S. Miller
maintainerQuoted 2 lines · On Thu, 21 Oct 2004 02:41:27 +0200 Andrea Arcangeli <[email protected]> wrote:
EMFILE is only for the per-process fds limit, all other cases where
sock_allocfails already returns-ENFILEtoo, must have been a typo.
Fix applied to both 2.4.x and 2.6.x, thanks Andrea.