Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp321711pxk; Thu, 3 Sep 2020 00:03:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwP6tN8OhO6gKevz4D0z1s0VUY2iKlMiEDfBpkFkpVXa2UHe5P6zTSTvsyPnTnNhcoQPhF3 X-Received: by 2002:a17:906:22c9:: with SMTP id q9mr720445eja.158.1599116609251; Thu, 03 Sep 2020 00:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599116609; cv=none; d=google.com; s=arc-20160816; b=rJauhu/aP6zy8gL8j/hB+Xu33Qt+LKH0DJ8FtUpG0zaGBwiBO8+D+Y6AiVGaOtjDpq HTyGTc16nIgdOVKQFV2R2FTax8HHwsqUpBJImZL6/TfwbMnFJNCR/j1vnMEDmC8PR2fF ffcevWg++c/QQ2fwD9UZGhY8HYJdeWJBPB46VQ4CudUGBtD73JUZdLnl1xuoxLTXwUMy Oyq1IRMw6+B+/ppZFkd+dPuwra3Ia2vpHhS+2ey+fe/EEqp+H8J3HspKdAuOc9Vo3JML 28By0RJp7sbLrDAyNRLd63l2BXmH9w9aZiHBjb+tXcx8QMHOdNbLEmzdetFPYP8UCZeE wFGQ== 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=SXQz/Vu60JfVY2DqsK9wsLGUfbAy7X5OoQ+WKwGFefU=; b=nkXQAZCikYHJXWa2vq+PXpUu9lv4I0SAww0/PKMdAmCJuChX7qMyaY2vEGX2uvsrzc wWLJ3QvZ5d9EyXpIrBwZoMDizBnpZdak/d+tBLuYNEHm5VhRWSY63Kr1EB6BiBXZ1Yz7 l0wVJFnzkpWkv2BqsYktQSSw0Hu2q8W1f77rD3Cdrg9tSBMULhJBUpW0c6RLXm8f3MeU BcT45J1E5JcQF521nvc2J2kezOD9mNgGhZmrtPa49PDsD3bLdp6aMIjUGPjJDT3oY+8S hhtsi90kxazICpYL07ca/pN//CgwVRR6KL9cfSVIju7HNy/OQmJ2cRnWGg7/hrkp47FG lYrA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rs10si1337970ejb.625.2020.09.03.00.03.06; Thu, 03 Sep 2020 00:03:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726855AbgICG7x (ORCPT + 99 others); Thu, 3 Sep 2020 02:59:53 -0400 Received: from verein.lst.de ([213.95.11.211]:36567 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725919AbgICG7x (ORCPT ); Thu, 3 Sep 2020 02:59:53 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 30B2968BEB; Thu, 3 Sep 2020 08:59:50 +0200 (CEST) Date: Thu, 3 Sep 2020 08:59:50 +0200 From: Christoph Hellwig To: Peilin Ye Cc: Jens Axboe , Hillf Danton , Christoph Hellwig , Johannes Thumshirn , Jan Kara , Ming Lei , Konstantin Khlebnikov , Greg Kroah-Hartman , linux-block@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, syzkaller-bugs@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [Linux-kernel-mentees] [PATCH] block: Fix use-after-free in bdev_del_partition() Message-ID: <20200903065950.GA19012@lst.de> References: <000000000000520ffc05ae2f4fee@google.com> <20200903065534.623691-1-yepeilin.cs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200903065534.623691-1-yepeilin.cs@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 03, 2020 at 02:55:34AM -0400, Peilin Ye wrote: > In bdev_del_partition(), `part` is being looked up outside the critical > section. This is causing bdev_del_partition() to delete the same partition > more than once. Fix it by reverting commit cddae808aeb7. We've already fix the problem properly: https://git.kernel.dk/cgit/linux-block/commit/?h=block-5.9&id=08fc1ab6d748ab1a690fd483f41e2938984ce353