Commit 4ee819e6 authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/home/davem/BK/misc-2.5

into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
parents bf4d8485 3de8785e
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <linux/devfs_fs_kernel.h> #include <linux/devfs_fs_kernel.h>
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/init.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
/* Version Information */ /* Version Information */
......
...@@ -387,6 +387,9 @@ static int copy_mm(unsigned long clone_flags, struct task_struct * tsk) ...@@ -387,6 +387,9 @@ static int copy_mm(unsigned long clone_flags, struct task_struct * tsk)
if (!mm_init(mm)) if (!mm_init(mm))
goto fail_nomem; goto fail_nomem;
if (init_new_context(tsk,mm))
goto free_pt;
down_write(&oldmm->mmap_sem); down_write(&oldmm->mmap_sem);
retval = dup_mmap(mm); retval = dup_mmap(mm);
up_write(&oldmm->mmap_sem); up_write(&oldmm->mmap_sem);
...@@ -394,9 +397,6 @@ static int copy_mm(unsigned long clone_flags, struct task_struct * tsk) ...@@ -394,9 +397,6 @@ static int copy_mm(unsigned long clone_flags, struct task_struct * tsk)
if (retval) if (retval)
goto free_pt; goto free_pt;
if (init_new_context(tsk,mm))
goto free_pt;
good_mm: good_mm:
tsk->mm = mm; tsk->mm = mm;
tsk->active_mm = mm; tsk->active_mm = mm;
......
...@@ -839,7 +839,10 @@ kmem_cache_create (const char *name, size_t size, size_t offset, ...@@ -839,7 +839,10 @@ kmem_cache_create (const char *name, size_t size, size_t offset,
down(&cache_chain_sem); down(&cache_chain_sem);
{ {
struct list_head *p; struct list_head *p;
mm_segment_t old_fs;
old_fs = get_fs();
set_fs(KERNEL_DS);
list_for_each(p, &cache_chain) { list_for_each(p, &cache_chain) {
kmem_cache_t *pc = list_entry(p, kmem_cache_t, next); kmem_cache_t *pc = list_entry(p, kmem_cache_t, next);
char tmp; char tmp;
...@@ -857,6 +860,7 @@ kmem_cache_create (const char *name, size_t size, size_t offset, ...@@ -857,6 +860,7 @@ kmem_cache_create (const char *name, size_t size, size_t offset,
BUG(); BUG();
} }
} }
set_fs(old_fs);
} }
/* There is no reason to lock our new cache before we /* There is no reason to lock our new cache before we
...@@ -1965,8 +1969,13 @@ static int s_show(struct seq_file *m, void *p) ...@@ -1965,8 +1969,13 @@ static int s_show(struct seq_file *m, void *p)
name = cachep->name; name = cachep->name;
{ {
char tmp; char tmp;
mm_segment_t old_fs;
old_fs = get_fs();
set_fs(KERNEL_DS);
if (__get_user(tmp, name)) if (__get_user(tmp, name))
name = "broken"; name = "broken";
set_fs(old_fs);
} }
seq_printf(m, "%-17s %6lu %6lu %6u %4lu %4lu %4u", seq_printf(m, "%-17s %6lu %6lu %6u %4lu %4lu %4u",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment