summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/amd_nb.h
diff options
context:
space:
mode:
authorDan Carpenter2014-01-21 08:22:09 +0100
committerIngo Molnar2014-01-25 08:50:09 +0100
commit2993ae3305ad10b41e0d0bc2662f7754ee8e30fa (patch)
treea3ff55895017b1511896f6744e905311c1453f59 /arch/x86/include/asm/amd_nb.h
parentx86/quirks: Add workaround for AMD F16h Erratum792 (diff)
downloadkernel-qcow2-linux-2993ae3305ad10b41e0d0bc2662f7754ee8e30fa.tar.gz
kernel-qcow2-linux-2993ae3305ad10b41e0d0bc2662f7754ee8e30fa.tar.xz
kernel-qcow2-linux-2993ae3305ad10b41e0d0bc2662f7754ee8e30fa.zip
x86/AMD/NB: Fix amd_set_subcaches() parameter type
This is under CAP_SYS_ADMIN, but Smatch complains that mask comes from the user and the test for "mask > 0xf" can underflow. The fix is simple: amd_set_subcaches() should hand down not an 'int' but an 'unsigned long' like it was originally indended to do. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Borislav Petkov <bp@suse.de> Cc: Borislav Petkov <bp@alien8.de> Cc: Daniel J Blueman <daniel@numascale-asia.com> Link: http://lkml.kernel.org/r/20140121072209.GA22095@elgon.mountain Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/amd_nb.h')
-rw-r--r--arch/x86/include/asm/amd_nb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h
index a54ee1d054d9..aaac3b2fb746 100644
--- a/arch/x86/include/asm/amd_nb.h
+++ b/arch/x86/include/asm/amd_nb.h
@@ -19,7 +19,7 @@ extern int amd_cache_northbridges(void);
extern void amd_flush_garts(void);
extern int amd_numa_init(void);
extern int amd_get_subcaches(int);
-extern int amd_set_subcaches(int, int);
+extern int amd_set_subcaches(int, unsigned long);
struct amd_l3_cache {
unsigned indices;