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

[Xen-changelog] [xen stable-4.2] flask: fix error propagation from flask_security_set_bool()



commit 6fdf926a81ad624c80ea6d97c2e8918326245fec
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Feb 13 10:21:02 2014 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Feb 13 10:21:02 2014 +0100

    flask: fix error propagation from flask_security_set_bool()
    
    The function should return an error when flask_security_make_bools()
    fails as well as when the input ID is out of range.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
    master commit: 31f3620be0e3158c205a3669135f9c4bfa40b1c7
    master date: 2014-02-11 11:13:22 +0100
---
 xen/xsm/flask/flask_op.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/xen/xsm/flask/flask_op.c b/xen/xsm/flask/flask_op.c
index a19d3f1..7d55f15 100644
--- a/xen/xsm/flask/flask_op.c
+++ b/xen/xsm/flask/flask_op.c
@@ -364,9 +364,10 @@ static int flask_security_set_bool(struct 
xen_flask_boolean *arg)
     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);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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