Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 342193 | Differences between
and this patch

Collapse All | Expand All

(-)vsock-only/linux/af_vsock.c.original (-13 / +13 lines)
Lines 3230-3236 Link Here
3230
    * a notification of an error.
3230
    * a notification of an error.
3231
    */
3231
    */
3232
   timeout = sock_sndtimeo(sk, flags & O_NONBLOCK);
3232
   timeout = sock_sndtimeo(sk, flags & O_NONBLOCK);
3233
   compat_init_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
3233
   compat_init_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
3234
3234
3235
   while (sk->compat_sk_state != SS_CONNECTED && sk->compat_sk_err == 0) {
3235
   while (sk->compat_sk_state != SS_CONNECTED && sk->compat_sk_err == 0) {
3236
      if (timeout == 0) {
3236
      if (timeout == 0) {
Lines 3253-3259 Link Here
3253
         goto outWaitError;
3253
         goto outWaitError;
3254
      }
3254
      }
3255
3255
3256
      compat_cont_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
3256
      compat_cont_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
3257
   }
3257
   }
3258
3258
3259
   if (sk->compat_sk_err) {
3259
   if (sk->compat_sk_err) {
Lines 3265-3271 Link Here
3265
   }
3265
   }
3266
3266
3267
outWait:
3267
outWait:
3268
   compat_finish_wait(sk->compat_sk_sleep, &wait, TASK_RUNNING);
3268
   compat_finish_wait(compat_sk_sleep(sk), &wait, TASK_RUNNING);
3269
out:
3269
out:
3270
   release_sock(sk);
3270
   release_sock(sk);
3271
   return err;
3271
   return err;
Lines 3325-3331 Link Here
3325
    * upon connection establishment.
3325
    * upon connection establishment.
3326
    */
3326
    */
3327
   timeout = sock_sndtimeo(listener, flags & O_NONBLOCK);
3327
   timeout = sock_sndtimeo(listener, flags & O_NONBLOCK);
3328
   compat_init_prepare_to_wait(listener->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
3328
   compat_init_prepare_to_wait(compat_sk_sleep(listener), &wait, TASK_INTERRUPTIBLE);
3329
3329
3330
   while ((connected = VSockVmciDequeueAccept(listener)) == NULL &&
3330
   while ((connected = VSockVmciDequeueAccept(listener)) == NULL &&
3331
          listener->compat_sk_err == 0) {
3331
          listener->compat_sk_err == 0) {
Lines 3341-3347 Link Here
3341
         goto outWait;
3341
         goto outWait;
3342
      }
3342
      }
3343
3343
3344
      compat_cont_prepare_to_wait(listener->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
3344
      compat_cont_prepare_to_wait(compat_sk_sleep(listener), &wait, TASK_INTERRUPTIBLE);
3345
   }
3345
   }
3346
3346
3347
   if (listener->compat_sk_err) {
3347
   if (listener->compat_sk_err) {
Lines 3375-3381 Link Here
3375
   }
3375
   }
3376
3376
3377
outWait:
3377
outWait:
3378
   compat_finish_wait(listener->compat_sk_sleep, &wait, TASK_RUNNING);
3378
   compat_finish_wait(compat_sk_sleep(listener), &wait, TASK_RUNNING);
3379
out:
3379
out:
3380
   release_sock(listener);
3380
   release_sock(listener);
3381
   return err;
3381
   return err;
Lines 3473-3479 Link Here
3473
   sk = sock->sk;
3473
   sk = sock->sk;
3474
   vsk = vsock_sk(sk);
3474
   vsk = vsock_sk(sk);
3475
3475
3476
   poll_wait(file, sk->compat_sk_sleep, wait);
3476
   poll_wait(file, compat_sk_sleep(sk), wait);
3477
   mask = 0;
3477
   mask = 0;
3478
3478
3479
   if (sk->compat_sk_err) {
3479
   if (sk->compat_sk_err) {
Lines 4113-4119 Link Here
4113
      goto out;
4113
      goto out;
4114
   }
4114
   }
4115
4115
4116
   compat_init_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
4116
   compat_init_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
4117
4117
4118
   while (totalWritten < len) {
4118
   while (totalWritten < len) {
4119
      Bool sentWrote;
4119
      Bool sentWrote;
Lines 4150-4156 Link Here
4150
            goto outWait;
4150
            goto outWait;
4151
         }
4151
         }
4152
4152
4153
         compat_cont_prepare_to_wait(sk->compat_sk_sleep,
4153
         compat_cont_prepare_to_wait(compat_sk_sleep(sk),
4154
                                     &wait, TASK_INTERRUPTIBLE);
4154
                                     &wait, TASK_INTERRUPTIBLE);
4155
      }
4155
      }
4156
4156
Lines 4203-4209 Link Here
4203
   if (totalWritten > 0) {
4203
   if (totalWritten > 0) {
4204
      err = totalWritten;
4204
      err = totalWritten;
4205
   }
4205
   }
4206
   compat_finish_wait(sk->compat_sk_sleep, &wait, TASK_RUNNING);
4206
   compat_finish_wait(compat_sk_sleep(sk), &wait, TASK_RUNNING);
4207
out:
4207
out:
4208
   release_sock(sk);
4208
   release_sock(sk);
4209
   return err;
4209
   return err;
Lines 4437-4443 Link Here
4437
      goto out;
4437
      goto out;
4438
   }
4438
   }
4439
4439
4440
   compat_init_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
4440
   compat_init_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
4441
4441
4442
   while ((ready = VSockVmciStreamHasData(vsk)) < target &&
4442
   while ((ready = VSockVmciStreamHasData(vsk)) < target &&
4443
          sk->compat_sk_err == 0 &&
4443
          sk->compat_sk_err == 0 &&
Lines 4477-4483 Link Here
4477
         goto outWait;
4477
         goto outWait;
4478
      }
4478
      }
4479
4479
4480
      compat_cont_prepare_to_wait(sk->compat_sk_sleep, &wait, TASK_INTERRUPTIBLE);
4480
      compat_cont_prepare_to_wait(compat_sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
4481
   }
4481
   }
4482
4482
4483
   if (sk->compat_sk_err) {
4483
   if (sk->compat_sk_err) {
Lines 4543-4549 Link Here
4543
   err = copied;
4543
   err = copied;
4544
4544
4545
outWait:
4545
outWait:
4546
   compat_finish_wait(sk->compat_sk_sleep, &wait, TASK_RUNNING);
4546
   compat_finish_wait(compat_sk_sleep(sk), &wait, TASK_RUNNING);
4547
out:
4547
out:
4548
   release_sock(sk);
4548
   release_sock(sk);
4549
   return err;
4549
   return err;

Return to bug 342193