Re: [BUG] hwmon: Widespread TOCTOU vulnerabilities in the hwmon subsystem

From: Andy Shevchenko

Date: Sat Nov 29 2025 - 09:43:00 EST


On Thu, Jun 05, 2025 at 07:33:22AM -0700, Guenter Roeck wrote:
> On Thu, Jun 05, 2025 at 07:49:37PM +0800, Gui-Dong Han wrote:

...

> Also, it might make sense to add a note to
> Documentation/hwmon/submitting-patches.rst, to "avoid calculations in
> macros", explaining that this may result in the kind of problem explained
> here.

No, it might not. Do not blame a messenger (calculations), the problem is
accessing data several times. That one makes sense to add.

--
With Best Regards,
Andy Shevchenko