Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
ematch: Fix auto-loading of ematch modules.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
iazz authored and davem330 committed Feb 20, 2015
1 parent 54da5a8 commit 34eea79
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/sched/ematch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 34eea79

Please sign in to comment.