为何此task非比task

pagefault 时,用mm 通过container_of找到 当前mm对应的struct task_struct,
然后和current 对应的task进行比较,发现竟然不一样。

我想这两个地址应该是一样的,不解!

strcut task_struct *tsk;

tsk = container_of(&mm,struct task_struct, mm);
printk(KERN_ERR"in %s line:%d &mm:%p tsk:%p current:%p \n",\
            __FILE__,__LINE__,&mm,tsk,current);

打印的结果:
&mm:de495e14 tsk:de495d20 current:de43ed80

作者: rocky1972   发布时间: 2011-03-11

呵呵,想到了,mm 是一个局部变量,并非task->mm 的那个成员

作者: rocky1972   发布时间: 2011-03-11