Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 377459
b: refs/heads/master
c: a61aef7
h: refs/heads/master
i:
  377457: e16426e
  377455: b2929ce
v: v3
  • Loading branch information
Linus Torvalds committed Jun 29, 2013
1 parent 21e3e85 commit 5eed688
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 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: e3f12a53042e26202993baa3ad4ff8768173653d
refs/heads/master: a61aef7fc00bac9068e98bf00aaa38e766f19a57
16 changes: 9 additions & 7 deletions trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,13 +1135,6 @@ void setup_new_exec(struct linux_binprm * bprm)
set_dumpable(current->mm, suid_dumpable);
}

/*
* Flush performance counters when crossing a
* security domain:
*/
if (!get_dumpable(current->mm))
perf_event_exit_task(current);

/* An exec changes our domain. We are no longer part of the thread
group */

Expand Down Expand Up @@ -1205,6 +1198,15 @@ void install_exec_creds(struct linux_binprm *bprm)

commit_creds(bprm->cred);
bprm->cred = NULL;

/*
* Disable monitoring for regular users
* when executing setuid binaries. Must
* wait until new credentials are committed
* by commit_creds() above
*/
if (get_dumpable(current->mm) != SUID_DUMP_USER)
perf_event_exit_task(current);
/*
* cred_guard_mutex must be held at least to this point to prevent
* ptrace_attach() from altering our determination of the task's
Expand Down
7 changes: 5 additions & 2 deletions trunk/kernel/time/tick-broadcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,6 @@ void tick_broadcast_oneshot_control(unsigned long reason)
} else {
if (cpumask_test_and_clear_cpu(cpu, tick_broadcast_oneshot_mask)) {
clockevents_set_mode(dev, CLOCK_EVT_MODE_ONESHOT);
if (dev->next_event.tv64 == KTIME_MAX)
goto out;
/*
* The cpu which was handling the broadcast
* timer marked this cpu in the broadcast
Expand All @@ -614,6 +612,11 @@ void tick_broadcast_oneshot_control(unsigned long reason)
tick_broadcast_pending_mask))
goto out;

/*
* Bail out if there is no next event.
*/
if (dev->next_event.tv64 == KTIME_MAX)
goto out;
/*
* If the pending bit is not set, then we are
* either the CPU handling the broadcast
Expand Down

0 comments on commit 5eed688

Please sign in to comment.