From: Jan Glauber <jang@linux.vnet.ibm.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Pavel Emelyanov <xemul@openvz.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Jon Masters <jcm@redhat.com>
Subject: Re: Module init call vs symbols exporting race?
Date: Fri, 09 Nov 2007 16:06:12 +0000 [thread overview]
Message-ID: <1194624372.5000.28.camel@localhost.localdomain> (raw)
In-Reply-To: <200711081310.07697.rusty@rustcorp.com.au>
On Thu, 2007-11-08 at 13:10 +1100, Rusty Russell wrote:
> On Wednesday 07 November 2007 21:01:30 Jan Glauber wrote:
> > Hi Rusty,
> >
> > I've seen a symbol-resolving race on s390. The qeth module uses symbols
> > from qdio and although the loading order seems correct and the qdio
> > symbols should be available the following error appears:
> >
> > qdio: loading QDIO base support version 2
> > qeth: Unknown symbol qdio_synchronize
>
> Looks like qdio does something which triggers qeth to load, but of course qdio
> isn't finished initializing yet so its symbols aren't available.
>
> It's not obvious what's triggering the load, but you could probably find it by
> using printk's through qdio.c's init_QDIO().
Digging through the module loader I found what triggers the error...
CPU0 (sys_init_module for qdio) CPU1 (sys_init_module for qeth)
mutex_lock()
-> load_module()
mod->state = COMING
mutex_unlock()
mutex_lock()
init().......takes some time load_module()
-> resolve_symbols()
-> use_module()
-> stong_try_module_get() bails out
because state == COMING
-> simplify_symbols() complains with the warning
mutex_lock()
mod->state = LIVE
mutex_unlock()
So is it correct that sys_init_module() is called for qeth even if qdio is
not yet in MODULE_STATE_LIVE?
-jang
next prev parent reply other threads:[~2007-11-09 16:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-06 9:20 Module init call vs symbols exporting race? Pavel Emelyanov
2007-11-06 12:41 ` Rusty Russell
2007-11-07 10:01 ` Jan Glauber
2007-11-08 2:10 ` Rusty Russell
2007-11-09 11:44 ` Jon Masters
2007-11-09 12:16 ` Jan Glauber
2007-11-10 7:27 ` Rusty Russell
2007-11-12 14:03 ` Jan Glauber
2007-11-09 16:06 ` Jan Glauber [this message]
2007-11-10 20:23 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1194624372.5000.28.camel@localhost.localdomain \
--to=jang@linux.vnet.ibm.com \
--cc=jcm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=xemul@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox