Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp30071pxf; Wed, 24 Mar 2021 19:56:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwysekWGj0/e7/+7yw1o0dYa7ogmAGII/DnPrqu+TxKrHbDwj/6/L9b/EzmmC6w3xg0iIOl X-Received: by 2002:aa7:d416:: with SMTP id z22mr6548161edq.239.1616640979256; Wed, 24 Mar 2021 19:56:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616640979; cv=none; d=google.com; s=arc-20160816; b=ur7EwgRYuQtApWMjeGibShcQ1yMRrvpF5ontW+/q1HvrVsZeDaV3yVwK3dxa6j35Mq nIifKF0zAu5NKPVWI6HQwwHLV6iBYpamy7ndZKo9e3SgoZbbVg3ZZE8mEduE+OrwauSn Ctef/Gc9t2hqcOYAVc39rU2MY+YU2umj6h2Jc1djzAYLoDONh/PcgiQMJRCzT1MCKUrd s6t5DJkaZLh2QpDTlMjN33WPruiSyjpkUDa40PjITxQqbRL1ibIU3dNUWeKQt4IwpLqX qdDRZTvsBDPsW237c+IKP3105bYqcb6R9wpHaWITpufv52khhBrkoqefZAg9LeFv9zuQ ymFQ== 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=+nZ+LKCV6XV/kweltGWw/hLt2oJ/PRBM7wOTuEH0/Ho=; b=uawkM0Nd812//bswqFLztl0/Ffq56JDEzAWsmjT4xnGwIPzE+i1jjfuAP927mV5GqS vbMSwMptlWwmXr8dklglxOYiyZJpUFIuv86+bVHzPUSlFJBfMc/p19n8BcHM2FUO4Amq 16FQ8sIG8hhYI4PZ73FQF7idmaJMh1YexJaANTBifM1pZlJc5hj8fx4bpBd35gXpN3Jl 4N+Y1Nj7yz8fvlO8/QG3yi1YGugBAGcxDeZSrPhw4sNzqzl6ip4UlgLLhGK6qEOx1ZU/ dBrbg9cSCJS+gz4LDrpaXH/JaV1f3/wXBRuTnhw5mj9UZrfkUEmyRhmsUj3DXHMy69qR poQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="EzCaUQ/c"; 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 m19si3662731edd.384.2021.03.24.19.55.57; Wed, 24 Mar 2021 19:56:19 -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=@infradead.org header.s=casper.20170209 header.b="EzCaUQ/c"; 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 S234668AbhCXLTM (ORCPT + 99 others); Wed, 24 Mar 2021 07:19:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232223AbhCXLTA (ORCPT ); Wed, 24 Mar 2021 07:19:00 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36A8DC061763; Wed, 24 Mar 2021 04:18:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=+nZ+LKCV6XV/kweltGWw/hLt2oJ/PRBM7wOTuEH0/Ho=; b=EzCaUQ/cnBX9PgdNTP4ImKya1j bjHAmfBY9k2pkhnPnZ0ZKiyB1yuMd7msHCRO5BfaBIXaO7YLqXzGnTM51t46nUz5nHhdzebcpTQ6g Y5yZ4xCBgKEuA/+g2Bea2+haofpziE8t1FLywufSBd+NVJDMmyTTYL19aCXi19howw6Y3XuhT18TE 2lTJW35fC035hKojHN4jRKgDrSy46weNwIvY67MgkylSzUU7c9Csb+Z9yOdkYTpN8AxiJjjmEi73V Vf9LJDTCpYRdMdXog1/6nMedB/V5KBt9Bnom8OpVSyfjywX4FAPT5Xg0OdFDWoRk1OGErU9JBZYIS YALMEEPA==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lP1WV-00BHLB-SN; Wed, 24 Mar 2021 11:18:10 +0000 Date: Wed, 24 Mar 2021 11:18:03 +0000 From: Christoph Hellwig To: Sergei Shtepa Cc: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, pavel.tide@veeam.com Subject: Re: [PATCH 1/1] block: fix potential infinite loop in the negative branch in __submit_bio_noacct_mq() Message-ID: <20210324111803.GA2687609@infradead.org> References: <1616500116-3411-1-git-send-email-sergei.shtepa@veeam.com> <1616500116-3411-2-git-send-email-sergei.shtepa@veeam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1616500116-3411-2-git-send-email-sergei.shtepa@veeam.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.