aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/timer.c')
-rw-r--r--kernel/timer.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index a297ffcf888e..6ec7e7e0db43 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -861,7 +861,13 @@ EXPORT_SYMBOL(mod_timer);
861 * 861 *
862 * mod_timer_pinned() is a way to update the expire field of an 862 * mod_timer_pinned() is a way to update the expire field of an
863 * active timer (if the timer is inactive it will be activated) 863 * active timer (if the timer is inactive it will be activated)
864 * and not allow the timer to be migrated to a different CPU. 864 * and to ensure that the timer is scheduled on the current CPU.
865 *
866 * Note that this does not prevent the timer from being migrated
867 * when the current CPU goes offline. If this is a problem for
868 * you, use CPU-hotplug notifiers to handle it correctly, for
869 * example, cancelling the timer when the corresponding CPU goes
870 * offline.
865 * 871 *
866 * mod_timer_pinned(timer, expires) is equivalent to: 872 * mod_timer_pinned(timer, expires) is equivalent to:
867 * 873 *
@@ -1102,7 +1108,9 @@ static void call_timer_fn(struct timer_list *timer, void (*fn)(unsigned long),
1102 * warnings as well as problems when looking into 1108 * warnings as well as problems when looking into
1103 * timer->lockdep_map, make a copy and use that here. 1109 * timer->lockdep_map, make a copy and use that here.
1104 */ 1110 */
1105 struct lockdep_map lockdep_map = timer->lockdep_map; 1111 struct lockdep_map lockdep_map;
1112
1113 lockdep_copy_map(&lockdep_map, &timer->lockdep_map);
1106#endif 1114#endif
1107 /* 1115 /*
1108 * Couple the lock chain with the lock chain at 1116 * Couple the lock chain with the lock chain at
@@ -1427,25 +1435,25 @@ SYSCALL_DEFINE0(getppid)
1427SYSCALL_DEFINE0(getuid) 1435SYSCALL_DEFINE0(getuid)
1428{ 1436{
1429 /* Only we change this so SMP safe */ 1437 /* Only we change this so SMP safe */
1430 return current_uid(); 1438 return from_kuid_munged(current_user_ns(), current_uid());
1431} 1439}
1432 1440
1433SYSCALL_DEFINE0(geteuid) 1441SYSCALL_DEFINE0(geteuid)
1434{ 1442{
1435 /* Only we change this so SMP safe */ 1443 /* Only we change this so SMP safe */
1436 return current_euid(); 1444 return from_kuid_munged(current_user_ns(), current_euid());
1437} 1445}
1438 1446
1439SYSCALL_DEFINE0(getgid) 1447SYSCALL_DEFINE0(getgid)
1440{ 1448{
1441 /* Only we change this so SMP safe */ 1449 /* Only we change this so SMP safe */
1442 return current_gid(); 1450 return from_kgid_munged(current_user_ns(), current_gid());
1443} 1451}
1444 1452
1445SYSCALL_DEFINE0(getegid) 1453SYSCALL_DEFINE0(getegid)
1446{ 1454{
1447 /* Only we change this so SMP safe */ 1455 /* Only we change this so SMP safe */
1448 return current_egid(); 1456 return from_kgid_munged(current_user_ns(), current_egid());
1449} 1457}
1450 1458
1451#endif 1459#endif