[OpenAFS] tasklist_lock undefined Linux 2.6.18, OpenAFS 1.4.2

Jeffrey Hutzelman jhutz@cmu.edu
Fri, 27 Oct 2006 18:46:38 -0400

On Friday, October 27, 2006 03:53:23 PM -0400 "Peter N. Schweitzer" 
<pschweitzer@usgs.gov> wrote:

>#  nm afs_osi.o | grep tasklist_lock
>          U tasklist_lock

OK; this is the one we're looking for.  That, combined with Stefaan's 
comment about not having the problem if keyring support is enabled, makes 
me think the compiler is doing something bogus here, like not correctly 
handling the 'weak' attribute on an extern symbol not declared in global 

Try the following patch:

--- src/afs/afs_osi.c.orig	2006-10-27 18:45:35.000000000 -0400
+++ src/afs/afs_osi.c	2006-10-27 18:45:43.000000000 -0400
@@ -805,11 +805,11 @@

 #if defined(AFS_LINUX22_ENV)
+extern rwlock_t tasklist_lock __attribute__((weak));
-    extern rwlock_t tasklist_lock __attribute__((weak));
     struct task_struct *p;

     if (&tasklist_lock)

> I'm still thinking there's some kernel feature that I should have enabled
> but didn't know I needed.

No; the symbol really isn't exported in recent kernels; this is not about 
kernel configuration.