From nobody Sun Jan 23 18:38:39 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 2649B196C349 for ; Sun, 23 Jan 2022 18:38:53 +0000 (UTC) (envelope-from wma@semihalf.com) Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jhhhq5zvWz4nym for ; Sun, 23 Jan 2022 18:38:51 +0000 (UTC) (envelope-from wma@semihalf.com) Received: by mail-yb1-xb34.google.com with SMTP id p5so44137556ybd.13 for ; Sun, 23 Jan 2022 10:38:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5U/FyLzxWdgQHz2KnuoCSrFxeBB+IeCFxKMPe7QEfos=; b=pou9UBPIGnYSiVJGmM6kmb+bP5NpV3Wah8ZipMlQsqN/VOnmGDi+HqDCG7Y2XTpyqM Xkc1mX6b3QO26rFA4YmHlI6u9R7qI/BV9pe6mmELdOnPnST4DPTCQmq/710c7M3dGZBk E9YISDtmM4cdCh5L0qEEvvv6d+Mual/71rY5fko/he0RhLdrsA2B/ufYRDRNyMfckYko 4pgguo9tuEgzgi4nQ45/Nm/4wfb5BHlDWR8FqVG440/WOci72ObMhtzNoUMjGaT0QDNI aXNRVXWmGZiPcg+cz0iLAoqYewvYykb261vsrvuaQT/dufSKab0hx07tJ0La/B+kRo5p sqcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5U/FyLzxWdgQHz2KnuoCSrFxeBB+IeCFxKMPe7QEfos=; b=5vTcmZKMD5hNmgxvPd4KNh4+O5MlahCk06K4JuPG2L8SqSaWqIEm0DStEy52obQqtC zfu0tJgyB9oVDaNUhetJMroVzS5D9LqyM6lOpx7rHcCMCSk/yhZXu6i+AdsUYyD3TxYm TiZ6hc7FT+AOQ4RSsFXbYRfmWdGFWZ3FR4ha4SEiLnvelVYTR1j69RuHj0GVxTFcJ5Kg /cf8SmMG9GpaDtQewbxI+H2RzpiO1WKWt8Qm9OYqAWcSrYnZtM1ZhNYh2IULc1hxZ/8i rDu1gfREGU353AZicJOabrdRJdzXNWG64EaCkJPIFs2fI/IukNop96xufuKYBE2qvlgN w6Kw== X-Gm-Message-State: AOAM5320UZSgISe/I0XbVXhD7tOGgdVhk0z1L9OBbhrc3GhYWhiZWm67 nxPWh7vW0sCxZcRNdJyDKKQyq/MB7yxKlel6IBUd+UuyKz8= X-Google-Smtp-Source: ABdhPJzAnJgOOapgIPHie6OGgYsZmRCtpzlGILRvhGhTIkBURYTvjIrmfdUGbmjxfNtTkZMDib76qhvdh1zVBSMihhk= X-Received: by 2002:a05:6902:70e:: with SMTP id k14mr9404653ybt.278.1642963131140; Sun, 23 Jan 2022 10:38:51 -0800 (PST) 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 References: <202201210519.20L5J1mJ029323@gitrepo.freebsd.org> <7A991003-0F24-4C8C-81FD-84F39FC78D8A@FreeBSD.org> In-Reply-To: From: Wojciech Macek Date: Sun, 23 Jan 2022 19:38:39 +0100 Message-ID: Subject: Re: git: 9ce46cbc95d7 - main - ip_mroute: move ip_mrouter_done outside lock To: Gleb Smirnoff Cc: Kristof Provost , Wojciech Macek , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000cfca3a05d644298c" X-Rspamd-Queue-Id: 4Jhhhq5zvWz4nym X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=semihalf-com.20210112.gappssmtp.com header.s=20210112 header.b=pou9UBPI; dmarc=none; spf=none (mx1.freebsd.org: domain of wma@semihalf.com has no SPF policy when checking 2607:f8b0:4864:20::b34) smtp.mailfrom=wma@semihalf.com X-Spamd-Result: default: False [0.70 / 15.00]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[semihalf-com.20210112.gappssmtp.com:s=20210112]; FREEFALL_USER(0.00)[wma]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[semihalf.com]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[semihalf-com.20210112.gappssmtp.com:+]; NEURAL_SPAM_LONG(1.00)[1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b34:from]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MLMMJ_DEST(0.00)[dev-commits-src-main]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --000000000000cfca3a05d644298c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable This commit, moving ip_mroutet_done outside a lock is only to silence a warning when invariants are enabled - no functional changes to the root problem were made here. Wojtek niedz., 23 sty 2022, 19:24 u=C5=BCytkownik Wojciech Macek napisa=C5=82: > This is an orginal fix. The issue was visible due to race between ip > input/output and mrouter uninit. > https://reviews.freebsd.org/D29946 > > niedz., 23 sty 2022, 17:41 u=C5=BCytkownik Gleb Smirnoff > napisa=C5=82: > >> On Sat, Jan 22, 2022 at 08:50:54AM +0100, Wojciech Macek wrote: >> W> I will prepare a fix later today. Basically, the whole "if" condition >> must >> W> be inside rwlock block to avoid race during module unload. >> W> Maybe adding else and rwunlock in rip_detach will suffice.... I need >> to try >> W> it out. >> >> May I ask you to post a review and add me as reviewer? Please also inclu= de >> a description of the problem we are fighting with. At least, a short >> version >> of it, for example "fix race between module unload and packet received". >> >> -- >> Gleb Smirnoff >> > --000000000000cfca3a05d644298c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This commit, moving ip_mroutet_done outside a lock is onl= y to silence a warning when invariants are enabled - no functional changes = to the root problem were made here.

Wojtek

niedz., 23 sty 2022, 19:24 u=C5=BCytkownik Wojciech Macek= <wma@semihalf.com> napisa=C5= =82:
This is an o= rginal fix. The issue was visible due to race between ip input/output and m= router uninit.=C2=A0

niedz., 23 sty 2022, 17:41 u=C5=BCytkownik Gleb Smirnof= f <glebius@freebsd.org> napisa=C5=82:
On Sat, Jan 22, 2022 at 08:50:54AM +0100, Wojciech Macek wrot= e:
W> I will prepare a fix later today. Basically, the whole "if"= condition must
W> be inside rwlock block to avoid race during module unload.
W> Maybe adding else and rwunlock in rip_detach will suffice.... I need = to try
W> it out.

May I ask you to post a review and add me as reviewer? Please also include<= br> a description of the problem we are fighting with. At least, a short versio= n
of it, for example "fix race between module unload and packet received= ".

--
Gleb Smirnoff
--000000000000cfca3a05d644298c--