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 79BA5320380; Mon, 18 Aug 2025 14:08:03 +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=1755526083; cv=none; b=Op6LldE9kCZPsRGOXsymkGQdPUA1n3b705z5MGqj5LsMEzfmTeC2FOj6Rxra/+puBUe9HSJmpc9i8QpVnwkLFznpRPvzM7dQ80zLSfieF83pdAmH46Ygfn1+Dyz37NMz6I92A6fI6FPx4H8DHtWwjk4f2vftmD6TRxDqJ+/UCvA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755526083; c=relaxed/simple; bh=jhamu6fqcKLu7wVPe4aXe7YoUoKZrBUjz9Uc9WLOWl4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uBM5pyL02IXwvUG0tVWjPwP+XezDFoifuEEEyClyIWFiXpSowERRZa9AUTyYEXQt6J2XVPEeqli6HUul5YhDsurRAVAn5LFg6ccJuKP9UjtVn8tzfzkq+6V+I/4AFEjn6s7ttOIm4emRhAXg64q4ScaPWQnEty6w1QnbVyspNac= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=aUProUV0; 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="aUProUV0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB0B1C4CEEB; Mon, 18 Aug 2025 14:08:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755526083; bh=jhamu6fqcKLu7wVPe4aXe7YoUoKZrBUjz9Uc9WLOWl4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aUProUV0mJbnzmXeWZ4dQO8/HCZOjpaahS1DkW1DyP5VMlgL7DezCmaCOoOYAYF+W vUvMW7XO6fsaKPV2y/wHlzHgmqGjv/EljTr2Q4UU58pbhYJwIkOyfo0Xzx47vUhnPS tyzydnHJr/IYiERPgRCKDv06LViGoURZDa/sIhcg= 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.16 446/570] ipmi: Use dev_warn_ratelimited() for incorrect message warnings Date: Mon, 18 Aug 2025 14:47:13 +0200 Message-ID: <20250818124522.997239556@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250818124505.781598737@linuxfoundation.org> References: <20250818124505.781598737@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.16-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 064944ae9fdc..8e9050f99e9e 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -4607,10 +4607,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