[Devel] [PATCH RHEL7 COMMIT] cpuinfo: zero all bits in cap mask

Konstantin Khorenko khorenko at virtuozzo.com
Tue Oct 20 09:00:17 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.9.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.8.9
------>
commit ea3fb6ac795269e5b6ec0cb22bc7e8577c3628bc
Author: Vladimir Davydov <vdavydov at virtuozzo.com>
Date:   Tue Oct 20 20:00:16 2015 +0400

    cpuinfo: zero all bits in cap mask
    
    Port diff-ve-cpuinfo-zero-all-bits-in-cap-mask
    
    The mask has 32*RHNCAPINTS bits.
    
    Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
    
    =============================================================================
    
    https://jira.sw.ru/browse/PSBM-33638
    
    Signed-off-by: Vladimir Davydov <vdavydov at virtuozzo.com>
---
 arch/x86/kernel/cpu/proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c
index 6a52fa6..1d5833a 100644
--- a/arch/x86/kernel/cpu/proc.c
+++ b/arch/x86/kernel/cpu/proc.c
@@ -66,7 +66,7 @@ static void init_cpu_flags(void *dummy)
 	unsigned int tmp1, tmp2;
 	int i;
 
-	bitmap_zero((unsigned long *)flags, NCAPINTS);
+	bitmap_zero((unsigned long *)flags, 32*NCAPINTS);
 	for (i = 0; i < 32*NCAPINTS; i++)
 		if (cpu_has(c, i))
 			set_bit(i, (unsigned long *)flags);



More information about the Devel mailing list