[NETFILTER]: nf_conntrack: properly use RCU API for nf_ct_protos/nf_ct_l3protos arrays
Replace preempt_{enable,disable} based RCU by proper use of the
RCU API and add missing rcu_read_lock/rcu_read_unlock calls in
all paths not obviously only used within packet process context
(nfnetlink_conntrack).
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
642d628b2c
commit
923f4902fe
6 changed files with 44 additions and 30 deletions
|
|
@ -106,7 +106,7 @@ __nf_ct_l3proto_find(u_int16_t l3proto)
|
|||
{
|
||||
if (unlikely(l3proto >= AF_MAX))
|
||||
return &nf_conntrack_l3proto_generic;
|
||||
return nf_ct_l3protos[l3proto];
|
||||
return rcu_dereference(nf_ct_l3protos[l3proto]);
|
||||
}
|
||||
|
||||
#endif /*_NF_CONNTRACK_L3PROTO_H*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue