[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/3] tests/resource: Initialise gnttab before xenforeignmemory_map_resource()


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 21 Feb 2022 10:02:52 +0000
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 21 Feb 2022 10:03:25 +0000
  • Ironport-data: A9a23:FEE52Km5bvvTRA36iZaizR/o5gzRJkRdPkR7XQ2eYbSJt1+Wr1Gzt xIeWmyPPfqJYGD0eI10OY60oEsBsMOBx4RlTFBtqS03FyMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8kk/vgqoPUUIYoAAgoLeNfYHpn2UILd9IR2NYy24DjWVrV4 LsenuWEULOb828sWo4rw/rrRCNH5JwebxtB4zTSzdgS1LPvvyF94KA3fMldHFOhKmVgJcaoR v6r8V2M1jixEyHBqD+Suu2TnkUiGtY+NOUV45Zcc/DKbhNq/kTe3kunXRa1hIg+ZzihxrhMJ NtxWZOYVDooHKLSxMgnVUcbMBBEL/VA+qebLi3q2SCT5xWun3rExvxvCAc9PJEC+/YxCmZLn RAaAGlTNFbZ3bvwme/lDLk37iggBJCD0Ic3k3ds1zzGS90hRojOWf7i7t5ExjYgwMtJGJ4yY uJHN2o/NU+cM3WjPH9IItUBvNn3rUKmUBdktnu0rK4n8zfcmVkZPL/Fb4OOJ43iqd9utlaVo CfK8nr0BjkeNceD0nyV/3S0nOjNkCjnHoUIG9WFGuVC2QPJgDZJUVtPCAX98aLRZlOCt8x3N nEV2CUw8YQI8hLobejHTUW+ombYsUtJMzZPKNES5AaIw6vSxg+WAGkYUzJMAOAbWN8KqS8Cj QHQwY6wbdB7mPjMEC/GqO/Ixd+nEXVNdQc/iTk4oRzpCjUJiKU6lVrxQ9lqC8ZZZfWlSGirk 1hmQMXT7oj/bPLnNY3mpzgrYBr2//AlqzLZAS2NAwqYAvtRPtLNWmBRwQGzAQx8BIiYVEKdm 3MPhtKT6usDZbnUynDQG7VRTez4uqzUWNE5vbKIN8N8nwlBBlb5JdwAiN2ADBwB3jk4lc/BP xaI5FI5CG57N3q2d65nC79d+OxxpZUM4e/ND6iOBvIXO8AZXFbeoElGOB7Bt0iwwRNEufxuZ v+mnTOEUC9y5VJPl2HtGY/wENYDm0gD+I8kbcqll0/+ieLGPhZ4i94taTOzUwzw14vcyC29z jqVH5fiJ8l3OAEmXhTqzA==
  • Ironport-hdrordr: A9a23:58ab3KOioY/PzMBcTvmjsMiBIKoaSvp037Eqv3oedfUzSL3gqy nOpoV86faaslYssR0b9exofZPwJE80lqQFhrX5X43SPzUO0VHAROoJgLcKgQeQfxEWntQtrZ uIGJIeNDSfNzdHZL7BkWuFL+o=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

It the 'addr' input to mmap(), and currently consuming stack rubble.

Coverity-ID: 1500115
Fixes: c7a7f14b9299 ("tests/resource: Extend to check that the grant frames are 
mapped correctly")
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 tools/tests/resource/test-resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/tests/resource/test-resource.c 
b/tools/tests/resource/test-resource.c
index 0557f8a1b585..189353ebcb43 100644
--- a/tools/tests/resource/test-resource.c
+++ b/tools/tests/resource/test-resource.c
@@ -24,7 +24,7 @@ static void test_gnttab(uint32_t domid, unsigned int 
nr_frames,
                         unsigned long gfn)
 {
     xenforeignmemory_resource_handle *res;
-    grant_entry_v1_t *gnttab;
+    grant_entry_v1_t *gnttab = NULL;
     size_t size;
     int rc;
     uint32_t refs[nr_frames], domids[nr_frames];
-- 
2.11.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.