X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fsched%2Fematch.c;h=f3a104e323bddd50c299c74c928a95038f1f5af5;hb=6140efb536e7758cd300461981634ebfd4f51efa;hp=63146d339d814e09a19cd26ba6909e3c9c9e8b6b;hpb=a205752d1ad2d37d6597aaae5a56fc396a770868;p=linux-2.6 diff --git a/net/sched/ematch.c b/net/sched/ematch.c index 63146d339d..f3a104e323 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c @@ -84,9 +84,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -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; }