Commit 4ecf752
ipmi: fix unsigned long underflow
commit 392a17b10ec4320d3c0e96e2a23ebaad1123b989 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>1 parent c4baa4a commit 4ecf752
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4029 | 4029 | | |
4030 | 4030 | | |
4031 | 4031 | | |
4032 | | - | |
| 4032 | + | |
| 4033 | + | |
4033 | 4034 | | |
4034 | 4035 | | |
4035 | 4036 | | |
| |||
4042 | 4043 | | |
4043 | 4044 | | |
4044 | 4045 | | |
4045 | | - | |
4046 | | - | |
| 4046 | + | |
| 4047 | + | |
4047 | 4048 | | |
4048 | 4049 | | |
4049 | 4050 | | |
| |||
4109 | 4110 | | |
4110 | 4111 | | |
4111 | 4112 | | |
4112 | | - | |
| 4113 | + | |
| 4114 | + | |
4113 | 4115 | | |
4114 | 4116 | | |
4115 | 4117 | | |
| |||
0 commit comments