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)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 3 Oct 2013 07:22:42 +0000 (17:22 +1000)
commit8f21bd0090052e740944f9397e2be5ac7957ded7
treeaa921309910569b6432d977c88af5c561417c100
parentd9813c3681a36774b254c0cdc9cce53c9e22c756
powerpc: Restore registers on error exit from csum_partial_copy_generic()

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>
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/lib/checksum_64.S