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-07-25 19:15:35 -07:00
2016-05-05 19:00:40 +01:00
2016-07-23 11:46:59 +09:00
2016-05-31 11:52:59 -07:00
2016-06-18 06:04:01 -10:00
2016-07-10 20:13:53 +02:00
2016-07-07 15:34:09 -07:00
2016-05-13 16:54:59 +02:00
2016-05-19 10:02:26 -07:00
2016-07-25 15:34:18 -07:00
2016-07-18 17:45:41 -07:00
2016-07-12 17:33:22 +02:00
2016-06-28 08:48:33 -04:00
2016-07-25 20:43:12 -07:00
2016-07-04 14:17:34 +02:00
2016-07-21 12:19:53 +08:00
2016-05-20 22:02:55 -07:00
2016-06-23 23:15:12 +02:00
2016-06-25 14:30:42 -07:00
2016-05-31 22:17:05 +05:30
2016-07-16 06:11:59 +09:00
2016-07-02 14:31:34 +09:00
2016-05-04 14:16:49 -04:00
2016-06-27 13:06:56 +02:00
2016-07-22 15:29:32 +02:00
2016-07-19 18:00:15 +10:00
2016-06-28 13:24:14 +02:00
2016-05-09 22:45:18 +02:00
2016-05-01 09:23:14 -07:00
2016-07-31 15:02:51 -07:00
2016-05-20 17:58:30 -07:00
2016-07-15 14:19:11 +09:00
2016-07-06 00:33:49 +09:00
2016-06-08 13:03:25 +02:00
2016-07-14 12:05:29 +09:00
2016-07-12 10:46:34 -04:00
2016-07-23 12:10:48 +09:00
2016-07-06 18:04:55 +02:00
2016-04-30 09:26:55 -07:00
2016-07-25 21:35:03 -07:00
2016-05-20 20:57:27 -07:00
2016-06-08 11:47:06 +02:00
2016-05-06 12:51:10 -06:00
2016-05-01 18:33:04 +10:00
2016-05-08 22:44:46 +05:30
2016-06-13 18:49:30 -07:00
2016-05-27 14:28:09 -07:00
2016-07-16 06:15:40 +09:00
2016-06-16 11:43:48 +03:00
2016-05-23 17:04:14 -07:00
2016-05-18 16:38:59 -07:00
2016-06-30 07:44:23 +01:00
2016-07-15 16:14:45 -07:00
2016-07-25 20:43:12 -07:00
2016-07-16 09:53:34 +09:00
2016-07-25 20:43:12 -07:00
2016-05-10 00:01:47 +02:00
2016-06-23 17:50:39 -07:00
2016-07-14 08:48:08 -07:00
2016-06-25 07:42:55 -07:00
2016-06-09 14:36:34 -05:00
2016-04-30 13:56:46 -07:00
2016-07-25 19:15:35 -07:00
2016-05-01 18:32:32 +10:00
2016-06-15 09:51:35 +01:00
2016-07-14 12:03:50 +09:00
2016-06-23 11:05:04 +02:00
2016-07-25 19:15:35 -07:00
2016-07-15 10:26:30 +02:00
2016-07-25 20:43:12 -07:00
2016-06-08 13:03:25 +02:00
2016-07-23 10:25:54 +09:00
2016-05-29 22:32:27 -07:00
2016-06-14 10:51:45 +02:00
2016-05-05 17:38:53 -07:00
2016-07-13 04:22:16 +09:00
2016-05-12 15:50:19 -07:00
2016-05-06 11:08:58 -07:00
2016-05-21 17:07:17 +02:00
2016-07-04 23:32:08 -07:00
2016-05-20 18:33:37 -07:00
2016-07-06 07:25:55 -07:00
2016-05-30 09:41:11 +09:00
2016-05-19 15:20:24 +02:00
2016-06-30 13:17:29 +01:00
2016-04-30 14:15:56 -07:00
2016-07-14 12:05:29 +09:00
2016-05-28 12:04:17 -07:00
2016-06-14 12:25:07 +02:00
2016-05-02 12:09:22 -05:00
2016-07-25 20:43:12 -07:00
2016-05-01 14:11:12 -07:00
2016-07-25 20:43:12 -07:00
2016-05-31 21:25:52 -06:00
2016-05-10 01:19:26 -07:00
2016-06-25 09:04:48 -07:00
2016-05-22 19:44:13 +03:00
2016-05-01 14:00:00 -07:00
2016-05-01 14:37:49 -07:00
2016-06-17 20:21:12 -07:00
2016-07-08 14:53:13 +01:00
2016-05-23 11:18:01 -07:00
2016-05-30 09:41:11 +09:00