]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: sched: don't set tunnel for decap action
authorVlad Buslov <vladbu@mellanox.com>
Mon, 1 Apr 2019 11:16:59 +0000 (14:16 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Apr 2019 20:20:30 +0000 (13:20 -0700)
Action tunnel_key doesn't have a metadata/tunnel for release(decap) action.
Drivers do not dereference entry->tunnel pointer for that action type, so
this behavior doesn't result in a crash at the moment. However, this needs
to be corrected as a preparation for updating hardware offloads API to not
rely on rtnl lock, for which flow_action code will copy the tunnel data to
temporary buffer to prevent concurrent action overwrite from
invalidating/freeing it.

Fixes: 3a7b68617de7 ("cls_api: add translator to flow_action representation")
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c

index 99ae30c177c76783dae71bf7955f4d4d0bb3b639..9115f053883f375e6f38d73530a7b88d0b2bd96c 100644 (file)
@@ -3229,7 +3229,6 @@ int tc_setup_flow_action(struct flow_action *flow_action,
                        entry->tunnel = tcf_tunnel_info(act);
                } else if (is_tcf_tunnel_release(act)) {
                        entry->id = FLOW_ACTION_TUNNEL_DECAP;
-                       entry->tunnel = tcf_tunnel_info(act);
                } else if (is_tcf_pedit(act)) {
                        for (k = 0; k < tcf_pedit_nkeys(act); k++) {
                                switch (tcf_pedit_cmd(act, k)) {