Re: [PATCH] iio: adc: intel_mrfld_adc: Allocating too much data in probe()

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

 



On Sat, Nov 23, 2019 at 02:42:06PM +0000, Jonathan Cameron wrote:
> On Tue, 19 Nov 2019 12:23:32 +0200
> Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> 
> > On Tue, Nov 19, 2019 at 09:21:24AM +0300, Dan Carpenter wrote:
> > > This probe function is passing the wrong size to devm_iio_device_alloc().
> > > It is supposed to be the size of the private data.  Fortunately,
> > > sizeof(*indio_dev) is larger than sizeof(struct mrfld_adc) so it doesn't
> > > cause a runtime problem.
> > >   
> > 
> > Ah, indeed, thanks for fixing this!
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Applied to the fixes-togreg branch of iio.git.

Thanks!

> I'll wait until after the merge window now to send a pull request for this
> one so will be rc2ish before it's in.

Sure, as pointed out by Dan it seems to work due to size of wrong structure is
bigger than needed, thus it's not a critical fix.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux