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 0EAE63A1B5; Tue, 26 Aug 2025 13:01:02 +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=1756213262; cv=none; b=Oz5aGM8sKrYDcLYfv1xp2b1vH8vLZqbS+wkBLVlpBsVoJk/J3Y6SSa2/8Msr2uQUFZjcIky09riF6y+Ah27PHJy0C2OmDdtRRd2XSUx9zyUaD0mlDjfuGpwgq8560pjf7ZT+VFQ1MZigA3B5NpIzt2+oYwwoBqOhwWtcSpWGl/8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756213262; c=relaxed/simple; bh=Cs/E3KE0LHDOiHIT9YNzpvIje77QnNeuHZrOX2S+81k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sYMrxnsl3u+prhShiW0PKSg4Q23XkOShn32pbLCmqIAKOQF+lIpR3cM9UWRunpBGpItHvnk39AqktiDaFSmUIyTTXsyUnp+As+kw4VSeNIPf5zPKRCI7KSX69eRSL2NBelQn/6/iTYpUYnYSVR0hLeygCmUpXyrGg6jHAMT/DZQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tXw6OPM+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="tXw6OPM+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6172FC4CEF1; Tue, 26 Aug 2025 13:01:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756213261; bh=Cs/E3KE0LHDOiHIT9YNzpvIje77QnNeuHZrOX2S+81k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tXw6OPM+zDpWq8RtXFYGm3gKWGqAkSBZc9xjdgAnIR6+ZWAtxQJ4qDKbVFjl4aKOw c7DP80CBL4wiNmCuEIMmPZIxrxcTrnGwMWlz3/XVTnl5q7E21znHHMwCtmafkmXaZ8 moclLRueKK2Uxr3cq8dqTJA6EwnBPuhfYfVBVEdg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Breno Leitao , Corey Minyard , Sasha Levin Subject: [PATCH 6.6 281/587] ipmi: Use dev_warn_ratelimited() for incorrect message warnings Date: Tue, 26 Aug 2025 13:07:10 +0200 Message-ID: <20250826111000.080899764@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250826110952.942403671@linuxfoundation.org> References: <20250826110952.942403671@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Breno Leitao [ Upstream commit ec50ec378e3fd83bde9b3d622ceac3509a60b6b5 ] During BMC firmware upgrades on live systems, the ipmi_msghandler generates excessive "BMC returned incorrect response" warnings while the BMC is temporarily offline. This can flood system logs in large deployments. Replace dev_warn() with dev_warn_ratelimited() to throttle these warnings and prevent log spam during BMC maintenance operations. Signed-off-by: Breno Leitao Message-ID: <20250710-ipmi_ratelimit-v1-1-6d417015ebe9@debian.org> Signed-off-by: Corey Minyard Signed-off-by: Sasha Levin --- drivers/char/ipmi/ipmi_msghandler.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index db8f1dadaa9f..96f175bd6d9f 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -4618,10 +4618,10 @@ static int handle_one_recv_msg(struct ipmi_smi *intf, * The NetFN and Command in the response is not even * marginally correct. */ - dev_warn(intf->si_dev, - "BMC returned incorrect response, expected netfn %x cmd %x, got netfn %x cmd %x\n", - (msg->data[0] >> 2) | 1, msg->data[1], - msg->rsp[0] >> 2, msg->rsp[1]); + dev_warn_ratelimited(intf->si_dev, + "BMC returned incorrect response, expected netfn %x cmd %x, got netfn %x cmd %x\n", + (msg->data[0] >> 2) | 1, msg->data[1], + msg->rsp[0] >> 2, msg->rsp[1]); goto return_unspecified; } -- 2.39.5