diff options
author | Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr> | 2015-02-17 20:15:20 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-18 13:22:27 +0100 |
commit | cae79d75dd639bca743b91d5532a09d90bc3492d (patch) | |
tree | 159e302e4ad4d2021294db4f18e662917b2627d0 /net | |
parent | 65d6368f21038a4315d508923501283c5e0681a9 (diff) | |
download | linux-stable-cae79d75dd639bca743b91d5532a09d90bc3492d.tar.gz linux-stable-cae79d75dd639bca743b91d5532a09d90bc3492d.tar.bz2 linux-stable-cae79d75dd639bca743b91d5532a09d90bc3492d.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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-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 3a633debb6df..a2abc449ce8f 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c @@ -227,6 +227,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 |