Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp203326imj; Thu, 14 Feb 2019 18:36:45 -0800 (PST) X-Google-Smtp-Source: AHgI3IZWhLPAW8sR5oGaKTU8ZCJGb13s53fxP67yAvuv1buzot9CEK050BSWA6YeAOQqYNNbc0O/ X-Received: by 2002:a63:1105:: with SMTP id g5mr6974462pgl.322.1550198205263; Thu, 14 Feb 2019 18:36:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550198205; cv=none; d=google.com; s=arc-20160816; b=V4D72SR4RCbTbm3BS0Ij4H8LOC2jjQqTFP1uFYTdlOvljnPAW4ksftZG72bwTWfFVf D6p8wCiWhOROyba9u5WWRZ8oEaDmQlxJeroO3fog68aNtxhr6iTF0OmUHRGl3jyXc1Di IfCaK9NjCpir/9DAz+rrNs6uv77GNrHNHPbkilbLUqE0WuwnUE6yUCdAlfTYQ501i5qC KeNJ1Nbwl0LyMd6nP/d2qgK0RCAXhIggXhrzvdFksMYh/XNo5XKiJetySmfI+8aztDeT WTQTpZ0l/aFV5YNx5WCzM73MhKQ24FYVOEJ5WQhTsrtaqFBP6lda1HV1OfOJRUb88U5/ aXCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:date:mime-version:cc:to:from:subject:message-id; bh=WsAxt00yz4KKdHiw0kmusv1/sVBEwl8d3NW9O+QXAMQ=; b=KLlmA82I0DlHbCvVR9tBdZcMzy8owFxNrF+ALcJZ2BXLF6m59hNPElI+Ak16DfA/Fe B8c0YRJeLAc4Dkm/6/ifFiwg7mZnu6P+jsxZmtBMBNHV+zJvY3NMBv9sUiYqtBtAi2vx fn+xIGAlwa891gPJCqQxKcgQNuAdD6Jg/lsiS3+SyYAG1mCkFpSHk/beaVcoN3SwxJlo f4Oq5CvQNw38sOPfgwQMUm4udkpBDKOiUqvVdRmz1xcE6DJv6mNJ+mfyLfpo71NE4VPN LYAj+hp5mLKzF1n8Pr3v+D8iOkoFbipcm9Ar7hd7ctERHk8TfzR4gkiLuCeog0xNYP/3 Vjgw== 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 n14si3787347pgv.572.2019.02.14.18.36.29; Thu, 14 Feb 2019 18:36:45 -0800 (PST) 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 S1729148AbfBOCYh (ORCPT + 99 others); Thu, 14 Feb 2019 21:24:37 -0500 Received: from www262.sakura.ne.jp ([202.181.97.72]:12005 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726165AbfBOCY3 (ORCPT ); Thu, 14 Feb 2019 21:24:29 -0500 Received: from fsav106.sakura.ne.jp (fsav106.sakura.ne.jp [27.133.134.233]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id x1F2ORdY039579; Fri, 15 Feb 2019 11:24:27 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav106.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav106.sakura.ne.jp); Fri, 15 Feb 2019 11:24:27 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav106.sakura.ne.jp) Received: from www262.sakura.ne.jp (localhost [127.0.0.1]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id x1F2OREj039575; Fri, 15 Feb 2019 11:24:27 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: (from i-love@localhost) by www262.sakura.ne.jp (8.15.2/8.15.2/Submit) id x1F2ORDs039574; Fri, 15 Feb 2019 11:24:27 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Message-Id: <201902150224.x1F2ORDs039574@www262.sakura.ne.jp> X-Authentication-Warning: www262.sakura.ne.jp: i-love set sender to penguin-kernel@i-love.sakura.ne.jp using -f Subject: Re: [PATCH AUTOSEL 4.20 49/77] block: cover another queue enter recursion via =?ISO-2022-JP?B?QklPX1FVRVVFX0VOVEVSRUQ=?= From: Tetsuo Handa To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Ming Lei , Tetsuo Handa , NeilBrown , Jens Axboe , Sasha Levin , linux-block@vger.kernel.org MIME-Version: 1.0 Date: Fri, 15 Feb 2019 11:24:27 +0900 References: <20190215020855.176727-1-sashal@kernel.org> <20190215020855.176727-49-sashal@kernel.org> In-Reply-To: <20190215020855.176727-49-sashal@kernel.org> Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch turned out to be wrong and was reverted. Please drop this patch. commit 947b7ac135b16aa60f9141ff72bd494eda0edb5e Author: Jens Axboe Date: Sun Jan 27 06:35:28 2019 -0700 Revert "block: cover another queue enter recursion via BIO_QUEUE_ENTERED" We can't touch a bio after ->make_request_fn(), for all we know it could already have been completed by the time this function returns. This reverts commit 698cef173983b086977e633e46476e0f925ca01e. Reported-by: syzbot+4df6ca820108fd248943@syzkaller.appspotmail.com Signed-off-by: Jens Axboe > From: Ming Lei > > [ Upstream commit 698cef173983b086977e633e46476e0f925ca01e ] > > Except for blk_queue_split(), bio_split() is used for splitting bio too, > then the remained bio is often resubmit to queue via generic_make_request(). > So the same queue enter recursion exits in this case too. Unfortunatley > commit cd4a4ae4683dc2 doesn't help this case. > > This patch covers the above case by setting BIO_QUEUE_ENTERED before calling > q->make_request_fn. > > In theory the per-bio flag is used to simulate one stack variable, it is > just fine to clear it after q->make_request_fn is returned. Especially > the same bio can't be submitted from another context. > > Fixes: cd4a4ae4683dc2 ("block: don't use blocking queue entered for recursive bio submits") > Cc: Tetsuo Handa > Cc: NeilBrown > Reviewed-by: Mike Snitzer > Signed-off-by: Ming Lei > Signed-off-by: Jens Axboe > Signed-off-by: Sasha Levin > --- > block/blk-core.c | 11 +++++++++++ > block/blk-merge.c | 10 ---------- > 2 files changed, 11 insertions(+), 10 deletions(-)