Re: [PATCH] iio: adc: meson-saradc: unlock on error in meson_sar_adc_lock()

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

 



On Mon, Mar 12, 2018 at 09:43:19PM +0100, Martin Blumenstingl wrote:
> Hi Dan,
> 
> On Thu, Mar 8, 2018 at 10:31 AM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> > The meson_sar_adc_lock() function is not supposed to hold the
> > "indio_dev->mlock" on the error path.
> >
> > Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs")
> > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Acked-by: Martin Blumenstingl<martin.blumenstingl@xxxxxxxxxxxxxx>
> 
> (even if I might be too late already since Jonathan already applied this patch)
> 
> thank you for finding and fixing this!
> out of curiosity: did you find this with some tool (sparse?) or by
> looking at the code?
> 

This was some Smatch stuff that I haven't pushed.  I re-wrote the
locking check to use cross function analysis, and it actually warns
about the callers not meson_sar_adc_lock().  That code works ok
basically for locks but it generates a ton of false positives about
double unlocks so I haven't pushed it.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux