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

[Xen-devel] [PATCH v3 2/4] xen/arm: initialize access

Initialize variable *access before returning it back to the caller.
It makes the code a bit nicer and it is a safety certification

M3CM Rule-9.1: The value of an object with automatic storage duration
shall not be read before it has been set

QAVerify: 2962
Signed-off-by: Stefano Stabellini <stefanos@xxxxxxxxxx>
Acked-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
CC: rcojocaru@xxxxxxxxxxxxxxx
CC: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
Changes in v3:
- add more info to commit messagte

Changes in v2:
- improve comment
- use p2m->default_access
 xen/arch/arm/mem_access.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/arm/mem_access.c b/xen/arch/arm/mem_access.c
index ba4ec78..86f0882 100644
--- a/xen/arch/arm/mem_access.c
+++ b/xen/arch/arm/mem_access.c
@@ -47,6 +47,7 @@ static int __p2m_get_mem_access(struct domain *d, gfn_t gfn,
+    *access = p2m->default_access;
     /* If no setting was ever set, just return rwx. */
     if ( !p2m->mem_access_enabled )

Xen-devel mailing list



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