Re: [PATCH 1/2] Add for_each_module iterator function

From: Andi Kleen
Date: Wed Sep 22 2010 - 08:52:15 EST


> > +void for_each_module(void (*op)(struct module *, void *arg), void *arg)
> > +{
> > + struct module *mod;
> > +
> > + preempt_disable();
>
> That wants rcu_read_lock()

Thanks. It was wrong anyways for the intended use case,
switched to module_mutex now.

BTW I think i copied this from somewhere else in module.c
Probably should be fixed there too.

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/