Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108194
b: refs/heads/master
c: ba66129
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Thomas Gleixner committed Jul 23, 2008
1 parent ff6b26f commit 0ecc1cf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 54da1174922cddd4be83d5a364b2e0fdd693f513
refs/heads/master: ba661292a2bc6ddd305a212b0526e5dc22195fe7
17 changes: 13 additions & 4 deletions trunk/kernel/posix-timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,22 @@ void do_schedule_next_timer(struct siginfo *info)
unlock_timer(timr, flags);
}

int posix_timer_event(struct k_itimer *timr,int si_private)
int posix_timer_event(struct k_itimer *timr, int si_private)
{
memset(&timr->sigq->info, 0, sizeof(siginfo_t));
/*
* FIXME: if ->sigq is queued we can race with
* dequeue_signal()->do_schedule_next_timer().
*
* If dequeue_signal() sees the "right" value of
* si_sys_private it calls do_schedule_next_timer().
* We re-queue ->sigq and drop ->it_lock().
* do_schedule_next_timer() locks the timer
* and re-schedules it while ->sigq is pending.
* Not really bad, but not that we want.
*/
timr->sigq->info.si_sys_private = si_private;
/* Send signal to the process that owns this timer.*/

timr->sigq->info.si_signo = timr->it_sigev_signo;
timr->sigq->info.si_errno = 0;
timr->sigq->info.si_code = SI_TIMER;
timr->sigq->info.si_tid = timr->it_id;
timr->sigq->info.si_value = timr->it_sigev_value;
Expand Down Expand Up @@ -435,6 +443,7 @@ static struct k_itimer * alloc_posix_timer(void)
kmem_cache_free(posix_timers_cache, tmr);
tmr = NULL;
}
memset(&tmr->sigq->info, 0, sizeof(siginfo_t));
return tmr;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group)
q->info.si_overrun++;
goto out;
}
q->info.si_overrun = 0;

signalfd_notify(t, sig);
pending = group ? &t->signal->shared_pending : &t->pending;
Expand Down

0 comments on commit 0ecc1cf

Please sign in to comment.