From owner-svn-src-head@freebsd.org Mon Sep 2 15:45:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9CEC6E1588; Mon, 2 Sep 2019 15:45:46 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46MZDV3RQTz3Qsv; Mon, 2 Sep 2019 15:45:46 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-ot1-x32c.google.com with SMTP id c7so13987183otp.1; Mon, 02 Sep 2019 08:45:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xsAvqB9GPeUKl7WXD0QLsF/nU0dWxOPTzJTUJ6Lb3Ik=; b=k1b/b/AwbLbRqqVlpYTv/CntZg1u06ECn+wbjl/2rW4+mHzYRiOiaRAnGiW+e8pcLT I05ZCtwN2vC1MkH0c05EqotD53dN2kADcgXsrxFRmV946g0bxml9PNf81mW26Qw+7832 6GR8Iqxxj+qNYKaZegpF16RfEO8G8E9uv2phIshwU/rGt6fkUgO1Z2mFhM8lFaStuYO6 N0dt7B+NnuBZJ7tnlYQ+3bEnuZh4KBNiwEPHcOnjHCkUVSr+uISvvqditVWShECGPB48 ZHIWM2Nmjs9d1GlI/4UAklXm+z1lPUXSOn8/boicv8Zpy5itMl5g0/Zx/qJ0krp6Ah+5 76LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xsAvqB9GPeUKl7WXD0QLsF/nU0dWxOPTzJTUJ6Lb3Ik=; b=I71NzHtj0VDgFWnjvX68gXci0qFbeomGeebW0qQl/KonPyw46G2oSlaCd+rBTpC3ok mykpUoirCvBVvXNgbE8iHUQhIKMEjtll5l7UtCcEF/b+2/e4zoEvGw6EuixcxVTFS54l mIU+KFJu9KBWhn6ZKbShl6uFaZMnD1TVrKmDzJakTogvaT4eflxeuoMdW7Nh3prwGqLS p4FjSQJbxdqRNsqVZHq2inn8ZhpTXJldN0pIshQDJk7A3JZTlo/lPuKl2KX8URdN0qK2 92TYzb7aTCaLNYTiRneFAG5l8bNhdVaRf1irjwWYfavz0+nlj+OKe1yRoUommLeatYcq 6blg== X-Gm-Message-State: APjAAAWUGR0AsmY36bIMXmDJigxNPaMzjfCF6ors6rFXpMfJAXJ7e1tx wYuVbvQDj52fFX0MlavfPBYv7VDiC0xC0QgwRMNffA== X-Google-Smtp-Source: APXvYqwk/59TjJLPdppU+kcwFEj8TQGnXnAN2HLGOfSpzzG98nbgPDcJ2LafSINNLN7Th0+aD42m6nP8CTqIj7GJszA= X-Received: by 2002:a9d:6e8d:: with SMTP id a13mr22740823otr.235.1567439144817; Mon, 02 Sep 2019 08:45:44 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:458d:0:0:0:0:0 with HTTP; Mon, 2 Sep 2019 08:45:44 -0700 (PDT) In-Reply-To: <20190902152633.GE68323@raichu> References: <201909021524.x82FOQZO033532@repo.freebsd.org> <20190902152633.GE68323@raichu> From: Mateusz Guzik Date: Mon, 2 Sep 2019 17:45:44 +0200 Message-ID: Subject: Re: svn commit: r351702 - head/sys/kern To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 46MZDV3RQTz3Qsv X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.982,0] 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: Mon, 02 Sep 2019 15:45:46 -0000 On 9/2/19, Mark Johnston wrote: > On Mon, Sep 02, 2019 at 03:24:26PM +0000, Mateusz Guzik wrote: >> Author: mjg >> Date: Mon Sep 2 15:24:25 2019 >> New Revision: 351702 >> URL: https://svnweb.freebsd.org/changeset/base/351702 >> >> Log: >> vfs: restore mp null check in vop_stdgetwritemount >> >> The initially read mount point can already be NULL. >> >> Reported by: markj > > Just a correction: it was Peter that found the bug, not me. > Yup, apologies. Automatically credited the person who sent the e-mail. >> Fixes: r351656 ("vfs: stop refing freed mount points in >> vop_stdgetwritemount") >> Sponsored by: The FreeBSD Foundation >> >> Modified: >> head/sys/kern/vfs_default.c >> >> Modified: head/sys/kern/vfs_default.c >> ============================================================================== >> --- head/sys/kern/vfs_default.c Mon Sep 2 14:51:59 2019 (r351701) >> +++ head/sys/kern/vfs_default.c Mon Sep 2 15:24:25 2019 (r351702) >> @@ -601,6 +601,8 @@ vop_stdgetwritemount(ap) >> */ >> vp = ap->a_vp; >> mp = vp->v_mount; >> + if (mp == NULL) >> + goto out; >> MNT_ILOCK(mp); >> if (mp != vp->v_mount) { >> MNT_IUNLOCK(mp); >> > -- Mateusz Guzik