Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273253
b: refs/heads/master
c: 0b0577f
h: refs/heads/master
i:
  273251: 5b86a72
v: v3
  • Loading branch information
Manfred Spraul authored and Linus Torvalds committed Nov 2, 2011
1 parent 62c4bae commit 9f3025b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3c24783bb2deafaa106b7e69a97540071afc590c
refs/heads/master: 0b0577f6080c0645b079dcc03fdbaf40d928beb8
9 changes: 9 additions & 0 deletions trunk/ipc/sem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,8 @@ SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops,

queue.status = -EINTR;
queue.sleeper = current;

sleep_again:
current->state = TASK_INTERRUPTIBLE;
sem_unlock(sma);

Expand Down Expand Up @@ -1478,6 +1480,13 @@ SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops,
*/
if (timeout && jiffies_left == 0)
error = -EAGAIN;

/*
* If the wakeup was spurious, just retry
*/
if (error == -EINTR && !signal_pending(current))
goto sleep_again;

unlink_queue(sma, &queue);

out_unlock_free:
Expand Down

0 comments on commit 9f3025b

Please sign in to comment.