From owner-svn-src-head@freebsd.org Fri Aug 17 18:34:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D39891077FE4; Fri, 17 Aug 2018 18:34:41 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8409F8D7B0; Fri, 17 Aug 2018 18:34:41 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f46.google.com (mail-it0-f46.google.com [209.85.214.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4F5A98CAC; Fri, 17 Aug 2018 18:34:41 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f46.google.com with SMTP id j81-v6so12564343ite.0; Fri, 17 Aug 2018 11:34:41 -0700 (PDT) X-Gm-Message-State: AOUpUlHn8FHGUFRoUb4HpdJelcWHS1YTo7s0hCZZoCDYdgTeBrYVCJSd YLa+xxlsYpRTl5gt2AZSEayzJcIomLVbgrXq9yk= X-Google-Smtp-Source: AA+uWPylQHMTSJzqcwGP1oD2m+J0SII1gE7mLDVcjrd605iVDrK4Zo1hCDQ98/6ELyLsAdI4mDb1GgyWO8Bqf1Ha7TU= X-Received: by 2002:a02:2b12:: with SMTP id h18-v6mr32245581jaa.10.1534530880772; Fri, 17 Aug 2018 11:34:40 -0700 (PDT) MIME-Version: 1.0 References: <201808152023.w7FKN9LL055254@repo.freebsd.org> <79ad414a-3e8e-3abd-0a8a-4d61b9ccfb4f@yandex.ru> In-Reply-To: <79ad414a-3e8e-3abd-0a8a-4d61b9ccfb4f@yandex.ru> From: Matthew Macy Date: Fri, 17 Aug 2018 11:34:30 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r337866 - in head/sys: net netinet netinet6 To: "Andrey V. Elsukov" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 18:34:42 -0000 Sorry. I'll take a look. On Fri, Aug 17, 2018 at 05:30 Andrey V. Elsukov wrote: > On 15.08.2018 23:23, Matt Macy wrote: > > Author: mmacy > > Date: Wed Aug 15 20:23:08 2018 > > New Revision: 337866 > > URL: https://svnweb.freebsd.org/changeset/base/337866 > > > > Log: > > Fix in6_multi double free > > > > This is actually several different bugs: > > - The code is not designed to handle inpcb deletion after interface > deletion > > - add reference for inpcb membership > > - The multicast address has to be removed from interface lists when > the refcount > > goes to zero OR when the interface goes away > > - decouple list disconnect from refcount (v6 only for now) > > - ifmultiaddr can exist past being on interface lists > > - add flag for tracking whether or not it's enqueued > > - deferring freeing moptions makes the incpb cleanup code simpler but > opens the > > door wider still to races > > - call inp_gcmoptions synchronously after dropping the the inpcb lock > > > > Fundamentally multicast needs a rewrite - but keep applying band-aids > for now. > > > > Tested by: kp > > Reported by: novel, kp, lwhsu > > > > Modified: > > head/sys/net/if.c > > head/sys/net/if_var.h > > head/sys/netinet/in_mcast.c > > head/sys/netinet/in_pcb.c > > head/sys/netinet/ip_carp.c > > head/sys/netinet6/in6_ifattach.c > > head/sys/netinet6/in6_mcast.c > > head/sys/netinet6/in6_var.h > > head/sys/netinet6/mld6.c > > Hi, > > After this commit my test machine panics just after boot finishes. > Reverting this commit helps. > Machine has two interfaces in failover lagg. One interface is not > connected. > > FreeBSD 12.0-ALPHA2 (GENERIC) #2 r337961M: Fri Aug 17 14:54:48 MSK 2018 > > # ifconfig > em0: flags=8843 metric 0 mtu 1500 > > options=209b > ether 00:22:4d:6a:5e:b9 > media: Ethernet autoselect > status: no carrier > nd6 options=21 > re0: flags=8843 metric 0 mtu 1500 > > options=8209b > ether 00:22:4d:6a:5e:b9 > hwaddr 1c:bd:b9:de:0d:7d > media: Ethernet autoselect (1000baseT ) > status: active > nd6 options=21 > lagg0: flags=8843 metric 0 mtu 1500 > > options=209b > ether 00:22:4d:6a:5e:b9 > inet6 fe80::222:4dff:fe6a:5eb9%lagg0 prefixlen 64 scopeid 0x5 > inet 10.9.8.6 netmask 0xffffff00 broadcast 10.9.8.255 > laggproto failover lagghash l2,l3,l4 > laggport: em0 flags=1 > laggport: re0 flags=4 > groups: lagg > media: Ethernet autoselect > status: active > nd6 options=21 > > -- > WBR, Andrey V. Elsukov >