* [BACKPORT 4.19.y 0/3] Candidates from Spreadtrum 4.14 product kernel
@ 2019-09-25 9:52 Baolin Wang
2019-09-25 9:55 ` [BACKPORT 4.19.y 3/3] power: supply: sysfs: ratelimit property read error message Baolin Wang
2019-09-28 20:02 ` [BACKPORT 4.19.y 0/3] Candidates from Spreadtrum 4.14 product kernel Sasha Levin
0 siblings, 2 replies; 3+ messages in thread
From: Baolin Wang @ 2019-09-25 9:52 UTC (permalink / raw)
To: stable, peterz, mingo, linus.walleij, natechancellor, sre
Cc: longman, linux-gpio, david, linux-pm, 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.19.75:
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/
David Lechner (1):
power: supply: sysfs: ratelimit property read error message
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/pinctrl/sprd/pinctrl-sprd.c | 6 ++----
drivers/power/supply/power_supply_sysfs.c | 3 ++-
kernel/locking/lockdep.c | 3 +++
3 files changed, 7 insertions(+), 5 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* [BACKPORT 4.19.y 3/3] power: supply: sysfs: ratelimit property read error message
2019-09-25 9:52 [BACKPORT 4.19.y 0/3] Candidates from Spreadtrum 4.14 product kernel Baolin Wang
@ 2019-09-25 9:55 ` Baolin Wang
2019-09-28 20:02 ` [BACKPORT 4.19.y 0/3] Candidates from Spreadtrum 4.14 product kernel Sasha Levin
1 sibling, 0 replies; 3+ messages in thread
From: Baolin Wang @ 2019-09-25 9:55 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 5a2757a..5358a80 100644
--- a/drivers/power/supply/power_supply_sysfs.c
+++ b/drivers/power/supply/power_supply_sysfs.c
@@ -131,7 +131,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] 3+ messages in thread
* Re: [BACKPORT 4.19.y 0/3] Candidates from Spreadtrum 4.14 product kernel
2019-09-25 9:52 [BACKPORT 4.19.y 0/3] Candidates from Spreadtrum 4.14 product kernel Baolin Wang
2019-09-25 9:55 ` [BACKPORT 4.19.y 3/3] power: supply: sysfs: ratelimit property read error message Baolin Wang
@ 2019-09-28 20:02 ` Sasha Levin
1 sibling, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2019-09-28 20:02 UTC (permalink / raw)
To: Baolin Wang
Cc: stable, peterz, mingo, linus.walleij, natechancellor, sre,
longman, linux-gpio, david, linux-pm, arnd, orsonzhai,
vincent.guittot, linux-kernel
On Wed, Sep 25, 2019 at 05:52:26PM +0800, Baolin Wang wrote:
>With Arnd's script [1] help, I found some bugfixes in Spreadtrum 4.14 product
>kernel, but missing in v4.19.75:
>
>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/
>
>David Lechner (1):
> power: supply: sysfs: ratelimit property read error message
>
>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/pinctrl/sprd/pinctrl-sprd.c | 6 ++----
> drivers/power/supply/power_supply_sysfs.c | 3 ++-
> kernel/locking/lockdep.c | 3 +++
> 3 files changed, 7 insertions(+), 5 deletions(-)
I've queued these up for 4.19, 4.14 and some for 4.9 and 4.4. Thank you.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-28 20:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-25 9:52 [BACKPORT 4.19.y 0/3] Candidates from Spreadtrum 4.14 product kernel Baolin Wang
2019-09-25 9:55 ` [BACKPORT 4.19.y 3/3] power: supply: sysfs: ratelimit property read error message Baolin Wang
2019-09-28 20:02 ` [BACKPORT 4.19.y 0/3] Candidates from Spreadtrum 4.14 product kernel Sasha Levin
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).