From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 281C6296BD3; Sun, 1 Mar 2026 01:29:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772328592; cv=none; b=lJGgVb4x4offY2jkSgQrx9SA/jQIZ4f1GaneySEF0/5s0fLRFqPUYKdcUdQfDT9pBUUxZMIRteiKxOxtUsa0VDp/sdMJics9GYGmLoA2gvSldSXlsYxHxEJzrB/tjC9Epb/sJjP3/D+Bpp2ZHyXqcPHcK7WyQK4PYczFnoHxXj8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772328592; c=relaxed/simple; bh=ibmNp6aYqt7OjDqYP6vHp6RWN3uJNdL/0aFTSEUxco0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lQfElYOHLtdW4FkxgCL6mTGoMfl/Eq3LQVoa6TBvGlZsJi4t1aM555xYXDrExRpmvH6HbU7rrdEIt3Ht9vVTzb6A4BpKfOKX+MnTMqK+2i70bnH9b0PZ2WLo5b8iwTZuk6RB7pIiRj9KQNlpgRmp0mAUIqW+5jSh2xukw6z6mtA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GrwzzRGq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GrwzzRGq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51CF3C19421; Sun, 1 Mar 2026 01:29:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772328592; bh=ibmNp6aYqt7OjDqYP6vHp6RWN3uJNdL/0aFTSEUxco0=; h=From:To:Cc:Subject:Date:From; b=GrwzzRGqsOsHRV2R4sH8KxJkfs0hBFt3qF2tYPrFug42/UeMzoWx7saQPT/Rc9Pwt qI4vk+JZiJPxbR6Us6ugIgh9CxcIgnfHoT8+SgpIph39PwAH/2Ghs3Fpe04opDXhJQ ejGVJchFnhbUzll64FJnAWDrniTxiizpddMgTujDtpZydsgGJ0o15eZTp4YvDMRvFu sUtWxQ6SG5YZXowoWwON51lIsodJL0YX+PBqwQf7Ha/ErwFMKxev9vXs3OfPhySkxH bBVQbrnSaUm7dhUVh1ZxwyFQbqgWXWHR+mrrUu0YtV2saDBJ1CBaIKdh4czOqh3dts c295hNqeY4X5g== From: Sasha Levin To: stable@vger.kernel.org, petr.pavlu@suse.com Cc: Mathieu Desnoyers , Tom Zanussi , "Masami Hiramatsu (Google)" , "Steven Rostedt (Google)" , linux-trace-kernel@vger.kernel.org Subject: FAILED: Patch "tracing: Wake up poll waiters for hist files when removing an event" failed to apply to 6.12-stable tree Date: Sat, 28 Feb 2026 20:29:49 -0500 Message-ID: <20260301012950.1687708-1-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Hint: ignore X-stable: review Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . Thanks, Sasha ------------------ original commit in Linus's tree ------------------ >From 9678e53179aa7e907360f5b5b275769008a69b80 Mon Sep 17 00:00:00 2001 From: Petr Pavlu Date: Thu, 19 Feb 2026 17:27:02 +0100 Subject: [PATCH] tracing: Wake up poll waiters for hist files when removing an event The event_hist_poll() function attempts to verify whether an event file is being removed, but this check may not occur or could be unnecessarily delayed. This happens because hist_poll_wakeup() is currently invoked only from event_hist_trigger() when a hist command is triggered. If the event file is being removed, no associated hist command will be triggered and a waiter will be woken up only after an unrelated hist command is triggered. Fix the issue by adding a call to hist_poll_wakeup() in remove_event_file_dir() after setting the EVENT_FILE_FL_FREED flag. This ensures that a task polling on a hist file is woken up and receives EPOLLERR. Cc: stable@vger.kernel.org Cc: Mathieu Desnoyers Cc: Tom Zanussi Acked-by: Masami Hiramatsu (Google) Link: https://patch.msgid.link/20260219162737.314231-3-petr.pavlu@suse.com Fixes: 1bd13edbbed6 ("tracing/hist: Add poll(POLLIN) support on hist file") Signed-off-by: Petr Pavlu Signed-off-by: Steven Rostedt (Google) --- include/linux/trace_events.h | 5 +++++ kernel/trace/trace_events.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index 0a2b8229b999c..37eb2f0f3dd8e 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -683,6 +683,11 @@ static inline void hist_poll_wakeup(void) #define hist_poll_wait(file, wait) \ poll_wait(file, &hist_poll_wq, wait) + +#else +static inline void hist_poll_wakeup(void) +{ +} #endif #define __TRACE_EVENT_FLAGS(name, value) \ diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 61fe01dce7a6f..b659653dc03ac 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -1311,6 +1311,9 @@ static void remove_event_file_dir(struct trace_event_file *file) free_event_filter(file->filter); file->flags |= EVENT_FILE_FL_FREED; event_file_put(file); + + /* Wake up hist poll waiters to notice the EVENT_FILE_FL_FREED flag. */ + hist_poll_wakeup(); } /* -- 2.51.0