Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1723
b: refs/heads/master
c: ae92ef8
h: refs/heads/master
i:
  1721: cc0e622
  1719: 2d373c5
v: v3
  • Loading branch information
Roman Zippel authored and Linus Torvalds committed May 31, 2005
1 parent 9e94596 commit ba9f8fa
Show file tree
Hide file tree
Showing 2 changed files with 7 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: f50734569c25c4e902bd3d0fb2e5bd93a200cc75
refs/heads/master: ae92ef8a442421356950a0a8dfdc35e8e783000e
6 changes: 6 additions & 0 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1758,6 +1758,7 @@ sys_init_module(void __user *umod,
const char __user *uargs)
{
struct module *mod;
mm_segment_t old_fs = get_fs();
int ret = 0;

/* Must have permission */
Expand All @@ -1775,6 +1776,9 @@ sys_init_module(void __user *umod,
return PTR_ERR(mod);
}

/* flush the icache in correct context */
set_fs(KERNEL_DS);

/* Flush the instruction cache, since we've played with text */
if (mod->module_init)
flush_icache_range((unsigned long)mod->module_init,
Expand All @@ -1783,6 +1787,8 @@ sys_init_module(void __user *umod,
flush_icache_range((unsigned long)mod->module_core,
(unsigned long)mod->module_core + mod->core_size);

set_fs(old_fs);

/* Now sew it into the lists. They won't access us, since
strong_try_module_get() will fail. */
stop_machine_run(__link_module, mod, NR_CPUS);
Expand Down

0 comments on commit ba9f8fa

Please sign in to comment.