mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 18:55:12 +00:00
ematch: Fix auto-loading of ematch modules.
[ Upstream commit34eea79e26
] 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 commit9405be7326
) Signed-off-by: Willy Tarreau <w@1wt.eu>
This commit is contained in:
parent
221956a27c
commit
20914ec48a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user