Crash at boot on 2.6.29-rc5
dcbw at redhat.com
Wed Feb 18 07:01:23 EST 2009
On Wed, 2009-02-18 at 02:10 -0800, Kiran Divekar wrote:
> > Hi,
> > I'm trying to boot Fedora Rawhide (Fedora's kernel contains daily merges
> > with Linus) on the XO, and it's crashing at boot if I have the libertas
> > firmware installed. Here's a dmesg:
> > http://dev.laptop.org/~cjb/libertas-rawhide.log
> The issue is that for common wext handlers, the netdev_priv does not give correct priv pointer for the mesh interface. Hence further accesses using the priv pointer result in a crash. For mesh interface, the dev->ml_priv pointer needs to be used.
Oh neat; so alloc_netdev() just allocates a block of sizeof(netdev) +
sizeof(priv) and so of course you're subject to alignment issues on the
structure side, and netdev_priv() returns a pointer just past the end of
the netdev struct. Whee! That sounds robust on all architectures...
In any case, the mesh device is "special" in that it still uses the
original netdev's private structure. Thus, netdev_priv(), which points
past the end of the mesh's 'struct netdev' will just return junk; I
think we used to simply replace dev->priv with the non-mesh device's
priv and thus that used to work.
So I think we now need an "lbs_priv()" function to use everywhere we use
netdev_priv() or dev->ml_priv. Given that the main netdev doesn't use
dev->ml_priv, we can use that as a check and do something like:
static inline struct lbs_private *lbs_priv(struct net_device *dev)
return dev->ml_priv ? dev->ml_priv : netdev_priv(dev);
and thus get the right private structure every time no matter what the
device. Seem sane?
> > It looks like jffs2 might be involved, but it isn't -- with libertas
> > loaded we fail to boot 100% of the time, and without it we boot
> > successfully 100% of the time. Any ideas?
> > Thanks,
> > - Chris.
> > --
> - Kiran
> > Chris Ball <cjb at laptop.org>
> > _______________________________________________
> > libertas-dev mailing list
> > libertas-dev at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/libertas-dev
> libertas-dev mailing list
> libertas-dev at lists.infradead.org
More information about the libertas-dev