From: Jiri Pirko <j...@mellanox.com>

Instead of using tp->q, use block to get the net pointer.

Signed-off-by: Jiri Pirko <j...@mellanox.com>
---
 net/sched/ematch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index 03b677b..1331a4c 100644
--- a/net/sched/ematch.c
+++ b/net/sched/ematch.c
@@ -178,7 +178,7 @@ static int tcf_em_validate(struct tcf_proto *tp,
        struct tcf_ematch_hdr *em_hdr = nla_data(nla);
        int data_len = nla_len(nla) - sizeof(*em_hdr);
        void *data = (void *) em_hdr + sizeof(*em_hdr);
-       struct net *net = dev_net(qdisc_dev(tp->q));
+       struct net *net = tp->chain->block->net;
 
        if (!TCF_EM_REL_VALID(em_hdr->flags))
                goto errout;
-- 
2.9.5

Reply via email to