Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1525023 > unrolled thread

Re: [RFC PATCH v2 2/2] module: When modifying a module's text ignore modules which are going away too

Started byRusty Russell <rusty@rustcorp.com.au>
First post2016-11-18 07:20 +0100
Last post2016-11-18 07:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC PATCH v2 2/2] module: When modifying a module's text ignore modules which are going away too Rusty Russell <rusty@rustcorp.com.au> - 2016-11-18 07:20 +0100

#1525023 — Re: [RFC PATCH v2 2/2] module: When modifying a module's text ignore modules which are going away too

FromRusty Russell <rusty@rustcorp.com.au>
Date2016-11-18 07:20 +0100
SubjectRe: [RFC PATCH v2 2/2] module: When modifying a module's text ignore modules which are going away too
Message-ID<sEKGJ-3oh-1@gated-at.bofh.it>
Aaron Tomlin <atomlin@redhat.com> writes:
> By default, during the access permission modification of a module's core
> and init pages, we only ignore modules that are malformed. Albeit for a
> module which is going away, it does not make sense to change its text to
> RO since the module should be RW, before deallocation.
>
> This patch makes set_all_modules_text_ro() skip modules which are going
> away too.
>
> Signed-off-by: Aaron Tomlin <atomlin@redhat.com>

Acked-by: Rusty Russell <rusty@rustcorp.com.au>

Thanks!
Rusty.

> ---
>  kernel/module.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/module.c b/kernel/module.c
> index ff93ab8..2a383df 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -1969,7 +1969,8 @@ void set_all_modules_text_ro(void)
>  
>  	mutex_lock(&module_mutex);
>  	list_for_each_entry_rcu(mod, &modules, list) {
> -		if (mod->state == MODULE_STATE_UNFORMED)
> +		if (mod->state == MODULE_STATE_UNFORMED ||
> +			mod->state == MODULE_STATE_GOING)
>  			continue;
>  
>  		frob_text(&mod->core_layout, set_memory_ro);
> -- 
> 2.5.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web