diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2013-06-25 15:34:54 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-06-26 21:10:29 +0200 |
commit | 739737efb57d74c71355c56cf5538048c9510507 (patch) | |
tree | 5544a5954208b33900fa8d8a7692dae520874548 /drivers/s390/char/vmwatchdog.c | |
parent | f4eae94f71372ea5ec1ba17a85f3aebedc516ca8 (diff) | |
download | op-kernel-dev-739737efb57d74c71355c56cf5538048c9510507.zip op-kernel-dev-739737efb57d74c71355c56cf5538048c9510507.tar.gz |
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/char/vmwatchdog.c')
-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 e9b7231..d5eac98 100644 --- a/drivers/s390/char/vmwatchdog.c +++ b/drivers/s390/char/vmwatchdog.c @@ -112,7 +112,8 @@ static int vmwdt_keepalive(void) static int vmwdt_disable(void) { - int ret = __diag288(wdt_cancel, 0, "", 0); + char cmd[] = {'\0'}; + int ret = __diag288(wdt_cancel, 0, cmd, 0); WARN_ON(ret != 0); clear_bit(VMWDT_RUNNING, &vmwdt_is_open); return ret; @@ -124,7 +125,7 @@ static int __init vmwdt_probe(void) * so we try initializing it with a NOP command ("BEGIN") * that won't cause any harm even if the following disable * fails for some reason */ - static char __initdata ebc_begin[] = { + char ebc_begin[] = { 194, 197, 199, 201, 213 }; if (__diag288(wdt_init, 15, ebc_begin, sizeof(ebc_begin)) != 0) |