diff options
Diffstat (limited to 'drivers/char/ipmi')
| -rw-r--r-- | drivers/char/ipmi/ipmi_devintf.c | 5 | ||||
| -rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 18 | ||||
| -rw-r--r-- | drivers/char/ipmi/ipmi_watchdog.c | 6 |
3 files changed, 11 insertions, 18 deletions
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c index 883ac4352be4..a09ff1080687 100644 --- a/drivers/char/ipmi/ipmi_devintf.c +++ b/drivers/char/ipmi/ipmi_devintf.c | |||
| @@ -735,7 +735,8 @@ static long compat_ipmi_ioctl(struct file *filep, unsigned int cmd, | |||
| 735 | case COMPAT_IPMICTL_RECEIVE_MSG: | 735 | case COMPAT_IPMICTL_RECEIVE_MSG: |
| 736 | case COMPAT_IPMICTL_RECEIVE_MSG_TRUNC: | 736 | case COMPAT_IPMICTL_RECEIVE_MSG_TRUNC: |
| 737 | { | 737 | { |
| 738 | struct ipmi_recv *precv64, recv64; | 738 | struct ipmi_recv __user *precv64; |
| 739 | struct ipmi_recv recv64; | ||
| 739 | 740 | ||
| 740 | if (get_compat_ipmi_recv(&recv64, compat_ptr(arg))) | 741 | if (get_compat_ipmi_recv(&recv64, compat_ptr(arg))) |
| 741 | return -EFAULT; | 742 | return -EFAULT; |
| @@ -748,7 +749,7 @@ static long compat_ipmi_ioctl(struct file *filep, unsigned int cmd, | |||
| 748 | ((cmd == COMPAT_IPMICTL_RECEIVE_MSG) | 749 | ((cmd == COMPAT_IPMICTL_RECEIVE_MSG) |
| 749 | ? IPMICTL_RECEIVE_MSG | 750 | ? IPMICTL_RECEIVE_MSG |
| 750 | : IPMICTL_RECEIVE_MSG_TRUNC), | 751 | : IPMICTL_RECEIVE_MSG_TRUNC), |
| 751 | (long) precv64); | 752 | (unsigned long) precv64); |
| 752 | if (rc != 0) | 753 | if (rc != 0) |
| 753 | return rc; | 754 | return rc; |
| 754 | 755 | ||
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 278f84104996..b6e5cbfb09f8 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
| @@ -1920,8 +1920,7 @@ static int try_get_dev_id(struct smi_info *smi_info) | |||
| 1920 | for (;;) | 1920 | for (;;) |
| 1921 | { | 1921 | { |
| 1922 | if (smi_result == SI_SM_CALL_WITH_DELAY) { | 1922 | if (smi_result == SI_SM_CALL_WITH_DELAY) { |
| 1923 | set_current_state(TASK_UNINTERRUPTIBLE); | 1923 | schedule_timeout_uninterruptible(1); |
| 1924 | schedule_timeout(1); | ||
| 1925 | smi_result = smi_info->handlers->event( | 1924 | smi_result = smi_info->handlers->event( |
| 1926 | smi_info->si_sm, 100); | 1925 | smi_info->si_sm, 100); |
| 1927 | } | 1926 | } |
| @@ -2256,10 +2255,8 @@ static int init_one_smi(int intf_num, struct smi_info **smi) | |||
| 2256 | 2255 | ||
| 2257 | /* Wait for the timer to stop. This avoids problems with race | 2256 | /* Wait for the timer to stop. This avoids problems with race |
| 2258 | conditions removing the timer here. */ | 2257 | conditions removing the timer here. */ |
| 2259 | while (! new_smi->timer_stopped) { | 2258 | while (!new_smi->timer_stopped) |
| 2260 | set_current_state(TASK_UNINTERRUPTIBLE); | 2259 | schedule_timeout_uninterruptible(1); |
| 2261 | schedule_timeout(1); | ||
| 2262 | } | ||
| 2263 | 2260 | ||
| 2264 | out_err: | 2261 | out_err: |
| 2265 | if (new_smi->intf) | 2262 | if (new_smi->intf) |
| @@ -2379,17 +2376,14 @@ static void __exit cleanup_one_si(struct smi_info *to_clean) | |||
| 2379 | 2376 | ||
| 2380 | /* Wait for the timer to stop. This avoids problems with race | 2377 | /* Wait for the timer to stop. This avoids problems with race |
| 2381 | conditions removing the timer here. */ | 2378 | conditions removing the timer here. */ |
| 2382 | while (! to_clean->timer_stopped) { | 2379 | while (!to_clean->timer_stopped) |
| 2383 | set_current_state(TASK_UNINTERRUPTIBLE); | 2380 | schedule_timeout_uninterruptible(1); |
| 2384 | schedule_timeout(1); | ||
| 2385 | } | ||
| 2386 | 2381 | ||
| 2387 | /* Interrupts and timeouts are stopped, now make sure the | 2382 | /* Interrupts and timeouts are stopped, now make sure the |
| 2388 | interface is in a clean state. */ | 2383 | interface is in a clean state. */ |
| 2389 | while (to_clean->curr_msg || (to_clean->si_state != SI_NORMAL)) { | 2384 | while (to_clean->curr_msg || (to_clean->si_state != SI_NORMAL)) { |
| 2390 | poll(to_clean); | 2385 | poll(to_clean); |
| 2391 | set_current_state(TASK_UNINTERRUPTIBLE); | 2386 | schedule_timeout_uninterruptible(1); |
| 2392 | schedule_timeout(1); | ||
| 2393 | } | 2387 | } |
| 2394 | 2388 | ||
| 2395 | rv = ipmi_unregister_smi(to_clean->intf); | 2389 | rv = ipmi_unregister_smi(to_clean->intf); |
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index e71aaae855ad..2da64bf7469c 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c | |||
| @@ -1037,10 +1037,8 @@ static __exit void ipmi_unregister_watchdog(void) | |||
| 1037 | /* Wait to make sure the message makes it out. The lower layer has | 1037 | /* Wait to make sure the message makes it out. The lower layer has |
| 1038 | pointers to our buffers, we want to make sure they are done before | 1038 | pointers to our buffers, we want to make sure they are done before |
| 1039 | we release our memory. */ | 1039 | we release our memory. */ |
| 1040 | while (atomic_read(&set_timeout_tofree)) { | 1040 | while (atomic_read(&set_timeout_tofree)) |
| 1041 | set_current_state(TASK_UNINTERRUPTIBLE); | 1041 | schedule_timeout_uninterruptible(1); |
| 1042 | schedule_timeout(1); | ||
| 1043 | } | ||
| 1044 | 1042 | ||
| 1045 | /* Disconnect from IPMI. */ | 1043 | /* Disconnect from IPMI. */ |
| 1046 | rv = ipmi_destroy_user(watchdog_user); | 1044 | rv = ipmi_destroy_user(watchdog_user); |
