Files
kernel_arpi/include/linux
Rusty Russell 65afac7d80 param: fix lots of bugs with writing charp params from sysfs, by leaking mem.
e180a6b775 "param: fix charp parameters set via sysfs" fixed the case
where charp parameters written via sysfs were freed, leaving drivers
accessing random memory.

Unfortunately, storing a flag in the kparam struct was a bad idea: it's
rodata so setting it causes an oops on some archs.  But that's not all:

1) module_param_array() on charp doesn't work reliably, since we use an
   uninitialized temporary struct kernel_param.
2) there's a fundamental race if a module uses this parameter and then
   it's changed: they will still access the old, freed, memory.

The simplest fix (ie. for 2.6.32) is to never free the memory.  This
prevents all these problems, at cost of a memory leak.  In practice, there
are only 18 places where a charp is writable via sysfs, and all are
root-only writable.

Reported-by: Takashi Iwai <tiwai@suse.de>
Cc: Sitsofe Wheeler <sitsofe@yahoo.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
2009-10-29 08:56:17 +10:30
..
2009-09-23 07:39:29 -07:00
2009-09-09 11:19:00 -04:00
2009-09-19 02:14:45 -04:00
2009-09-20 16:09:20 +05:30
2009-09-08 17:42:50 -07:00
2009-09-23 11:01:25 -07:00
2009-09-18 09:48:52 -07:00
2009-09-14 17:41:42 -07:00
2009-09-12 14:48:40 +02:00
2009-09-18 22:45:43 +02:00
2009-09-11 12:54:58 -07:00
2009-09-23 07:39:41 -07:00
2009-09-26 10:17:19 -07:00
2009-09-30 00:32:06 -04:00
2009-09-23 07:39:58 -07:00
2009-09-19 13:13:17 -07:00
2009-09-26 10:17:19 -07:00
2009-09-22 07:17:33 -07:00
2009-09-18 21:22:08 +02:00
2009-10-06 00:26:27 -04:00
2009-09-23 07:39:41 -07:00
2009-09-22 07:17:35 -07:00
2009-09-21 15:14:51 +02:00
2009-09-26 10:17:19 -07:00
2009-09-22 07:17:47 -07:00
2009-10-04 15:05:10 -07:00
2009-09-23 07:39:41 -07:00
2009-09-23 06:46:23 -07:00
2009-09-23 18:13:10 -07:00
2009-09-23 22:26:32 +09:30
2009-09-22 07:17:30 -07:00
2009-09-19 13:13:25 -07:00
2009-09-19 13:13:26 -07:00
2009-09-15 16:51:30 +02:00