[ofw] [IBAL]Patch protect from possible null dereference.
Alex Estrin
alex.estrin at qlogic.com
Wed Apr 4 12:52:59 PDT 2007
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 );
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bus_iou_mgr.patch
Type: application/octet-stream
Size: 501 bytes
Desc: bus_iou_mgr.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20070404/a02aeb4e/attachment.obj>
More information about the ofw
mailing list