[lm-sensors] [RFC/PATCH] hwmon: fix common race conditions, batch 1, v2
Grant Coady
grant_lkml at dodo.com.au
Fri Mar 21 02:40:41 CET 2008
On Thu, 20 Mar 2008 09:32:38 -0400, "Mark M. Hoffman" <mhoffman at lightlink.com> wrote:
>Hi all:
>
> adm1026.c | 22 ++++++++++++++--------
> adm1029.c | 30 +++++++++++++++++++-----------
> adm1031.c | 20 +++++++++++++++-----
> adm9240.c | 20 ++++++++++++++------
> adt7470.c | 40 ++++++++++++++++++++++++----------------
> adt7473.c | 54 +++++++++++++++++++++++++++++++-----------------------
> asb100.c | 16 ++++++++++++----
> 7 files changed, 129 insertions(+), 73 deletions(-)
>
>commit 3c798b55145f42725c54d64ac7d69062a5d62bad
>Author: Mark M. Hoffman <mhoffman at lightlink.com>
>Date: Mon Mar 3 23:35:52 2008 -0500
>
> hwmon: fix common race conditions, batch 1
>
> Most hwmon drivers have one or more race conditions that could cause the driver
> to display incorrect data; in the absolute worst case, these races could allow
> divide-by-zero/OOPS. The most common of these involves a race between setting
> a fan divider and displaying the fan data (RPMs). This patch fixes these race
> conditions by taking the update lock (or equivalent) as necessary.
>
> Signed-off-by: Mark M. Hoffman <mhoffman at lightlink.com>
adm9240 tested on 2.6.25-rc6 and lm-sensors 3.0.0, no problems noticed,
no observed breakage ;) I doubt there's a possible div0/oops involved.
Grant.
More information about the lm-sensors
mailing list