aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fou.c
diff options
context:
space:
mode:
authorVlad Buslov <vladbu@mellanox.com>2019-03-06 17:50:43 +0200
committerDavid S. Miller <davem@davemloft.net>2019-03-08 15:17:47 -0800
commitb62989fc4ea27863e7aef00c93a10118324d3ed0 (patch)
treef058a9a037433929d7d80d1194723eb988fe9811 /net/ipv4/fou.c
parentvhost: silence an unused-variable warning (diff)
downloadlinux-dev-b62989fc4ea27863e7aef00c93a10118324d3ed0.tar.xz
linux-dev-b62989fc4ea27863e7aef00c93a10118324d3ed0.zip
net: sched: fix potential use-after-free in __tcf_chain_put()
When used with unlocked classifier that have filters attached to actions with goto chain, __tcf_chain_put() for last non action reference can race with calls to same function from action cleanup code that releases last action reference. In this case action cleanup handler could free the chain if it executes after all references to chain were released, but before all concurrent users finished using it. Modify __tcf_chain_put() to only access tcf_chain fields when holding block->lock. Remove local variables that were used to cache some tcf_chain fields and are no longer needed because their values can now be obtained directly from chain under block->lock protection. Fixes: 726d061286ce ("net: sched: prevent insertion of new classifiers during chain flush") Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fou.c')
0 files changed, 0 insertions, 0 deletions