* [BACKPORT 4.14.y v2 0/6] Candidates from Spreadtrum 4.14 product kernel
@ 2019-09-05 3:05 Baolin Wang
2019-09-05 3:08 ` [BACKPORT 4.14.y v2 4/6] power: supply: sysfs: ratelimit property read error message Baolin Wang
0 siblings, 1 reply; 2+ messages in thread
From: Baolin Wang @ 2019-09-05 3:05 UTC (permalink / raw)
To: stable, davem, kuznet, yoshfuji, peterz, mingo, linus.walleij,
natechancellor, sre, paulus, gregkh
Cc: edumazet, netdev, longman, linux-gpio, david, linux-pm, ebiggers,
linux-ppp, lanqing.liu, linux-serial, arnd, baolin.wang,
orsonzhai, vincent.guittot, linux-kernel
With Arnd's script [1] help, I found some bugfixes in Spreadtrum 4.14 product
kernel, but missing in v4.14.141:
25a09ce79639 ppp: mppe: Revert "ppp: mppe: Add softdep to arc4"
47d3d7fdb10a ip6: fix skb leak in ip6frag_expire_frag_queue()
5b9cea15a3de serial: sprd: Modify the baud rate calculation formula
513e1073d52e locking/lockdep: Add debug_locks check in __lock_downgrade()
957063c92473 pinctrl: sprd: Use define directive for sprd_pinconf_params values
87a2b65fc855 power: supply: sysfs: ratelimit property read error message
[1] https://lore.kernel.org/lkml/20190322154425.3852517-19-arnd@arndb.de/T/
Changes from v1:
- Drop 2 unnecessary patches (patch 1 and patch 4) from v1 patch set.
- Add upstream commit id in change log for each stable patch.
David Lechner (1):
power: supply: sysfs: ratelimit property read error message
Eric Biggers (1):
ppp: mppe: Revert "ppp: mppe: Add softdep to arc4"
Eric Dumazet (1):
ip6: fix skb leak in ip6frag_expire_frag_queue()
Lanqing Liu (1):
serial: sprd: Modify the baud rate calculation formula
Nathan Chancellor (1):
pinctrl: sprd: Use define directive for sprd_pinconf_params values
Waiman Long (1):
locking/lockdep: Add debug_locks check in __lock_downgrade()
drivers/net/ppp/ppp_mppe.c | 1 -
drivers/pinctrl/sprd/pinctrl-sprd.c | 6 ++----
drivers/power/supply/power_supply_sysfs.c | 3 ++-
drivers/tty/serial/sprd_serial.c | 2 +-
include/net/ipv6_frag.h | 1 -
kernel/locking/lockdep.c | 3 +++
6 files changed, 8 insertions(+), 8 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* [BACKPORT 4.14.y v2 4/6] power: supply: sysfs: ratelimit property read error message
2019-09-05 3:05 [BACKPORT 4.14.y v2 0/6] Candidates from Spreadtrum 4.14 product kernel Baolin Wang
@ 2019-09-05 3:08 ` Baolin Wang
0 siblings, 0 replies; 2+ messages in thread
From: Baolin Wang @ 2019-09-05 3:08 UTC (permalink / raw)
To: stable, sre
Cc: david, linux-pm, arnd, baolin.wang, orsonzhai, vincent.guittot,
linux-kernel
From: David Lechner <david@lechnology.com>
[Upstream commit 87a2b65fc855e6be50f791c2ebbb492541896827]
This adds rate limiting to the message that is printed when reading a
power supply property via sysfs returns an error. This will prevent
userspace applications from unintentionally dDOSing the system by
continuously reading a property that returns an error.
Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
---
drivers/power/supply/power_supply_sysfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c
index eb5dc74..2ccaf4f 100644
--- a/drivers/power/supply/power_supply_sysfs.c
+++ b/drivers/power/supply/power_supply_sysfs.c
@@ -91,7 +91,8 @@ static ssize_t power_supply_show_property(struct device *dev,
dev_dbg(dev, "driver has no data for `%s' property\n",
attr->attr.name);
else if (ret != -ENODEV && ret != -EAGAIN)
- dev_err(dev, "driver failed to report `%s' property: %zd\n",
+ dev_err_ratelimited(dev,
+ "driver failed to report `%s' property: %zd\n",
attr->attr.name, ret);
return ret;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-05 3:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05 3:05 [BACKPORT 4.14.y v2 0/6] Candidates from Spreadtrum 4.14 product kernel Baolin Wang
2019-09-05 3:08 ` [BACKPORT 4.14.y v2 4/6] power: supply: sysfs: ratelimit property read error message Baolin Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).