From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B3A772623 for ; Thu, 12 Feb 2026 08:15:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770884125; cv=none; b=j/AIrof71fvookQmhGhUtLs39u+/yKQwbrdc05W5WRjm+9t7Lju6rQh2DWb9CRb1j8tUu/PO2N0CoaqaYMhzSkUqTmHMdQbRmotAaI9i+b4KkWIq0cUfr5h8Nfq+l6ctUBSeGo+0v0F/r4ZmVQ43OBiIUczWtq6ysmtX7opIrDY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770884125; c=relaxed/simple; bh=G/xfy/Yw3aSBRYTcvSDLwFcvGpbEkfNZDAFwDFdzOso=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=BQ0BRG+Ae2NWvB7bKSWPb0o3GgOo9yVWI5RMk0wSX+wdWgzOGyaxjBMr+LI3RE6KVpijfiPlXVAGiHx4j3u2PFs+BWr/OAOMYN2tgeINjzJMJIpWY6t1Ndxffa6O7ifD0epx5SRhk9LvCvu4+9aHmnO1ewf8lVb3NntXXVmlPPA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Ocl8kg8r; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Ocl8kg8r" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-436e87589e8so3870866f8f.3 for ; Thu, 12 Feb 2026 00:15:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1770884123; x=1771488923; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=dYTcCQQ+ktTucF6pos13F1p1yELwstagH4PhEGEuB/8=; b=Ocl8kg8rMc8Ymyd4LT+Tq+A5q0Gnn8LIl/T+C/8Nd3K7AcLH5f0lWkuOOjZvuVQFnT tqlPDWCWE5pn4b0DQB7RQm1dkdq66KkghTRdn+bkMzKaeEVh/lhT9+KXIMtS4NGzG9QG Ht+F9DH5xTtjPUGij0JNh5VdUEPz7eG5VW/X+JqXfnoftTmWIqSWuijjdVzBLr3zqSBp K3CnmBCDDMmQm9nSf0TQIryvQktKMyhe3tA6Exi6bV5y07TCIeUrbXiiflZtjCzfkUOB Caaf2aYd9fw2mRoV918+TUPRlE9SyBJt3RRaUI3ua+ZA1lCGAROIUeK9HNIZQRjNjvMH S6YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770884123; x=1771488923; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dYTcCQQ+ktTucF6pos13F1p1yELwstagH4PhEGEuB/8=; b=voBZjU7STTjMA3yChHubZ6SWHrM8z3B7NTiKEGl03rZeNOZNAQADAtESz7yHFlO9z2 SbeMC2p84n1E4BUt6KKEa1YjWvVykNkvv+dDjA8hwIJ4OiIj+x6fMdJ3Hh3It3oQVnmS JqrkwssmHzdwSOsmD31MDfTx2IuKugAOFNRZw4jA2/L9GsBfRJenFnSxAUyXKC7yRo8a sotjGm1Vi0uZLTO2z+GR0l6qON4tmP5IUldcU1+euS51VlZ4q9iZ+9HFIoalEZib9QRP 9dl3espKXaWIT8HzpQsc7FmjhHb8udeHxTjvjOEpLGD7jt/P6/CCQlHzUWJyZohDdCRH nRTA== X-Forwarded-Encrypted: i=1; AJvYcCUiqvZlA2xnk69sSF5ikqDbx6RQiQQvY7Ru6r4B35FJaaBSIVxVIUU2HBqYTYYOrbP3k2P6f/9gs9uccPo=@vger.kernel.org X-Gm-Message-State: AOJu0Yym8JIM5cJ+hnbyME5nGzk59WzRYXL3rlhGATxTMMfp9VjuQYpE il/K9unztQwPWr08tw5W2UzSkWbw1neECm7bhTMKBZCez5Q7shKm6Htgy69lCElpRt0= X-Gm-Gg: AZuq6aI0o12TEMdiM1z5sGc+S9szgZjSXg/cwwasMdlBpCAH09eNBv+oCGbPpjgHLhS Ze/SpbEFHzz0TQZR9F87zbZSmP/ggbU3MVnIEFCheXJUdhxTNmdeE2LdGjxA74IBNwDT2LZR6tM RYazM1riU4iFojbIsn/LJ1hA2xrkLGVwADpQqBsDW89YN0BZruqCiBk8cIlueC7dryHNlNB0YXX PJ5TD4G77/IzV3aZSL7B7LXLOFeF4zG7L63j//i9rD+cWHD9o1i7MCmUN/B17HxISnKRnSNSrlh uK3H/KNv8M5+zfkQmklUMV6RK0DOyZnm+ccaxIDeDy/KBVJjC7rn8+OesuBIDzNRriMZtyEpHWC yPXUNWFVadVXIOTADrA934lECz0kC2ygAySIvTDLdLZ2EBdLOsjETrJRunRzlL0guiIEgsNqKGX FqS3TSPW/2Nq3CO7sRndAYYoupg2CRmi5WJ5GjpvRViWiz X-Received: by 2002:a05:6000:2212:b0:437:707e:9f59 with SMTP id ffacd0b85a97d-4378acd8e25mr3695732f8f.12.1770884122736; Thu, 12 Feb 2026 00:15:22 -0800 (PST) Received: from [10.100.51.209] (nat2.prg.suse.com. [195.250.132.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43783e38e26sm9858669f8f.26.2026.02.12.00.15.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Feb 2026 00:15:22 -0800 (PST) Message-ID: <71ebc4fb-6992-4a15-93e3-43390f2216d7@suse.com> Date: Thu, 12 Feb 2026 09:15:21 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/5] tracing: Fix checking of freed trace_event_file for id files To: Steven Rostedt Cc: Masami Hiramatsu , Mathieu Desnoyers , Tom Zanussi , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org References: <20260210113427.1068932-1-petr.pavlu@suse.com> <20260210113427.1068932-3-petr.pavlu@suse.com> <20260211113752.54bf37e9@fedora> Content-Language: en-US From: Petr Pavlu In-Reply-To: <20260211113752.54bf37e9@fedora> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/11/26 5:37 PM, Steven Rostedt wrote: > On Tue, 10 Feb 2026 12:28:17 +0100 > Petr Pavlu wrote: > >> The code for reading an event id currently uses file->f_inode->i_private to >> store the value of trace_event_file->event_call->event.type, unlike all >> other event files which use it to store a pointer to the associated >> trace_event_file data. The event_id_read() function retrieves this id value >> from i_private and checks if it is non-0/NULL to determine whether the >> event is still valid. This approach worked in the past when >> remove_event_file_dir() would set i_private to NULL for all files in an >> event directory upon removal. However, with the introduction of eventfs, >> i_private is assigned when an eventfs inode is allocated and remains set > >> throughout its lifetime. As a result, event_id_read() may fail to detect >> that an event is being removed. > > Who cares? It's just an id. If the event is being removed, there's > nothing wrong with still returning its id. The code currently is very > simple, I don't want to make it complex for something nobody cares > about. I think one could argue that handling all event files in the same way is less complex. It would also allow for a minor simplification where event_callback() would no longer need to modify the data pointer and eventfs then wouldn't need to pass it down to lookup_file() because it could always use the default ei->data. However, this is all minor and I can see your point of view. I'll drop this patch. -- Thanks, Petr