From: Hendrik Brueckner Moving prepare_to_wait before the condition to avoid a race between schedule_timeout and wake up. The race can appear during iucv_sock_connect() and iucv_callback_connack(). Signed-off-by: Hendrik Brueckner Signed-off-by: Ursula Braun --- net/iucv/af_iucv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6-uschi/net/iucv/af_iucv.c =================================================================== --- linux-2.6-uschi.orig/net/iucv/af_iucv.c +++ linux-2.6-uschi/net/iucv/af_iucv.c @@ -59,8 +59,8 @@ do { \ DEFINE_WAIT(__wait); \ long __timeo = timeo; \ ret = 0; \ + prepare_to_wait(sk->sk_sleep, &__wait, TASK_INTERRUPTIBLE); \ while (!(condition)) { \ - prepare_to_wait(sk->sk_sleep, &__wait, TASK_INTERRUPTIBLE); \ if (!__timeo) { \ ret = -EAGAIN; \ break; \ -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html