Opencl not working with kernel 5.9

Based on what @dinosaur said, I created my own kernel patch to make nvidia drivers work again. The patch reverts the commit which introduced the TAINT stuff:

https://github.com/torvalds/linux/commit/262e6ae7081df304fc625cf368d5c2cbba2bb991

This is my patch:

--- linux-5.9/kernel/module.c.old	2020-10-14 06:51:57.598066293 +0200
+++ linux-5.9/kernel/module.c	2020-10-14 07:58:16.504570606 +0200
@@ -1431,6 +1431,7 @@
 	return 0;
 }
 
+#if 0
 static bool inherit_taint(struct module *mod, struct module *owner)
 {
 	if (!owner || !test_bit(TAINT_PROPRIETARY_MODULE, &owner->taints))
@@ -1449,6 +1450,7 @@
 	}
 	return true;
 }
+#endif
 
 /* Resolve a symbol for this module.  I.e. if we find one, record usage. */
 static const struct kernel_symbol *resolve_symbol(struct module *mod,
@@ -1474,6 +1476,7 @@
 	if (!sym)
 		goto unlock;
 
+#if 0
 	if (license == GPL_ONLY)
 		mod->using_gplonly_symbols = true;
 
@@ -1481,6 +1484,7 @@
 		sym = NULL;
 		goto getname;
 	}
+#endif
 
 	if (!check_version(info, name, mod, crc)) {
 		sym = ERR_PTR(-EINVAL);

It works just fine!

1 Like