diff options
author | Ignacy GawÄdzki <ignacy.gawedzki@green-communications.fr> | 2015-02-17 20:15:20 +0100 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2015-05-24 10:10:46 +0200 |
commit | 20914ec48a0bdce899c7a97a8ba720110a0ee9c5 (patch) | |
tree | b91118c66e783691d2bc0e385c46d3fd8640bac2 | |
parent | 221956a27cf80585f0313d9be7f55ffd8746dcc0 (diff) |
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: Ben Hutchings <ben@decadent.org.uk>
(cherry picked from commit 9405be73262273a6904688fb2f1e60a13117cf1b)
Signed-off-by: Willy Tarreau <w@1wt.eu>
-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 aab59409728b..3dff06f2b6bd 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c @@ -222,6 +222,7 @@ static int tcf_em_validate(struct tcf_proto *tp, * perform the module load. Tell the caller * to replay the request. */ module_put(em->ops->owner); + em->ops = NULL; err = -EAGAIN; } #endif |