]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sched/ematch.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[linux-2.6-omap-h63xx.git] / net / sched / ematch.c
index 63146d339d814e09a19cd26ba6909e3c9c9e8b6b..f3a104e323bddd50c299c74c928a95038f1f5af5 100644 (file)
@@ -84,9 +84,7 @@
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
-#include <linux/mm.h>
 #include <linux/errno.h>
-#include <linux/interrupt.h>
 #include <linux/rtnetlink.h>
 #include <linux/skbuff.h>
 #include <net/pkt_cls.h>
@@ -224,6 +222,19 @@ static int tcf_em_validate(struct tcf_proto *tp,
 
                if (em->ops == NULL) {
                        err = -ENOENT;
+#ifdef CONFIG_KMOD
+                       __rtnl_unlock();
+                       request_module("ematch-kind-%u", em_hdr->kind);
+                       rtnl_lock();
+                       em->ops = tcf_em_lookup(em_hdr->kind);
+                       if (em->ops) {
+                               /* We dropped the RTNL mutex in order to
+                                * perform the module load. Tell the caller
+                                * to replay the request. */
+                               module_put(em->ops->owner);
+                               err = -EAGAIN;
+                       }
+#endif
                        goto errout;
                }