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

[Xen-devel] [PATCH 2/4] flask: fix error propagation from flask_security_set_bool()



The function should return an error when flask_security_make_bools() as
well as when the input ID is out of range.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/xsm/flask/flask_op.c
+++ b/xen/xsm/flask/flask_op.c
@@ -364,9 +364,10 @@ static int flask_security_set_bool(struc
     else
     {
         if ( !bool_pending_values )
-            flask_security_make_bools();
-
-        if ( arg->bool_id >= bool_num )
+            rv = flask_security_make_bools();
+        if ( !rv && arg->bool_id >= bool_num )
+            rv = -ENOENT;
+        if ( rv )
             goto out;
 
         bool_pending_values[arg->bool_id] = !!(arg->new_value);



Attachment: flask-set-bool-err.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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