Re: [PATCH] spi-altera: Fix NULL pointer dereference in spi_bitbang_transfer_one

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

 



On Wed, Dec 03, 2014 at 11:25:49AM +0000, Iain Baron wrote:
> spi-altera.c is missing a bitbang setup_transfer callback to setup
> the clock and wordsize for the SPI transfer.  This triggers a NULL
> pointer dereference in spi_bitbang_transfer_one.
> Provide the missing callback, which simply returns success, because
> the parameters are not configurable at runtime for this hardware.

If we can safely handle not having the callback then we should fix the
call site to safely handle a null pointer rather than adding dummy
callbacks.  That way this is fixed once for all drivers that need it.

I'd expect to see some code that checks to see if the caller is trying
to change paramters.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux