Hello ,
I write a loadable kernel and add a member to
struct task_struct named
security. I alloc memory to every process
p->security memory .when i
want to rmmod the module ,i use for_each_task(p ) to travel
each process and free the memory that i have already
alloc(p->security!=NULL), sometime it is ok,sometime system Oops,I found
that if freeing for current process it is ok,Is that true,How can free the
memory in that other process's task_struct in cleanup_module( ) in a safer
way.
|