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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 09 Aug 2016 14:32:45 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	ubraun@...ux.vnet.ibm.com
Cc:	netdev@...r.kernel.org, linux-s390@...r.kernel.org,
	schwidefsky@...ibm.com, heiko.carstens@...ibm.com,
	utz.bacher@...ibm.com
Subject: Re: [PATCH RESEND net-next 13/15] smc: receive data from RMBE

From: Ursula Braun <ubraun@...ux.vnet.ibm.com>
Date: Tue,  9 Aug 2016 12:12:58 +0200

> +		xchg(&conn->rx_curs_confirmed.acurs,
> +		     smc_curs_read(conn->local_tx_ctrl.cons.acurs));

Why in the world do you need to use xchg() in all of these places?

It makes no sense whatsoever, especially since you don't even check
the return value.

If you need the operation to be atomic, then you have to check the
return value and do something to recover if something else beat
you to the xchg() and put something else into the location.

Otherwise, you therefore don't need it be atomic and can avoid
this expensive operation and just store the value normally.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ