Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224090
b: refs/heads/master
c: 94462ad
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt committed Dec 23, 2010
1 parent 74c5eab commit 92afadf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 26e20a108caca6231c6a5ec659f815a866904751
refs/heads/master: 94462ad3b14739d158a1ab87bb30008c1e5a6bc1
24 changes: 12 additions & 12 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -2816,18 +2816,6 @@ static struct module *load_module(void __user *umod,
kfree(info.strmap);
free_copy(&info);

/* Set RO and NX regions for core */
set_section_ro_nx(mod->module_core,
mod->core_text_size,
mod->core_ro_size,
mod->core_size);

/* Set RO and NX regions for init */
set_section_ro_nx(mod->module_init,
mod->init_text_size,
mod->init_ro_size,
mod->init_size);

/* Done! */
trace_module_load(mod);
return mod;
Expand Down Expand Up @@ -2888,6 +2876,18 @@ SYSCALL_DEFINE3(init_module, void __user *, umod,
blocking_notifier_call_chain(&module_notify_list,
MODULE_STATE_COMING, mod);

/* Set RO and NX regions for core */
set_section_ro_nx(mod->module_core,
mod->core_text_size,
mod->core_ro_size,
mod->core_size);

/* Set RO and NX regions for init */
set_section_ro_nx(mod->module_init,
mod->init_text_size,
mod->init_ro_size,
mod->init_size);

do_mod_ctors(mod);
/* Start the module */
if (mod->init != NULL)
Expand Down

0 comments on commit 92afadf

Please sign in to comment.