From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796384723; b=v+dODdHgvf0kaiLAHQnsOXlQsldCr9DDjJYgiLpWpP+qNJDaoKt0SjrhYsPgbWsxcxUx fUVDq8TfumZTkBFrG8YK6YWDTwnl4ALwYHf40QbMdHpEGshYp1J9VORVZEfrU8I64OqaJ Hwl8UyODZXL8Qwcwz6DzNwlgFSLl8yGIPoF7IMC1x+5+dnMW0qUXmWxqBIiCjZ4IDjW6s ixa839NztV1agh7Mp6oJHRSOZaF0qJbyj5E0LRi3TTW/bki9iPlxDlS+2no6iMqAAIkvg 9qMmx2vv6uO3TMkLD1jLCNb4Xf4HLJkGOEjaQi2OpFzMbRej9wkV/6Lg3O/00WKiLGA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796384723; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=BaY8ZzOnvLq7+NAdyZlM/Tj+6U1jCsJTYZ15pMO2ZCI=; b=ZgSSgJUb00UbQvAzZiBFxFldNKjJZnOVjxPLOQj4PLNjlj0bGmS1hmGao8eexS4tZehL 0v4T8aAF2pF84VPH1bsfZhrRxIFSSVz1Qa+a7cJsyXFF07J86vVQgIoCwu8edo4R667Pg Fn7vU6A8TijOLxKLWi5/kmYb8fU+45PkEZ481fEQzvRWkLujpLSLLdfojCFvcqamnFwiy 0fNUV+cCeal9u0bxUBUb3Ub5suTfhWfHmvWhkegXG7dQJ+0lteBKmM4aT4HL3DJNTkgKv wb8ZeAXYndRw4Lb1fPadCu8v7UneLkMN6UU+N6gsQEwmCt83V0bYlFNwaJ8Xy+BoIXg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=CQGQzbsX; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85642606A32C; Fri, 4 Dec 2026 11:45:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=CQGQzbsX Received: by smtp.kernel.org (Postfix) with ESMTPSA id 040F31F000C2; Fri, 4 Dec 2026 11:45:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796384723; bh=BaY8ZzOnvLq7+NAdyZlM/Tj+6U1jCsJTYZ15pMO2ZCI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=CQGQzbsXrdJ1ltDaCLcAA95M61NWqTcGhOmBzB0xksiXFTsEC0e/hhfbq9ivalHaE 6BJU7CgNRNn8PlmQrNmhs08bZLmXqdkH56P6xRO03jm8rdabmAj/JQ8qQnDuc9sQHa /YbRc3ppSaUAbusFODNTqB2A+toyRit4G+NQTpKE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wenwen Fu , "Masami Hiramatsu (Google)" , Sasha Levin Subject: [PATCH 6.6 0265/1167] tracing: skip boot kprobe setup when no events were requested Date: Fri, 4 Dec 2026 18:54:52 +0900 Message-ID: <20261204100708.961477901@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wenwen Fu [ Upstream commit 2388a673e9276de30c7e917fce50830e497d46cc ] setup_boot_kprobe_events() calls enable_boot_kprobe_events() even when the kprobe_event= boot parameter was not supplied. That call takes event_mutex without any command-line probes to enable. Asynchronous eval-map updates also hold event_mutex. A normal boot can therefore wait in init_kprobe_trace() for this background work despite having no boot probes to set up. Return early when the boot-event buffer is empty. Keep the mutex protection in trace_event_update_all() and retain setup for explicit kprobe_event= parameters. Bootconfig handles its own probe enablement, and the existing trace_eval_sync() still waits for background work before init memory is freed. Link: https://lore.kernel.org/all/20261106021457.2648231-1-wenwfu@qti.qualcomm.com/ Fixes: 970988e19eb0 ("tracing/kprobe: Add kprobe_event= boot parameter") Signed-off-by: Wenwen Fu Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Sasha Levin --- kernel/trace/trace_kprobe.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index 20dbe40ab15e8..d39f41a9bdb2e 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c @@ -1911,6 +1911,9 @@ static __init void setup_boot_kprobe_events(void) char *p, *cmd = kprobe_boot_events_buf; int ret; + if (!kprobe_boot_events_buf[0]) + return; + strreplace(kprobe_boot_events_buf, ',', ' '); while (cmd && *cmd != '\0') { -- 2.53.0