sparse-detected bug

From: David Mosberger <davidm_at_napali.hpl.hp.com>
Date: 2004-10-04 22:29:10
Tony,

I started working on a patch to enable sparse-checking on the ia64 kernel.
This uncovered a bug in setup_frame() where the arguments to copy_to_user()
were reversed.  The following is an (untested) patch to fix the bug.

	--david

ia64: fix wrong argument order in __copy_to_user() call

Signed-off-by: davidm@hpl.hp.com

===== arch/ia64/kernel/signal.c 1.43 vs edited =====
--- 1.43/arch/ia64/kernel/signal.c	2004-08-25 10:13:41 -07:00
+++ edited/arch/ia64/kernel/signal.c	2004-10-04 05:24:53 -07:00
@@ -335,7 +335,7 @@
 		err |= __put_user(scr->pt.ar_ccv, &sc->sc_ar_ccv);		/* ar.ccv */
 		err |= __put_user(scr->pt.b7, &sc->sc_br[7]);			/* b7 */
 		err |= __put_user(scr->pt.r14, &sc->sc_gr[14]);			/* r14 */
-		err |= __copy_to_user(&scr->pt.ar_csd, &sc->sc_ar25, 2*8); /* ar.csd & ar.ssd */
+		err |= __copy_to_user(&sc->sc_ar25, &scr->pt.ar_csd, 2*8); /* ar.csd & ar.ssd */
 		err |= __copy_to_user(&sc->sc_gr[2], &scr->pt.r2, 2*8);		/* r2-r3 */
 		err |= __copy_to_user(&sc->sc_gr[16], &scr->pt.r16, 16*8);	/* r16-r31 */
 	}
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Oct 4 08:30:27 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:31 EST