From nobody Fri May 06 12:46:23 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1C0DC1AC2F95; Fri, 6 May 2022 12:46:28 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kvr0g0JC8z53ps; Fri, 6 May 2022 12:46:26 +0000 (UTC) (envelope-from hps@selasky.org) Received: from [10.36.2.165] (unknown [176.74.213.87]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 0699F2600A9; Fri, 6 May 2022 14:46:24 +0200 (CEST) Message-ID: Date: Fri, 6 May 2022 14:46:23 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: git: 868bf82153e8 - main - if: avoid interface destroy race Content-Language: en-US To: Kristof Provost , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202205061156.246Bu4Iq039282@gitrepo.freebsd.org> From: Hans Petter Selasky In-Reply-To: <202205061156.246Bu4Iq039282@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Kvr0g0JC8z53ps X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-3.30 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 5/6/22 13:56, Kristof Provost wrote: > The branch main has been updated by kp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=868bf82153e8ff22f09a8860c872149e0fb6bdef > > commit 868bf82153e8ff22f09a8860c872149e0fb6bdef > Author: Kristof Provost > AuthorDate: 2022-03-27 18:23:25 +0000 > Commit: Kristof Provost > CommitDate: 2022-05-06 11:55:08 +0000 > > if: avoid interface destroy race > > When we destroy an interface while the jail containing it is being > destroyed we risk seeing a race between if_vmove() and the destruction > code, which results in us trying to move a destroyed interface. > > Protect against this by using the ifnet_detach_sxlock to also covert > if_vmove() (and not just detach). > > PR: 262829 > MFC after: 3 weeks > Differential Revision: https://reviews.freebsd.org/D34704 > --- > sys/net/if.c | 22 ++++++++++++++++++++-- > tests/sys/net/if_clone_test.sh | 29 +++++++++++++++++++++++++++++ > 2 files changed, 49 insertions(+), 2 deletions(-) > There are more issues like this: https://reviews.freebsd.org/D28136 --HPS