]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (lm90) Add range check to set_update_interval
authorGuenter Roeck <linux@roeck-us.net>
Mon, 16 Jan 2012 21:51:47 +0000 (22:51 +0100)
committerJean Delvare <khali@endymion.delvare>
Mon, 16 Jan 2012 21:51:47 +0000 (22:51 +0100)
commit1f3858629458905c304aee12239e9c6b9329c656
tree418e5369d31ebdf8aea6bfa4c012e7ac8702ded6
parent5165dbd7e7ff02d02839a995ec5c1d237f5fe0f2
hwmon: (lm90) Add range check to set_update_interval

When writing the update_interval attribute, the parameter value was
not range checked, which could cause an integer overflow and result
in an arbitrary update interval. Fix by limiting the value range to
<0, 100000>.

Reported-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/lm90.c