Re: [PATCH nf] netfilter: nat: use atomic bit op to clear the _SRC_NAT_DONE_BIT

2017-05-23 Thread Pablo Neira Ayuso
On Sun, May 21, 2017 at 10:38:11PM +0800, Liping Zhang wrote: > From: Liping Zhang > > We need to clear the IPS_SRC_NAT_DONE_BIT to indicate that the ct has > been removed from nat_bysource table. But unfortunately, we use the > non-atomic bit operation: "ct->status &=

Re: [PATCH nf] netfilter: nat: use atomic bit op to clear the _SRC_NAT_DONE_BIT

2017-05-21 Thread Florian Westphal
Liping Zhang wrote: > From: Liping Zhang > > We need to clear the IPS_SRC_NAT_DONE_BIT to indicate that the ct has > been removed from nat_bysource table. But unfortunately, we use the > non-atomic bit operation: "ct->status &= ~IPS_NAT_DONE_MASK". So >

[PATCH nf] netfilter: nat: use atomic bit op to clear the _SRC_NAT_DONE_BIT

2017-05-21 Thread Liping Zhang
From: Liping Zhang We need to clear the IPS_SRC_NAT_DONE_BIT to indicate that the ct has been removed from nat_bysource table. But unfortunately, we use the non-atomic bit operation: "ct->status &= ~IPS_NAT_DONE_MASK". So there's a race condition that we may clear the