Skip to contentSkip to conversation

task_struct reference counting

DISCUSSION Francesco Casadei 2 participants 2 messages Sep 24, 2004

lore
Share & tools
lore
#0 lore raw

How one is supposed to handle the reference count of a task_struct from a kernel module?

get_task_struct() and put_task_struct() do not work, because the latter can't be used from a module, since it calls __put_task_struct(), which is not EXPORT_SYMBOL()'d.

I'm running 2.6.8.1.

Thanks in advance for your time,

Francesco Casadei

#1 lore raw
Quoted 2 lines · Francesco Casadei

How one is supposed to handle the reference count of a task_struct from a kernel module?

I don't think you are supposed to do anything that'd need to grab a task_struct from modular code.