Re: [PATCH] iio: chemical: scd30: Prevent potential divide-by-zero error
From: Andy Shevchenko
Date: Mon May 11 2026 - 09:36:39 EST
On Mon, May 11, 2026 at 01:03:10PM +0100, Jonathan Cameron wrote:
> On Sat, 9 May 2026 19:47:53 -0500
> Maxwell Doose <m32285159@xxxxxxxxx> wrote:
> > On Sat, May 9, 2026 at 4:53 PM Maxwell Doose <m32285159@xxxxxxxxx> wrote:
...
> > Also maybe we update to use dev_err_ratelimited(), sashiko has a good
> > point here:
> >
> > https://sashiko.dev/#/patchset/20260509211921.84969-1-m32285159%40gmail.com
> >
> Do we care for something that is going to be a very rare hardware failure?
If it happens rarely, ratelimit is no-op (no change from regular printing),
the only difference if (and I think this is actually what may happen IRL)
there is an intermittent failure of HW and it starts spamming logs like a
hell.
> That's one interesting attack vector. I suppose maybe they have another
> exploit that lets them trip the scd30 into an odd state.
>
> Ah well, doesn't do much harm to rate limit it I guess.
--
With Best Regards,
Andy Shevchenko