Files
linux/drivers
Guenter Roeck 4c8702b3cd hwmon: (ftsteutates) Fix potential memory access error
Using set_bit() to set a bit in an integer is not a good idea, since
the function expects an unsigned long as argument, which can be 64 bit
wide. Coverity reports this problem as

>>>     CID 1364488:  Memory - illegal accesses  (INCOMPATIBLE_CAST)
>>>     Pointer "&ret" points to an object whose effective type is "int"
>>>	(32 bits, signed) but is dereferenced as a wider "unsigned
+long" (64 bits, unsigned).  This may lead to memory corruption.
245                     set_bit(1, (unsigned long *)&ret);

Just use BIT instead.

Cc: Thilo Cestonaro <thilo@cestona.ro>
Fixes: 08426eda58 ("hwmon: Add driver for FTS BMC chip "Teutates"")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-07-31 15:02:51 -07:00
..
2016-05-31 11:52:59 -07:00
…
…
2016-05-31 22:17:05 +05:30
2016-07-16 06:11:59 +09:00
…
…
…
…
…
2016-04-30 13:56:46 -07:00
2016-06-15 09:51:35 +01:00
…
2016-05-29 22:32:27 -07:00
…
2016-05-20 18:33:37 -07:00
2016-07-06 07:25:55 -07:00
…
…
2016-04-30 14:15:56 -07:00
…
…
2016-05-01 14:11:12 -07:00
…
2016-05-31 21:25:52 -06:00
2016-05-10 01:19:26 -07:00
…