diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2010-10-25 10:10:21 -0400 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-10-25 10:10:17 -0400 |
commit | a20852d2b7ca3c6e7b232eecf09631b66dde2a46 (patch) | |
tree | 436305042c18b77e6dabdeaac5476bf27a1f0e09 | |
parent | bf2106ae114807772506e62cbf8a7d8e2c5403a1 (diff) |
[S390] cmm: fix crash on case conversion
When the cmm module is compiled into the kernel it will crash when
writing to the R/O data section.
Reason is the lower to upper case conversion of the "sender" module
parameter which ignored the fact that the pointer is preinitialized.
Introduced with 41b42876 "cmm, smsgiucv_app: convert sender to
uppercase"
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | arch/s390/mm/cmm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index a9550dca3e4b..c66ffd8dbbb7 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c | |||
@@ -23,7 +23,10 @@ | |||
23 | #include <asm/pgalloc.h> | 23 | #include <asm/pgalloc.h> |
24 | #include <asm/diag.h> | 24 | #include <asm/diag.h> |
25 | 25 | ||
26 | static char *sender = "VMRMSVM"; | 26 | #ifdef CONFIG_CMM_IUCV |
27 | static char *cmm_default_sender = "VMRMSVM"; | ||
28 | #endif | ||
29 | static char *sender; | ||
27 | module_param(sender, charp, 0400); | 30 | module_param(sender, charp, 0400); |
28 | MODULE_PARM_DESC(sender, | 31 | MODULE_PARM_DESC(sender, |
29 | "Guest name that may send SMSG messages (default VMRMSVM)"); | 32 | "Guest name that may send SMSG messages (default VMRMSVM)"); |
@@ -440,6 +443,8 @@ static int __init cmm_init(void) | |||
440 | int len = strlen(sender); | 443 | int len = strlen(sender); |
441 | while (len--) | 444 | while (len--) |
442 | sender[len] = toupper(sender[len]); | 445 | sender[len] = toupper(sender[len]); |
446 | } else { | ||
447 | sender = cmm_default_sender; | ||
443 | } | 448 | } |
444 | 449 | ||
445 | rc = smsg_register_callback(SMSG_PREFIX, cmm_smsg_target); | 450 | rc = smsg_register_callback(SMSG_PREFIX, cmm_smsg_target); |