From: Jan Beulich Date: Tue, 11 Feb 2014 10:13:22 +0000 (+0100) Subject: flask: fix error propagation from flask_security_set_bool() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5591 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=31f3620be0e3158c205a3669135f9c4bfa40b1c7;p=xen.git 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 Reviewed-by: Andrew Cooper Acked-by: Daniel De Graaf --- diff --git a/xen/xsm/flask/flask_op.c b/xen/xsm/flask/flask_op.c index e4b07eb04e..cde93084c9 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);