From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AC72C61DB3 for ; Fri, 6 Jan 2023 20:45:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235688AbjAFUpU (ORCPT ); Fri, 6 Jan 2023 15:45:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjAFUpS (ORCPT ); Fri, 6 Jan 2023 15:45:18 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09CDE9C; Fri, 6 Jan 2023 12:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=xiUR5yo1Xf+kMhRxDbcyFgKeRt/FmPsE+7rBoN9l/64=; b=mB3DXq7p6xE0ZmjOtPLKf39Eac RlcwzW41zXRbvidWKT98jr/aUtzfKlHqHQAoVJCPd0u+2S+8BuiqcD//5cRF0vMnJu29ccM6pgMDy CMtKeT1WzPMayddbXJP8zY6NNB6ItbBYYgu7brL0mNSNxjJTFVjyZHcKmb7xfr8+FN7JD78w5lbs4 jFVgMTSBT32CErD6eG6IS5m/hPGUu4sBaVwYrcob/Ut3TdeQxWhg4xD38N8Fj2W+gIAnICYFTr5tU QD0piuJjbQhObchkwzBOD2wv/vJD3UHdmqFVcumN3+6Rpnys805rtfmEggn9H/9lO/dDMgbQqtZtG 8nQE8opw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDtaS-00ErfA-KQ; Fri, 06 Jan 2023 20:45:12 +0000 Date: Fri, 6 Jan 2023 12:45:12 -0800 From: Luis Chamberlain To: Tejun Heo Cc: Jens Axboe , Dan Carpenter , Christoph Hellwig , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH block/for-6.2-fixes] block: Drop spurious might_sleep() from blk_put_queue() Message-ID: References: <9ac3390c-055b-546c-f1f4-68350dfe04f8@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 06, 2023 at 10:34:10AM -1000, Tejun Heo wrote: > Dan reports the following smatch detected the following: > > block/blk-cgroup.c:1863 blkcg_schedule_throttle() warn: sleeping in atomic context > > caused by blkcg_schedule_throttle() calling blk_put_queue() in an > non-sleepable context. > > blk_put_queue() acquired might_sleep() in 63f93fd6fa57 ("block: mark > blk_put_queue as potentially blocking") which transferred the might_sleep() > from blk_free_queue(). > > blk_free_queue() acquired might_sleep() in e8c7d14ac6c3 ("block: revert back > to synchronous request_queue removal") while turning request_queue removal > synchronous. However, this isn't necessary as nothing in the free path > actually requires sleeping. > > It's pretty unusual to require a sleeping context in a put operation and > it's not needed in the first place. Let's drop it. > > Signed-off-by: Tejun Heo > Reported-by: Dan Carpenter > Link: https://lkml.kernel.org/r/Y7g3L6fntnTtOm63@kili > Cc: Christoph Hellwig > Cc: Luis Chamberlain > Fixes: e8c7d14ac6c3 ("block: revert back to synchronous request_queue removal") # v5.9+ *tons* has changed since e8c7d14ac6c3 and so the bots might think that *if* this patch is applied upstream it is justified for older kernels and I don't think that's yet been verified and doubt it. And so I think adding a "Fixes" tag is not appropriate here. First I'd like to hear from Christoph if he agrees with this patch upstream. For stable, someone would have to do the homework. Luis