Patch "iio: buffer: check if a buffer has been set up when poll is called" has been added to the 4.15-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
iio: buffer: check if a buffer has been set up when poll is called
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
iio-buffer-check-if-a-buffer-has-been-set-up-when-poll-is-called.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
4cd140bda6494543f1c1b0ccceceaa44b676eef6Mon Sep 17 00:00:00 2001
From: Stefan Windfeldt-Prytz <[email protected]>
Date: Thu, 15 Feb 2018 15:02:53 +0100
Subject: iio: buffer: check if a buffer has been set up when poll is called
From: Stefan Windfeldt-Prytz <[email protected]>
commit 4cd140bda6494543f1c1b0ccceceaa44b676eef6 upstream.
If no iio buffer has been set up and poll is called return 0. Without this check there will be a null pointer dereference when calling poll on a iio driver without an iio buffer.
--- drivers/iio/industrialio-buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/industrialio-buffer.c +1 -1
@@ -175,7 +175,7 @@ unsigned int iio_buffer_poll(struct filestruct iio_dev *indio_dev = filp->private_data;struct iio_buffer *rb = indio_dev->buffer; -if (!indio_dev->info) +if (!indio_dev->info || rb ==NULL )return 0 ;poll_wait (filp, &rb->pollq, wait);
Patches currently in stable-queue which might be from [email protected] are
queue-4.15/iio-buffer-check-if-a-buffer-has-been-set-up-when-poll-is-called.patch