From: Håkon Bugge
Date: Thu, 20 Jul 2017 12:28:55 +0200
> cp->cp_send_gen is treated as a normal variable, although it may be
> used by different threads.
>
> This is fixed by using {READ,WRITE}_ONCE when it is incremented and
> READ_ONCE when it is read outside the {acquire,release}_in_xmit
> p
On 7/20/2017 3:28 AM, Håkon Bugge wrote:
cp->cp_send_gen is treated as a normal variable, although it may be
used by different threads.
This is fixed by using {READ,WRITE}_ONCE when it is incremented and
READ_ONCE when it is read outside the {acquire,release}_in_xmit
protection.
There is expli
> On 20 Jul 2017, at 13:02, Sowmini Varadhan
> wrote:
>
> On (07/20/17 12:28), H??kon Bugge wrote:
>> cp->cp_send_gen is treated as a normal variable, although it may be
>> used by different threads.
>
> I'm confused by that assertion. If you look at the comments right
> above the change in yo
On (07/20/17 12:28), H??kon Bugge wrote:
> cp->cp_send_gen is treated as a normal variable, although it may be
> used by different threads.
I'm confused by that assertion. If you look at the comments right
above the change in your patch, there is a note that
acquire_in_xmit/release_in_xmit are th
cp->cp_send_gen is treated as a normal variable, although it may be
used by different threads.
This is fixed by using {READ,WRITE}_ONCE when it is incremented and
READ_ONCE when it is read outside the {acquire,release}_in_xmit
protection.
Normative reference from the Linux-Kernel Memory Model: