From: David Lechner Date: Tue, 16 Sep 2025 21:02:52 +0000 (-0500) Subject: iio: buffer: iio_push_to_buffers_with_ts_unaligned() might_sleep() X-Git-Tag: v6.19-rc1~65^2~58^2~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8c8aad411554755ab59621dc6961db8a4c8af7a;p=thirdparty%2Fkernel%2Flinux.git iio: buffer: iio_push_to_buffers_with_ts_unaligned() might_sleep() Call might_sleep() in iio_push_to_buffers_with_ts_unaligned() since it can allocate memory, which may sleep. Suggested-by: Andy Shevchenko Signed-off-by: David Lechner Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c index 7da43a1f2f75f..5599fa37b698d 100644 --- a/drivers/iio/industrialio-buffer.c +++ b/drivers/iio/industrialio-buffer.c @@ -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.