Thread (42 messages) 42 messages, 6 authors, 2022-11-28

Re: [PATCH v8 08/26] tcp: authopt: Disable via sysctl by default

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2022-09-07 22:51:26
Also in: linux-crypto, linux-kselftest, lkml

On Tue, Sep 06, 2022 at 04:11:58PM -0700, Eric Dumazet wrote:
WRITE_ONCE(sysctl_tcp_authopt, val),  or even better:

if (val)
     cmpxchg(&sysctl_tcp_authopt, 0, val);
What's the point of the cmpxchg? Since you're simply trying to prevent
sysctl_tcp_authopt from going back to zero, then the if clause
by itself is enough:

	if (val)
		WRITE_ONCE(sysctl_tcp_authopt, val);

Cheers,
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help