Skip to content

Commit 34eea79

Browse files
iazzdavem330
authored andcommitted
ematch: Fix auto-loading of ematch modules.
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 <[email protected]> Acked-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 54da5a8 commit 34eea79

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/sched/ematch.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ static int tcf_em_validate(struct tcf_proto *tp,
228228
* to replay the request.
229229
*/
230230
module_put(em->ops->owner);
231+
em->ops = NULL;
231232
err = -EAGAIN;
232233
}
233234
#endif

0 commit comments

Comments
 (0)