diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2013-06-25 09:34:54 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-06-26 15:10:29 -0400 |
commit | 739737efb57d74c71355c56cf5538048c9510507 (patch) | |
tree | 5544a5954208b33900fa8d8a7692dae520874548 /drivers/s390 | |
parent | f4eae94f71372ea5ec1ba17a85f3aebedc516ca8 (diff) |
s390/vmwatchdog: do not use static data
Using static data for fields which are accessed by HW will fail if
the driver is build as a module (since this would be vmalloc'ed
memory). This Bug was revealed via
"s390: remove virt_to_phys implementation" - the old virt_to_phys
implementation would have translated the address but it was not
guaranteed that the memory was contiguous.
Fix it by putting the data on the stack.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/vmwatchdog.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/s390/char/vmwatchdog.c b/drivers/s390/char/vmwatchdog.c index e9b72311e254..d5eac985976b 100644 --- a/drivers/s390/char/vmwatchdog.c +++ b/drivers/s390/char/vmwatchdog.c | |||
@@ -112,7 +112,8 @@ static int vmwdt_keepalive(void) | |||
112 | 112 | ||
113 | static int vmwdt_disable(void) | 113 | static int vmwdt_disable(void) |
114 | { | 114 | { |
115 | int ret = __diag288(wdt_cancel, 0, "", 0); | 115 | char cmd[] = {'\0'}; |
116 | int ret = __diag288(wdt_cancel, 0, cmd, 0); | ||
116 | WARN_ON(ret != 0); | 117 | WARN_ON(ret != 0); |
117 | clear_bit(VMWDT_RUNNING, &vmwdt_is_open); | 118 | clear_bit(VMWDT_RUNNING, &vmwdt_is_open); |
118 | return ret; | 119 | return ret; |
@@ -124,7 +125,7 @@ static int __init vmwdt_probe(void) | |||
124 | * so we try initializing it with a NOP command ("BEGIN") | 125 | * so we try initializing it with a NOP command ("BEGIN") |
125 | * that won't cause any harm even if the following disable | 126 | * that won't cause any harm even if the following disable |
126 | * fails for some reason */ | 127 | * fails for some reason */ |
127 | static char __initdata ebc_begin[] = { | 128 | char ebc_begin[] = { |
128 | 194, 197, 199, 201, 213 | 129 | 194, 197, 199, 201, 213 |
129 | }; | 130 | }; |
130 | if (__diag288(wdt_init, 15, ebc_begin, sizeof(ebc_begin)) != 0) | 131 | if (__diag288(wdt_init, 15, ebc_begin, sizeof(ebc_begin)) != 0) |