linux/drivers/char/ipmi
Corey Minyard 55b06b0fc0 ipmi: fix unsigned long underflow
commit 392a17b10e upstream.

When I set the timeout to a specific value such as 500ms, the timeout
event will not happen in time due to the overflow in function
check_msg_timeout:
...
	ent->timeout -= timeout_period;
	if (ent->timeout > 0)
		return;
...

The type of timeout_period is long, but ent->timeout is unsigned long.
This patch makes the type consistent.

Reported-by: Weilong Chen <chenweilong@huawei.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Tested-by: Weilong Chen <chenweilong@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2017-11-24 08:33:42 +01:00
..
bt-bmc.c ipmi/bt-bmc: change compatible node to 'aspeed, ast2400-ibt-bmc' 2016-11-17 16:31:09 -08:00
ipmi_bt_sm.c ipmi: Make some data const that was only read 2015-09-03 15:02:27 -05:00
ipmi_devintf.c ipmi: Free ipmi_recv_msg messages from the linked list on close 2015-02-19 20:58:40 -06:00
ipmi_kcs_sm.c ipmi: Make some data const that was only read 2015-09-03 15:02:27 -05:00
ipmi_msghandler.c ipmi: fix unsigned long underflow 2017-11-24 08:33:42 +01:00
ipmi_powernv.c impi:Remove unneeded setting of module owner to THIS_MODULE in the platform structure, powernv_ipmi_driver 2015-09-03 15:02:24 -05:00
ipmi_poweroff.c char: Convert use of typedef ctl_table to struct ctl_table 2013-06-17 16:43:08 -07:00
ipmi_si_intf.c ipmi: remove trydefaults parameter and default init 2016-07-27 10:24:38 -05:00
ipmi_si_sm.h ipmi: Make some data const that was only read 2015-09-03 15:02:27 -05:00
ipmi_smic_sm.c ipmi: Make some data const that was only read 2015-09-03 15:02:27 -05:00
ipmi_ssif.c ipmi:ssif: Add missing unlock in error branch 2017-07-27 15:08:02 -07:00
ipmi_watchdog.c ipmi/watchdog: fix watchdog timeout set on reboot 2017-08-06 18:59:43 -07:00
Kconfig ipmi/bt-bmc: add a dependency on ARCH_ASPEED 2016-09-29 19:05:06 -05:00
Makefile ipmi: add an Aspeed BT IPMI BMC driver 2016-09-29 19:05:06 -05:00