Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp38037pxf; Wed, 24 Mar 2021 20:13:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwskAozHFxSpVi8YNlgxy1cy9SGlHwmBa0jxq3u2BjDLnVkhNmW1rsKCxEVUpPKisXFUu/N X-Received: by 2002:a05:6402:84b:: with SMTP id b11mr6611773edz.56.1616641983295; Wed, 24 Mar 2021 20:13:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616641983; cv=none; d=google.com; s=arc-20160816; b=smZqV0VWiTKShz2UVg8uwHUrKCsTg4kblG2UTe5j7xh4m1mAEY6T/iKMqzS7vQ0Uzz apCnGaMsJwPegsKX7tXRrbVLSo9a2RIK6GB91/whtzGyrUZRj0j8W9q/Kc/7zWTjdMDt mGDEDp/MzVtoiQ/8Cz9v/ndwMG5Xa8+IJP+h54cd31ZzwM2fKWxUKR1nwnC2KoNDYST1 vaMbvtwXgWGwseT3qH8AIgauiRYzg24I3XawVj9iUKSyrBNztiITE9e6NvfIIKcLdLg6 0cHnPOKhDVgzxBLgMNlwPNen+r3XcsD0A3hcVtfRCA3OFMJRtjwJ2qMwLWoVqlfWLbTB +R0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ajKj4AgUojDeKoeK4aucvD7WQjAp/h50svuAT5cpfok=; b=PavM7G2SLzokYRNSzaX8wkCM9+pdJ6ExRnJkJ8QFkkxHGeVh8/oFUI9FbrQ/h8QdQf Zd1g9UTIM5zU9bPra76Qyv5xnHEexRqe+jCqTlFe/R4XXdi9ezh7bkGIX0EzFMrwDBl2 BoAE/VJ/x6p5NrnzJMZMAXRdMdnQmqaBP3LU7bloZJpfKlouKzHG+cUQQ8RntfdhW+8F zTAfrxg4O4vh8LH5xnA75Fh4I5OlswEGH3QDs6dr/f0KFEHq+4yj9QBYcPfDZjgBzlM6 uFUz0+M5EgPEVWz/R+oxgjeKu6GxNA/XmpkynYxztHdrBDvWf5ApLxrbzv9x2aJTvajr mqkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@veeam.com header.s=mx4 header.b=j8lDhnO8; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=veeam.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si3697396ejb.398.2021.03.24.20.12.41; Wed, 24 Mar 2021 20:13:03 -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; dkim=pass header.i=@veeam.com header.s=mx4 header.b=j8lDhnO8; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=veeam.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236556AbhCXPOv (ORCPT + 99 others); Wed, 24 Mar 2021 11:14:51 -0400 Received: from mx4.veeam.com ([104.41.138.86]:36620 "EHLO mx4.veeam.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236414AbhCXPOU (ORCPT ); Wed, 24 Mar 2021 11:14:20 -0400 Received: from mail.veeam.com (prgmbx01.amust.local [172.24.0.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx4.veeam.com (Postfix) with ESMTPS id 35A2B114A62; Wed, 24 Mar 2021 18:14:15 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=veeam.com; s=mx4; t=1616598855; bh=ajKj4AgUojDeKoeK4aucvD7WQjAp/h50svuAT5cpfok=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=j8lDhnO8OHkqPTIzkuDcDCCRKU7aDuCUuzBsgZrIOBahIi3qlQTd+46bxoGFyNPda yozoYKB1sHH0vrknXoaA1INzZ27DLaSeh/aRldkXuckxNBvOn1zbnX5BmnoNb0hen0 bBUoXKSN679c5Wpcs0C14FdaMND4jK68n4dtYsBw= Received: from veeam.com (172.24.14.5) by prgmbx01.amust.local (172.24.0.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.721.2; Wed, 24 Mar 2021 16:14:13 +0100 Date: Wed, 24 Mar 2021 18:14:05 +0300 From: Sergei Shtepa To: Christoph Hellwig CC: Jens Axboe , , , Subject: Re: [PATCH 1/1] block: fix potential infinite loop in the negative branch in __submit_bio_noacct_mq() Message-ID: <20210324151405.GA4260@veeam.com> References: <1616500116-3411-1-git-send-email-sergei.shtepa@veeam.com> <1616500116-3411-2-git-send-email-sergei.shtepa@veeam.com> <20210324111803.GA2687609@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20210324111803.GA2687609@infradead.org> X-Originating-IP: [172.24.14.5] X-ClientProxiedBy: prgmbx01.amust.local (172.24.0.171) To prgmbx01.amust.local (172.24.0.171) X-EsetResult: clean, is OK X-EsetId: 37303A29D2A50B586D7C66 X-Veeam-MMEX: True Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 03/24/2021 11:18, Christoph Hellwig wrote: > On Tue, Mar 23, 2021 at 02:48:36PM +0300, Sergei Shtepa wrote: > > When the blk_crypto_bio_prep() function returns false, the processing > > of the bio request must end. Repeated access to blk_crypto_bio_prep() > > for this same bio may lead to access to already released data, since in > > this case the bio_endio() function was already called for bio. > > > > The changes allow to leave the processing of the failed bio and > > go to the next one from the bio_list. > > > > The error can only occur when using inline encryption on > > request-based blk-mq devices and something went wrong in the > > __blk_crypto_bio_prep(). > > A continue in a do { } while statement evaluates the while condition, > so your patch is a no-op. Thank you Christoph! Shame on my bald head. I apologize and will be more attentive in the future. -- Sergei Shtepa Veeam Software developer.