summaryrefslogtreecommitdiff
path: root/net/mpls/mpls_iptunnel.c
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2020-03-18 20:42:29 +0300
committerDavid S. Miller <davem@davemloft.net>2020-03-19 02:52:04 +0300
commit2c4b58dc75dd291c9ce6100bcb892322cd004614 (patch)
tree96af4c6d52d0f937a7ba909fd7f8f8df7d9bde0d /net/mpls/mpls_iptunnel.c
parentdd13f4dfc02d46a46e79bced579c8ccf78c9cc9b (diff)
downloadlinux-2c4b58dc75dd291c9ce6100bcb892322cd004614.tar.xz
net: sched: Fix hw_stats_type setting in pedit loop
In the commit referenced below, hw_stats_type of an entry is set for every entry that corresponds to a pedit action. However, the assignment is only done after the entry pointer is bumped, and therefore could overwrite memory outside of the entries array. The reason for this positioning may have been that the current entry's hw_stats_type is already set above, before the action-type dispatch. However, if there are no more actions, the assignment is wrong. And if there are, the next round of the for_each_action loop will make the assignment before the action-type dispatch anyway. Therefore fix this issue by simply reordering the two lines. Fixes: 74522e7baae2 ("net: sched: set the hw_stats_type in pedit loop") Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mpls/mpls_iptunnel.c')
0 files changed, 0 insertions, 0 deletions