소스 검색

[WATCHDOG] drivers/watchdog/wdt.c:wdt_ioctl(): make `ident' non-static

Making this instance static exposes the code to SMP races, etc.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Andrew Morton 15 년 전
부모
커밋
c1bf3acffc
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      drivers/watchdog/wdt.c
  2. 1 1
      drivers/watchdog/wdt_pci.c

+ 1 - 1
drivers/watchdog/wdt.c

@@ -358,7 +358,7 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	int new_heartbeat;
 	int status;
 
-	static struct watchdog_info ident = {
+	struct watchdog_info ident = {
 		.options =		WDIOF_SETTIMEOUT|
 					WDIOF_MAGICCLOSE|
 					WDIOF_KEEPALIVEPING,

+ 1 - 1
drivers/watchdog/wdt_pci.c

@@ -412,7 +412,7 @@ static long wdtpci_ioctl(struct file *file, unsigned int cmd,
 	int new_heartbeat;
 	int status;
 
-	static struct watchdog_info ident = {
+	struct watchdog_info ident = {
 		.options =		WDIOF_SETTIMEOUT|
 					WDIOF_MAGICCLOSE|
 					WDIOF_KEEPALIVEPING,