diff options
author | Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr> | 2015-02-17 14:15:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-20 15:30:56 -0500 |
commit | 34eea79e2664b314cab6a30fc582fdfa7a1bb1df (patch) | |
tree | fac30f2ab8adee79b12cdafd428df0ec6eaf984f /net/sched | |
parent | 54da5a8be3c1e924c35480eb44c6e9b275f6444e (diff) |
ematch: Fix auto-loading of ematch modules.
In tcf_em_validate(), after calling request_module() to load the
kind-specific module, set em->ops to NULL before returning -EAGAIN, so
that module_put() is not called again by tcf_em_tree_destroy().
Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
Acked-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/ematch.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sched/ematch.c b/net/sched/ematch.c index 6742200b1307..fbb7ebfc58c6 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c | |||
@@ -228,6 +228,7 @@ static int tcf_em_validate(struct tcf_proto *tp, | |||
228 | * to replay the request. | 228 | * to replay the request. |
229 | */ | 229 | */ |
230 | module_put(em->ops->owner); | 230 | module_put(em->ops->owner); |
231 | em->ops = NULL; | ||
231 | err = -EAGAIN; | 232 | err = -EAGAIN; |
232 | } | 233 | } |
233 | #endif | 234 | #endif |