* help tasklist_lock
@ 2006-09-25 8:10 Giacomo
0 siblings, 0 replies; 4+ messages in thread
From: Giacomo @ 2006-09-25 8:10 UTC (permalink / raw)
To: netfilter-devel
Good morning to all!
I've written a module which needs to lock the tasklist_lock to read
the processes and get their pid.
Before kernel source 2.6.18 the symbol tasklist_lock was exported inside the
file fork.c.
With kernel 2.6.18, such symbol is no more exported, albeit a large number of
other source files use it.
My code does not compile any more and it says unexported symbol during
the compilation.
How can i do it?
Is there a way to make my module see the tasklist_lock?
The documentation of the kernel says:
What: remove EXPORT_SYMBOL(tasklist_lock)
When: August 2006
Files: kernel/fork.c
Why: tasklist_lock protects the kernel internal task list. Modules have
no business looking at it, and all instances in drivers have been due
to use of too-lowlevel APIs. Having this symbol exported prevents
moving to more scalable locking schemes for the task list.
while my code does simply the following:
struct task_struct *get_uid_from_pid(const pid_t uspace_pid)
{
struct task_struct *task;
/* task list must not change while we are reading!
* We are not in atomic */
read_lock(&tasklist_lock);
for_each_process(task)
{
if (task->pid == uspace_pid)
{
read_unlock(&tasklist_lock);
return task;
}
}
read_unlock(&tasklist_lock);
return NULL;
}
Thanks a lot for any suggestion.
Giacomo S.
--
Giacomo S.
http://www.giacomos.it
- - - - - - - - - - - - - - - - - - - - - -
Proteggi il tuo PC provando il mio semplice FIREWALL:
http://www.giacomos.it/ipfire
mailto:
delleceste@gmail.com
giacomo.strangolino@elettra.trieste.it
jacum@libero.it
- - - - - - - - - - - - - - - - - - - - - -
. '' `.
: :' :
`. ` '
`- Debian GNU/Linux -- The power of freedom
http://www.debian.org
^ permalink raw reply [flat|nested] 4+ messages in thread* help tasklist_lock
@ 2006-09-25 10:13 Giacomo
2006-09-25 10:16 ` Patrick McHardy
0 siblings, 1 reply; 4+ messages in thread
From: Giacomo @ 2006-09-25 10:13 UTC (permalink / raw)
To: netfilter-devel
Good morning to all!
I've written a module which needs to lock the tasklist_lock to read
the processes and get their pid.
Before kernel source 2.6.18 the symbol tasklist_lock was exported inside the
file fork.c.
With kernel 2.6.18, such symbol is no more exported, albeit a large number of
other source files use it.
My code does not compile any more and it says unexported symbol during
the compilation.
How can i do it?
Is there a way to make my module see the tasklist_lock?
The documentation of the kernel says:
What: remove EXPORT_SYMBOL(tasklist_lock)
When: August 2006
Files: kernel/fork.c
Why: tasklist_lock protects the kernel internal task list. Modules have
no business looking at it, and all instances in drivers have been due
to use of too-lowlevel APIs. Having this symbol exported prevents
moving to more scalable locking schemes for the task list.
while my code does simply the following:
struct task_struct *get_uid_from_pid(const pid_t uspace_pid)
{
struct task_struct *task;
/* task list must not change while we are reading!
* We are not in atomic */
read_lock(&tasklist_lock);
for_each_process(task)
{
if (task->pid == uspace_pid)
{
read_unlock(&tasklist_lock);
return task;
}
}
read_unlock(&tasklist_lock);
return NULL;
}
Thanks a lot for any suggestion.
Giacomo S.
--
Giacomo S.
http://www.giacomos.it
- - - - - - - - - - - - - - - - - - - - - -
Proteggi il tuo PC provando il mio semplice FIREWALL:
http://www.giacomos.it/ipfire
mailto:
delleceste@gmail.com
giacomo.strangolino@elettra.trieste.it
jacum@libero.it
- - - - - - - - - - - - - - - - - - - - - -
. '' `.
: :' :
`. ` '
`- Debian GNU/Linux -- The power of freedom
http://www.debian.org
-------------------------------------------------------
--
Giacomo S.
http://www.giacomos.it
- - - - - - - - - - - - - - - - - - - - - -
Proteggi il tuo PC provando il mio semplice FIREWALL:
http://www.giacomos.it/ipfire
mailto:
delleceste@gmail.com
giacomo.strangolino@elettra.trieste.it
jacum@libero.it
- - - - - - - - - - - - - - - - - - - - - -
. '' `.
: :' :
`. ` '
`- Debian GNU/Linux -- The power of freedom
http://www.debian.org
^ permalink raw reply [flat|nested] 4+ messages in thread* help tasklist_lock
@ 2006-09-25 8:05 Giacomo
0 siblings, 0 replies; 4+ messages in thread
From: Giacomo @ 2006-09-25 8:05 UTC (permalink / raw)
To: netfilter devel
Good morning to all!
I've written a module which needs to lock the tasklist_lock to read
the processes and get their pid.
Before kernel source 2.6.18 the symbol tasklist_lock was exported inside the
file fork.c.
With kernel 2.6.18, such symbol is no more exported, albeit a large number of
other source files use it.
My code does not compile any more and it says unexported symbol during
the compilation.
How can i do it?
Is there a way to make my module see the tasklist_lock?
The documentation of the kernel says:
What: remove EXPORT_SYMBOL(tasklist_lock)
When: August 2006
Files: kernel/fork.c
Why: tasklist_lock protects the kernel internal task list. Modules have
no business looking at it, and all instances in drivers have been due
to use of too-lowlevel APIs. Having this symbol exported prevents
moving to more scalable locking schemes for the task list.
while my code does simply the following:
struct task_struct *get_uid_from_pid(const pid_t uspace_pid)
{
struct task_struct *task;
/* task list must not change while we are reading!
* We are not in atomic */
read_lock(&tasklist_lock);
for_each_process(task)
{
if (task->pid == uspace_pid)
{
read_unlock(&tasklist_lock);
return task;
}
}
read_unlock(&tasklist_lock);
return NULL;
}
Thanks a lot for any suggestion.
Giacomo S.
--
Giacomo S.
http://www.giacomos.it
- - - - - - - - - - - - - - - - - - - - - -
Proteggi il tuo PC provando il mio semplice FIREWALL:
http://www.giacomos.it/ipfire
mailto:
delleceste@gmail.com
giacomo.strangolino@elettra.trieste.it
jacum@libero.it
- - - - - - - - - - - - - - - - - - - - - -
. '' `.
: :' :
`. ` '
`- Debian GNU/Linux -- The power of freedom
http://www.debian.org
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-09-25 10:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-25 8:10 help tasklist_lock Giacomo
-- strict thread matches above, loose matches on Subject: below --
2006-09-25 10:13 Giacomo
2006-09-25 10:16 ` Patrick McHardy
2006-09-25 8:05 Giacomo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.