]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
power: supply: cros_charge-control: add mutex for driver data
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 8 Dec 2024 14:59:26 +0000 (15:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Jan 2025 09:34:23 +0000 (10:34 +0100)
commit77e6c8adf8d66c5464ee8a85942823b4302e4942
treeec57a2f1129d8c43a7f9fd413ef29b18005801a1
parent7182f93bb358a99eeb9087c645230d29491230a8
power: supply: cros_charge-control: add mutex for driver data

commit e5f84d1cf562f7b45e28d6e5f6490626f870f81c upstream.

Concurrent accesses through sysfs may lead to inconsistent state in the
priv data. Introduce a mutex to avoid this.

Fixes: c6ed48ef5259 ("power: supply: add ChromeOS EC based charge control driver")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20241208-cros_charge-control-v2-v1-1-8d168d0f08a3@weissschuh.net
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/power/supply/cros_charge-control.c