Re: [PATCH -stable] staging: comedi: check s->async for poll(), read() and write()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2013-02-27 at 10:56 +0000, Ian Abbott wrote:
> commit cc400e185c07c15a42d2635995f422de5b94b696 upstream.
> 
> Some low-level comedi drivers (incorrectly) point `dev->read_subdev` or
> `dev->write_subdev` to a subdevice that does not support asynchronous
> commands.  Comedi's poll(), read() and write() file operation handlers
> assume these subdevices do support asynchronous commands.  In
> particular, they assume `s->async` is valid (where `s` points to the
> read or write subdevice), which it won't be if it has been set
> incorrectly.  This can lead to a NULL pointer dereference.
> 
> Check `s->async` is non-NULL in `comedi_poll()`, `comedi_read()` and
> `comedi_write()` to avoid the bug.
> 
> Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
> ---
> Applies to all stable/longterm kernels from (at least) 2.6.32.x to 3.8.x.
[...]

Added to the queue for 3.2, thanks.

Ben.

-- 
Ben Hutchings
Computers are not intelligent.	They only think they are.

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]