mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-09 08:32:40 +00:00
IIO triggers are software IRQ chips that split an incoming IRQ into separate IRQs routed to all devices using the trigger. When all consumers are done then a trigger callback reenable() is called. There are a few circumstances under which this can happen in atomic context. 1) A single user of the trigger that calls the iio_trigger_done() function from interrupt context. 2) A race between disconnecting the last device from a trigger and the trigger itself sucessfully being disabled. To avoid a resulting scheduling whilst atomic, close this second corner by using schedule_work() to ensure the reenable is not done in atomic context. Note that drivers must be careful to manage the interaction of set_state() and reenable() callbacks to ensure appropriate reference counting if they are relying on the same hardware controls. Deliberately taking this the slow path rather than via a fixes tree because the error has hard to hit and I would like it to soak for a while before hitting a release kernel. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Pengutronix Kernel Team <kernel@pengutronix.de> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Tested-by: Oleksij Rempel <o.rempel@pengutronix.de> Cc: <Stable@vger.kernel.org> Link: https://lore.kernel.org/r/20211017172209.112387-1-jic23@kernel.org |
||
|---|---|---|
| .. | ||
| accel | ||
| adc | ||
| common | ||
| dac | ||
| frequency | ||
| gyro | ||
| imu | ||
| timer | ||
| buffer_impl.h | ||
| buffer-dma.h | ||
| buffer-dmaengine.h | ||
| buffer.h | ||
| configfs.h | ||
| consumer.h | ||
| driver.h | ||
| events.h | ||
| hw-consumer.h | ||
| iio-opaque.h | ||
| iio.h | ||
| kfifo_buf.h | ||
| machine.h | ||
| sw_device.h | ||
| sw_trigger.h | ||
| sysfs.h | ||
| trigger_consumer.h | ||
| trigger.h | ||
| triggered_buffer.h | ||
| triggered_event.h | ||
| types.h | ||