diff options
author | Ignacy GawÄdzki <ignacy.gawedzki@green-communications.fr> | 2015-02-17 20:15:20 +0100 |
---|---|---|
committer | Stefan Bader <stefan.bader@canonical.com> | 2015-05-29 11:54:16 +0200 |
commit | 1f889821ccb9887eff444a9339be67b0e40da9be (patch) | |
tree | 50287683f8bab07a3aa5298d82a6006469e3789e | |
parent | 08831c91f9aece292156ce7d43d0e7ab78710dff (diff) | |
download | linux-2.6.32.y-drm33.z-1f889821ccb9887eff444a9339be67b0e40da9be.tar.gz |
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>
Signed-off-by: Stefan Bader <stefan.bader@canonical.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 aab59409728b4c..3dff06f2b6bd82 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 |