lkml.org 
[lkml]   [2002]   [Jan]   [30]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
SubjectRe: Encountered a Null Pointer Problem on the SCSI Layer
DateTue, 29 Jan 2002 18:22:31 +0100
FromHorst von Brand <>
Pete Zaitcev <zaitcev@redhat.com> said:
> > --- 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
> 
> There's one more of theese
> 
> --- linux-2.4.18-pre1/drivers/scsi/sd.c	Fri Nov  9 14:05:06 2001
> +++ linux-2.4.18-pre1-p3/drivers/scsi/sd.c	Mon Jan 28 14:46:11 2002
> @@ -302,7 +302,7 @@
> 
>  	dpnt = &rscsi_disks[dev];
>  	if (devm >= (sd_template.dev_max << 4) ||
> -	    !dpnt ||
> +	    !dpnt->device ||
>  	    !dpnt->device->online ||
>   	    block + SCpnt->request.nr_sectors > sd[devm].nr_sects) {
>  		SCSI_LOG_HLQUEUE(2, printk("Finishing %ld sectors\n", SCpnt->re
> quest.nr_sectors));

Is is possible for dpnt to be NULL here? Should perhaps be checked...
-- 
Horst von Brand			     http://counter.li.org # 22616
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 11:15    [W:0.248 / U:0.170 seconds]
©2003-2008 Jasper Spaans