[PATCH 4.9 12/31] ipv4: remove warning in ip_recv_error

2018-06-12 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Willem de Bruijn [ Upstream commit 730c54d59403658a62af6517338fa8d4922c1b28 ] A precondition check in ip_recv_error triggered on an otherwise benign race. Remove the warning. The warning

[PATCH 4.9 12/31] ipv4: remove warning in ip_recv_error

2018-06-12 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Willem de Bruijn [ Upstream commit 730c54d59403658a62af6517338fa8d4922c1b28 ] A precondition check in ip_recv_error triggered on an otherwise benign race. Remove the warning. The warning

[PATCH 4.4 13/24] ipv4: remove warning in ip_recv_error

2018-06-12 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Willem de Bruijn [ Upstream commit 730c54d59403658a62af6517338fa8d4922c1b28 ] A precondition check in ip_recv_error triggered on an otherwise benign race. Remove the warning. The warning

[PATCH 4.4 13/24] ipv4: remove warning in ip_recv_error

2018-06-12 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Willem de Bruijn [ Upstream commit 730c54d59403658a62af6517338fa8d4922c1b28 ] A precondition check in ip_recv_error triggered on an otherwise benign race. Remove the warning. The warning

[PATCH 4.14 14/41] ipv4: remove warning in ip_recv_error

2018-06-09 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Willem de Bruijn [ Upstream commit 730c54d59403658a62af6517338fa8d4922c1b28 ] A precondition check in ip_recv_error triggered on an otherwise benign race. Remove the warning. The warning

[PATCH 4.14 14/41] ipv4: remove warning in ip_recv_error

2018-06-09 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Willem de Bruijn [ Upstream commit 730c54d59403658a62af6517338fa8d4922c1b28 ] A precondition check in ip_recv_error triggered on an otherwise benign race. Remove the warning. The warning

[PATCH 4.16 13/48] ipv4: remove warning in ip_recv_error

2018-06-09 Thread Greg Kroah-Hartman
4.16-stable review patch. If anyone has any objections, please let me know. -- From: Willem de Bruijn [ Upstream commit 730c54d59403658a62af6517338fa8d4922c1b28 ] A precondition check in ip_recv_error triggered on an otherwise benign race. Remove the warning. The warning

[PATCH 4.16 13/48] ipv4: remove warning in ip_recv_error

2018-06-09 Thread Greg Kroah-Hartman
4.16-stable review patch. If anyone has any objections, please let me know. -- From: Willem de Bruijn [ Upstream commit 730c54d59403658a62af6517338fa8d4922c1b28 ] A precondition check in ip_recv_error triggered on an otherwise benign race. Remove the warning. The warning

Re: WARNING in ip_recv_error

2018-05-24 Thread Paolo Abeni
; > operation. > > > > > > Actually, no reason to hold the lock. This setsockopt holds the socket > > > lock, which connect would need, too. So testing that the queue > > > is empty after testing that it is connected to a v4 address is > > > sufficient to ensure th

Re: WARNING in ip_recv_error

2018-05-24 Thread Paolo Abeni
nd then take its lock for the duration of the > > > > operation. > > > > > > Actually, no reason to hold the lock. This setsockopt holds the socket > > > lock, which connect would need, too. So testing that the queue > > > is empty after testing that it is connected

Re: WARNING in ip_recv_error

2018-05-23 Thread Willem de Bruijn
then take its lock for the duration of the >>>> operation. >>> >>> Actually, no reason to hold the lock. This setsockopt holds the socket >>> lock, which connect would need, too. So testing that the queue >>> is empty after testing that it is connected to a v4 a

Re: WARNING in ip_recv_error

2018-05-23 Thread Willem de Bruijn
take its lock for the duration of the >>>> operation. >>> >>> Actually, no reason to hold the lock. This setsockopt holds the socket >>> lock, which connect would need, too. So testing that the queue >>> is empty after testing that it is connected to

Re: WARNING in ip_recv_error

2018-05-23 Thread Willem de Bruijn
ation. >> >> Actually, no reason to hold the lock. This setsockopt holds the socket >> lock, which connect would need, too. So testing that the queue >> is empty after testing that it is connected to a v4 address is >> sufficient to ensure that no ipv6 packets are queued for

Re: WARNING in ip_recv_error

2018-05-23 Thread Willem de Bruijn
is >> sufficient to ensure that no ipv6 packets are queued for reception. >> >> diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c >> index 4d780c7f0130..a975d6311341 100644 >> --- a/net/ipv6/ipv6_sockglue.c >> +++ b/net/ipv6/ipv6_sockglue.c >> @@ -199,6 +199,11 @@

Re: WARNING in ip_recv_error

2018-05-20 Thread Willem de Bruijn
gt; index 4d780c7f0130..a975d6311341 100644 > --- a/net/ipv6/ipv6_sockglue.c > +++ b/net/ipv6/ipv6_sockglue.c > @@ -199,6 +199,11 @@ static int do_ipv6_setsockopt(struct sock *sk, > int level, int optname, > > if (ipv6_only_sock(sk) || >

Re: WARNING in ip_recv_error

2018-05-20 Thread Willem de Bruijn
ed for reception. > > diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c > index 4d780c7f0130..a975d6311341 100644 > --- a/net/ipv6/ipv6_sockglue.c > +++ b/net/ipv6/ipv6_sockglue.c > @@ -199,6 +199,11 @@ static int do_ipv6_setsockopt(struct sock *sk, > int level, int optn

Re: WARNING in ip_recv_error

2018-05-18 Thread Willem de Bruijn
6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -199,6 +199,11 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, if (ipv6_only_sock(sk) || !ipv6_addr_v4mapped(>sk_v6_daddr)) { retv = -EADDRNOTAVAIL; break; } + if (!skb_queue_empty(>sk_error_queue)) { + retv = -EBUSY; + break; + } + fl6_free_socklist(sk); __ipv6_sock_mc_close(sk); After this it should be safe to remove the warning in ip_recv_error.

Re: WARNING in ip_recv_error

2018-05-18 Thread Willem de Bruijn
if (ipv6_only_sock(sk) || !ipv6_addr_v4mapped(>sk_v6_daddr)) { retv = -EADDRNOTAVAIL; break; } + if (!skb_queue_empty(>sk_error_queue)) { + retv = -EBUSY; + break; + } + fl6_free_socklist(sk); __ipv6_sock_mc_close(sk); After this it should be safe to remove the warning in ip_recv_error.

Re: WARNING in ip_recv_error

2018-05-18 Thread Willem de Bruijn
On Fri, May 18, 2018 at 2:44 PM, Willem de Bruijn wrote: > On Fri, May 18, 2018 at 1:09 PM, Willem de Bruijn > wrote: >> On Fri, May 18, 2018 at 11:44 AM, David Miller wrote: >>> From: Eric Dumazet

Re: WARNING in ip_recv_error

2018-05-18 Thread Willem de Bruijn
On Fri, May 18, 2018 at 2:44 PM, Willem de Bruijn wrote: > On Fri, May 18, 2018 at 1:09 PM, Willem de Bruijn > wrote: >> On Fri, May 18, 2018 at 11:44 AM, David Miller wrote: >>> From: Eric Dumazet >>> Date: Fri, 18 May 2018 08:30:43 -0700 >>> We probably need to revert Willem patch

Re: WARNING in ip_recv_error

2018-05-18 Thread Willem de Bruijn
On Fri, May 18, 2018 at 1:09 PM, Willem de Bruijn wrote: > On Fri, May 18, 2018 at 11:44 AM, David Miller wrote: >> From: Eric Dumazet >> Date: Fri, 18 May 2018 08:30:43 -0700 >> >>> We probably need to revert Willem

Re: WARNING in ip_recv_error

2018-05-18 Thread Willem de Bruijn
On Fri, May 18, 2018 at 1:09 PM, Willem de Bruijn wrote: > On Fri, May 18, 2018 at 11:44 AM, David Miller wrote: >> From: Eric Dumazet >> Date: Fri, 18 May 2018 08:30:43 -0700 >> >>> We probably need to revert Willem patch >>> (7ce875e5ecb8562fd44040f69bda96c999e38bbc) >> >> Is it really valid

Re: WARNING in ip_recv_error

2018-05-18 Thread Willem de Bruijn
On Fri, May 18, 2018 at 11:44 AM, David Miller wrote: > From: Eric Dumazet > Date: Fri, 18 May 2018 08:30:43 -0700 > >> We probably need to revert Willem patch >> (7ce875e5ecb8562fd44040f69bda96c999e38bbc) > > Is it really valid to reach ip_recv_err

Re: WARNING in ip_recv_error

2018-05-18 Thread Willem de Bruijn
On Fri, May 18, 2018 at 11:44 AM, David Miller wrote: > From: Eric Dumazet > Date: Fri, 18 May 2018 08:30:43 -0700 > >> We probably need to revert Willem patch >> (7ce875e5ecb8562fd44040f69bda96c999e38bbc) > > Is it really valid to reach ip_recv_err with an ipv6 socket? I guess the issue is

Re: WARNING in ip_recv_error

2018-05-18 Thread David Miller
From: Eric Dumazet Date: Fri, 18 May 2018 08:30:43 -0700 > We probably need to revert Willem patch > (7ce875e5ecb8562fd44040f69bda96c999e38bbc) Is it really valid to reach ip_recv_err with an ipv6 socket?

Re: WARNING in ip_recv_error

2018-05-18 Thread David Miller
From: Eric Dumazet Date: Fri, 18 May 2018 08:30:43 -0700 > We probably need to revert Willem patch > (7ce875e5ecb8562fd44040f69bda96c999e38bbc) Is it really valid to reach ip_recv_err with an ipv6 socket?

Re: WARNING in ip_recv_error

2018-05-18 Thread Eric Dumazet
On 05/18/2018 05:08 AM, DaeRyong Jeong wrote: > We report the crash: WARNING in ip_recv_error > (I resend the email since I mistakenly missed the subject in my previous > email. I'm sorry.) > > > This crash has been found in v4.17-rc1 using RaceFuzzer (a modified > version

Re: WARNING in ip_recv_error

2018-05-18 Thread Eric Dumazet
On 05/18/2018 05:08 AM, DaeRyong Jeong wrote: > We report the crash: WARNING in ip_recv_error > (I resend the email since I mistakenly missed the subject in my previous > email. I'm sorry.) > > > This crash has been found in v4.17-rc1 using RaceFuzzer (a modified > version

WARNING in ip_recv_error

2018-05-18 Thread DaeRyong Jeong
We report the crash: WARNING in ip_recv_error (I resend the email since I mistakenly missed the subject in my previous email. I'm sorry.) This crash has been found in v4.17-rc1 using RaceFuzzer (a modified version of Syzkaller), which we describe more at the end of this report. Our analysis

WARNING in ip_recv_error

2018-05-18 Thread DaeRyong Jeong
We report the crash: WARNING in ip_recv_error (I resend the email since I mistakenly missed the subject in my previous email. I'm sorry.) This crash has been found in v4.17-rc1 using RaceFuzzer (a modified version of Syzkaller), which we describe more at the end of this report. Our analysis