[IBAL] Check for invalid PD during AV creation.
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 25 Apr 2006 18:17:19 +0000 (18:17 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 25 Apr 2006 18:17:19 +0000 (18:17 +0000)
Signed-off-by: Yossi Leybovich (sleybo@mellanox.co.il)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@325 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/al_av.c

index 81f170b..89b2486 100644 (file)
@@ -122,6 +122,12 @@ create_av(
                return IB_INVALID_PARAMETER;\r
        }\r
 \r
                return IB_INVALID_PARAMETER;\r
        }\r
 \r
+       if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_PD_HANDLE\n") );\r
+               return IB_INVALID_PD_HANDLE;\r
+       }\r
+\r
        /* Get an AV tracking structure. */\r
        h_av = alloc_av();\r
        if( !h_av )\r
        /* Get an AV tracking structure. */\r
        h_av = alloc_av();\r
        if( !h_av )\r