gpio: fix sleeping-in-atomic in shared-proxy; restore meson non-sleeping
Subsystems (3)
v3 cover gpio: fix sleeping-in-atomic in shared-proxy; restore meson non-sleeping
gpio-shared-proxy chooses its descriptor lock (mutex vs spinlock) from the underlying chip's can_sleep, but under that lock it calls config and direction ops that reach sleeping pinctrl paths. On a controller with non-sleeping MMIO value ops the lock is a spinlock, so a sleeping call runs from atomic context:
BUG: sleeping function called from invalid context
... pinctrl_gpio_set_config <- gpiochip_generic_config
<- gpio_shared_proxy_set_config (voting spinlock held)
<- ... <- mmc_pwrseq_simple_probeThis was reported on Khadas VIM3 and worked around for Amlogic by commit 28f240683871 ("pinctrl: meson: mark the GPIO controller as sleeping"), which marked the whole meson controller sleeping. That workaround broke atomic value-path consumers: w1-gpio (1-Wire bitbang) no longer detects devices, because its IRQ-disabled read slot calls the non-cansleep gpiod_*_value() and now hits WARN_ON(can_sleep) per bit.
Patch 1 fixes the proxy locking generically (always a sleeping mutex). Patch 2 then restores meson can_sleep=false, fixing 1-Wire.
Patch 1 has a trade-off: a proxied GPIO becomes sleeping, so consumers gating on gpiod_cansleep() change behaviour. No current device needs atomic (non-cansleep) value access on a shared GPIO -- every report (Khadas VIM3, ODROID-M1, my test on JetHub D1+) is a shared reset line (eMMC/SDIO pwrseq or PCIe reset) driven through the cansleep accessors, which is what the proxy exists to vote on; bit-banging that needs atomic access cannot work through voting anyway. An alternative that keeps atomic value access (split locking) is possible but adds a second lock and new race windows, so this series takes the simpler mutex-only approach.
The two are a unit: patch 2 must not be applied without patch 1, otherwise the original VIM3 splat returns on boards that share a meson GPIO -- please keep the order. I have not Cc'd stable; I will request stable backports separately once both patches have landed.
Changes since v2:
- gpio: shared-proxy: drop the set_func callback from gpio_shared_proxy_set_unlocked() and call gpiod_set_value_cansleep() directly. The shared direction_output path drives the already-output line through the value setter instead of re-issuing gpiod_direction_output() (equivalent, minus a redundant per-edge re-assert of drive config/bias). No change to the voting/value behaviour.
Changes since v1:
- gpio: shared-proxy: open-code the descriptor mutex; drop the gpio_shared_desc_lock guard and the gpio_shared_lockdep_assert() helper, move the mutex rationale to the can_sleep assignment.
v1: https://lore.kernel.org/linux-gpio/[email protected]/
v2: https://lore.kernel.org/linux-gpio/[email protected]/
Viacheslav Bocharov (2):
gpio: shared-proxy: always serialize with a sleeping mutex
pinctrl: meson: restore non-sleeping GPIO access
drivers/gpio/gpio-shared-proxy.c | 76 ++++++++++----------------- drivers/gpio/gpiolib-shared.c | 9 +--- drivers/gpio/gpiolib-shared.h | 28 +--------- drivers/pinctrl/meson/pinctrl-meson.c | 2 +- 4 files changed, 33 insertions(+), 82 deletions(-)
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
Signature · 1 line
2.54.0
PATCH v3 1/2 gpio: shared-proxy: always serialize with a sleeping mutex
The shared GPIO descriptor used either a mutex or a spinlock, chosen at runtime from the underlying chip's can_sleep:
shared_desc->can_sleep = gpiod_cansleep(shared_desc->desc); ... if (can_sleep) mutex_lock(); else spin_lock_irqsave();
can_sleep describes only the value path (->get/->set). Under the same lock, however, the proxy may call gpiod_set_config() and gpiod_direction_*(), which can reach pinctrl paths that take a mutex (e.g. gpiod_set_config() -> gpiochip_generic_config() -> pinctrl_gpio_set_config()), independent of can_sleep. On a controller with non-sleeping MMIO value ops the descriptor lock was a spinlock, so the sleeping pinctrl call ran from atomic context. Reproduced on an Amlogic A113X board with the workaround from commit 28f240683871 ("pinctrl: meson: mark the GPIO controller as sleeping") reverted; the original Khadas VIM3 report hit the same path:
BUG: sleeping function called from invalid context __mutex_lock pinctrl_get_device_gpio_range pinctrl_gpio_set_config gpiochip_generic_config gpiod_set_config gpio_shared_proxy_set_config <- voting spinlock held ... mmc_pwrseq_simple_probe
The spinlock existed to take the value vote from atomic context, but the vote and the (possibly sleeping) control operations share the same state and lock, so this scheme cannot serialize config under a mutex and still offer atomic value access. Always serialize the shared descriptor with a mutex instead and mark the proxy a sleeping gpiochip, driving the underlying GPIO through the cansleep value accessors: those are valid for both sleeping and non-sleeping chips, so value access keeps working on fast controllers, at the cost of no longer being atomic.
With every vote edge now driven through the cansleep value setter, gpio_shared_proxy_set_unlocked() no longer needs a per-call setter: drop its set_func callback and call gpiod_set_value_cansleep() directly. The shared direction_output path reaches it only once the line is already an output, so driving the value there is equivalent to re-issuing gpiod_direction_output(), without the redundant per-edge re-assertion of drive config and bias.
This is observable: consumers gating on gpiod_cansleep() take their sleeping branch on a proxied GPIO (mmc-pwrseq-emmc skips its emergency-restart reset handler; its normal reset is unaffected), and consumers that reject sleeping GPIOs (pwm-gpio, ps2-gpio, ...) would fail to probe. Such atomic users do not share a pin through the proxy, whose purpose is voting on shared reset/enable lines. The same narrowing already applies on Amlogic since that workaround, and rockchip addressed the identical splat per-driver in commit 7ca497be0016 ("gpio:
rockchip: Stop calling pinctrl for set_direction"); fixing the proxy addresses the locking error once, for every controller.
The lock type was added by commit a060b8c511ab ("gpiolib: implement low-level, shared GPIO support"); the sleeping call under it arrived with the proxy driver.
---
v2 -> v3: drop the set_func callback from gpio_shared_proxy_set_unlocked()
and call gpiod_set_value_cansleep() directly; the shared direction_output path drives the already-output line via the value setter instead of re-issuing gpiod_direction_output().
v1 -> v2: open-code the descriptor mutex; drop the gpio_shared_desc_lock
guard and the gpio_shared_lockdep_assert() helper, use guard(mutex) and lockdep_assert_held() directly; move the mutex rationale from the header to the can_sleep assignment in probe.
v1: https://lore.kernel.org/linux-gpio/[email protected]/
v2: https://lore.kernel.org/linux-gpio/[email protected]/
drivers/gpio/gpio-shared-proxy.c | 76 ++++++++++++-------------------- drivers/gpio/gpiolib-shared.c | 9 +--- drivers/gpio/gpiolib-shared.h | 28 +----------- 3 files changed, 32 insertions(+), 81 deletions(-)
drivers/gpio/gpio-shared-proxy.c +29 -47
@@ -9,8 +9,10 @@#include <linux/err.h> #include <linux/gpio/consumer.h> #include <linux/gpio/driver.h> +#include <linux/lockdep.h> #include <linux/mod_devicetable.h> #include <linux/module.h> +#include <linux/mutex.h> #include <linux/string_choices.h> #include <linux/types.h>
@@ -24,15 +26,13 @@ struct gpio_shared_proxy_data { };static int -gpio_shared_proxy_set_unlocked (struct gpio_shared_proxy_data *proxy, -int (*set_func)(struct gpio_desc *desc,int value), -int value) +gpio_shared_proxy_set_unlocked (struct gpio_shared_proxy_data *proxy,int value) {struct gpio_shared_desc *shared_desc = proxy->shared_desc;struct gpio_desc *desc = shared_desc->desc;int ret =0 ; -gpio_shared_lockdep_assert (shared_desc); +lockdep_assert_held (&shared_desc->mutex);if (value) {/* User wants to set value to high. */
@@ -46,7 +46,7 @@ gpio_shared_proxy_set_unlocked(struct gpio_shared_proxy_data *proxy,* Current value is low, need to actually set value * to high. */ - ret =set_func (desc,1 ); + ret =gpiod_set_value_cansleep (desc,1 );if (ret) goto out; }
@@ -65,7 +65,7 @@ gpio_shared_proxy_set_unlocked(struct gpio_shared_proxy_data *proxy,/* We previously voted for high. */ if (shared_desc->highcnt ==1 ) {/* This is the last remaining vote for high, set value to low. */ - ret =set_func (desc,0 ); + ret =gpiod_set_value_cansleep (desc,0 );if (ret) goto out; }
@@ -89,7 +89,7 @@ static int gpio_shared_proxy_request(struct gpio_chip *gc, unsigned int offset)struct gpio_shared_proxy_data *proxy =gpiochip_get_data (gc);struct gpio_shared_desc *shared_desc = proxy->shared_desc; -guard (gpio_shared_desc_lock)(shared_desc); +guard (mutex)(&shared_desc->mutex); proxy->shared_desc->usecnt++;
@@ -105,11 +105,10 @@ static void gpio_shared_proxy_free(struct gpio_chip *gc, unsigned int offset)struct gpio_shared_desc *shared_desc = proxy->shared_desc;int ret; -guard (gpio_shared_desc_lock)(shared_desc); +guard (mutex)(&shared_desc->mutex);if (proxy->voted_high) { - ret =gpio_shared_proxy_set_unlocked (proxy, - shared_desc->can_sleep ? gpiod_set_value_cansleep : gpiod_set_value,0 ); + ret =gpio_shared_proxy_set_unlocked (proxy,0 );if (ret)dev_err (proxy->dev,"Failed to unset the shared GPIO value on release: %d\n" , ret);
@@ -129,7 +128,7 @@ static int gpio_shared_proxy_set_config(struct gpio_chip *gc,struct gpio_desc *desc = shared_desc->desc;int ret; -guard (gpio_shared_desc_lock)(shared_desc); +guard (mutex)(&shared_desc->mutex);if (shared_desc->usecnt >1 ) {if (shared_desc->cfg != cfg) {
@@ -157,7 +156,7 @@ static int gpio_shared_proxy_direction_input(struct gpio_chip *gc,struct gpio_desc *desc = shared_desc->desc;int dir; -guard (gpio_shared_desc_lock)(shared_desc); +guard (mutex)(&shared_desc->mutex);if (shared_desc->usecnt ==1 ) { dev_dbg(proxy->dev,
@@ -187,7 +186,7 @@ static int gpio_shared_proxy_direction_output(struct gpio_chip *gc,struct gpio_desc *desc = shared_desc->desc;int ret, dir; -guard (gpio_shared_desc_lock)(shared_desc); +guard (mutex)(&shared_desc->mutex);if (shared_desc->usecnt ==1 ) { dev_dbg(proxy->dev,
@@ -219,14 +218,7 @@ static int gpio_shared_proxy_direction_output(struct gpio_chip *gc,return -EPERM ; } -return gpio_shared_proxy_set_unlocked (proxy, gpiod_direction_output, value); -} - -static int gpio_shared_proxy_get (struct gpio_chip *gc,unsigned int offset) -{ -struct gpio_shared_proxy_data *proxy =gpiochip_get_data (gc); - -return gpiod_get_value (proxy->shared_desc->desc); +return gpio_shared_proxy_set_unlocked (proxy, value); } static int gpio_shared_proxy_get_cansleep(struct gpio_chip *gc,
@@ -237,29 +229,14 @@ static int gpio_shared_proxy_get_cansleep(struct gpio_chip *gc,return gpiod_get_value_cansleep (proxy->shared_desc->desc); } -static int gpio_shared_proxy_do_set (struct gpio_shared_proxy_data *proxy, -int (*set_func)(struct gpio_desc *desc,int value), -int value) -{ -guard (gpio_shared_desc_lock)(proxy->shared_desc); - -return gpio_shared_proxy_set_unlocked (proxy, set_func, value); -} - -static int gpio_shared_proxy_set (struct gpio_chip *gc,unsigned int offset, -int value) -{ -struct gpio_shared_proxy_data *proxy =gpiochip_get_data (gc); - -return gpio_shared_proxy_do_set (proxy, gpiod_set_value, value); -} -static int gpio_shared_proxy_set_cansleep (struct gpio_chip *gc,unsigned int offset,int value) {struct gpio_shared_proxy_data *proxy =gpiochip_get_data (gc); -return gpio_shared_proxy_do_set (proxy, gpiod_set_value_cansleep, value); +guard (mutex)(&proxy->shared_desc->mutex); + +return gpio_shared_proxy_set_unlocked (proxy, value); } static int gpio_shared_proxy_get_direction(struct gpio_chip *gc,
@@ -302,20 +279,25 @@ static int gpio_shared_proxy_probe(struct auxiliary_device *adev, gc->label =dev_name (dev); gc->parent = dev; gc->owner =THIS_MODULE ; - gc->can_sleep = shared_desc->can_sleep; +/* +* Under the descriptor mutex the proxy may call +* gpiod_set_config()/gpiod_direction_*(), which can reach pinctrl +* paths that take a mutex (e.g. gpiod_set_config() -> +* gpiochip_generic_config() -> pinctrl_gpio_set_config()), independent +* of the underlying chip's can_sleep. So the descriptor lock must be a +* mutex and the proxy gpiochip is therefore always sleeping; drive the +* underlying GPIO through the cansleep value accessors, which are valid +* for both sleeping and non-sleeping chips. +*/ + gc->can_sleep = true; gc->request = gpio_shared_proxy_request; gc->free = gpio_shared_proxy_free; gc->set_config = gpio_shared_proxy_set_config; gc->direction_input = gpio_shared_proxy_direction_input; gc->direction_output = gpio_shared_proxy_direction_output; -if (gc->can_sleep) { - gc->set = gpio_shared_proxy_set_cansleep; - gc->get = gpio_shared_proxy_get_cansleep; - }else { - gc->set = gpio_shared_proxy_set; - gc->get = gpio_shared_proxy_get; - } + gc->set = gpio_shared_proxy_set_cansleep; + gc->get = gpio_shared_proxy_get_cansleep; gc->get_direction = gpio_shared_proxy_get_direction; gc->to_irq = gpio_shared_proxy_to_irq;
drivers/gpio/gpiolib-shared.c +2 -7
@@ -627,8 +627,7 @@ static void gpio_shared_release(struct kref *kref) shared_desc = entry->shared_desc;gpio_device_put (shared_desc->desc->gdev); -if (shared_desc->can_sleep) -mutex_destroy (&shared_desc->mutex); +mutex_destroy (&shared_desc->mutex);kfree (shared_desc); entry->shared_desc =NULL ; }
@@ -659,11 +658,7 @@ gpiod_shared_desc_create(struct gpio_shared_entry *entry) } shared_desc->desc = &gdev->descs[entry->offset]; - shared_desc->can_sleep =gpiod_cansleep (shared_desc->desc); -if (shared_desc->can_sleep) -mutex_init (&shared_desc->mutex); -else -spin_lock_init (&shared_desc->spinlock); +mutex_init (&shared_desc->mutex);return shared_desc; }
drivers/gpio/gpiolib-shared.h +1 -27
@@ -3,10 +3,7 @@#ifndef __LINUX_GPIO_SHARED_H#define __LINUX_GPIO_SHARED_H -#include <linux/cleanup.h> -#include <linux/lockdep.h> #include <linux/mutex.h> -#include <linux/spinlock.h> struct gpio_device ;struct gpio_desc ;
@@ -42,35 +39,12 @@ static inline int gpio_shared_add_proxy_lookup(struct device *consumer,struct gpio_shared_desc {struct gpio_desc *desc; -bool can_sleep;unsigned long cfg;unsigned int usecnt;unsigned int highcnt; -union { -struct mutex mutex; -spinlock_t spinlock; - }; +struct mutex mutex;/* serializes all proxy operations on this descriptor */ };struct gpio_shared_desc *devm_gpiod_shared_get (struct device *dev); -DEFINE_LOCK_GUARD_1(gpio_shared_desc_lock, struct gpio_shared_desc, - if (_T->lock->can_sleep) - mutex_lock(&_T->lock->mutex); - else - spin_lock_irqsave(&_T->lock->spinlock, _T->flags), -if (_T->lock->can_sleep) -mutex_unlock (&_T->lock->mutex); -else -spin_unlock_irqrestore (&_T->lock->spinlock, _T->flags), - unsigned long flags) - -static inline void gpio_shared_lockdep_assert (struct gpio_shared_desc *shared_desc) -{ -if (shared_desc->can_sleep) -lockdep_assert_held (&shared_desc->mutex); -else -lockdep_assert_held (&shared_desc->spinlock); -} -#endif /* __LINUX_GPIO_SHARED_H */
Signature · 1 line
2.54.0
PATCH v3 2/2 pinctrl: meson: restore non-sleeping GPIO access
In reply to Viacheslav BocharovCommit 28f240683871 ("pinctrl: meson: mark the GPIO controller as sleeping") set gpio_chip.can_sleep = true to work around gpio-shared-proxy holding a spinlock across a sleeping pinctrl config path. That locking bug is now fixed in the shared-proxy itself ("gpio:
shared-proxy: always serialize with a sleeping mutex"), so the controller-wide workaround is no longer needed; the meson GPIO controller does not sleep.
meson_gpio_get/set/direction_* access MMIO through regmap. The regmap_mmio bus uses fast I/O (spinlock) locking, so these value callbacks do not contain sleeping operations. Since gpio_chip.can_sleep describes the get/set value path, restore can_sleep = false.
Marking the controller sleeping also broke atomic value consumers such as w1-gpio (1-Wire bitbang): w1_io.c runs its read time slot under local_irq_save() and uses the non-cansleep gpiod_set_value() / gpiod_get_value(), which with can_sleep=true trigger WARN_ON(can_sleep) in gpiolib on every transferred bit (from w1_gpio_write_bit() / w1_gpio_read_bit() via w1_reset_bus() and w1_search()). The printk and stack dump inside the IRQs-off, microsecond-scale time slot destroy the bit timing, so reset/presence detection and ROM search fail: the bus master registers but w1_master_slave_count stays at 0 and no devices are found. Verified on an Amlogic A113X board (DS18B20 on GPIOA_14):
with can_sleep restored to false the warnings are gone and the sensor is detected and read again.
This must not be applied or backported without the shared-proxy locking fix above; otherwise the original Khadas VIM3 splat returns on boards that genuinely share a meson GPIO.
--- drivers/pinctrl/meson/pinctrl-meson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/meson/pinctrl-meson.c +1 -1
@@ -619,7 +619,7 @@ static int meson_gpiolib_register(struct meson_pinctrl *pc) pc->chip.set = meson_gpio_set; pc->chip.base =-1 ; pc->chip.ngpio = pc->data->num_pins; - pc->chip.can_sleep = true; + pc->chip.can_sleep = false; ret =gpiochip_add_data (&pc->chip, pc);if (ret) {
Signature · 1 line
2.54.0
[email protected]
AI reviewRe: [PATCH v3 2/2] pinctrl: meson: restore non-sleeping GPIO access
Thank you for your contribution! Sashiko AI review found 5 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 5 potential issue(s) to consider:
New issues:
- [High] Setting can_sleep = false without enabling raw spinlocks in the regmap configuration will cause panics on PREEMPT_RT kernels when called from atomic context.
Pre-existing issues:
- [High] The driver leaks the registered gpio_chip and causes a use-after-free on device unbind due to the lack of devres management for the GPIO chip.
- [High] Concurrent probes will race to modify the global static meson_regmap_config structure, potentially leading to corrupted regmap initialization.
- [High] Setting a GPIO to output temporarily exposes the old driven value before setting the new value, causing an output glitch.
- [Medium] The return value of regmap_read() is ignored in meson_gpio_get(), potentially evaluating uninitialized stack memory. --
commit b08edbdcf628b329dd9c5cf2f8f1fd105ba240d1
Author: Viacheslav Bocharov <[email protected]>
pinctrl: meson: restore non-sleeping GPIO access
Commit 28f240683871 ("pinctrl: meson: mark the GPIO controller as sleeping") set gpio_chip.can_sleep = true to work around gpio-shared-proxy holding a spinlock across a sleeping pinctrl config path. That locking bug is now fixed in the shared-proxy itself ("gpio:
shared-proxy: always serialize with a sleeping mutex"), so the controller-wide workaround is no longer needed; the meson GPIO controller does not sleep.
[ ... ]
drivers/pinctrl/meson/pinctrl-meson.c static int meson_gpiolib_register(struct meson_pinctrl *pc) · line 622
Quoted 10 lines
drivers/pinctrl/meson/pinctrl-meson.c +1
-1@@ -619,7 +619,7 @@ static int meson_gpiolib_register(struct meson_pinctrl *pc) pc->chip.set = meson_gpio_set; pc->chip.base =-1 ; pc->chip.ngpio = pc->data->num_pins; - pc->chip.can_sleep = true; + pc->chip.can_sleep = false;
[Severity: High]
Does setting can_sleep to false without configuring the regmap to use raw spinlocks cause panics on PREEMPT_RT kernels?
When atomic consumers like w1-gpio acquire a raw lock and disable IRQs, they then call gpiod_set_value(). Since meson_regmap_config does not set use_raw_spinlock = true, the MMIO regmap uses a standard spinlock_t which sleeps on PREEMPT_RT. Taking a sleeping lock with interrupts disabled will crash the system.
drivers/pinctrl/meson/pinctrl-meson.c static int meson_gpiolib_register(struct meson_pinctrl *pc) · line 624
Quoted 2 lines
drivers/pinctrl/meson/pinctrl-meson.c +0
-0ret =gpiochip_add_data (&pc->chip, pc);
[Severity: High]
This is a pre-existing issue, but does this leak the registered gpio_chip and cause a use-after-free on device unbind?
Because the platform driver lacks a .remove callback and uses gpiochip_add_data() instead of devm_gpiochip_add_data(), the GPIO chip remains registered after struct meson_pinctrl is freed by devres.
drivers/pinctrl/meson/pinctrl-meson.c static int meson_gpiolib_register(struct meson_pinctrl *pc) · line 625
Quoted 2 lines
drivers/pinctrl/meson/pinctrl-meson.c +0
-0if (ret) { dev_err(pc->dev, "can't add gpio chip %s\n",
drivers/pinctrl/meson/pinctrl-meson.c:meson_map_resource() {
...
meson_regmap_config.max_register = resource_size(&res) - 4;
meson_regmap_config.name = devm_kasprintf(pc->dev, GFP_KERNEL,
"%pOFn-%s", node,
name);
...
}[Severity: High]
This is a pre-existing issue, but will concurrent probes race to modify the global static meson_regmap_config structure?
Multiple Meson pinctrl instances probing concurrently can modify these fields without synchronization, potentially leading to out-of-bounds register accesses or use-after-free of strings.
drivers/pinctrl/meson/pinctrl-meson.c:meson_pinconf_set_output_drive() {
...
ret = meson_pinconf_set_output(pc, pin, true);
if (ret)
return ret;
return meson_pinconf_set_drive(pc, pin, high);
}[Severity: High]
This is a pre-existing issue, but could setting the GPIO direction to output before setting the desired output value cause a physical glitch on the GPIO line?
During the window between the two regmap updates, the pin is driven with whatever stale value was previously in the output register.
drivers/pinctrl/meson/pinctrl-meson.c:meson_gpio_get() {
...
meson_calc_reg_and_bit(bank, gpio, MESON_REG_IN, ®, &bit);
regmap_read(pc->reg_gpio, reg, &val);
return !!(val & BIT(bit));
}[Severity: Medium]
This is a pre-existing issue, but is it possible for regmap_read() to fail here?
If the register access fails, the return value is ignored. The uninitialized stack variable val is then evaluated, resulting in non-deterministic GPIO state being reported to consumers.
Signature · 6 lines
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
Re: (subset) [PATCH v3 0/2] gpio: fix sleeping-in-atomic in shared-proxy; restore meson non-sleeping
In reply to Viacheslav BocharovQuoted 6 lines · Viacheslav Bocharov
gpio-shared-proxy chooses its descriptor lock (mutex vs spinlock) from the underlying chip's
can_sleep, but under that lock it calls config and direction ops that reach sleeping pinctrl paths. On a controller with non-sleeping MMIO value ops the lock is a spinlock, so a sleeping call runs from atomic context:
Quoted 6 lines
BUG: sleeping function called from invalid context ... pinctrl_gpio_set_config <- gpiochip_generic_config <- gpio_shared_proxy_set_config (voting spinlock held) <- ... <- mmc_pwrseq_simple_probe[...]
There are no build-time dependencies between this and 2/2 so let me queue this for fixes on its own and Linus W can take 2/2.
[1/2] gpio: shared-proxy: always serialize with a sleeping mutex
https://git.kernel.org/brgl/c/efecde8a254d1f207b75c5ebcfba2c51f4c771d9
Best regards,
Signature · 1 line
Bartosz Golaszewski <[email protected]>