]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/xive: Fix missing check of rc != OPAL_BUSY
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 20 Apr 2017 04:43:19 +0000 (14:43 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 20 Apr 2017 04:43:19 +0000 (14:43 +1000)
commit95f07d5eb75d47a9ce6fbf002953e89a29645ca4
treeeb5ebabe7c22abe66386505bc597d27a0d2345fa
parent78fba9bab3e3dde224ceeaba3b9e3bcf235ffe27
powerpc/xive: Fix missing check of rc != OPAL_BUSY

Dan Carpenter noticed that the code in __xive_native_disable_queue() has a for
loop with an unconditional break in the middle, which doesn't make a lot of
sense.

What the code's supposed to do is loop as long as OPAL says it's busy, if we get
any other return code, either success or failure, then we should break the loop.

So add the missing check.

Fixes: 2d7ecd8d170c ("powerpc/xive: Native exploitation of the XIVE interrupt controller")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/sysdev/xive/native.c