Skip to content

Commit

Permalink
[S390] xpram: remove __initdata attribute from module parameters
Browse files Browse the repository at this point in the history
The module parameter 'devs' and 'sizes' are marked as __initdata. The
memory for the parameters are freed after module_init completed. This
can lead to kernel crashes in param_free_charp. Remove the __initdata
attribute to fix the problem.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Martin Schwidefsky authored and Martin Schwidefsky committed Mar 3, 2011
1 parent cbdbb4c commit 0c0db03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/s390/block/xpram.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ static int xpram_devs;
/*
* Parameter parsing functions.
*/
static int __initdata devs = XPRAM_DEVS;
static char __initdata *sizes[XPRAM_MAX_DEVS];
static int devs = XPRAM_DEVS;
static char *sizes[XPRAM_MAX_DEVS];

module_param(devs, int, 0);
module_param_array(sizes, charp, NULL, 0);
Expand Down

0 comments on commit 0c0db03

Please sign in to comment.