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] [thread-next>] [day] [month] [year] [list]
Date: Wed, 5 Jun 2024 09:43:59 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc: linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org, Richard
 Weinberger <richard@....at>, Vignesh Raghavendra <vigneshr@...com>
Subject: Re: [PATCH 0/2] mtd: use 'time_left' instead of 'timeout' with
 wait_*() functions

Hi Wolfram,

wsa+renesas@...g-engineering.com wrote on Tue,  4 Jun 2024 23:29:19
+0200:

> There is a confusing pattern in the kernel to use a variable named 'timeout' to
> store the result of wait_*() functions causing patterns like:
> 
>         timeout = wait_for_completion_timeout(...)
>         if (!timeout) return -ETIMEDOUT;
> 
> with all kinds of permutations. Use 'time_left' as a variable to make the code
> obvious and self explaining.

Good idea. The waiting functions are generally confusing because the
semantics of the return values are different, so this is a good first
step, I'll take them through mtd-next soon.

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ