Re: [PATCH] net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()

2018-01-03 Thread Stefano Brivio
Hi Nicolai, On Wed, 03 Jan 2018 10:28:20 +0100 Nicolai Stange wrote: > Hi Stefano, > > Stefano Brivio writes: > > > On Tue, 2 Jan 2018 17:30:20 +0100 > > Nicolai Stange wrote: > > > >> [...] > >> > >> diff --git a/net/ipv4/raw.c

Re: [PATCH] net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()

2018-01-03 Thread Stefano Brivio
Hi Nicolai, On Wed, 03 Jan 2018 10:28:20 +0100 Nicolai Stange wrote: > Hi Stefano, > > Stefano Brivio writes: > > > On Tue, 2 Jan 2018 17:30:20 +0100 > > Nicolai Stange wrote: > > > >> [...] > >> > >> diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c > >> index 5b9bd5c33d9d..e84290c28c0c

Re: [PATCH] net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()

2018-01-03 Thread Nicolai Stange
Hi Stefano, Stefano Brivio writes: > On Tue, 2 Jan 2018 17:30:20 +0100 > Nicolai Stange wrote: > >> [...] >> >> diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c >> index 5b9bd5c33d9d..e84290c28c0c 100644 >> --- a/net/ipv4/raw.c >> +++ b/net/ipv4/raw.c >> @@

Re: [PATCH] net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()

2018-01-03 Thread Nicolai Stange
Hi Stefano, Stefano Brivio writes: > On Tue, 2 Jan 2018 17:30:20 +0100 > Nicolai Stange wrote: > >> [...] >> >> diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c >> index 5b9bd5c33d9d..e84290c28c0c 100644 >> --- a/net/ipv4/raw.c >> +++ b/net/ipv4/raw.c >> @@ -513,16 +513,18 @@ static int

Re: [PATCH] net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()

2018-01-02 Thread Stefano Brivio
Hi, On Tue, 2 Jan 2018 17:30:20 +0100 Nicolai Stange wrote: > [...] > > diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c > index 5b9bd5c33d9d..e84290c28c0c 100644 > --- a/net/ipv4/raw.c > +++ b/net/ipv4/raw.c > @@ -513,16 +513,18 @@ static int raw_sendmsg(struct sock *sk, struct

Re: [PATCH] net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()

2018-01-02 Thread Stefano Brivio
Hi, On Tue, 2 Jan 2018 17:30:20 +0100 Nicolai Stange wrote: > [...] > > diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c > index 5b9bd5c33d9d..e84290c28c0c 100644 > --- a/net/ipv4/raw.c > +++ b/net/ipv4/raw.c > @@ -513,16 +513,18 @@ static int raw_sendmsg(struct sock *sk, struct msghdr > *msg,

[PATCH] net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()

2018-01-02 Thread Nicolai Stange
Commit 8f659a03a0ba ("net: ipv4: fix for a race condition in raw_sendmsg") fixed the issue of possibly inconsistent ->hdrincl handling due to concurrent updates by reading this bit-field member into a local variable and using the thus stabilized value in subsequent tests. However, aforementioned

[PATCH] net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()

2018-01-02 Thread Nicolai Stange
Commit 8f659a03a0ba ("net: ipv4: fix for a race condition in raw_sendmsg") fixed the issue of possibly inconsistent ->hdrincl handling due to concurrent updates by reading this bit-field member into a local variable and using the thus stabilized value in subsequent tests. However, aforementioned