Re: tasklist_lock location

c. chris erway (cce3@cornell.edu)
Thu, 01 Jul 1999 00:23:27 -0700


well, uhh, if anyone's interested, i narrowed the problem down to just
SMP machines. it sure seems like this symbol is pretty well exported,
and <linux/sched.h> is definitely #included in my source, but everyone
who tries to insmod it on an SMP machine (even me) gets the same
message:

mymod-smp-2.2.10: unresolved symbol tasklist_lock

i'm told that tasklist_lock's type, rwlock_t, is defined differently and
"works different" in SMP, but i'm not exactly sure what kind of
ramifications it would have for me. do i need some special ifdefs to
get this to work in SMP? thanks.

i don't subscribe to this list (yet), so i'd appreciate cc's in the
responses. thanks.

chris

Brendan Cully wrote:
>
> tasklist_lock is declared in include/linux/sched.h and defined in
> kernel/sched.c. As far as I know there is no way that symbol could be
> undefined - SMP systems in particular need that lock. Since the symbol
> is defined in sched.c, failing to compile in /proc wouldn't give you
> that particular error.
>
> Probably your user miscompiled your module. Maybe your user is using
> CONFIG_MODVERSIONS and you aren't?
>
> just guessing...
>
> --
> Brendan Cully <brendan@kublai.com> | OLD SKOOL ROOLZ
> "I hope I don't win | .-_|\
> The rules say to bring a friend | / \
> I don't have any" | Perth ->*.--._/
>
> On Wednesday, 30 June 1999 at 21:44, cce3@cornell.edu wrote:
> > I wrote a function into a kernel module that iterated through the current
> > tasks for statistics purposes to /proc/mymod. Following an example
> > from the procfs sources, I used (un)read_lock(&tasklist_lock) during the
> > time I was iterating throug them.
> >
> > But a user using 2.2.10-smp complained that though he could compile my
> > module fine, upon insmod'ing it he got this problem:
> > mymod-smp-2.2.10: unresolved symbol tasklist_lock
> >
> > Is there a config flag in the kernel sources that would lead to this
> > symbol not being created? Perhaps he didn't compile in a /proc
> > filesystem? I was just wondering where exactly it was defined, and
> > whether or not I have to tell him to enable a certain option, or if it's
> > a deeper issue. Thanks.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/