diff options
author | Patrick McHardy <kaber@trash.net> | 2007-07-11 19:46:26 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-07-11 19:46:26 -0700 |
commit | db3d99c090e0cdb34b1274767e062bfddbb384bc (patch) | |
tree | 9130391307ac77b7f458db5d3994309df6c9877b /net/sched/ematch.c | |
parent | 662ad4f8efd3ba2ed710d36003f968b500e6f123 (diff) | |
download | op-kernel-dev-db3d99c090e0cdb34b1274767e062bfddbb384bc.zip op-kernel-dev-db3d99c090e0cdb34b1274767e062bfddbb384bc.tar.gz |
[NET_SCHED]: ematch: module autoloading
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/ematch.c')
-rw-r--r-- | net/sched/ematch.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/sched/ematch.c b/net/sched/ematch.c index 2483739..f3a104e 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c @@ -222,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; } |