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 8487F2D9EE2 for ; Thu, 19 Mar 2026 13:52:17 +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=1773928337; cv=none; b=dIEFEi69lu3You+HcP3eY7ai9ZXdOoADasdkP2Ili2gFcJsv0AapzTGnn5wVT8/rJgFpN6q5VAhn6pHwruZwB8JS3ffMoUnHU5CKpczj3FezKCPtm6f2VdgXNxFqvk66t0DCYSMb6vvMVId91vuAMiF6fUoQjV80RDaQgRL7wDQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773928337; c=relaxed/simple; bh=0HyWnDCpoHzTvM73LC4Pw0620gYQtRJbQi6yvNzmAyM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=vB/1Jo3zDg+rodgy8ikJqyKq6Vd1s+DiGwI8ma4rqLljTTZcUwlcnB/M8wJ/d9g//rGwG4uwm3ptxSD3P2gbQOXTlyusIK1sP9jBVOqF+BbS5ls+hfVVHth2EUgeztDrwqc2t5PM5XFI89SPy1Fj7PFzhtb5FZHmTz0nTDLnp8w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JpWuKMAS; 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="JpWuKMAS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B577CC19424; Thu, 19 Mar 2026 13:52:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773928337; bh=0HyWnDCpoHzTvM73LC4Pw0620gYQtRJbQi6yvNzmAyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JpWuKMASAms5m7o56ncKeYkyQ2zgQxeRNFOzyYtDu6FApTaXT4klsQnuGc1Vssd9s Sghm1F27kolbW4K3Qh2XwJmCC4qNltpos7bwu/1ENnd2hvCjG1an78fujJDm/02x3C Xa6xymgh8HVYMIkXi4M2wdFn9oIbnDbTATSHwx6g8Ui/oKNcbEp9KOiCG+TCxMiumR D4dUv2M7DIyd/crby5hxdu5zH3tS/rb2EUvLQjFv1Fl17gXfnI5dLrjYSxXqKfJo9p fxvmGZozdhJeBQyGsbSkul1FJYeR0gBdavKWz+UCFz8QiO5V6CosE5XlMx5ai9EdB7 VLRIIOSI9RAyA== From: Sasha Levin To: stable@vger.kernel.org Cc: "Masami Hiramatsu (Google)" , Zw Tang , Sasha Levin Subject: [PATCH 6.6.y 2/2] kprobes: Remove unneeded warnings from __arm_kprobe_ftrace() Date: Thu, 19 Mar 2026 09:52:12 -0400 Message-ID: <20260319135212.2484493-2-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260319135212.2484493-1-sashal@kernel.org> References: <2026031701-refueling-blob-24d8@gregkh> <20260319135212.2484493-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Masami Hiramatsu (Google)" [ Upstream commit 5ef268cb7a0aac55521fd9881f1939fa94a8988e ] Remove unneeded warnings for handled errors from __arm_kprobe_ftrace() because all caller handled the error correctly. Link: https://lore.kernel.org/all/177261531182.1312989.8737778408503961141.stgit@mhiramat.tok.corp.google.com/ Reported-by: Zw Tang Closes: https://lore.kernel.org/all/CAPHJ_V+J6YDb_wX2nhXU6kh466Dt_nyDSas-1i_Y8s7tqY-Mzw@mail.gmail.com/ Fixes: 9c89bb8e3272 ("kprobes: treewide: Cleanup the error messages for kprobes") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Sasha Levin --- kernel/kprobes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 70827cbf6035d..808b7e4f63bcb 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -1078,12 +1078,12 @@ static int __arm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops, lockdep_assert_held(&kprobe_mutex); ret = ftrace_set_filter_ip(ops, (unsigned long)p->addr, 0, 0); - if (WARN_ONCE(ret < 0, "Failed to arm kprobe-ftrace at %pS (error %d)\n", p->addr, ret)) + if (ret < 0) return ret; if (*cnt == 0) { ret = register_ftrace_function(ops); - if (WARN(ret < 0, "Failed to register kprobe-ftrace (error %d)\n", ret)) { + if (ret < 0) { /* * At this point, sinec ops is not registered, we should be sefe from * registering empty filter. -- 2.51.0