git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ocfs2: don't clear SGID when inheriting ACLs
[pandora-kernel.git]
/
kernel
/
posix-timers.c
diff --git
a/kernel/posix-timers.c
b/kernel/posix-timers.c
index
4556182
..
6766183
100644
(file)
--- a/
kernel/posix-timers.c
+++ b/
kernel/posix-timers.c
@@
-46,7
+46,7
@@
#include <linux/syscalls.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
#include <linux/syscalls.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
-#include <linux/
module
.h>
+#include <linux/
export
.h>
/*
* Management arrays for POSIX timers. Timers are kept in slab memory
/*
* Management arrays for POSIX timers. Timers are kept in slab memory
@@
-589,6
+589,7
@@
SYSCALL_DEFINE3(timer_create, const clockid_t, which_clock,
goto out;
}
} else {
goto out;
}
} else {
+ memset(&event.sigev_value, 0, sizeof(event.sigev_value));
event.sigev_notify = SIGEV_SIGNAL;
event.sigev_signo = SIGALRM;
event.sigev_value.sival_int = new_timer->it_id;
event.sigev_notify = SIGEV_SIGNAL;
event.sigev_signo = SIGALRM;
event.sigev_value.sival_int = new_timer->it_id;
@@
-639,6
+640,13
@@
static struct k_itimer *__lock_timer(timer_t timer_id, unsigned long *flags)
{
struct k_itimer *timr;
{
struct k_itimer *timr;
+ /*
+ * timer_t could be any type >= int and we want to make sure any
+ * @timer_id outside positive int range fails lookup.
+ */
+ if ((unsigned long long)timer_id > INT_MAX)
+ return NULL;
+
rcu_read_lock();
timr = idr_find(&posix_timers_id, (int)timer_id);
if (timr) {
rcu_read_lock();
timr = idr_find(&posix_timers_id, (int)timer_id);
if (timr) {
@@
-698,7
+706,7
@@
common_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting)
(timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE))
timr->it_overrun += (unsigned int) hrtimer_forward(timer, now, iv);
(timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE))
timr->it_overrun += (unsigned int) hrtimer_forward(timer, now, iv);
- remaining =
ktime_sub(hrtimer_get_expires(timer)
, now);
+ remaining =
__hrtimer_expires_remaining_adjusted(timer
, now);
/* Return 0 only, when the timer is expired and not pending */
if (remaining.tv64 <= 0) {
/*
/* Return 0 only, when the timer is expired and not pending */
if (remaining.tv64 <= 0) {
/*