If socket create call races with module unload, it correctly
fails the socket call but doesn't return an error. This race
is theoritical because the sock->ops are always the same and
non-modular.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>


--- tcp-2.6.orig/net/socket.c
+++ tcp-2.6/net/socket.c
@@ -1204,6 +1204,7 @@ static int __sock_create(int family, int
         * socket at sock_release time we decrement its refcnt.
         */
        if (!try_module_get(sock->ops->owner)) {
+               err = -EAGAIN;
                sock->ops = NULL;
                goto out_module_put;
        }

--

-
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

Reply via email to