projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make constants in kernel/timeconst.h fixed 64 bits
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
kernel
/
futex.c
diff --git
a/kernel/futex.c
b/kernel/futex.c
index
06968cd
..
98092c9
100644
(file)
--- a/
kernel/futex.c
+++ b/
kernel/futex.c
@@
-281,7
+281,7
@@
static int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared,
*/
static void get_futex_key_refs(union futex_key *key)
{
*/
static void get_futex_key_refs(union futex_key *key)
{
- if (key->both.ptr ==
0
)
+ if (key->both.ptr ==
NULL
)
return;
switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) {
case FUT_OFF_INODE:
return;
switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) {
case FUT_OFF_INODE:
@@
-1266,11
+1266,13
@@
static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared,
if (!abs_time)
schedule();
else {
if (!abs_time)
schedule();
else {
- hrtimer_init(&t.timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
+ hrtimer_init_on_stack(&t.timer, CLOCK_MONOTONIC,
+ HRTIMER_MODE_ABS);
hrtimer_init_sleeper(&t, current);
t.timer.expires = *abs_time;
hrtimer_init_sleeper(&t, current);
t.timer.expires = *abs_time;
- hrtimer_start(&t.timer, t.timer.expires, HRTIMER_MODE_ABS);
+ hrtimer_start(&t.timer, t.timer.expires,
+ HRTIMER_MODE_ABS);
if (!hrtimer_active(&t.timer))
t.task = NULL;
if (!hrtimer_active(&t.timer))
t.task = NULL;
@@
-1286,6
+1288,8
@@
static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared,
/* Flag if a timeout occured */
rem = (t.task == NULL);
/* Flag if a timeout occured */
rem = (t.task == NULL);
+
+ destroy_hrtimer_on_stack(&t.timer);
}
}
__set_current_state(TASK_RUNNING);
}
}
__set_current_state(TASK_RUNNING);
@@
-1367,7
+1371,8
@@
static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared,
if (time) {
to = &timeout;
if (time) {
to = &timeout;
- hrtimer_init(&to->timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
+ hrtimer_init_on_stack(&to->timer, CLOCK_REALTIME,
+ HRTIMER_MODE_ABS);
hrtimer_init_sleeper(to, current);
to->timer.expires = *time;
}
hrtimer_init_sleeper(to, current);
to->timer.expires = *time;
}
@@
-1581,6
+1586,8
@@
static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared,
unqueue_me_pi(&q);
futex_unlock_mm(fshared);
unqueue_me_pi(&q);
futex_unlock_mm(fshared);
+ if (to)
+ destroy_hrtimer_on_stack(&to->timer);
return ret != -EINTR ? ret : -ERESTARTNOINTR;
out_unlock_release_sem:
return ret != -EINTR ? ret : -ERESTARTNOINTR;
out_unlock_release_sem:
@@
-1588,6
+1595,8
@@
static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared,
out_release_sem:
futex_unlock_mm(fshared);
out_release_sem:
futex_unlock_mm(fshared);
+ if (to)
+ destroy_hrtimer_on_stack(&to->timer);
return ret;
uaddr_faulted:
return ret;
uaddr_faulted:
@@
-1615,6
+1624,8
@@
static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared,
if (!ret && (uval != -EFAULT))
goto retry;
if (!ret && (uval != -EFAULT))
goto retry;
+ if (to)
+ destroy_hrtimer_on_stack(&to->timer);
return ret;
}
return ret;
}
@@
-2158,7
+2169,7
@@
static struct file_system_type futex_fs_type = {
.kill_sb = kill_anon_super,
};
.kill_sb = kill_anon_super,
};
-static int __init init(void)
+static int __init
futex_
init(void)
{
u32 curval;
int i;
{
u32 curval;
int i;
@@
-2194,4
+2205,4
@@
static int __init init(void)
return 0;
}
return 0;
}
-__initcall(init);
+__initcall(
futex_
init);