Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbac74b7 authored by Ignacy Gawędzki's avatar Ignacy Gawędzki Committed by Sasha Levin
Browse files

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: 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 avatarSasha Levin <sasha.levin@oracle.com>
parent e6aa677f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -228,6 +228,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