diff options
| author | Felix Blyakher <felixb@sgi.com> | 2009-06-10 18:07:47 -0400 |
|---|---|---|
| committer | Felix Blyakher <felixb@sgi.com> | 2009-06-10 18:07:47 -0400 |
| commit | 4e73e0eb633f8a1b5cbf20e7f42c6dbfec1d1ca7 (patch) | |
| tree | 0cea46e43f0625244c3d06a71d6559e5ec5419ca /kernel/exec_domain.c | |
| parent | 4156e735d3abde8e9243b5d22f7999dd3fffab2e (diff) | |
| parent | 07a2039b8eb0af4ff464efd3dfd95de5c02648c6 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'kernel/exec_domain.c')
| -rw-r--r-- | kernel/exec_domain.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/kernel/exec_domain.c b/kernel/exec_domain.c index 667c841c2952..c35452cadded 100644 --- a/kernel/exec_domain.c +++ b/kernel/exec_domain.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/syscalls.h> | 18 | #include <linux/syscalls.h> |
| 19 | #include <linux/sysctl.h> | 19 | #include <linux/sysctl.h> |
| 20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
| 21 | #include <linux/fs_struct.h> | ||
| 21 | 22 | ||
| 22 | 23 | ||
| 23 | static void default_handler(int, struct pt_regs *); | 24 | static void default_handler(int, struct pt_regs *); |
| @@ -145,28 +146,6 @@ __set_personality(u_long personality) | |||
| 145 | return 0; | 146 | return 0; |
| 146 | } | 147 | } |
| 147 | 148 | ||
| 148 | if (atomic_read(¤t->fs->count) != 1) { | ||
| 149 | struct fs_struct *fsp, *ofsp; | ||
| 150 | |||
| 151 | fsp = copy_fs_struct(current->fs); | ||
| 152 | if (fsp == NULL) { | ||
| 153 | module_put(ep->module); | ||
| 154 | return -ENOMEM; | ||
| 155 | } | ||
| 156 | |||
| 157 | task_lock(current); | ||
| 158 | ofsp = current->fs; | ||
| 159 | current->fs = fsp; | ||
| 160 | task_unlock(current); | ||
| 161 | |||
| 162 | put_fs_struct(ofsp); | ||
| 163 | } | ||
| 164 | |||
| 165 | /* | ||
| 166 | * At that point we are guaranteed to be the sole owner of | ||
| 167 | * current->fs. | ||
| 168 | */ | ||
| 169 | |||
| 170 | current->personality = personality; | 149 | current->personality = personality; |
| 171 | oep = current_thread_info()->exec_domain; | 150 | oep = current_thread_info()->exec_domain; |
| 172 | current_thread_info()->exec_domain = ep; | 151 | current_thread_info()->exec_domain = ep; |
