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 28C34C636D4 for ; Tue, 7 Feb 2023 18:25:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232608AbjBGSZy (ORCPT ); Tue, 7 Feb 2023 13:25:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232109AbjBGSZk (ORCPT ); Tue, 7 Feb 2023 13:25:40 -0500 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F24A81AE for ; Tue, 7 Feb 2023 10:25:07 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id sa10so14489725ejc.9 for ; Tue, 07 Feb 2023 10:25:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pizbVdzIu8iuBwFy6mvT//fygI8uGhRT/vJXKJ1LaVY=; b=Cbdf46oletXuJOCJFIQa/rXoWMh2VweqM3WV0BdriyXCVvt01UIAIUTfYvqvj42FI2 dGIfD10JkRckky68XPz+miwRmw315N2EVOwurVjhjAEG1ALANVLXtxKLg2HenyvlPIf3 BQ+5TFXwBlTTO9jEL5tKFIsun1OjHvxjw507I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pizbVdzIu8iuBwFy6mvT//fygI8uGhRT/vJXKJ1LaVY=; b=Pvq7DpL0PQLTQuCWyCzeh3edrCHycbH85nMQmpWoz4wj9BgVd5A30gRksyWHqsi0id +rf1lLhm0y0FfrPwAOvIA6Rtrtwbu0FfoOf3qgsmJjx0GEF4Izx1xjbDKXnup4qHxR1j xnQlGZ5z4tDWZtcz+j7OWoFIonU7KnyztqnkZW07LQJHRjkbXqm4bDvWauEdszkHLIp1 2EvBIL8lXWjEWcsaIAKRda5Za03nebTHqP7immmH56evu133mEVLG6BdS0LbJQ99GupB zI2JLXXvBqMPznxaosy5alam3OApKDy53G6VlSc/gVCewm3p2b1sgWSI7x68jC4NffaX mzEA== X-Gm-Message-State: AO0yUKVXyIojxEBTgmL8bHhDyFY5ERtxe02R3wCG1PlHwIhUAifRyAx0 /jf3tglVpxdT//82pyeLJ5ir6qWDZ5HAe7JOkXutCA== X-Google-Smtp-Source: AK7set/zCijcP03eTMU+2PhxffdAXyPf3oFS3VHfWoeL1IaY8vYSg0WqeOjtMaD3pqHkwRuwpUhl2g== X-Received: by 2002:a17:907:2c54:b0:882:82b3:58bc with SMTP id hf20-20020a1709072c5400b0088282b358bcmr4492008ejc.65.1675794303620; Tue, 07 Feb 2023 10:25:03 -0800 (PST) Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com. [209.85.218.51]) by smtp.gmail.com with ESMTPSA id sa21-20020a170906edb500b0088957f66018sm7245480ejb.142.2023.02.07.10.25.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Feb 2023 10:25:02 -0800 (PST) Received: by mail-ej1-f51.google.com with SMTP id sa10so14489376ejc.9 for ; Tue, 07 Feb 2023 10:25:02 -0800 (PST) X-Received: by 2002:a17:906:4e46:b0:87a:7098:ca09 with SMTP id g6-20020a1709064e4600b0087a7098ca09mr970336ejw.78.1675794302170; Tue, 07 Feb 2023 10:25:02 -0800 (PST) MIME-Version: 1.0 References: <20230129060452.7380-1-zhanghongchen@loongson.cn> <4ffbb0c8-c5d0-73b3-7a4e-2da9a7b03669@inria.fr> In-Reply-To: From: Linus Torvalds Date: Tue, 7 Feb 2023 10:24:45 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: block: sleeping in atomic warnings To: Eric Biggers Cc: Dan Carpenter , linux-block@vger.kernel.org, Julia Lawall , Luis Chamberlain , Hongchen Zhang , Alexander Viro , Andrew Morton , "Christian Brauner (Microsoft)" , David Howells , Mauro Carvalho Chehab , Eric Dumazet , "Fabio M. De Francesco" , Christophe JAILLET , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, maobibo , Matthew Wilcox , Sedat Dilek Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 7, 2023 at 9:53 AM Eric Biggers wrote: > > It's a false positive. See the comment above fscrypt_destroy_keyring() Hmm. Ok. Unfortunate. > If the filesystem has not been mounted, then the call from __put_super() > is needed, but blk_crypto_evict_key() can never be executed in that case. It's not all that clear that some *other* error might not have happened to keep the mount from actually succeeding, but after the keys have been instantiated? IOW, what's the thing that makes "blk_crypto_evict_key() can never be executed in that case" be obvious? I think _that_ is what might want a comment, about how we always call generic_shutdown_super() before the last put_super() happens. It does seem like Dan's automated checks could be useful, but if there's no sane way to avoid the false positives, it's always going to be a lot of noise ;( Linus