Skip to content

Commit 25c8ac5

Browse files
author
CKI KWF Bot
committed
Merge: power: supply: core: Use blocking_notifier_call_chain to avoid RCU complaint
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5286 JIRA: https://issues.redhat.com/browse/RHEL-36251 Resolves: 36251 Fix an RCU issue that happens on some HP laptops. Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com> Approved-by: Wander Lairson Costa <wander@redhat.com> Approved-by: Phil Auld <pauld@redhat.com> Approved-by: David Arcari <darcari@redhat.com> Approved-by: Lenny Szubowicz <lszubowi@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 6d87b50 + 145ae6d commit 25c8ac5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

drivers/power/supply/power_supply_core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
struct class *power_supply_class;
3030
EXPORT_SYMBOL_GPL(power_supply_class);
3131

32-
ATOMIC_NOTIFIER_HEAD(power_supply_notifier);
32+
BLOCKING_NOTIFIER_HEAD(power_supply_notifier);
3333
EXPORT_SYMBOL_GPL(power_supply_notifier);
3434

3535
static struct device_type power_supply_dev_type;
@@ -97,7 +97,7 @@ static void power_supply_changed_work(struct work_struct *work)
9797
class_for_each_device(power_supply_class, NULL, psy,
9898
__power_supply_changed_work);
9999
power_supply_update_leds(psy);
100-
atomic_notifier_call_chain(&power_supply_notifier,
100+
blocking_notifier_call_chain(&power_supply_notifier,
101101
PSY_EVENT_PROP_CHANGED, psy);
102102
kobject_uevent(&psy->dev.kobj, KOBJ_CHANGE);
103103
spin_lock_irqsave(&psy->changed_lock, flags);
@@ -1262,13 +1262,13 @@ static void power_supply_dev_release(struct device *dev)
12621262

12631263
int power_supply_reg_notifier(struct notifier_block *nb)
12641264
{
1265-
return atomic_notifier_chain_register(&power_supply_notifier, nb);
1265+
return blocking_notifier_chain_register(&power_supply_notifier, nb);
12661266
}
12671267
EXPORT_SYMBOL_GPL(power_supply_reg_notifier);
12681268

12691269
void power_supply_unreg_notifier(struct notifier_block *nb)
12701270
{
1271-
atomic_notifier_chain_unregister(&power_supply_notifier, nb);
1271+
blocking_notifier_chain_unregister(&power_supply_notifier, nb);
12721272
}
12731273
EXPORT_SYMBOL_GPL(power_supply_unreg_notifier);
12741274

include/linux/power_supply.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ struct power_supply_battery_info {
731731
int bti_resistance_tolerance;
732732
};
733733

734-
extern struct atomic_notifier_head power_supply_notifier;
734+
extern struct blocking_notifier_head power_supply_notifier;
735735
extern int power_supply_reg_notifier(struct notifier_block *nb);
736736
extern void power_supply_unreg_notifier(struct notifier_block *nb);
737737
#if IS_ENABLED(CONFIG_POWER_SUPPLY)

0 commit comments

Comments
 (0)