Re: [PATCH] fix xenU kernel crash in dmi_iterate

From: Ulrich Drepper
Date: Fri Jan 14 2005 - 17:08:31 EST


On Fri, 14 Jan 2005 14:49:10 -0500 (EST), Rik van Riel <riel@xxxxxxxxxx> wrote:
> char __iomem *p, *q;
>
> for (p = q = ioremap(0xF0000, 0x10000); q < p + 0x10000; q += 16) {
> + if (p == NULL)
> + return -1;
> memcpy_fromio(buf, q, 15);
> if(memcmp(buf, "_DMI_", 5)==0 && dmi_checksum(buf))
> {

SInce p is not modified in the loop, this certainly should look like this

p = ioremap(0xF0000, 0x10000);
if (p == NULL)
return -1;
for (q = p; q < p + 0x10000; q += 16) {
memcpy_fromio(buf, q, 15);
...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/