Re: [patch] vxge: potential NULL dereference

David Miller
2010-09-10T21:40:44Z

From: Jon Mason <jon.mason@exar.com>
Date: Fri, 10 Sep 2010 17:32:15 -0400

> It is possible to the vpath to be NULL in this array if it is not
> populated in __vxge_hw_vp_initialize due to the vpath being masked off
> my the adapter. vxge_hw_device_begin_irq calls
> __vxge_hw_vpath_alarm_process on all possible vpaths regardless of
> their allocation. This is the case we need to worry about.
>
> It is not an issue because in the first instance of the vpath being
> NULL, its sets the alarm_event to be VXGE_HW_EVENT_UNKNOWN. The first
> check in the out2 error path checks for VXGE_HW_EVENT_UNKNOWN and
> returns. So its not possible to hit this...though it is ugly code. I
> welcome a reworking of the code to something mroe elegant. :)

Aha, I see, thanks for explaining this.