FAILED: patch "[PATCH] driver core: Limit the messages on a refused uevent" failed to apply to 5.10-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.10-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 <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x a01c8e5b1dff1ce489e6b339139e744db36b8bb3
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026110326-defuse-swifter-f038@gregkh' --subject-prefix 'PATCH 5.10.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From a01c8e5b1dff1ce489e6b339139e744db36b8bb3 Mon Sep 17 00:00:00 2001
From: Josef Bacik <[email protected]>
Date: Tue, 27 Oct 2026 18:18:19 +0100
Subject: [PATCH] driver core: Limit the messages on a refused uevent
A write to a "uevent" file which is no valid action makes kobject_synth_uevent() print a warning and uevent_store() an error every time. This is generally considered a bad thing so rate limit these messages.
drivers/base/core.c +3 -1
@@ -2847,7 +2847,9 @@ static ssize_t uevent_store(struct device *dev, const struct device_attribute *a rc =kobject_synth_uevent (&dev->kobj, buf, count);if (rc) { -dev_err (dev,"uevent: failed to send synthetic uevent: %d\n" , rc); +dev_err_ratelimited (dev, +"uevent: failed to send synthetic uevent: %d\n" , + rc);return rc; }
lib/kobject_uevent.c +3 -3
@@ -223,9 +223,9 @@ int kobject_synth_uevent(struct kobject *kobj, const char *buf, size_t count) out:if (r) { devpath =kobject_get_path (kobj,GFP_KERNEL ); -pr_warn ("synth uevent: %s: %s\n" , - devpath ?:"unknown device" , - msg ?:"failed to send uevent" ); +pr_warn_ratelimited ("synth uevent: %s: %s\n" , + devpath ?:"unknown device" , + msg ?:"failed to send uevent" );kfree (devpath); }return r;
Sasha Levin
maintainerPATCH 1/1 driver core: Limit the messages on a refused uevent
From: Josef Bacik <[email protected]>
[ Upstream commit a01c8e5b1dff1ce489e6b339139e744db36b8bb3 ]
A write to a "uevent" file which is no valid action makes kobject_synth_uevent() print a warning and uevent_store() an error every time. This is generally considered a bad thing so rate limit these messages.
--- drivers/base/core.c | 4 +++- lib/kobject_uevent.c | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-)
drivers/base/core.c +3 -1
@@ -2032,7 +2032,9 @@ static ssize_t uevent_store(struct device *dev, struct device_attribute *attr, rc =kobject_synth_uevent (&dev->kobj, buf, count);if (rc) { -dev_err (dev,"uevent: failed to send synthetic uevent\n" ); +dev_err_ratelimited (dev, +"uevent: failed to send synthetic uevent: %d\n" , + rc);return rc; }
lib/kobject_uevent.c +3 -3
@@ -224,9 +224,9 @@ int kobject_synth_uevent(struct kobject *kobj, const char *buf, size_t count) out:if (r) { devpath =kobject_get_path (kobj,GFP_KERNEL ); -pr_warn ("synth uevent: %s: %s\n" , - devpath ?:"unknown device" , - msg ?:"failed to send uevent" ); +pr_warn_ratelimited ("synth uevent: %s: %s\n" , + devpath ?:"unknown device" , + msg ?:"failed to send uevent" );kfree (devpath); }return r;
Signature · 1 line
2.53.0