diff options
| author | <jgarzik@pretzel.yyz.us> | 2005-06-02 18:43:09 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-02 18:43:09 -0400 |
| commit | d7aaf48128ec7fcefcee92ea22833afc1a80e268 (patch) | |
| tree | 16ff78f6be6a5519944bb7bfc6034dfbd71ae97f /kernel/module.c | |
| parent | decc6d0b68f27bbb8a0357fccf41936a3c196b03 (diff) | |
| parent | 1e86d1c648508fd50e6c9960576b87906a7906ad (diff) | |
Automatic merge of /spare/repo/linux-2.6/.git branch HEAD
Diffstat (limited to 'kernel/module.c')
| -rw-r--r-- | kernel/module.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c index 5734ab09d3f9..83b3d376708c 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
| @@ -1758,6 +1758,7 @@ sys_init_module(void __user *umod, | |||
| 1758 | const char __user *uargs) | 1758 | const char __user *uargs) |
| 1759 | { | 1759 | { |
| 1760 | struct module *mod; | 1760 | struct module *mod; |
| 1761 | mm_segment_t old_fs = get_fs(); | ||
| 1761 | int ret = 0; | 1762 | int ret = 0; |
| 1762 | 1763 | ||
| 1763 | /* Must have permission */ | 1764 | /* Must have permission */ |
| @@ -1775,6 +1776,9 @@ sys_init_module(void __user *umod, | |||
| 1775 | return PTR_ERR(mod); | 1776 | return PTR_ERR(mod); |
| 1776 | } | 1777 | } |
| 1777 | 1778 | ||
| 1779 | /* flush the icache in correct context */ | ||
| 1780 | set_fs(KERNEL_DS); | ||
| 1781 | |||
| 1778 | /* Flush the instruction cache, since we've played with text */ | 1782 | /* Flush the instruction cache, since we've played with text */ |
| 1779 | if (mod->module_init) | 1783 | if (mod->module_init) |
| 1780 | flush_icache_range((unsigned long)mod->module_init, | 1784 | flush_icache_range((unsigned long)mod->module_init, |
| @@ -1783,6 +1787,8 @@ sys_init_module(void __user *umod, | |||
| 1783 | flush_icache_range((unsigned long)mod->module_core, | 1787 | flush_icache_range((unsigned long)mod->module_core, |
| 1784 | (unsigned long)mod->module_core + mod->core_size); | 1788 | (unsigned long)mod->module_core + mod->core_size); |
| 1785 | 1789 | ||
| 1790 | set_fs(old_fs); | ||
| 1791 | |||
| 1786 | /* Now sew it into the lists. They won't access us, since | 1792 | /* Now sew it into the lists. They won't access us, since |
| 1787 | strong_try_module_get() will fail. */ | 1793 | strong_try_module_get() will fail. */ |
| 1788 | stop_machine_run(__link_module, mod, NR_CPUS); | 1794 | stop_machine_run(__link_module, mod, NR_CPUS); |
