public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Jan Glauber <jang@linux.vnet.ibm.com>
Cc: Jon Masters <jonathan@jonmasters.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Pavel Emelyanov <xemul@openvz.org>
Subject: Re: Module init call vs symbols exporting race?
Date: Sat, 10 Nov 2007 18:27:47 +1100	[thread overview]
Message-ID: <200711101827.47874.rusty@rustcorp.com.au> (raw)
In-Reply-To: <1194610607.5000.9.camel@localhost.localdomain>

On Friday 09 November 2007 23:16:47 Jan Glauber wrote:
> On Fri, 2007-11-09 at 06:44 -0500, Jon Masters wrote:
> > 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().
> >
> > Jan - did you get anything?
>
> I still think this is a bug in the module loader since qdio does not
> depent on qeth, qdio can be modprobe'd without automatically loading
> qeth. Adding a printk to the end of init_QDIO() inidicates that
> qeth_init() runs _after_ init_QDIO() is finished.

Of course it does: it has to.

qeth needs qdio, and qdio hasn't finished init when qeth tries to load.  
Something tries to load qeth again, and this time it works (qdio's init has 
presumably finished).

We fail rather than sleep in the "dependency isn't ready" case.  Partially 
because it's not happened before, but partially because we risk nasty loops.

Cheers,
Rusty.

  reply	other threads:[~2007-11-10  7:28 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 [this message]
2007-11-12 14:03             ` Jan Glauber
2007-11-09 16:06       ` Jan Glauber
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=200711101827.47874.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=jang@linux.vnet.ibm.com \
    --cc=jonathan@jonmasters.org \
    --cc=linux-kernel@vger.kernel.org \
    --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