Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1741253rdg; Sat, 12 Aug 2023 14:33:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFOgzkf1R8CzLrD65v35x5KQq6Y96ekwH3Ubvk79dIn5BcerOqanw6TyOb3jSO/XIv22wJw X-Received: by 2002:a05:6a20:100d:b0:13c:8e50:34b8 with SMTP id gs13-20020a056a20100d00b0013c8e5034b8mr4382312pzc.35.1691876001485; Sat, 12 Aug 2023 14:33:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691876001; cv=none; d=google.com; s=arc-20160816; b=0aiEjCoqS9oLbWilMwx+hI3FXoTDhrHPdPOpAAKJ3A6ZYqIzKK8swz4aFGFRMBSkTp F6qOx1yMlF42ADuYQB65LFK8WwtrZUvjOmDzMkDwIA9b7O49BKqWuEz4ZORu0fIaFNMr fEIOGskPZzWXLQTAQiTrT1Lb9djOUu461REKTFogKvFBBMlkuBTAT/PoKcb3R6++UlK6 bNhBDQbKbC2j6esDQK8Nlr9MQEVDrZO5hEeLTyioZsE/JdTG0ERBnjMSMEGel5KMmPy4 XcYNRzwHZ1ZLoRHMp2C6fUBLzeRXPlf4N+/11BqaS+t9OhjXRE6VY3EYAI6F0ERqOXuc /X0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=LfS1esj2DuilUpbx4F9eF7liyAvMC4KoAqHgrAKHzms=; fh=4ulc0e7gofl5rQjQaLYlcdrka16oD7vG82H6dTLvfjI=; b=BEEbtaBVTe9GA1LIa2W1d64O3emoHMbR3RFWVKo/VxEalQOCHUruy+PCkk6L7KpcCH 1scnvE1nqqmMUA4WUV1CtXVbnjuU+ZE1YC52eMgqfARIMvNFBO81cWhIWjUg8+uLQzX7 LdfdTipvR/IogHIZQQfGDL096keTpMuUlmJiafPKFL+42oE3k0rsMdCPg0x/6rOR+ewz X1TJ4ggoqIya9jFaLy//L0eg7cxwHgmfl9NH7ayu/bPE8h4mq4VVcLIAsuO0NWUtoLxk pe3J2EVb4zimXiMGjFY4DoR9ypcXa/NyW7NgdlaJlR56ZhNPHfTxnCXoYUCl6hh5zMiE qFGQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cj12-20020a056a00298c00b0068302ab63e4si5412634pfb.273.2023.08.12.14.33.09; Sat, 12 Aug 2023 14:33:21 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231320AbjHLVIr (ORCPT + 99 others); Sat, 12 Aug 2023 17:08:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231292AbjHLVIq (ORCPT ); Sat, 12 Aug 2023 17:08:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EF3D1738; Sat, 12 Aug 2023 14:08:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C31E661CF4; Sat, 12 Aug 2023 21:08:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 686F6C433C7; Sat, 12 Aug 2023 21:08:47 +0000 (UTC) Date: Sat, 12 Aug 2023 17:08:39 -0400 From: Steven Rostedt To: Zheng Yejian Cc: "Masami Hiramatsu (Google)" , , , Subject: Re: [PATCH] tracing: Fix race when concurrently splice_read trace_pipe Message-ID: <20230812170839.2e4f2f22@rorschach.local.home> In-Reply-To: <0b83d0e5-5fe6-0cfb-4695-23c2cb86526d@huawei.com> References: <20230810123905.1531061-1-zhengyejian1@huawei.com> <20230811204257.99df8ba60d591f5bace38615@kernel.org> <20230811152413.76d5b72e@gandalf.local.home> <0b83d0e5-5fe6-0cfb-4695-23c2cb86526d@huawei.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Sat, 12 Aug 2023 10:22:43 +0800 Zheng Yejian wrote: > > And if it wasn't consumed? We just lost it? > > If 'iter->ent' was not consumed, trace_find_next_entry_inc() will find > it again, will it? No it will not, because it did the "inc". That means the next time it is called, it will find the next item to read, thinking it already "consumed" the last one. -- Steve