Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 222873
b: refs/heads/master
c: 33dd94a
h: refs/heads/master
i:
  222871: 0672422
v: v3
  • Loading branch information
Nelson Elhage authored and Linus Torvalds committed Dec 2, 2010
1 parent 6ab030c commit 8f46476
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a0b0f58cdd32ab363a600a294ddaa90f0c32de8c
refs/heads/master: 33dd94ae1ccbfb7bf0fb6c692bc3d1c4269e6177
9 changes: 9 additions & 0 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,15 @@ NORET_TYPE void do_exit(long code)
if (unlikely(!tsk->pid))
panic("Attempted to kill the idle task!");

/*
* If do_exit is called because this processes oopsed, it's possible
* that get_fs() was left as KERNEL_DS, so reset it to USER_DS before
* continuing. Amongst other possible reasons, this is to prevent
* mm_release()->clear_child_tid() from writing to a user-controlled
* kernel address.
*/
set_fs(USER_DS);

tracehook_report_exit(&code);

validate_creds_for_do_exit(tsk);
Expand Down

0 comments on commit 8f46476

Please sign in to comment.