mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
xsm/flask: correct off-by-one in flask_security_avc_cachestats cpu id check
This is XSA-85. Signed-off-by: Matthew Daley <mattd@bugfuzz.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
6c79e0ab9a
commit
2e1cba2da4
1 file changed
+1
-1
@@ -464,7 +464,7 @@ static int flask_security_avc_cachestats(struct xen_flask_cache_stats *arg)
|
||||
{
|
||||
struct avc_cache_stats *st;
|
||||
|
||||
if ( arg->cpu > nr_cpu_ids )
|
||||
if ( arg->cpu >= nr_cpu_ids )
|
||||
return -ENOENT;
|
||||
if ( !cpu_online(arg->cpu) )
|
||||
return -ENOENT;
|
||||
|
||||