lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <ZCuZj9b2s3FI9tzo@gondor.apana.org.au> Date: Tue, 4 Apr 2023 11:29:19 +0800 From: Herbert Xu <herbert@...dor.apana.org.au> To: Jakub Kicinski <kuba@...nel.org> Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com, alexanderduyck@...com, roman.gushchin@...ux.dev, kuba@...nel.org Subject: Re: [RFC net-next 1/3] net: provide macros for commonly copied lockless queue stop/wake code Jakub Kicinski <kuba@...nel.org> wrote: > > +#define netif_tx_queue_try_stop(txq, get_desc, start_thrs) \ > + ({ \ > + int _res; \ > + \ > + netif_tx_stop_queue(txq); \ > + \ > + smp_mb(); \ We should never have an smp_mb by itself. It must come with a comment indicating which other barrier (possibly implicit) it pairs with. I know that you're just copying old code around, but by turning it into a helper, we should treat it as new code and apply the current requirements. Thanks, -- Email: Herbert Xu <herbert@...dor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists