public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Drokin <green@linuxhacker.ru>
To: "Randy.Dunlap" <rddunlap@osdl.org>
Cc: alan@lxorguk.ukuu.org.uk, linux-kernel@vger.kernel.org,
	deanna_bonds@adaptec.com
Subject: Re: dpt_i2o.c fix for possibly memory corruption on reset timeout
Date: Thu, 13 Mar 2003 21:56:28 +0300	[thread overview]
Message-ID: <20030313185628.GA2485@linuxhacker.ru> (raw)
In-Reply-To: <20030313105125.1548d67c.rddunlap@osdl.org>

Hello!

On Thu, Mar 13, 2003 at 10:51:25AM -0800, Randy.Dunlap wrote:
> | Ok, so please consider applying this patch instead (appies to both
> | 2.4 and 2.5)

Ok, here's the one with spelling fix from Randy ;)

Bye,
    Oleg

===== drivers/scsi/dpt_i2o.c 1.9 vs edited =====
--- 1.9/drivers/scsi/dpt_i2o.c	Wed Jan  8 18:26:13 2003
+++ edited/drivers/scsi/dpt_i2o.c	Thu Mar 13 21:55:08 2003
@@ -1318,7 +1318,9 @@
 	while(*status == 0){
 		if(time_after(jiffies,timeout)){
 			printk(KERN_WARNING"%s: IOP Reset Timeout\n",pHba->name);
-			kfree(status);
+			/* We lose 4 bytes of "status" here, but we cannot
+			   free these because controller may awake and corrupt
+			   those bytes at any time */
 			return -ETIMEDOUT;
 		}
 		rmb();
@@ -1336,6 +1338,9 @@
 			}
 			if(time_after(jiffies,timeout)){
 				printk(KERN_ERR "%s:Timeout waiting for IOP Reset.\n",pHba->name);
+			/* We lose 4 bytes of "status" here, but we cannot
+			   free these because controller may awake and corrupt
+			   those bytes at any time */
 				return -ETIMEDOUT;
 			}
 		} while (m == EMPTY_QUEUE);

  reply	other threads:[~2003-03-13 18:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-13 18:28 dpt_i2o.c memleak/incorrectness Oleg Drokin
2003-03-13 19:44 ` Alan Cox
2003-03-13 18:41   ` dpt_i2o.c fix for possibly memory corruption on reset timeout Oleg Drokin
2003-03-13 18:51     ` Randy.Dunlap
2003-03-13 18:56       ` Oleg Drokin [this message]
2003-03-14  9:18         ` Denis Vlasenko
2003-03-14 12:02           ` Joern Engel
2003-03-14 14:19           ` Alan Cox
2003-03-14 13:39             ` Joern Engel
2003-03-14 13:43               ` Oleg Drokin
2003-03-14 15:26                 ` Alan Cox
2003-03-13 18:58   ` dpt_i2o.c memleak/incorrectness Bryan Andersen
2003-03-15 16:15     ` Horst von Brand
2003-03-13 19:38   ` Now i2o_core.c memleak/incorrectness? Oleg Drokin
2003-03-14  0:42     ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030313185628.GA2485@linuxhacker.ru \
    --to=green@linuxhacker.ru \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=deanna_bonds@adaptec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox