From: Heiko Carstens Date: Mon, 14 Nov 2011 10:19:01 +0000 (+0100) Subject: [S390] pfault: ignore leftover completion interrupts X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fa2fb2f4a599c402bb2670dde27867dbbb7e3c45;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [S390] pfault: ignore leftover completion interrupts Ignore completion interrupts if the initial interrupt hasn't been received and the addressed task is not running. This case can only happen if leftover (pending) completion interrupt gets delivered which wasn't removed with the PFAULT CANCEL operation during cpu hotplug. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 1766def5bc3..a9a301866b3 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -587,8 +587,13 @@ static void pfault_interrupt(unsigned int ext_int_code, } else { /* Completion interrupt was faster than initial * interrupt. Set pfault_wait to -1 so the initial - * interrupt doesn't put the task to sleep. */ - tsk->thread.pfault_wait = -1; + * interrupt doesn't put the task to sleep. + * If the task is not running, ignore the completion + * interrupt since it must be a leftover of a PFAULT + * CANCEL operation which didn't remove all pending + * completion interrupts. */ + if (tsk->state == TASK_RUNNING) + tsk->thread.pfault_wait = -1; } put_task_struct(tsk); } else {