Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1731277

Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression

From Josef Bacik <jbacik@fb.com>
Newsgroups linux.kernel
Subject Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression
Date 2017-09-13 01:20 +0200
Message-ID <up2Df-7P4-1@gated-at.bofh.it> (permalink)
References <up20x-7jY-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

First I’m super sorry for the top post, I’m at plumbers and I forgot to upload my muttrc to my new cloud instance, so I’m screwed using outlook.

I have a completely untested, uncompiled patch that I think will fix the problem, would you mind giving it a go?  Thanks,

Josef

On 9/12/17, 3:36 PM, "Laura Abbott" <labbott@redhat.com> wrote:

Hi,

Fedora got a bug report 
https://bugzilla.redhat.com/show_bug.cgi?id=1432684 of a regression with 
automatic spice port
assignment. The libvirt team reduced this to the attached test
case run as follows:

In a separate terminal, qemu-kvm -vnc 127.0.0.1:0 to grab port 5900. 
Then do this:

$ gcc bind-collision.c && ./a.out
bind: Address already in use
AF_INET check failed.
$ gcc -D CHECK_IPV6 bind-collision.c && ./a.out
AF_INET6 success
AF_INET success
$ gcc bind-collision.c && ./a.out
AF_INET success

Bisection showed this behavior to be caused by

commit 319554f284dda9f2737d09df82ba3610bd8ddea3
Author: Josef Bacik <jbacik@fb.com>
Date:   Thu Jan 19 17:47:46 2017 -0500

     inet: don't use sk_v6_rcv_saddr directly

     When comparing two sockets we need to use inet6_rcv_saddr so we get 
a NULL
     sk_v6_rcv_saddr if the socket isn't AF_INET6, otherwise our 
comparison function
     can be wrong.

     Fixes: 637bc8b ("inet: reset tb->fastreuseport when adding a 
reuseport sk")
     Signed-off-by: Josef Bacik <jbacik@fb.com>
     Signed-off-by: David S. Miller <davem@davemloft.net>


And reverting fixed both the standalone test case and the spice issue.

Any ideas?

Thanks,
Laura


Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind  port regression Laura Abbott <labbott@redhat.com> - 2017-09-13 00:40 +0200
  Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes  bind port regression Josef Bacik <jbacik@fb.com> - 2017-09-13 01:20 +0200
    Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes  bind port regression Laura Abbott <labbott@redhat.com> - 2017-09-13 17:50 +0200
      Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes  bind port regression Josef Bacik <jbacik@fb.com> - 2017-09-13 19:30 +0200
        Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes  bind port regression Cole Robinson <crobinso@redhat.com> - 2017-09-13 19:50 +0200
          Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes  bind port regression Cole Robinson <crobinso@redhat.com> - 2017-09-13 21:20 +0200
            Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes  bind port regression Josef Bacik <jbacik@fb.com> - 2017-09-13 21:50 +0200
              Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes  bind port regression Cole Robinson <crobinso@redhat.com> - 2017-09-14 00:50 +0200
                Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes  bind port regression Josef Bacik <jbacik@fb.com> - 2017-09-15 20:00 +0200
                Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes  bind port regression Cole Robinson <crobinso@redhat.com> - 2017-09-17 15:20 +0200
                Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes  bind port regression Marc Haber <mh+linux-kernel@zugschlus.de> - 2017-09-18 10:30 +0200
        Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly")  causes bind port regression Chuck Ebbert <cebbert.lkml@gmail.com> - 2017-09-13 21:50 +0200
          Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes  bind port regression Josef Bacik <jbacik@fb.com> - 2017-09-13 22:20 +0200

csiph-web