aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/ematch.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-07-11 22:46:26 -0400
committerDavid S. Miller <davem@davemloft.net>2007-07-11 22:46:26 -0400
commitdb3d99c090e0cdb34b1274767e062bfddbb384bc (patch)
tree9130391307ac77b7f458db5d3994309df6c9877b /net/sched/ematch.c
parent662ad4f8efd3ba2ed710d36003f968b500e6f123 (diff)
[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.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index 24837391640d..f3a104e323bd 100644
--- a/net/sched/ematch.c
+++ b/net/sched/ematch.c
@@ -222,6 +222,19 @@ static int tcf_em_validate(struct tcf_proto *tp,
222 222
223 if (em->ops == NULL) { 223 if (em->ops == NULL) {
224 err = -ENOENT; 224 err = -ENOENT;
225#ifdef CONFIG_KMOD
226 __rtnl_unlock();
227 request_module("ematch-kind-%u", em_hdr->kind);
228 rtnl_lock();
229 em->ops = tcf_em_lookup(em_hdr->kind);
230 if (em->ops) {
231 /* We dropped the RTNL mutex in order to
232 * perform the module load. Tell the caller
233 * to replay the request. */
234 module_put(em->ops->owner);
235 err = -EAGAIN;
236 }
237#endif
225 goto errout; 238 goto errout;
226 } 239 }
227 240