Skip to contentSkip to conversation

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

PATCH New Don Zickus 1 participant 1 message Apr 27, 2012 x86

lore
Share & tools
lore

Don Zickus

author
#0 lore raw

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

From: Betty Dall <[email protected]>

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.

---
 arch/x86/kernel/nmi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/nmi.c +1 -1
index 47acaf3..db071af 100644
@@ -35,7 +35,7 @@
 struct nmiaction {
 	struct list_head list;
 	nmi_handler_t handler;
-	unsigned int flags;
+	unsigned long flags;
 	char *name;
 };
 
Signature · 1 line
1.7.7.6