diff options
author | Robin Holt <holt@sgi.com> | 2007-05-18 14:46:52 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2007-05-22 13:16:07 -0400 |
commit | 6ae384884d936cb39ab20238af34689933e44525 (patch) | |
tree | 41fdde5596919fb7f987f637a4578792ef39ea4e /arch | |
parent | e2e6fe7bb6e30621ad4e8a3acb1e711815c239bd (diff) |
[IA64] Only unwind non-running tasks.
Unwinding a running task has proven problematic.
In one instance, the running task was attempting to unwind itself and
received an interrupt between when get_wchan allocated local variables on
the stack and when unw_init_from_blocked_task was called which resulted
in unw_init_frame_info to place this tasks task_struct pointer over the
switch stack's ar_bspstore entry.
Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/kernel/process.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index d1c3ed9943e5..af73b8dfde28 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -763,6 +763,9 @@ get_wchan (struct task_struct *p) | |||
763 | unsigned long ip; | 763 | unsigned long ip; |
764 | int count = 0; | 764 | int count = 0; |
765 | 765 | ||
766 | if (!p || p == current || p->state == TASK_RUNNING) | ||
767 | return 0; | ||
768 | |||
766 | /* | 769 | /* |
767 | * Note: p may not be a blocked task (it could be current or | 770 | * Note: p may not be a blocked task (it could be current or |
768 | * another process running on some other CPU. Rather than | 771 | * another process running on some other CPU. Rather than |
@@ -773,6 +776,8 @@ get_wchan (struct task_struct *p) | |||
773 | */ | 776 | */ |
774 | unw_init_from_blocked_task(&info, p); | 777 | unw_init_from_blocked_task(&info, p); |
775 | do { | 778 | do { |
779 | if (p->state == TASK_RUNNING) | ||
780 | return 0; | ||
776 | if (unw_unwind(&info) < 0) | 781 | if (unw_unwind(&info) < 0) |
777 | return 0; | 782 | return 0; |
778 | unw_get_ip(&info, &ip); | 783 | unw_get_ip(&info, &ip); |