|
@@ -1426,6 +1426,8 @@ SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops,
|
|
|
|
|
|
queue.status = -EINTR;
|
|
queue.status = -EINTR;
|
|
queue.sleeper = current;
|
|
queue.sleeper = current;
|
|
|
|
+
|
|
|
|
+sleep_again:
|
|
current->state = TASK_INTERRUPTIBLE;
|
|
current->state = TASK_INTERRUPTIBLE;
|
|
sem_unlock(sma);
|
|
sem_unlock(sma);
|
|
|
|
|
|
@@ -1478,6 +1480,13 @@ SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops,
|
|
*/
|
|
*/
|
|
if (timeout && jiffies_left == 0)
|
|
if (timeout && jiffies_left == 0)
|
|
error = -EAGAIN;
|
|
error = -EAGAIN;
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * If the wakeup was spurious, just retry
|
|
|
|
+ */
|
|
|
|
+ if (error == -EINTR && !signal_pending(current))
|
|
|
|
+ goto sleep_again;
|
|
|
|
+
|
|
unlink_queue(sma, &queue);
|
|
unlink_queue(sma, &queue);
|
|
|
|
|
|
out_unlock_free:
|
|
out_unlock_free:
|