Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1581682ybi; Sat, 1 Jun 2019 00:30:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxKTTnbl0FcwWBIBw01H0IV5L681BtCu/GVfxbLPIAiVEMa0t0Mo1vn/daNAzfYgbPYRtX X-Received: by 2002:a17:902:42e2:: with SMTP id h89mr14327367pld.332.1559374209980; Sat, 01 Jun 2019 00:30:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559374209; cv=none; d=google.com; s=arc-20160816; b=M/dR4GKh6X2k91BI1eLr5zCZYb++O0vxJsFjYcuaqPuGhA38jr+nXDwYcvyBh5N0rd Jtlk/STXNblW/hwEZC2Z+88u13wSOpI6KG1u86YeA/LzpiGeHSVcajMqX5OsPvOQYA6/ d304o69U7ybCl3Kb6ALrKG25aXtkof7W7onQynNTdbz5ph9HnDqCob054qIlpHpzbFLW +LNcq9pxOvQ/jAoPM/v7fvl/gy63P8e0hD8bVlnNZx9OiZWe8dinXZMdQRgMm0aykXzr w1rxjQim43OW8ix+8neiTnl9VREEnzFybH6ly0mI4gzgr2EtdVWwg7Su+I02+NblS541 P8Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BOFLtM4VjbBeE4VB3cwlMTPLNibhwdfnvGaC9e8XND8=; b=nFMd5XBiKJUygP0p0q1+1CCuA5KkOzj6NIZr3TVtq6HQlR5PXR43LMudX2YPcT/2Oe IPxUx6QC28AMEu+I10whcn6LavaMrY4SAUrdmFODU/gsmkvMd9yC8PgH1czx0j78bQPK wB0ME7rRZT1Pp1R3HVzAD2fmUGhzfdXJMvaONW87csifCZL2zCZ947Jcwa0iP5CWoEDl UCa6TRXt9efUBpQ5mDUIeZb0GzNWLDLglMJW6buLKW9dhvmwpk3y/bxiOAiVW1+UHvQw ot/7EzRc8HYjvjsAkza3UTBdH3dntlOBNZcqt/UDBWBuJbvcq/147GQhgWqaaBf3YGrC ZZhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cj13si6053835plb.162.2019.06.01.00.29.42; Sat, 01 Jun 2019 00:30:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726246AbfFAH17 (ORCPT + 99 others); Sat, 1 Jun 2019 03:27:59 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:52450 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726058AbfFAH17 (ORCPT ); Sat, 1 Jun 2019 03:27:59 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 56B6D802F5; Sat, 1 Jun 2019 09:27:47 +0200 (CEST) Date: Sat, 1 Jun 2019 09:27:56 +0200 From: Pavel Machek To: pavel@ucw.cz Cc: linux-kernel@vger.kernel.org, Al Viro , Bart Van Assche , Keith Busch , Jan Kara , Yufen Yu , Jens Axboe , Sasha Levin Subject: Re: [PATCH 4.19 130/276] block: fix use-after-free on gendisk Message-ID: <20190601072756.GA2215@amd> References: <20190530030523.133519668@linuxfoundation.org> <20190530030533.910471797@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ibTvN161/egqYuK8" Content-Disposition: inline In-Reply-To: <20190530030533.910471797@linuxfoundation.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > +++ b/block/genhd.c > @@ -518,6 +518,18 @@ void blk_free_devt(dev_t devt) > } > } > =20 > +/** > + * We invalidate devt by assigning NULL pointer for devt in idr. > + */ > +void blk_invalidate_devt(dev_t devt) > +{ > + if (MAJOR(devt) =3D=3D BLOCK_EXT_MAJOR) { > + spin_lock_bh(&ext_devt_lock); > + idr_replace(&ext_devt_idr, NULL, blk_mangle_minor(MINOR(devt))); > + spin_unlock_bh(&ext_devt_lock); > + } > +} > + AFAICT /** means linuxdoc, but the comment does not have required format. Probably should be just /*. Thanks, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --ibTvN161/egqYuK8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlzyKPwACgkQMOfwapXb+vJsrgCgqD+CDZs2l5FIKcmOJq0+LQpP yhcAnR/Uu9rulkUgtM5Yhv44dQ6hl1Uh =fDgO -----END PGP SIGNATURE----- --ibTvN161/egqYuK8--