* [PATCH] bug in scsi debug code
@ 2001-02-28 20:06 Rajagopal Ananthanarayanan
0 siblings, 0 replies; only message in thread
From: Rajagopal Ananthanarayanan @ 2001-02-28 20:06 UTC (permalink / raw)
To: linux-kernel; +Cc: axboe, torvalds
[-- Attachment #1: Type: text/plain, Size: 520 bytes --]
A small fix in dump_stats() (scsi_merge.c) invoked when (struct req)
has inconsistent number of segments. The list formed
by b_reqnext is null terminated, so the current code is
simply wrong: it can cause a oops if (req->bh) is NULL,
or it fails to print the last element in the b_reqnext chain.
--
--------------------------------------------------------------------------
Rajagopal Ananthanarayanan ("ananth")
Member Technical Staff, SGI.
--------------------------------------------------------------------------
[-- Attachment #2: scsi-merge-debug.patch --]
[-- Type: text/plain, Size: 491 bytes --]
--- ../../linux-2.4.2/linux/drivers/scsi/scsi_merge.c Fri Feb 9 11:30:23 2001
+++ drivers/scsi/scsi_merge.c Wed Feb 28 11:55:48 2001
@@ -90,7 +90,7 @@
printk("nr_segments is %x\n", req->nr_segments);
printk("counted segments is %x\n", segments);
printk("Flags %d %d\n", use_clustering, dma_host);
- for (bh = req->bh; bh->b_reqnext != NULL; bh = bh->b_reqnext)
+ for (bh = req->bh; bh != NULL; bh = bh->b_reqnext)
{
printk("Segment 0x%p, blocks %d, addr 0x%lx\n",
bh,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-02-28 20:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-28 20:06 [PATCH] bug in scsi debug code Rajagopal Ananthanarayanan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox