Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 596342 - net-wireless/broadcom-sta: incompatible with linux 4.8.0 (kernel NULL pointer dereference)
Summary: net-wireless/broadcom-sta: incompatible with linux 4.8.0 (kernel NULL pointer...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Matt Turner
URL: https://bugs.debian.org/cgi-bin/bugre...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-06 11:40 UTC by Mykyta Holubakha
Modified: 2016-11-21 04:19 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
This patch works for me (broadcom-sta-6.30.223.271-r3-linux-4.8.patch,1.37 KB, patch)
2016-10-07 03:44 UTC, Javad Karabi
Details | Diff
A patch for broadcom-sta to work on linux 4.8.0 (broadcom-sta-6.30.223.271-r3-linux-4.8.patch,1.28 KB, patch)
2016-10-07 04:07 UTC, Javad Karabi
Details | Diff
Patch to broadcom-sta ebuild to include linux-4.8.0 patch (broadcom-sta-6.30.223.271-r3.ebuild-linux-4.8.0.patch,549 bytes, patch)
2016-10-07 04:19 UTC, Javad Karabi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mykyta Holubakha 2016-10-06 11:40:14 UTC
net-wireless/broadcom-sta-6.30.223.271-r3 is incompatible with linux 4.8, causing a kernel level null pointer dereference.
Linked is a patch by Debian project, which fixes the issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=839629;filename=wl-4.8.0.diff;msg=5
Comment 1 Javad Karabi 2016-10-07 03:44:44 UTC
Created attachment 449404 [details, diff]
This patch works for me

I have tested this patch to work on my machine
Comment 2 Javad Karabi 2016-10-07 04:07:00 UTC
Created attachment 449406 [details, diff]
A patch for broadcom-sta to work on linux 4.8.0

Here is a slightly better formatted version of the patch.

In linux 4.8.0, the function signature of cfg80211_scan_done changed:
-void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted);
+void cfg80211_scan_done(struct cfg80211_scan_request *request,
+                       struct cfg80211_scan_info *info);


As opposed to providing a bool for abort, it seems that one now provides a structure which encodes that information:
+ * struct cfg80211_scan_info - information about completed scan
+ * @scan_start_tsf: scan start time in terms of the TSF of the BSS that the
+ *     wireless device that requested the scan is connected to. If this
+ *     information is not available, this field is left zero.
+ * @tsf_bssid: the BSSID according to which %scan_start_tsf is set.
+ * @aborted: set to true if the scan was aborted for any reason,
+ *     userspace will be notified of that
+ */
+struct cfg80211_scan_info {
+       u64 scan_start_tsf;
+       u8 tsf_bssid[ETH_ALEN] __aligned(2);
+       bool aborted;
+};

This patch essentially replaces the 2nd argument with a the correct structure
Comment 3 Javad Karabi 2016-10-07 04:19:10 UTC
Created attachment 449408 [details, diff]
Patch to broadcom-sta ebuild to include linux-4.8.0 patch
Comment 4 Aleksandr K. 2016-10-10 18:10:03 UTC
Can confirm that patch working.

P.S. Without this patch some freezes of plasma was on my PC.
Comment 5 Drake Donahue 2016-10-22 02:29:33 UTC
patch works for me also on amd64 kernel-4.8.2 
prior to patch broadcom-sta would cause wlan0 to fail to start at boot and total computer lockup (requiring turning power off) in response to manual restart of wlan0.
Thanks Javad.
Comment 6 Alexander Turenko 2016-11-14 21:39:44 UTC
The patch from Javad works for mee too. Iā€™m using gentoo-sources-4.8.7. Thanks, Javad!
Comment 7 Matt Turner gentoo-dev 2016-11-21 04:19:18 UTC
Should be fixed by

commit c6d3f917370292c267bb05d447db028125946dfe
Author: Matt Turner <mattst88@gentoo.org>
Date:   Sun Nov 20 20:17:58 2016 -0800

    net-wireless/broadcom-sta: Add support for Linux v4.8