linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bob Copeland <me@bobcopeland.com>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: Dan McGee <dpmcgee@gmail.com>,
	linux-wireless@vger.kernel.org, Michael Buesch <mb@bu3sch.de>
Subject: Re: Kernel oops when loading ath5k from compat-wireless in 2.6.27
Date: Sun, 16 Nov 2008 11:20:19 -0500	[thread overview]
Message-ID: <20081116162019.GA15851@hash.localnet> (raw)
In-Reply-To: <43e72e890811152215h5cf389a3ufe4dc10b021b0c0f@mail.gmail.com>

On Sat, Nov 15, 2008 at 10:15:31PM -0800, Luis R. Rodriguez wrote:
> The answer is drivers/base/dd.c really_probe(). Curious enough guess
> what, dev->driver = drv; is assigned *before* the device driver probe
> :) (bus probe in this case first, so dev->bus->probe) contrary to the
> other way around. So you're absolutely right the patch is not
> necessary then. Good catch.

Cool, so that's where that is.  

I got some more info, this looks like a miscompilation of some kind,
maybe a mismatch between kernel config and compat-wireless, but I didn't
see anything obvious.

Here's what I did:

--- drivers/net/wireless/ath5k/base.c	2008-11-14 00:11:09.000000000 -0500
+++ drivers/net/wireless/ath5k/my-base.c	2008-11-16 11:01:42.000000000 -0500
@@ -490,6 +490,9 @@
 		goto err_map;
 	}
 
+	print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1, 
+		hw->wiphy, sizeof(struct wiphy), 1);
+	printk(KERN_INFO "offset: %d\n", offsetof(struct wiphy, dev.bus_id));
 	dev_info(&pdev->dev, "registered as '%s'\n", wiphy_name(hw->wiphy));
 
 	/* Initialize driver private data */

Which produced:

ath5k_pci 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
ath5k_pci 0000:02:00.0: setting latency timer to 64
00000000: 00 00 00 00 00 00 00 00 b4 ea 07 b7 00 00 00 00  ................
00000010: 00 00 00 00 54 c0 03 b3 54 c0 03 b3 9a c0 24 78  ....T...T.....$x
00000020: 58 c0 24 78 00 00 00 00 00 00 00 00 00 00 00 00  X.$x............
00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000080: c0 c0 03 b3 c0 c0 03 b3 00 00 00 00 40 b2 c0 b5  ............@...
00000090: 28 cf 42 78 00 00 00 00 01 00 00 00 01 00 00 00  (.Bx............
000000a0: 70 68 79 30 00 00 00 00 00 00 00 00 00 00 00 00  phy0............
000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000000c0: 01 00 00 00 04 c1 03 b3 04 c1 03 b3 00 00 00 00  ................
000000d0: 00 00 00 00 00 00 00 00 00 c0 03 b3 00 00 00 00  ................
000000e0: 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00  ................
000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000100: 40 c1 03 b3 40 c1 03 b3 00 00 00 00 00 00 00 00  @...@...........
00000110: 50 c1 03 b3 50 c1 03 b3 58 c1 03 b3 58 c1 03 b3  P...P...X...X...
00000120: 2c 0f 45 78 00 00 00 00 00 00 00 00 00 00 00 00  ,.Ex............
00000130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
offset: 164
ath5k_pci 0000:02:00.0: registered as ''
BUG: unable to handle kernel NULL pointer dereference at 00000000

As you can see, the modules think "phy0" should be at offset 164, but
it's really at 160.

Also I noticed the original config had CONFIG_DYNAMIC_FTRACE=y, unfortunately
turning that off didn't seem to change anything (hmm, I didn't get a build 
bug, was the breakage fixed in 2.6.27.y?)

-- 
Bob Copeland %% www.bobcopeland.com


  reply	other threads:[~2008-11-16 16:21 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-14  5:46 Kernel oops when loading ath5k from compat-wireless in 2.6.27 Dan McGee
2008-11-14  6:17 ` Luis R. Rodriguez
2008-11-14 17:02   ` Bob Copeland
2008-11-14 17:37     ` Luis R. Rodriguez
2008-11-14 17:49       ` Bob Copeland
2008-11-14 18:06         ` Luis R. Rodriguez
2008-11-14 18:13           ` Sujith
2008-11-14 18:29             ` Luis R. Rodriguez
2008-11-14 18:33               ` Sujith
2008-11-14 18:37                 ` Luis R. Rodriguez
2008-11-14 19:33                   ` Dan McGee
2008-11-14 20:33                     ` Bob Copeland
2008-11-14 20:41                       ` Luis R. Rodriguez
2008-11-14 21:13                         ` Luis R. Rodriguez
2008-11-15  0:25                           ` Dan McGee
2008-11-15  0:36                             ` Luis R. Rodriguez
2008-11-15  2:05                               ` Dan McGee
2008-11-15  2:29                                 ` Bob Copeland
2008-11-15  2:57                                   ` Dan McGee
2008-11-15  6:30                                     ` Dan McGee
     [not found]                                     ` <449c10960811142229v77ea85f4nf898d447c7e63422@mail.gmail.com>
2008-11-15 18:19                                       ` Bob Copeland
2008-11-16  0:12                                         ` Dan McGee
2008-11-15  0:38                             ` Bob Copeland
2008-11-14 18:34           ` Bob Copeland
2008-11-16  2:11     ` Dan McGee
2008-11-16  2:38       ` Dan McGee
2008-11-16  5:48         ` Luis R. Rodriguez
2008-11-16  5:53           ` Bob Copeland
2008-11-16  6:05             ` Luis R. Rodriguez
2008-11-16  6:06               ` Luis R. Rodriguez
2008-11-16  6:15                 ` Luis R. Rodriguez
2008-11-16 16:20                   ` Bob Copeland [this message]
2008-11-16 16:38                     ` Dan McGee
2008-11-16 16:52                       ` Bob Copeland
2008-11-16 18:01                         ` Dan McGee
2008-11-16 18:05                           ` Johannes Berg
2008-11-16 18:20                             ` Luis R. Rodriguez
2008-11-16  5:55         ` Bob Copeland
2008-11-14 13:18 ` Bob Copeland

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=20081116162019.GA15851@hash.localnet \
    --to=me@bobcopeland.com \
    --cc=dpmcgee@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mb@bu3sch.de \
    --cc=mcgrof@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).