+++ This bug was initially created as a clone of Bug #266710 +++ The aforementioned bug was closed, but I don't think it's resolved. Attempting to emerge openafs-kernel against vanilla-sources-2.6.30, the build fails: ... LD [M] /var/tmp/portage/net-fs/openafs-kernel-1.4.10/work/openafs-1.4.10/src/libafs/MODLOAD-2.6.29-gentoo-r1-mikeyd-MP/libafs.o Building modules, stage 2. MODPOST 1 modules FATAL: modpost: GPL-incompatible module libafs.ko uses GPL-only symbol '__rcu_read_unlock' make[6]: *** [__modpost] Error 1 ... Reproducible: Always Steps to Reproduce:
*** Bug 274355 has been marked as a duplicate of this bug. ***
Confirmed also with gentoo-sources-2.6.30-r1.
Please post your "emerge --info" and attach the build.log file of the failed emerge to this bug.
Created attachment 195502 [details] net-fs/openafs-kernel build log As one can see, the module builds just fine. It fails right after linking in the modpost script.
Created attachment 195504 [details] paludis --info net-fs/openafs-kernel
It's the same if you compile it manually. You can indeed just change the license declaration to GPL and it works, but that's not really viable. P.S.: Why has the bug been closed as fixed before?!
Would it be possible to see the kernel .config when this error occurs? I think I may have an idea of where this is coming from.
Created attachment 195613 [details] kernel .config
Thanks, I think CONFIG_PREEMPT_RCU is the source of the problem. The good news is that we can easily work around it in the OpenAFS source. I'll have a patch to test out a bit later.
Created attachment 195659 [details, diff] Avoid code that uses rcu_read_* when they are not usable (exported GPL) Can anyone try out the attached patch. With CONFIG_PREEMPT_RCU, rcu_read_unlock is GPL only, and some new credentials macros from 2.6.29 uses it.
Created attachment 195667 [details] Build log with patch_rcu Nope, sorry, still the same error. "nm -A *.o | grep __rcu_read_" says there are still one call each to lock and unlock in libafs.o and afs_osi.o.
Actually it's only afs_osi.c, lines 855 and 859 I guess.
Created attachment 195678 [details] Avoid rcu_read_{un}lock if exported GPL Hmm, in your case you don't have keyring support enabled in your kernel. Could you try this version of the patch?
(In reply to comment #13) > Created an attachment (id=195678) [edit] > Avoid rcu_read_{un}lock if exported GPL > > Hmm, in your case you don't have keyring support enabled in your kernel. > Could you try this version of the patch? > That one worked (or at least it compiled, didn't test it yet), thank you very much :)
FYI a slightly different version of this patch has been committed upstream and will be part of 1.4.11 pre-release 2.
1.4.11 is out, but I didn't test it yet.
openafs-kernel-1.4.12.1 should fix things