mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xsm: Error code consistency
Signed-off-by: Machon Gregory <mbgrego@tycho.ncsc.mil>
This commit is contained in:
1 parent
8afc46b70c
commit
2bbb3d0fe9
2 files changed
+8
-1
No files matched your search
@@ -427,7 +427,11 @@ static inline int xsm_remove_range (struct domain *d, char *name, unsigned long
|
||||
|
||||
static inline long __do_xsm_op (XEN_GUEST_HANDLE(xsm_op_t) op)
|
||||
{
|
||||
return xsm_call(__do_xsm_op(op));
|
||||
#ifdef XSM_ENABLE
|
||||
return xsm_ops->__do_xsm_op(op);
|
||||
#else
|
||||
return -ENOSYS;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef XSM_ENABLE
|
||||
|
||||
@@ -485,6 +485,9 @@ static int flask_security_sid(char *buf, uint32_t count)
|
||||
if ( length < 0 )
|
||||
goto out;
|
||||
|
||||
if ( len > count )
|
||||
return -ERANGE;
|
||||
|
||||
memset(buf, 0, count);
|
||||
memcpy(buf, context, len);
|
||||
length = len;
|
||||
|
||||