Bug 87731 - b43: no boot with kernels 3.18
Summary: b43: no boot with kernels 3.18
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: i386 Linux
: P1 normal
Assignee: Hauke Mehrtens
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-04 19:57 UTC by volker_kempter
Modified: 2014-11-24 09:56 UTC (History)
3 users (show)

See Also:
Kernel Version: 3.18-rcx (x=1,2,3) and 3.18.0-1 and -2
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
dmesg.log (86.65 KB, text/x-log)
2014-11-04 19:57 UTC, volker_kempter
Details
b43: fix NULL pointer dereference in b43_phy_copy() (1.74 KB, patch)
2014-11-05 22:33 UTC, Hauke Mehrtens
Details | Diff

Description volker_kempter 2014-11-04 19:57:26 UTC
Created attachment 156541 [details]
dmesg.log

boot problems with all of the kernels 3.18 published so far:

after the termination of the boot process, no sudo commands can be processed. There is no wifi. No access to "synaptic".

This is for lubuntu-14.10 on dell e6500. 

"dmesg" produces the BUG "unable to handle kernel null pointer de - reference at ..." (see attached file)

No such problems with any of the kernels 3.16 and 3.17. In particular, the machine runs well with 3.17.2 and 3.16.0-25.
Comment 1 Hauke Mehrtens 2014-11-05 22:33:18 UTC
Created attachment 156831 [details]
b43: fix NULL pointer dereference in b43_phy_copy()

The attached patch should fix your problem. The null pointer dereference you have was caused by a regression in 3.18. I hope this is the root cause of your problem.
Comment 2 volker_kempter 2014-11-05 23:07:46 UTC
(In reply to Hauke Mehrtens from comment #1)
> Created attachment 156831 [details]
> b43: fix NULL pointer dereference in b43_phy_copy()
> 
> The attached patch should fix your problem. The null pointer dereference you
> have was caused by a regression in 3.18. I hope this is the root cause of
> your problem.

thanks for the immediate reply! 

Meanwhile, I had confirmed that b43 is at the origin of the problem: I deactivated b43-fwcutter and the firmware -> following that, 14.10 boots well with al 3.18 kernels.

Remaining "problem": how to use the attachment / patch (never done that before)?
Any suggestion / link?
Comment 3 Barto 2014-11-07 06:36:18 UTC
(In reply to volker_kempter from comment #2)
>  
> Remaining "problem": how to use the attachment / patch (never done that
> before)?
> Any suggestion / link?

you can modify the file /drivers/net/wireless/b43/phy_common.c by replacing this line :

dev->phy.ops->phy_write(dev, destreg,
		dev->phy.ops->phy_read(dev, srcreg));

by this line :

b43_phy_write(dev, destreg, b43_phy_read(dev, srcreg));

or you can use the program "diff" in order to apply the patch :

http://fluxbb.org/docs/patching

once the file has been modified you can follow the next step :

- build your own kernel version with this modified source file ( /drivers/net/wireless/b43/phy_common.c ), you can follow this guide for ubuntu :

https://help.ubuntu.com/community/Kernel/Compile
Comment 4 volker_kempter 2014-11-07 11:26:32 UTC
(In reply to Barto from comment #3)
> (In reply to volker_kempter from comment #2)
> >  
> > Remaining "problem": how to use the attachment / patch (never done that
> > before)?
> > Any suggestion / link?
> 
> you can modify the file /drivers/net/wireless/b43/phy_common.c by replacing
> this line :
> 
> dev->phy.ops->phy_write(dev, destreg,
>               dev->phy.ops->phy_read(dev, srcreg));
> 
> by this line :
> 
> b43_phy_write(dev, destreg, b43_phy_read(dev, srcreg));
> 
> or you can use the program "diff" in order to apply the patch :
> 
> http://fluxbb.org/docs/patching
> 
> once the file has been modified you can follow the next step :
> 
> - build your own kernel version with this modified source file (
> /drivers/net/wireless/b43/phy_common.c ), you can follow this guide for
> ubuntu :
> 
> https://help.ubuntu.com/community/Kernel/Compile

Bonjour! Thanks for your patience! 
I might try (download the kernel source with apt-get source to /usr/src (?), applying the patch to .../b43/phy_common.c -the easiest part-, building the kernel with fakeroot, install it). Good exercise, I suppose!

I fell, however, that an updated kernel, supporting my hardware, will be available before I will be successful...
Comment 5 volker_kempter 2014-11-07 11:36:09 UTC
b43: fix NULL pointer dereference in b43_phy_copy():

an additional observation that could probably be of interest:
The BUG"nullpointer dereference..." does not occur with the 3.18 kernels on the much older dell Latitude D505 under lubuntu-14.10 (and under Ubuntu-12.04). The only difference I can think of, is the BCM chip (4309 in the D505), but 4312 in the e6500 (who creates the boot problem). In both cases I'm using the b43-fwcutter.
Comment 6 volker_kempter 2014-11-08 09:36:10 UTC
(In reply to Hauke Mehrtens from comment #1)
> Created attachment 156831 [details]
> b43: fix NULL pointer dereference in b43_phy_copy()
> 
> The attached patch should fix your problem. The null pointer dereference you
> have was caused by a regression in 3.18. I hope this is the root cause of
> your problem.

I applied the attached patch to ../phy_common.c in kernel 3.18.0-rc3, built a new kernel from the modified source file:
- boot successful without any obvious problems (in particular sudo and synaptic work)
- WIFI with b43 works.

Thanks for your help and advice to Barto and you!
Comment 7 volker_kempter 2014-11-10 09:25:53 UTC
kernel 3.18.0-rc4:

for me, this version (-rc4) shows still the same problems as the previous versions. 

This is probably not too surprising because the patch has not yet been applied yet?
Comment 8 volker_kempter 2014-11-17 08:42:58 UTC
kernel 3.18.0-rc5:

this version (-rc5) shows still the same problems as all the previous versions: not booting properly as soon as the b43 driver is activated.
Comment 9 Hauke Mehrtens 2014-11-17 18:13:10 UTC
The patch is currently in David Millers tree and should arrive in 3.18-rc6

https://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/?id=9c3a6670863033df421c8e46f79f383cf3a922ee
Comment 10 volker_kempter 2014-11-17 18:56:47 UTC
(In reply to Hauke Mehrtens from comment #9)
> The patch is currently in David Millers tree and should arrive in 3.18-rc6
> 
> https://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/
> ?id=9c3a6670863033df421c8e46f79f383cf3a922ee

thanks for replying!
Comment 11 volker_kempter 2014-11-24 09:56:03 UTC
(In reply to Hauke Mehrtens from comment #9)
> The patch is currently in David Millers tree and should arrive in 3.18-rc6
> 
> https://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/
> ?id=9c3a6670863033df421c8e46f79f383cf3a922ee

patch is in: 3.18-rc6 works normally and supports the b43 driver.

Note You need to log in before you can comment on or make changes to this bug.