[ofw] [IBAL]Patch protect from possible null dereference.

Alex Estrin alex.estrin at qlogic.com
Thu Apr 5 05:57:03 PDT 2007


Yes, I think you are right.

Thanks,
Alex
 
> -----Original Message-----
> From: Yossi Leybovich [mailto:sleybo at dev.mellanox.co.il]
> Sent: Thursday, April 05, 2007 4:10 AM
> To: Alex Estrin; Yossi Leybovich; ofw at lists.openfabrics.org
> Subject: RE: [ofw] [IBAL]Patch protect from possible null dereference.
> 
> Hi
> 
> Thanks for the patch , I think we need to do the same for the
bus_port_mgr
> ?
> What do you think?
> 
> Yossi
> 
> > -----Original Message-----
> > From: ofw-bounces at lists.openfabrics.org
> > [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Alex Estrin
> > Sent: Wednesday, April 04, 2007 10:53 PM
> > To: Yossi Leybovich; ofw at lists.openfabrics.org
> > Subject: [ofw] [IBAL]Patch protect from possible null dereference.
> >
> > Yossi,
> >
> > Proposed patch is to verify device status flags before
> > dereferencing hca. This could be the case if IOU goes away
> > before it had a chance to complete initialization.
> > Please review.
> >
> > Thanks,
> > Alex
> >
> >
> >
> > Index: bus_iou_mgr.c
> > ===================================================================
> > --- bus_iou_mgr.c	(revision 623)
> > +++ bus_iou_mgr.c	(working copy)
> > @@ -1370,6 +1370,14 @@
> >  		&GUID_BUS_INTERFACE_STANDARD ) )
> >  	{
> >  		p_ext = p_dev_obj->DeviceExtension;
> > +
> > +		if( !p_ext->h_ca ||
> > +			!p_ext->b_present ||
> > +			p_ext->b_reported_missing )
> > +		{
> > +			return STATUS_NO_SUCH_DEVICE;
> > +		}
> > +
> >  		status = cl_fwd_query_ifc(
> >  			p_ext->h_ca->obj.p_ci_ca->verbs.p_hca_dev,
> > p_io_stack );
> >  	}
> >




More information about the ofw mailing list