From owner-svn-src-head@freebsd.org Wed May 29 00:23:30 2019 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 7B8D215B13C5; Wed, 29 May 2019 00:23:30 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::601]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBA7E717B1; Wed, 29 May 2019 00:23:29 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback19j.mail.yandex.net (mxback19j.mail.yandex.net [IPv6:2a02:6b8:0:1619::95]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 83E3C3C00DA6; Wed, 29 May 2019 03:23:25 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback19j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id FV053QObeH-NPa8H8MA; Wed, 29 May 2019 03:23:25 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1559089405; bh=LYRoXIGy7dT2/S1gbtDupldQO4lpRlsGaOjpK7IBtIY=; h=In-Reply-To:From:To:Subject:Cc:Date:References:Message-ID; b=XP/1c0JbHYI41oXCXfIwBECzZFf4e+WvDg4tht1IGe1yW1jLppIDRHzxiTJDI9+Nq 55wgldh9QsXwbJiyeYEnZLEek20jW44UZHg6IF9Y5uc1KyUDYhpb61osCjsB4fSx83 MuM/tvNmW9ir5MKVgb6Y8CJ9C7zwtISjNqdoMS0Y= Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id FZwmZgcLfy-NO7SD94r; Wed, 29 May 2019 03:23:24 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) Subject: Re: svn commit: r348303 - head/sys/net To: Gleb Smirnoff , "Andrey V. Elsukov" , kib@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201905271241.x4RCffTm047128@repo.freebsd.org> <20190529001046.GC21836@FreeBSD.org> From: "Andrey V. Elsukov" Openpgp: preference=signencrypt Autocrypt: addr=bu7cher@yandex.ru; prefer-encrypt=mutual; keydata= mQENBEwBF1kBCADB9sXFhBEUy8qQ4X63Y8eBatYMHGEFWN9ypS5lI3RE6qQW2EYbxNk7qUC5 21YIIS1mMFVBEfvR7J9uc7yaYgFCEb6Sce1RSO4ULN2mRKGHP3/Sl0ijZEjWHV91hY1YTHEF ZW/0GYinDf56sYpDDehaBF5wkWIo1+QK5nmj3vl0DIDCMNd7QEiWpyLVwECgLX2eOAXByT8B bCqVhJGcG6iFP7/B9Ll6uX5gb8thM9LM+ibwErDBVDGiOgvfxqidab7fdkh893IBCXa82H9N CNwnEtcgzh+BSKK5BgvPohFMgRwjti37TSxwLu63QejRGbZWSz3OK3jMOoF63tCgn7FvABEB AAG0JUFuZHJleSBWLiBFbHN1a292IDxidTdjaGVyQHlhbmRleC5ydT6JATgEEwECACIFAkwB F1kCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEAHF6gQQyKF6qmYIAI6ekfm1VA4T vqankI1ISE6ku4jV7UlpIQlEbE7/8n3Zd6teJ+pGOQhN5qk8QE7utdPdbktAzi+x7LIJVzUw 4TywZLXGrkP7VKYkfg6oyCGyzITghefQeJtr2TN4hYCkzPWpylkue8MtmqfZv/6royqwTbN+ +E09FQNvTgRUYJYTeQ1qOsxNRycwvw3dr2rOfuxShbzaHBB1pBIjGrMg8fC5pd65ACH5zuFV A0CoTNGMDrEZSfBkTW604UUHFFXeCoC3dwDZRKOWJ3GmMXns65Ai5YkA63BSHEE1Qle3VBhd cG1w0CB5FBV3pB27UVnf0jEbysrDqW4qN7XMRFSWNAy5AQ0ETAEXWQEIAJ2p6l9LBoqdH/0J PEFDY2t2gTvAuzz+8zs3R03dFuHcNbOwjvWCG0aOmVpAzkRa8egn5JB4sZaFUtKPYJEQ1Iu+ LUBwgvtXf4vWpzC67zs2dDuiW4LamH5p6xkTD61aHR7mCB3bg2TUjrDWn2Jt44cvoYxj3dz4 S49U1rc9ZPgD5axCNv45j72tggWlZvpefThP7xT1OlNTUqye2gAwQravXpZkl5JG4eOqJVIU X316iE3qso0iXRUtO7OseBf0PiVmk+wCahdreHOeOxK5jMhYkPKVn7z1sZiB7W2H2TojbmcK HZC22sz7Z/H36Lhg1+/RCnGzdEcjGc8oFHXHCxUAEQEAAYkBHwQYAQIACQUCTAEXWQIbDAAK CRABxeoEEMihegkYCAC3ivGYNe2taNm/4Nx5GPdzuaAJGKWksV+w9mo7dQvU+NmI2az5w8vw 98OmX7G0OV9snxMW+6cyNqBrVFTu33VVNzz9pnqNCHxGvj5dL5ltP160JV2zw2bUwJBYsgYQ WfyJJIM7l3gv5ZS3DGqaGIm9gOK1ANxfrR5PgPzvI9VxDhlr2juEVMZYAqPLEJe+SSxbwLoz BcFCNdDAyXcaAzXsx/E02YWm1hIWNRxanAe7Vlg7OL+gvLpdtrYCMg28PNqKNyrQ87LQ49O9 50IIZDOtNFeR0FGucjcLPdS9PiEqCoH7/waJxWp6ydJ+g4OYRBYNM0EmMgy1N85JJrV1mi5i Message-ID: Date: Wed, 29 May 2019 03:23:23 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190529001046.GC21836@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: ru Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EBA7E717B1 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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: Wed, 29 May 2019 00:23:30 -0000 29.05.2019 3:10, Gleb Smirnoff пишет: > Hi Andrey, > > I made a different change to mitigate this panic: don't clear the pointer. > > --- a/FreeBSD/sys/net/bpf.c > +++ b/FreeBSD/sys/net/bpf.c > @@ -857,7 +857,6 @@ bpf_detachd_locked(struct bpf_d *d, bool detached_ifp) > /* Save bd_writer value */ > error = d->bd_writer; > ifp = bp->bif_ifp; > - d->bd_bif = NULL; > if (detached_ifp) { > /* > * Notify descriptor as it's detached, so that any > > Since every bpf_d holds a reference on bpf_if until delayed free happens, > the the bpf_if is going to be valid. > > This allows not to use epoch_wait and run fully async. The patch above is > a minimal patch: with NULL assignment removed, several more pieces of code > can be removed in bpf.c > > Of course your patch also is going to work, but what do you think: > are there any landmines with fully async approach? Hi, bpf_mtap() is not the only consumer of bd_bif, some of them expect it becomes NULL when descriptor is detached. -- WBR, Andrey V. Elsukov