From: leonidk Date: Wed, 9 Jul 2008 12:27:24 +0000 (+0000) Subject: [IBAL] Driver verifier caught this one. If an IRP is completed via IoCompletRequest... X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=894dda651b0ed325b518f37f69d70f0ccd8260bf;p=~shefty%2Frdma-win.git [IBAL] Driver verifier caught this one. If an IRP is completed via IoCompletRequest the IRP dispatch routine needs to return the same status as the IRP's completion status. There's no reason to use the CL_COMPLETED value here anyway (and it should probably be eliminated to prevent exactly this type of issue.) Signed-off-by: Fab Tillier git-svn-id: svn://openib.tc.cornell.edu/gen1@1360 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/trunk/core/al/kernel/al_proxy_ndi.c b/trunk/core/al/kernel/al_proxy_ndi.c index ef1ab9a5..2e4027db 100644 --- a/trunk/core/al/kernel/al_proxy_ndi.c +++ b/trunk/core/al/kernel/al_proxy_ndi.c @@ -433,6 +433,7 @@ __ndi_rej_cm( ib_api_status_t status; ual_ndi_rej_cm_ioctl_in_t *p_rej = (ual_ndi_rej_cm_ioctl_in_t*)cl_ioctl_in_buf( h_ioctl ); + NTSTATUS ntstatus; UNUSED_PARAM(p_ret_bytes); AL_ENTER( AL_DBG_NDI ); @@ -442,7 +443,7 @@ __ndi_rej_cm( /* Check psize */ if ( p_rej->pdata_size >= sizeof(p_rej->pdata) ) { - h_ioctl->IoStatus.Status = CL_INVALID_PARAMETER; + ntstatus = CL_INVALID_PARAMETER; goto exit; } @@ -454,20 +455,16 @@ __ndi_rej_cm( NULL, 0, p_rej->pdata, p_rej->pdata_size); if (status != IB_SUCCESS) { - h_ioctl->IoStatus.Status = CL_INVALID_HANDLE; + ntstatus = CL_INVALID_HANDLE; goto exit; } al_destroy_cep( p_context->h_al, &p_rej->cid, FALSE ); - h_ioctl->IoStatus.Status = STATUS_SUCCESS; + ntstatus = STATUS_SUCCESS; exit: - /* complete the IRP */ - h_ioctl->IoStatus.Information = 0; - IoCompleteRequest( h_ioctl, IO_NO_INCREMENT ); - AL_EXIT( AL_DBG_NDI ); - return CL_COMPLETED; + return ntstatus; } static cl_status_t