RE: more serious sparse-detected bug (with fix)

From: Luck, Tony <tony.luck_at_intel.com>
Date: 2004-10-05 14:30:20
> 	for (i = 4; i < 8; i++) {
>-		retval |= unw_access_gr(&info, i, &ppr->gr[i], &nat, 0);
>+		unsigned long val;
>+
>+		if (unw_access_gr(&info, i, &val, &nat, 0) < 0)
>+			return -EIO;
>+		retval |= __put_user(val, &ppr->gr[i]);
> 	}


Couldn't see why you added another local 'val' here as well as
the one declared at the top of the function ... so I dropped this
one.  Otherwise it *looks* good.  I've put it in my tree
(linux-ia64-release-2.6.9) which I'll push in a few minutes.

> trivially.  Patch below should fix the problem, but it's completely
> untested (I don't have any testcases for getregs/putregs).

I'd be happy to hear from anyone who does have some sort of test
exercising this before I ask Linus to pull.  The current crop of
bugs have shown how easy it is for the eyes to skip over typos
in this code.

-Tony
-
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 Tue Oct 5 00:30:57 2004

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