Allow for a RCU-sched critical section around find_module, following
the lower level find_module_all helper, and switch the two callers
outside of module.c to use such a RCU-sched critical section instead
of module_mutex.
Signed-off-by: Christoph Hellwig
Reviewed-by: Petr Mladek
Acked-by: Mirosl
On Mon, 1 Feb 2021, Jessica Yu wrote:
> +++ Miroslav Benes [29/01/21 16:29 +0100]:
> >On Thu, 28 Jan 2021, Christoph Hellwig wrote:
> >
> >> Allow for a RCU-sched critical section around find_module, following
> >> the lower level find_module_all helper, and switch the two callers
> >> outside of
+++ Miroslav Benes [29/01/21 16:29 +0100]:
On Thu, 28 Jan 2021, Christoph Hellwig wrote:
Allow for a RCU-sched critical section around find_module, following
the lower level find_module_all helper, and switch the two callers
outside of module.c to use such a RCU-sched critical section instead
o
On Fri, Jan 29, 2021 at 04:29:02PM +0100, Miroslav Benes wrote:
> >
> > - mutex_lock(&module_mutex);
> > + rcu_read_lock_sched();
> > /*
> > * We do not want to block removal of patched modules and therefore
> > * we do not take a reference here. The patches are removed by
> > @
Christoph Hellwig writes:
> On Thu, Jan 28, 2021 at 05:50:56PM -0300, Thiago Jung Bauermann wrote:
>> > struct module *find_module(const char *name)
>> > {
>> > - module_assert_mutex();
>>
>> Does it make sense to replace the assert above with the warn below
>> (untested)?
>>
>> RCU_
On Thu 2021-01-28 19:14:12, Christoph Hellwig wrote:
> Allow for a RCU-sched critical section around find_module, following
> the lower level find_module_all helper, and switch the two callers
> outside of module.c to use such a RCU-sched critical section instead
> of module_mutex.
>
> Signed-off-
On Thu, Jan 28, 2021 at 05:50:56PM -0300, Thiago Jung Bauermann wrote:
> > struct module *find_module(const char *name)
> > {
> > - module_assert_mutex();
>
> Does it make sense to replace the assert above with the warn below (untested)?
>
> RCU_LOCKDEP_WARN(rcu_read_lock_sched_held());
Hi Christoph,
Christoph Hellwig writes:
> diff --git a/kernel/module.c b/kernel/module.c
> index 981302f616b411..6772fb2680eb3e 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -668,7 +668,6 @@ static struct module *find_module_all(const char *name,
> size_t len,
>
> struct modu
Allow for a RCU-sched critical section around find_module, following
the lower level find_module_all helper, and switch the two callers
outside of module.c to use such a RCU-sched critical section instead
of module_mutex.
Signed-off-by: Christoph Hellwig
---
include/linux/module.h | 2 +-
k
9 matches
Mail list logo