Created
August 16, 2020 22:46
-
-
Save joanbm/9e20b3842bb336379eccc12410901e37 to your computer and use it in GitHub Desktop.
Broadcom wireless driver patch for Linux 5.9-rc1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From e5630a5ff6de417f0df7cfb14fe9434487f3d815 Mon Sep 17 00:00:00 2001 | |
From: Joan Bruguera <joanbrugueram@gmail.com> | |
Date: Fri, 14 Aug 2020 00:38:47 +0200 | |
Subject: [PATCH] Fix build for Linux 5.9-rc1 | |
See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=428e2976a5bf7e7f5554286d7a5a33b8147b106a | |
Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com> | |
--- | |
src/wl/sys/wl_linux.c | 4 ++++ | |
1 file changed, 4 insertions(+) | |
diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c | |
index 0d05100..4be2189 100644 | |
--- a/src/wl/sys/wl_linux.c | |
+++ b/src/wl/sys/wl_linux.c | |
@@ -1643,7 +1643,11 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |
goto done2; | |
} | |
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0) | |
if (segment_eq(get_fs(), KERNEL_DS)) | |
+#else | |
+ if (uaccess_kernel()) | |
+#endif | |
buf = ioc.buf; | |
else if (ioc.buf) { | |
-- | |
2.28.0 | |
BTW, in case someone is interested, I posted an alternative, more complex patch on https://gist.github.com/joanbm/5c640ac074d27fd1d82c74a5b67a1290 , which not only fixes Linux 5.9, but should be a more long-term fix since the kernel devs. seem to eventually want to get rid of the get_fs
/set_fs
/uaccess_kernel
functions entirely.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So far I haven't submitted anything.