From: Stephen Hemminger <[EMAIL PROTECTED]> Date: Thu, 1 Dec 2005 10:51:55 -0800
> Detail of issue is old: > > http://oss.sgi.com/archives/netdev/2004-11/msg00573.html > > Once accept fails on EMFILE/ENFILE you cannot get the socket even if you free > up > fd's and retry... I want to apply something like what is in that netdev posting. It does make accept() more robust, but there is still a hole. BTW, the other user of sock_map_fd() outside of net/socket.c, SCTP's peeloff getsockopt() handling, has the same bug so we should fix it there too. If we take an -EFAULT at the end of sys_accept(), we'll lose the socket in that case as well, even with the above mentioned fix. But we have to fully complete the ->accept() call before doing the write back to userspace. That case would be really tough to fix. I guess one way would be to have some kind of ->accept_putback() call, but that's really cross for some corner case like this. Any better ideas? - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html