Commit 87852ab0 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] i2o memleak comment

From: Andy Whitcroft <apw@shadowen.org>

There's a spot in i2o where we deliberately leak some memory when the
hardware plays up.  The alternative is to let the hardware scribble on it at
some unknown time in the future.

Things like the Stanford checker keep alleging that this is a bug.  So shut
them up with a comment
parent a1a862b7
......@@ -1690,7 +1690,9 @@ static int i2o_reset_controller(struct i2o_controller *c)
if((jiffies-time)>=20*HZ)
{
printk(KERN_ERR "IOP reset timeout.\n");
// Better to leak this for safety: - status;
/* The controller still may respond and overwrite
* status_phys, LEAK it to prevent memory corruption.
*/
return -ETIMEDOUT;
}
schedule();
......@@ -1719,6 +1721,10 @@ static int i2o_reset_controller(struct i2o_controller *c)
{
printk(KERN_ERR "%s: Timeout waiting for IOP reset.\n",
c->name);
/* The controller still may respond and
* overwrite status_phys, LEAK it to prevent
* memory corruption.
*/
return -ETIMEDOUT;
}
schedule();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment