[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87vcaxycus.fsf@rustcorp.com.au>
Date: Wed, 16 Jan 2013 14:54:11 +1030
From: Rusty Russell <rusty@...tcorp.com.au>
To: Tejun Heo <tj@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Ming Lei <ming.lei@...onical.com>,
Alex Riesen <raa.lkml@...il.com>,
Alan Stern <stern@...land.harvard.edu>,
Jens Axboe <axboe@...nel.dk>,
USB list <linux-usb@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Arjan van de Ven <arjan@...ux.intel.com>
Subject: Re: [PATCH] module, async: async_synchronize_full() on module init iff async is used
Tejun Heo <tj@...nel.org> writes:
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -3058,8 +3064,25 @@ static int do_init_module(struct module
> blocking_notifier_call_chain(&module_notify_list,
> MODULE_STATE_LIVE, mod);
>
> - /* We need to finish all async code before the module init sequence is done */
> - async_synchronize_full();
Linus put async_synchronize_full() here as a fix but beware: you can
start using the module before this call. Normally the potential caller
is the one requesting the module load so it works, but if we get more
async stuff we may land in that hole.
Changing every caller of any async-initializing service is not going to
be pretty, but maybe put an async_cookie_t in struct module for
module_init to use, and sync it in try_module_get()? Which would now
need a can_sleep flag... but the result would be more async.
Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists