From linux-kernel@vger.kernel.org Thu Dec 18 21:48:23 2003 Date: Mon, 15 Dec 2003 03:20:20 +0000 From: Linux Kernel Mailing List To: bk-commits-24@vger.kernel.org Subject: [PPC64] Fix smp_call_function so we don't crash if an IPI is very late. ChangeSet 1.1270.3.2, 2003/12/15 14:20:20+11:00, olof@austin.ibm.com [PPC64] Fix smp_call_function so we don't crash if an IPI is very late. # This patch includes the following deltas: # ChangeSet 1.1270.3.1 -> 1.1270.3.2 # arch/ppc64/kernel/smp.c 1.4 -> 1.5 # smp.c | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c --- a/arch/ppc64/kernel/smp.c Mon Dec 15 07:03:47 2003 +++ b/arch/ppc64/kernel/smp.c Mon Dec 15 07:03:47 2003 @@ -564,6 +564,7 @@ ret = 0; out: + call_data = NULL; HMT_medium(); spin_unlock_bh(&call_lock); return ret; @@ -571,9 +572,20 @@ void smp_call_function_interrupt(void) { - void (*func) (void *info) = call_data->func; - void *info = call_data->info; - int wait = call_data->wait; + void (*func) (void *info); + void *info; + int wait; + + + /* call_data will be NULL if the sender timed out while + * waiting on us to receive the call. + */ + if (!call_data) + return; + + func = call_data->func; + info = call_data->info; + wait = call_data->wait; /* * Notify initiating CPU that I've grabbed the data and am - To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html