spidernet: skb used after netif_receive_skb
[powerpc.git] / drivers / net / pppox.c
index 3f8115d..f3e47d0 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/ppp_defs.h>
 #include <linux/if_ppp.h>
 #include <linux/ppp_channel.h>
+#include <linux/kmod.h>
 
 #include <net/sock.h>
 
@@ -114,6 +115,13 @@ static int pppox_create(struct socket *sock, int protocol)
                goto out;
 
        rc = -EPROTONOSUPPORT;
+#ifdef CONFIG_KMOD
+       if (!pppox_protos[protocol]) {
+               char buffer[32];
+               sprintf(buffer, "pppox-proto-%d", protocol);
+               request_module(buffer);
+       }
+#endif
        if (!pppox_protos[protocol] ||
            !try_module_get(pppox_protos[protocol]->owner))
                goto out;