s390/xpram: don't modify module parameters
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Mon, 20 Jan 2014 15:43:33 +0000 (16:43 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 22 Jan 2014 13:02:15 +0000 (14:02 +0100)
commit7e2e2b96f50d17f301f1ee5505bf949c1d90204e
treeda300e53a2c5f4de9bd124238dffbfc5b048bc3b
parent4dd841a0c4fe4d5be3825cf0e129d3da431d82b0
s390/xpram: don't modify module parameters

During parsing of the sizes array the pointer to the particular
string is lost. Keep it by using an extra pointer to store the end
position of the parsed string. Keeping these parameters accessible
can be helpful for debugging purposes and for userspace reading
the parameters at runtime via sysfs. Also this will ensure that the
memory is freed at module unload time.

Reported-by: Michael Veigel <veigel@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/xpram.c
This page took 0.02458 seconds and 5 git commands to generate.