diff options
author | Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr> | 2015-02-17 20:15:20 +0100 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-03-14 15:37:11 -0400 |
commit | cbac74b71f36968c3b54a6c0d068defec3851b9b (patch) | |
tree | fbb20733cc3ade78659ae41b7f059e69cfdbeff3 | |
parent | e6aa677fd2f9ebc21b5b623be5a2a4088532dece (diff) | |
download | lwn-cbac74b71f36968c3b54a6c0d068defec3851b9b.tar.gz lwn-cbac74b71f36968c3b54a6c0d068defec3851b9b.zip |
ematch: Fix auto-loading of ematch modules.
[ Upstream commit 34eea79e2664b314cab6a30fc582fdfa7a1bb1df ]
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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-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, * to replay the request. */ module_put(em->ops->owner); + em->ops = NULL; err = -EAGAIN; } #endif |