[OpenAFS] Re: 1.4.2 client on RHEL5 beta 2

Derek Atkins warlord@MIT.EDU
Thu, 07 Dec 2006 10:17:10 -0500


Jeffrey Hutzelman <jhutz@cmu.edu> writes:

> On Tuesday, November 21, 2006 04:16:51 PM +0100 Stephan Wiesand 
> <Stephan.Wiesand@desy.de> wrote:
>
>> But isn't loading such a module supposed to fail? Is it only in this
>> special case that it doesn't, because of the "weak" definition of
>> tasklist_lock in the AFS module and/or because of the fallback to
>> rcu_read_lock?
>
> It is, except that our reference is weak, so we can detect at runtime 
> whether the symbol is available to us.  The kernel handles this case 
> correctly; if a non-GPL module has a weak reference to a GPL-only symbol, 
> the reference will be left unresolved, just as if the symbol were not 
> present at all.

One way to solve this is to make a compile-time check for the symbol
and if it fails there then we don't run the runtime check, we ifdef
it out.  That way the build wont fail in modpost.

> -- Jeff

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available