diff options
| author | Haowen Tu <tuhaowen@uniontech.com> | 2026-06-24 13:38:39 +0800 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-07-06 20:58:23 +0200 |
| commit | 6058646587dded0ce0ba91bd5a6afbf14fe42055 (patch) | |
| tree | 8164ec7e52de64ac64978fbc17fbb08e2c085e5e /tools/perf/scripts/python | |
| parent | 8cdeaa50eae8dad34885515f62559ee83e7e8dda (diff) | |
PM: sleep: Fix off-by-one in wakelocks number limit check
CONFIG_PM_WAKELOCKS_LIMIT is documented as the maximum number of
user-space wakeup sources, but the limit check is performed before
the counter is incremented and only rejects new wakeup sources when the
current number is greater than the limit. This allows one extra wakeup
source to be created.
Reject new wakeup sources once the counter has reached the limit.
Fixes: b86ff9820fd5 ("PM / Sleep: Add user space interface for manipulating wakeup sources, v3")
Signed-off-by: Haowen Tu <tuhaowen@uniontech.com>
[ rjw: Subject edits ]
Link: https://patch.msgid.link/20260624053839.2150567-1-tuhaowen@uniontech.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
