aacraid: Relinquish CPU during timeout wait
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Tue, 26 Apr 2016 06:31:26 +0000 (23:31 -0700)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:13:24 +0000 (13:13 +0000)
commit0a01732d887f34802ae945da2501a50ac14bd47d
treee76b2d1d046f0567274e2fa57ef4ab4e78c1323a
parentff6ac3c302555f47a3e789b6e0d3bab6b1bdc3e8
aacraid: Relinquish CPU during timeout wait

commit 07beca2be24cc710461c0b131832524c9ee08910 upstream.

aac_fib_send has a special function case for initial commands during
driver initialization using wait < 0(pseudo sync mode). In this case,
the command does not sleep but rather spins checking for timeout.This
loop is calls cpu_relax() in an attempt to allow other processes/threads
to use the CPU, but this function does not relinquish the CPU and so the
command will hog the processor. This was observed in a KDUMP
"crashkernel" and that prevented the "command thread" (which is
responsible for completing the command from being timed out) from
starting because it could not get the CPU.

Fixed by replacing "cpu_relax()" call with "schedule()"
Cc: stable@vger.kernel.org
Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/scsi/aacraid/commsup.c