lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250811213607.7bf4b91c@jic23-huawei>
Date: Mon, 11 Aug 2025 21:36:07 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: jean-baptiste.maneyrol@....com, David Lechner <dlechner@...libre.com>,
 Nuno Sá <nuno.sa@...log.com>, Andy Shevchenko
 <andy@...nel.org>, Jean-Baptiste Maneyrol <jmaneyrol@...ensense.com>,
 Jonathan Cameron <Jonathan.Cameron@...wei.com>, linux-iio@...r.kernel.org,
 linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] iio: imu: inv_icm42600: change invalid data error to
 EBUSY

On Fri, 8 Aug 2025 14:35:00 +0200
Andy Shevchenko <andy.shevchenko@...il.com> wrote:

> On Fri, Aug 8, 2025 at 9:40 AM Jean-Baptiste Maneyrol via B4 Relay
> <devnull+jean-baptiste.maneyrol.tdk.com@...nel.org> wrote:
> >
> > Temperature sensor returns the temperature of the mechanical parts
> > of the chip. If both accel and gyro are off, temperature sensor is  
> 
> the temperature
> 
> > also automatically turned off and return invalid data.  
> 
> returns
> 
> > In this case, returning EBUSY error code is better then EINVAL and  
> 
> -EBUSY
> than
> -EINVAL
> 
> > indicates userspace that it needs to retry reading temperature in
> > another context.  
> 
> ...
> 
> > +       /*
> > +        * Temperature data is invalid if both accel and gyro are off.
> > +        * Return EBUSY in this case.  
> 
> -EBUSY
> 
> > +        */
> >         if (*temp == INV_ICM42600_DATA_INVALID)
> > -               ret = -EINVAL;
> > +               ret = -EBUSY;
> >
> >  exit:
> >         mutex_unlock(&st->lock);  
> 
> ...
> 
> No need to resend just for the above, I hope Jonathan tweaks this
> whilst applying.
> Reviewed-by: Andy Shevchenko <andy@...nel.org>
> (assuming typos and signs are fixed)
> 

Tweaked an applied to the fixes-togreg branch of iio.git.
I've not marked this explicitly for stable as it's a kind of weird
sort of 'fix'.  If anyone wants is backported, then maybe we can consider
that once it's upstream

Jonathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ