Commit c8ed7ec8 authored by Ignacy Gawędzki's avatar Ignacy Gawędzki Committed by Luis Henriques

ematch: Fix auto-loading of ematch modules.

commit 34eea79e upstream.

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: default avatarIgnacy Gawędzki <ignacy.gawedzki@green-communications.fr>
Acked-by: default avatarCong Wang <cwang@twopensource.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 5c83dce4
...@@ -227,6 +227,7 @@ static int tcf_em_validate(struct tcf_proto *tp, ...@@ -227,6 +227,7 @@ static int tcf_em_validate(struct tcf_proto *tp,
* to replay the request. * to replay the request.
*/ */
module_put(em->ops->owner); module_put(em->ops->owner);
em->ops = NULL;
err = -EAGAIN; err = -EAGAIN;
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment