diff options
author | Davide Caratti <dcaratti@redhat.com> | 2019-03-20 15:00:15 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-21 13:26:42 -0700 |
commit | fe384e2fa36ca084a456fd30558cccc75b4b3fbd (patch) | |
tree | e90582ded10560c8daf4e857a06966f212027c76 /include/net/ah.h | |
parent | 7e0c8892df7d0316ec853adbf84db536cd53258c (diff) |
net/sched: don't dereference a->goto_chain to read the chain index
callers of tcf_gact_goto_chain_index() can potentially read an old value
of the chain index, or even dereference a NULL 'goto_chain' pointer,
because 'goto_chain' and 'tcfa_action' are read in the traffic path
without caring of concurrent write in the control path. The most recent
value of chain index can be read also from a->tcfa_action (it's encoded
there together with TC_ACT_GOTO_CHAIN bits), so we don't really need to
dereference 'goto_chain': just read the chain id from the control action.
Fixes: e457d86ada27 ("net: sched: add couple of goto_chain helpers")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ah.h')
0 files changed, 0 insertions, 0 deletions