Re: [RFC v4 8/9] Link frame_info to thread_info

Yao Qi
2017-06-19T13:07:14Z

Philipp Rudo <prudo@linux.vnet.ibm.com> writes:

> Linux kernel stacks on S390 are spread over several memory locations.
> These locations differ for every kernel task/thread. Thus we need to know
> to which task/thread a frame belongs to check whether a stack pointer is
> valid and when to stop unwinding. To do so add a pointer to corresponding
> thread_info to frame_info.
>
> This connection already exists implicitly by the fact that switch_to_thread
> reinitializes the frame cache.

The whole frame cache is created for current thread, from sentinel
frame. When the current thread is changed, the frame cache will be
re-created. If we see different frame_info objects are about different
threads, it must be a bug somewhere. I think frame_info.thread always
points to the current thread, no?

--
Yao (齐尧)