]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: buffer: iio_push_to_buffers_with_ts_unaligned() might_sleep()
authorDavid Lechner <dlechner@baylibre.com>
Tue, 16 Sep 2025 21:02:52 +0000 (16:02 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 13 Oct 2025 07:37:23 +0000 (08:37 +0100)
Call might_sleep() in iio_push_to_buffers_with_ts_unaligned() since it
can allocate memory, which may sleep.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-buffer.c

index 7da43a1f2f75f32dc93b9a5fe903378a79e82fe3..5599fa37b698dda6ff126496f62939331c12f524 100644 (file)
@@ -2412,6 +2412,8 @@ int iio_push_to_buffers_with_ts_unaligned(struct iio_dev *indio_dev,
 {
        struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
 
+       might_sleep();
+
        /*
         * Conservative estimate - we can always safely copy the minimum
         * of either the data provided or the length of the destination buffer.