Merge - #5
Conversation
Updated the build process to conditionally use different setup scripts based on the 'susfs' input. Removed commented-out code related to patch applications and adjusted the BBRv3 patch application method.
apply patch to fix KSUN and added Image to compile ONLY the kernel image for kernel
updated hashes and switch to official ksun rather than pershoots fork
Refactor build_kernels.yml by commenting out the cloning and patching steps for Droidspaces-OSS, and streamline kernel configuration options.
There was a problem hiding this comment.
Code Review
This pull request updates the changelog, transitions pm_get_active_wakeup_sources to use SRCU read locks with added input validation, and adjusts the wakeup event duration in alarmtimer_suspend to be dynamic. Feedback highlights two key issues: first, a potential unsigned underflow in alarmtimer.c if min is negative, which can be resolved by using max_t to guarantee a minimum duration of 1 millisecond; second, the use of the non-standard list_for_each_entry_rcu_locked macro in wakeup.c should be replaced with the standard list_for_each_entry_rcu to prevent compilation or lockdep issues.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| if (ktime_to_ns(min) < 2 * NSEC_PER_SEC) { | ||
| pm_wakeup_event(dev, 2 * MSEC_PER_SEC); | ||
| pm_wakeup_event(dev, ktime_to_ms(min) + 1); |
There was a problem hiding this comment.
If min is negative (e.g., if the alarm has already expired), ktime_to_ms(min) will return a negative value. Since pm_wakeup_event expects an unsigned int for the millisecond duration, passing a negative value will result in an extremely large wakeup duration (due to unsigned underflow), preventing the system from suspending. Use max_t to ensure the duration is at least 1 millisecond.
pm_wakeup_event(dev, max_t(s64, 0, ktime_to_ms(min)) + 1);| pending_wakeup_source[0] = '\0'; | ||
|
|
||
| srcuidx = srcu_read_lock(&wakeup_srcu); | ||
| list_for_each_entry_rcu_locked(ws, &wakeup_sources, entry) { |
There was a problem hiding this comment.
No description provided.