Re: [PATCH v3] gpio: pca953x: Fix dereference of irq data in shutdown

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

 



On Thu, Feb 28, 2019 at 4:46 PM Mark Walton <mark.walton@xxxxxxxxxxxxx> wrote:

> If a PCA953x gpio was used as an interrupt and then released,
> the shutdown function was trying to extract the pca953x_chip
> pointer directly from the irq_data, but in reality was getting
> the gpio_chip structure.
>
> The net effect was that the subsequent writes to the data
> structure corrupted data in the gpio_chip structure, which wasn't
> immediately obvious until attempting to use the GPIO again in the
> future, at which point the kernel panics.
>
> This fix correctly extracts the pca953x_chip structure via the
> gpio_chip structure, as is correctly done in the other irq
> functions.
>
> Fixes: 0a70fe00efea ("gpio: pca953x: Clear irq trigger type on irq shutdown")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Mark Walton <mark.walton@xxxxxxxxxxxxx>

Patch applied with Bartosz review tag.
Since we are just 2 days away from the v5.1 merge window
and this needs testing it will likely go in with all other v5.1 patches
and picked to stable from there.

Yours,
Linus Walleij



[Index of Archives]     [Linux SPI]     [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