include/linux/sched.h
2501 #define task_thread_info(task) ((struct thread_info *)(task)->stack)
2502 #define task_stack_page(task) ((task)->stack)
2503
2504 static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org)
2505 {
2506 *task_thread_info(p) = *task_thread_info(org);
2507 task_thread_info(p)->task = p;
2508 }
2501行中为什么要强转成 struct thread_info *?看2506行中对这个宏的使用,传进去的是一个struct task_struct *。而且通过代码逻辑看,它要做的也是取task_struct 中的stack啊。
在commit f7e4217b007d1f73e7e3cf10ba4fea4a608c603f 中,“rename thread_info to stack” 是不是提这个patch的时候忽视了?