Re: [PATCH v2] 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 03:33:47PM +0000, Mark Walton wrote:
> 
> 
> > -----Original Message-----
> > From: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
> > Sent: 28 February 2019 15:16
> > To: Mark Walton <mark.walton@xxxxxxxxxxxxx>
> > Cc: Linus Walleij <linus.walleij@xxxxxxxxxx>; Bartosz Golaszewski
> > <bgolaszewski@xxxxxxxxxxxx>; Marek Vasut <marek.vasut@xxxxxxxxx>;
> > linux-gpio@xxxxxxxxxxxxxxx; stable@xxxxxxxxxxxxxxx
> > Subject: Re: [PATCH v2] gpio: pca953x: Fix dereference of irq data in
> > shutdown
> > 
> > On Thu, Feb 28, 2019 at 02:27:33PM +0000, Mark Walton 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")
> > > Signed-off-by: Mark Walton <mark.walton@xxxxxxxxxxxxx>
> > > ---
> > >  drivers/gpio/gpio-pca953x.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > <formletter>
> > 
> > This is not the correct way to submit patches for inclusion in the stable kernel
> > tree.  Please read:
> >     https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> > for how to do this properly.
> > 
> > </formletter>
> 
> Hi Greg,
> 
> Apologies, I'm pretty new to submitting patches to the kernel.
> 
> Is it just a case of needing to move the CC: stable@xxxxxxxxxxxxxxx
> line to the sign-off area?

Yes, that's what the documentation says to do, correct?

thanks,

greg k-h



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

  Powered by Linux