Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2443601rdg; Mon, 14 Aug 2023 02:42:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGoyxNmirislMDL5nLM0xE5bQSc/ighOCa7vKAYtOgitIuUh8I0hQYYjZJXBqrcpNotmoik X-Received: by 2002:a17:906:292a:b0:99b:4ed4:5526 with SMTP id v10-20020a170906292a00b0099b4ed45526mr7302609ejd.7.1692006135042; Mon, 14 Aug 2023 02:42:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692006135; cv=none; d=google.com; s=arc-20160816; b=WgzzOusMpCnkqYpKsap3zktF5Kq6uOggdvrR0lccwTpZzOYFOsBkl3V6sRAlijxtRY fSx7rt8Iuw003amPXFeznxI+evmYzHewUTsn1j2ALy8g0oM+PwQUFo/GNcVnuJdYsEpt lvL9hxX5EMt0YMJek6GVX/+h+Hydr+PUlyTxFlmi6daSHWEnxFdTXApz9fmTMo5iE7n8 CV4VSpQWKbj9iKGSc8VGuXZa4QYsCQMkl+2EAUJ6eU0oAoAA3lQTuUp91+CseNwGoIHa 3L1GamMk0Ac+oUIVPMD5sPqA2sOzGeTTIPb6PuQZMQjfhP/nsK+3mhkMeCxvFEs/IXth OprQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=d5No2yWXOwFNofrztFyXIxBaBOAMm52WifJguXNm6mc=; fh=l7yMh5GRex2XwmIegUoDgiLmMeBPuZjxz/5e0w7lQYg=; b=CcVOizsfx2jZMyTyDK8GClYKdGS2uYWVpOhFXc4jouYsUy7dIx44UwgBb0ybBoNxqZ fx5KvMOcpPIhkYNOjhYLkjG0Nj6KHcMkJs3UmSWosuFNxVbrN+XmZcsFsehCOSRpc9Vq MjFEYPNoLJ+IX3KffQ1G+kaiGDVDMQHsyrwXwSkBZ1WzH4vRVu8y8ZOp96s7nlNsaoy1 6hn/GMBv+KGkgx9o4bQw8fbYUMm2tT2KzlqFmBXRCeqXEaWLopn+kqAQ+qHuLUeI1Vo/ gKS4uV+/uHhhWXS15LJP1w7JwD+vAkEMVCAiCGb8bZcjhssXQ88Sm16UbNOxClOHFGwJ p4cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WYyxr00H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j13-20020a170906254d00b00997dbbda750si7331049ejb.839.2023.08.14.02.41.50; Mon, 14 Aug 2023 02:42:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WYyxr00H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235013AbjHNIs0 (ORCPT + 99 others); Mon, 14 Aug 2023 04:48:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235003AbjHNIry (ORCPT ); Mon, 14 Aug 2023 04:47:54 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D12C91 for ; Mon, 14 Aug 2023 01:47:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692002832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d5No2yWXOwFNofrztFyXIxBaBOAMm52WifJguXNm6mc=; b=WYyxr00HEq5a1/GGjr2OZ88FnHXVHuczQHUY5teOZTFPo3eX3Dxn4/jl0I4ySuz/wFrIc/ G+bH22HnRdN6KB/Nnfya6ZA6n1UDCVdjNRTSeBRCFJjoN2AfBun5gJSXj3XV898T21PEwH DmTr3Cn1ifv8FTDrpAuhcVQY5hyiRpI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-108-m5H72l0VOcyYGOFjWcvkTg-1; Mon, 14 Aug 2023 04:47:04 -0400 X-MC-Unique: m5H72l0VOcyYGOFjWcvkTg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 36BDA805AF6; Mon, 14 Aug 2023 08:47:04 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6CF21492C13; Mon, 14 Aug 2023 08:47:01 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20230811010309.20196-2-zhanghongchen@loongson.cn> References: <20230811010309.20196-2-zhanghongchen@loongson.cn> <20230811010309.20196-1-zhanghongchen@loongson.cn> To: Hongchen Zhang Cc: dhowells@redhat.com, Alexander Viro , Christian Brauner , Steve French , Jens Axboe , David Disseldorp , Luis Chamberlain , Nick Alcock , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn Subject: Re: [PATCH v5 2/2] pipe: use __pipe_{lock,unlock} instead of spinlock MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3955286.1692002820.1@warthog.procyon.org.uk> Date: Mon, 14 Aug 2023 09:47:00 +0100 Message-ID: <3955287.1692002820@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hongchen Zhang wrote: > - spin_lock_irq(&pipe->rd_wait.lock); > + __pipe_lock(pipe); This mustn't sleep. post_one_notification() needs to be callable with a spinlock held. David