public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: "Martin J. Bligh" <mbligh@mbligh.org>
Cc: Andrew Morton <akpm@osdl.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	bugme-daemon@kernel-bugs.osdl.org
Subject: Re: [Bugme-new] [Bug 5003] New: Problem with symbios driver	on	recent	-mm trees
Date: Tue, 09 Aug 2005 11:55:36 -0500	[thread overview]
Message-ID: <1123606536.5170.27.camel@mulgrave> (raw)
In-Reply-To: <531000000.1123599581@[10.10.2.4]>

On Tue, 2005-08-09 at 07:59 -0700, Martin J. Bligh wrote:
> Dear novice test examiner,
> 
> It's in http://test.kernel.org with everything else ;-)
> 2.6.13-rc4-mm1+jejb_fix ... drills down to:
> 
> http://test.kernel.org/10080/debug/console.log

Well, OK, apparently some novice coder made an error converting from a
stack allocated buffer to a kmalloc'd one in the sense handling
routines.

I think this patch should fix it (or at least restore it to the level of
bugginess it had before).

James

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -342,12 +342,12 @@ int scsi_execute_req(struct scsi_device 
 		sense = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL);
 		if (!sense)
 			return DRIVER_ERROR << 24;
-		memset(sense, 0, sizeof(*sense));
+		memset(sense, 0, SCSI_SENSE_BUFFERSIZE);
 	}
 	result = scsi_execute(sdev, cmd, data_direction, buffer, bufflen,
 				  sense, timeout, retries, 0);
 	if (sshdr)
-		scsi_normalize_sense(sense, sizeof(*sense), sshdr);
+		scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, sshdr);
 
 	kfree(sense);
 	return result;



  reply	other threads:[~2005-08-09 16:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-05  4:33 Symbios problems in recent -mm trees? Martin J. Bligh
2005-08-05  6:39 ` Andrew Morton
2005-08-05 14:24   ` James Bottomley
2005-08-05 14:36     ` [Bugme-new] [Bug 5003] New: Problem with symbios driver on recent -mm trees Martin J. Bligh
2005-08-05 15:01       ` James Bottomley
2005-08-09  4:41         ` Martin J. Bligh
2005-08-09 14:26           ` James Bottomley
2005-08-09 14:59             ` Martin J. Bligh
2005-08-09 16:55               ` James Bottomley [this message]
2005-08-09 23:23                 ` Martin J. Bligh

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=1123606536.5170.27.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=akpm@osdl.org \
    --cc=bugme-daemon@kernel-bugs.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mbligh@mbligh.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