powerpc: Restore registers on error exit from csum_partial_copy_generic()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 1 Oct 2013 07:11:35 +0000 (17:11 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Oct 2013 23:08:31 +0000 (16:08 -0700)
commit17cb5c2fef8f1b1b2f3a4ac10f0801c9ad258cb6
tree25c5e345e0c2424f5643741ac3149fa235a89067
parent4d358e9e19f001d2d7b33c2c8daa7b83b85ae1fc
powerpc: Restore registers on error exit from csum_partial_copy_generic()

commit 8f21bd0090052e740944f9397e2be5ac7957ded7 upstream.

The csum_partial_copy_generic() function saves the PowerPC non-volatile
r14, r15, and r16 registers for the main checksum-and-copy loop.
Unfortunately, it fails to restore them upon error exit from this loop,
which results in silent corruption of these registers in the presumably
rare event of an access exception within that loop.

This commit therefore restores these register on error exit from the loop.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/lib/checksum_64.S