[ofw] al_cm_qp.c: <NULL> p_listen induced crash

Fab Tillier ftillier at windows.microsoft.com
Thu Apr 9 10:54:47 PDT 2009


> Hi,
>   It appears the svn commits for ND connection scaling (2082?) have
> introduced a failure in unchanged dap2test.exe code.

Doh!

> In al_cm_qp.c when attempting to match an inbound connection request to
> a posted listen, the context field is <null>
> when passed to __proc_listen(). Later in __listen_req()
> P_listen->obj.context is dereferenced ... Boom!

<snip...>

> Thoughts on a fix?

I'll do better than just thoughts...

Signed-off-by: Fab Tillier <ftillier at microsoft.com>

Index: core/al/user/ual_cm_cep.c
===================================================================
--- core/al/user/ual_cm_cep.c   (revision 2088)
+++ core/al/user/ual_cm_cep.c   (working copy)
@@ -1403,7 +1403,7 @@

                cl_memcpy( p_mad->p_mad_buf, ioctl.mad_buf, MAD_BLOCK_SIZE );

-               *p_context = (void*)(ULONG_PTR)ioctl.context;
+               *p_context = p_cep->destroy_context;
                *p_new_cid = ioctl.new_cid;
                *pp_mad = p_mad;
        }
Index: inc/iba/ib_al_ioctl.h
===================================================================
--- inc/iba/ib_al_ioctl.h       (revision 2088)
+++ inc/iba/ib_al_ioctl.h       (working copy)
@@ -3053,7 +3053,7 @@
 typedef struct _ual_cep_poll_ioctl
 {
        ib_api_status_t                         status;
-       uint64_t                                        context;
+       uint64_t                                        reserved;
        net32_t                                         new_cid;
        ib_mad_element_t                        element;
        ib_grh_t                                        grh;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ucep_poll.patch
Type: application/octet-stream
Size: 848 bytes
Desc: ucep_poll.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20090409/cd9324da/attachment.obj>


More information about the ofw mailing list