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] [day] [month] [year] [list]
Date:	Mon, 15 Dec 2014 10:51:04 -0800
From:	Jeremiah Mahler <jmmahler@...il.com>
To:	Andy Whitcroft <apw@...onical.com>
Cc:	KY Srinivasan <kys@...rosoft.com>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
	"olaf@...fle.de" <olaf@...fle.de>,
	"jasowang@...hat.com" <jasowang@...hat.com>,
	"mcb30@...e.org" <mcb30@...e.org>
Subject: Re: [PATCH V3 1/1] Drivers: hv: vmbus: Fix a bug in
 vmbus_establish_gpadl()

Andy,

On Mon, Dec 15, 2014 at 03:47:04PM +0000, Andy Whitcroft wrote:
> On Sun, Dec 14, 2014 at 11:59:19PM -0800, Jeremiah Mahler wrote:
[...]
> 
> The calculation appears identical to my reading, the original form was:
> 
>   next_gpadl_handle = atomic_read(&vmbus_connection.next_gpadl_handle);
>   atomic_inc(&vmbus_connection.next_gpadl_handle);
> 
> or:
> 
>   y = x;
>   x++;
> 
> so y == x' (x before incrementing)
> 
> the new code is:
> 
>   next_gpadl_handle = (atomic_inc_return(&vmbus_connection.next_gpadl_handle) - 1);
> 
> or:
> 
>   y = ++x - 1;
> 
> Also making y = x' (x before incrementing)
> 
> -apw

Ah, you are right.  The increment before/after messed me up.

Thanks for clearing that up for me :-)

-- 
- Jeremiah Mahler
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ