[lkml]   [2002]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectEncountered a Null Pointer Problem on the SCSI Layer
I encountered a null pointer problem on the SCSI layer when
I was testing Mingming Cao's diskio patch "diskio-stat-rq-2414"
on 2.4.14.

Mingming's patch is at

The code in sd_find_queue() that protects against accessing a
non-existent device is not correct. The patch to fix it is given
below. Please check.

The following patch is based on the 2.4.18-pre7 code:

--- linux/drivers/scsi/sd.c Fri Jan 25 14:01:07 2002
+++ linux-2.4.17-diskio/drivers/scsi/sd.c Fri Jan 25 13:57:01 2002
@@ -279,7 +279,7 @@
target = DEVICE_NR(dev);

dpnt = &rscsi_disks[target];
- if (!dpnt)
+ if (!dpnt->device)
return NULL; /* No such device */
return &dpnt->device->request_queue;

Wai Yee Peter Wong
IBM Linux Technology Center, Performance Analysis

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:18    [W:0.035 / U:1.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site