ematch: Fix auto-loading of ematch modules.
authorIgnacy GawÄ\99dzki <ignacy.gawedzki@green-communications.fr>
Tue, 17 Feb 2015 19:15:20 +0000 (20:15 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 24 May 2015 08:10:46 +0000 (10:10 +0200)
commit20914ec48a0bdce899c7a97a8ba720110a0ee9c5
treeb91118c66e783691d2bc0e385c46d3fd8640bac2
parent221956a27cf80585f0313d9be7f55ffd8746dcc0
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Ä\99dzki <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>
net/sched/ematch.c