From: Johannes Berg <johannes@sipsolutions.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jeff Chua <jeff.chua.linux@gmail.com>,
"John W. Linville" <linville@tuxdriver.com>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: wpa2 hangs v2.6.32-rc5-402-gb6727b1. Revert 7d930bc33653d5592dc386a76a38f39c2e962344 fixed it.
Date: Mon, 02 Nov 2009 09:49:02 +0100 [thread overview]
Message-ID: <1257151742.3555.165.camel@johannes.local> (raw)
In-Reply-To: <alpine.LFD.2.01.0911011641101.31845@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 2519 bytes --]
On Sun, 2009-11-01 at 16:53 -0800, Linus Torvalds wrote:
> That decodes to
>
> cfg80211_conn_work+89:
>
> 3: 89 ef mov %ebp,%edi
> 5: e8 6f be 41 e1 callq 0xffffffffe141be79
> a: 48 8b 43 20 mov 0x20(%rbx),%rax
> e: f6 40 48 01 testb $0x1,0x48(%rax)
> 12: 74 5d je 0x71
> 14: 83 bb 8c 00 00 00 01 cmpl $0x1,0x8c(%rbx)
> 1b: 75 54 jne 0x71
> 1d: 48 ?? 50 08 ??? 0x8(%rax) ???? uncertain instruction ????
> 21:* 8b 02 mov (%rdx),%eax <-- trapping instruction
> 23: 41 89 45 00 mov %eax,0x0(%r13)
> 27: 66 8b 42 04 mov 0x4(%rdx),%ax
> 2b: 66 41 89 45 04 mov %ax,0x4(%r13)
> 30: e8 f5 ea ff ff callq 0xffffffffffffeb2a
>
> trace:
> __cfg80111_scan_done
> worker_thread
>
> which looks like it matches this code:
>
> movq %r14, %rdi # D.43604,
> call mutex_lock #
> movq 32(%rbx), %rax # <variable>.netdev, <variable>.netdev
> testb $1, 72(%rax) #, <variable>.state
> je .L215 #,
> cmpl $1, 140(%rbx) #, <variable>.sme_state
> jne .L215 #,
> movq 144(%rbx), %rax # <variable>.conn, <variable>.conn
> movq %rbx, %rdi # wdev,
> movq 8(%rax), %rax # <variable>.params.bssid, <variable>.params.bssid
> movl (%rax), %edx #* <variable>.params.bssid, tmp74
> movl %edx, 0(%r13) # tmp74, bssid
> movw 4(%rax), %ax #, tmp75
> movw %ax, 4(%r13) # tmp75, bssid
> call cfg80211_conn_do_work #
>
> ie it looks like 'conn->params.bssid' is NULL and we oops when we try to
> load bssid from there. The code is:
>
> memcpy(bssid, wdev->conn->params.bssid, ETH_ALEN);
>
> where ETH_ALEN is 6 bytes, so the memcpy is inlined..
>
> And yes, that "memcpy()" was added in that buggy commit.
Indeed, thank you. I'd analysed this before but not made the connection
with Jeff's report.
> So reverting 7d930bc33653d5592dc386a76a38f39c2e962344 is the correct thing
> to do. Or somebody needs to fix that piece-of-shit code.
Yes ... that params.bssid was != NULL was a bad assumption in that
commit. The right thing to do is to add a check and pass NULL through,
like I did here:
http://thread.gmane.org/gmane.linux.kernel.wireless.general/41695
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2009-11-02 8:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-01 15:18 Jeff Chua
2009-11-01 15:29 ` Johannes Berg
[not found] ` <b6a2187b0911011612v4a874640s62105a7323b01ad0@mail.gmail.com>
2009-11-02 0:53 ` Linus Torvalds
2009-11-02 8:49 ` Johannes Berg [this message]
[not found] ` <b6a2187b0911020705v2377928dn15523318d7c2f09d@mail.gmail.com>
2009-11-02 17:10 ` John W. Linville
-- strict thread matches above, loose matches on Subject: below --
2009-11-01 15:17 Jeff Chua
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=1257151742.3555.165.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=jeff.chua.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®