2012-05-08 04:06:39

by Dall, Elizabeth J

[permalink] [raw]
Subject: [tip:core/locking] x86/nmi: Fix the type of the nmiaction. flags field

Commit-ID: 6ff968cca1dfebd4b6fcade87c11658dbfc96932
Gitweb: http://git.kernel.org/tip/6ff968cca1dfebd4b6fcade87c11658dbfc96932
Author: Betty Dall <[email protected]>
AuthorDate: Fri, 27 Apr 2012 14:40:55 -0600
Committer: Ingo Molnar <[email protected]>
CommitDate: Mon, 7 May 2012 12:32:11 +0200

x86/nmi: Fix the type of the nmiaction.flags field

This patch changes the type of the struct nmiaction flags field
to unsigned long from unsigned int. All the usages of the flags
field are unsigned long already. There is only one flag used
currently, NMI_FLAG_FIRST, but having the wrong size could cause
a truncation bug in the future on 64 bit architectures.

Signed-off-by: Betty Dall <[email protected]>
Acked-by: Don Zickus <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/include/asm/nmi.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h
index a1a836c..0e3793b 100644
--- a/arch/x86/include/asm/nmi.h
+++ b/arch/x86/include/asm/nmi.h
@@ -40,7 +40,7 @@ typedef int (*nmi_handler_t)(unsigned int, struct pt_regs *);
struct nmiaction {
struct list_head list;
nmi_handler_t handler;
- unsigned int flags;
+ unsigned long flags;
const char *name;
};