mbox series

[SRU,L/M,0/1] Fix RCU warning on AMD laptops

Message ID 20230918045841.1477606-1-kai.heng.feng@canonical.com
Headers show
Series Fix RCU warning on AMD laptops | expand

Message

Kai-Heng Feng Sept. 18, 2023, 4:58 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/2036377

[Impact]
Scary kernel splat about RCU can be observed everytime laptop resumes
from suspend.

[Fix]
Use non-atomic notifier for power supply change to relax the constraint.

[Test]
Once the fix is applied, no more RCU warning can be found after several
suspend/resume cycle.

[Where problems could occur]
Essentially no regression potential. Atomic notifier should be used by
core kernel, and things like power supply doesn't need to be atomic
anyway.

Kai-Heng Feng (1):
  power: supply: core: Use blocking_notifier_call_chain to avoid RCU
    complaint

 drivers/power/supply/power_supply_core.c | 8 ++++----
 include/linux/power_supply.h             | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

Tim Gardner Sept. 19, 2023, 12:36 p.m. UTC | #1
On 9/17/23 10:58 PM, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/2036377
> 
> [Impact]
> Scary kernel splat about RCU can be observed everytime laptop resumes
> from suspend.
> 
> [Fix]
> Use non-atomic notifier for power supply change to relax the constraint.
> 
> [Test]
> Once the fix is applied, no more RCU warning can be found after several
> suspend/resume cycle.
> 
> [Where problems could occur]
> Essentially no regression potential. Atomic notifier should be used by
> core kernel, and things like power supply doesn't need to be atomic
> anyway.
> 
> Kai-Heng Feng (1):
>    power: supply: core: Use blocking_notifier_call_chain to avoid RCU
>      complaint
> 
>   drivers/power/supply/power_supply_core.c | 8 ++++----
>   include/linux/power_supply.h             | 2 +-
>   2 files changed, 5 insertions(+), 5 deletions(-)
> 
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Roxana Nicolescu Sept. 20, 2023, 7:50 a.m. UTC | #2
On 18/09/2023 06:58, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/2036377
>
> [Impact]
> Scary kernel splat about RCU can be observed everytime laptop resumes
> from suspend.
>
> [Fix]
> Use non-atomic notifier for power supply change to relax the constraint.
>
> [Test]
> Once the fix is applied, no more RCU warning can be found after several
> suspend/resume cycle.
>
> [Where problems could occur]
> Essentially no regression potential. Atomic notifier should be used by
> core kernel, and things like power supply doesn't need to be atomic
> anyway.
>
> Kai-Heng Feng (1):
>    power: supply: core: Use blocking_notifier_call_chain to avoid RCU
>      complaint
>
>   drivers/power/supply/power_supply_core.c | 8 ++++----
>   include/linux/power_supply.h             | 2 +-
>   2 files changed, 5 insertions(+), 5 deletions(-)
>
Acked-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
Roxana Nicolescu Sept. 20, 2023, 9:38 a.m. UTC | #3
On 18/09/2023 06:58, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/2036377
>
> [Impact]
> Scary kernel splat about RCU can be observed everytime laptop resumes
> from suspend.
>
> [Fix]
> Use non-atomic notifier for power supply change to relax the constraint.
>
> [Test]
> Once the fix is applied, no more RCU warning can be found after several
> suspend/resume cycle.
>
> [Where problems could occur]
> Essentially no regression potential. Atomic notifier should be used by
> core kernel, and things like power supply doesn't need to be atomic
> anyway.
>
> Kai-Heng Feng (1):
>    power: supply: core: Use blocking_notifier_call_chain to avoid RCU
>      complaint
>
>   drivers/power/supply/power_supply_core.c | 8 ++++----
>   include/linux/power_supply.h             | 2 +-
>   2 files changed, 5 insertions(+), 5 deletions(-)
>
Applied to lunar:master-next. Thanks!
Stefan Bader Oct. 4, 2023, 9:57 a.m. UTC | #4
On 18.09.23 06:58, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/2036377
> 
> [Impact]
> Scary kernel splat about RCU can be observed everytime laptop resumes
> from suspend.
> 
> [Fix]
> Use non-atomic notifier for power supply change to relax the constraint.
> 
> [Test]
> Once the fix is applied, no more RCU warning can be found after several
> suspend/resume cycle.
> 
> [Where problems could occur]
> Essentially no regression potential. Atomic notifier should be used by
> core kernel, and things like power supply doesn't need to be atomic
> anyway.
> 
> Kai-Heng Feng (1):
>    power: supply: core: Use blocking_notifier_call_chain to avoid RCU
>      complaint
> 
>   drivers/power/supply/power_supply_core.c | 8 ++++----
>   include/linux/power_supply.h             | 2 +-
>   2 files changed, 5 insertions(+), 5 deletions(-)
> 

Applied to mantic:linux/master-next. Thanks.

-Stefan