[ofw] [Patch 2/62] Reference implementation of NDv2

Fab Tillier ftillier at microsoft.com
Wed Feb 20 15:32:19 PST 2013


Don't corrupt the stack by dereferencing a stack variable after it's gone out of scope...

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

diff -dwup3 -x *svn* -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mlx4\kernel\hca\pd.c .\hw\mlx4\kernel\hca\pd.c
--- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mlx4\kernel\hca\pd.c	Thu May 31 11:22:19 2012
+++ .\hw\mlx4\kernel\hca\pd.c	Wed May 23 18:26:47 2012
@@ -78,9 +78,8 @@ mlnx_allocate_pd (
 				0, sizeof(p_resp->pdn));
 		}
 		else {
-			u32 pdn;
-			INIT_UDATA(&udata, NULL, &pdn, 
-				0, sizeof(pdn));
+            // Discard PDN output, so use status as temp storage.
+            INIT_UDATA(&udata, NULL, &status, 0, sizeof(status));
 		}
 	}
 	else {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ndv2.2.patch
Type: application/octet-stream
Size: 594 bytes
Desc: ndv2.2.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20130220/f12105c4/attachment.obj>


More information about the ofw mailing list