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-22 20:49:04 +01:00
2009-10-09 13:32:24 -07:00
2009-09-22 07:54:33 -07:00
2009-09-26 10:50:47 -07:00
2009-10-11 11:20:58 -07:00
2009-09-23 07:39:29 -07:00
2009-09-22 13:32:45 +01:00
2009-09-26 10:49:42 -07:00
2009-09-23 14:36:38 -04:00
2009-09-24 07:21:05 -07:00
2009-10-09 13:52:05 -07:00
2009-09-27 11:39:25 -07:00
2009-09-23 07:39:29 -07:00
2009-10-06 00:26:26 -04:00
2009-09-30 16:12:20 -07:00
2009-09-26 00:10:40 +02:00
2009-09-21 21:03:58 +01:00
2009-09-24 07:21:01 -07:00
2009-10-05 11:03:58 +02:00
2009-10-01 21:19:34 +02:00
2009-09-22 07:17:38 -07:00
2009-09-21 15:14:51 +02:00
2009-10-01 16:11:11 -07:00
2009-09-23 07:39:29 -07:00
2009-09-24 07:20:57 -07:00
2009-10-02 10:54:05 -07:00
2009-09-24 09:34:53 +09:30
2009-09-23 11:01:25 -07:00
2009-09-24 07:20:57 -07:00
2009-10-06 10:35:10 +02:00
2009-09-23 07:39:29 -07:00
2009-09-22 07:17:47 -07:00
2009-10-04 12:39:14 -07:00
2009-10-07 15:52:09 -04:00
2009-10-08 12:16:35 -07:00
2009-10-06 20:16:55 +02:00
2009-09-23 07:39:29 -07:00
2009-09-23 07:39:46 -07:00
2009-09-27 11:39:25 -07:00
2009-09-26 20:28:07 -07:00
2009-09-21 14:28:04 +02:00
2009-10-02 15:42:19 +02:00
2009-10-11 11:20: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-10-22 16:39:28 +10:30
2009-10-11 23:21:25 +02:00
2009-09-23 07:39:29 -07:00
2009-09-26 10:17:19 -07:00
2009-09-22 07:17:33 -07:00
2009-10-06 00:26:27 -04:00
2009-09-22 07:17:48 -07:00
2009-09-23 07:39:42 -07:00
2009-09-24 07:20:59 -07:00
2009-09-23 07:39:41 -07:00
2009-09-22 07:17:35 -07:00
2009-09-21 15:14:56 +02:00
2009-09-22 07:17:37 -07:00
2009-09-27 11:39:25 -07:00
2009-09-24 17:20:20 -07:00
2009-09-22 07:17:42 -07:00
2009-09-22 07:17:31 -07:00
2009-09-24 07:21:04 -07:00
2009-09-23 07:39:43 -07:00
2009-09-25 00:32:58 +09:30
2009-10-29 08:56:17 +10:30
2009-09-30 16:12:20 -07:00
2009-09-30 16:12:20 -07:00
2009-09-21 15:14:51 +02:00
2009-09-30 16:12:20 -07:00
2009-10-07 13:53:11 -07:00
2009-09-30 16:12:20 -07:00
2009-09-24 15:44:05 -07:00
2009-09-22 07:54:33 -07:00
2009-09-26 10:17:19 -07:00
2009-09-22 07:17:38 -07:00
2009-09-24 07:20:58 -07:00
2009-09-24 07:53:22 -07:00
2009-10-16 06:21:20 -04:00
2009-09-22 15:42:01 +02:00
2009-10-06 14:21:50 +02:00
2009-09-24 15:38:57 -07:00
2009-09-22 07:17:49 -07:00
2009-09-22 07:17:47 -07:00
2009-10-04 15:05:10 -07:00
2009-09-24 07:53:22 -07:00
2009-09-23 07:39:41 -07:00
2009-09-22 07:17:24 -07:00
2009-09-27 11:39:25 -07:00
2009-10-05 21:02:02 +02:00
2009-09-23 19:46:30 +02:00
2009-09-24 07:20:57 -07:00
2009-10-01 16:11:13 -07:00
2009-09-24 07:53:22 -07:00
2009-09-24 07:53:22 -07:00
2009-09-24 07:21:04 -07:00
2009-09-24 07:47:35 -04:00
2009-09-30 21:46:59 +02:00
2009-09-24 07:21:01 -07:00
2009-09-24 09:34:40 +09:30
2009-10-05 00:24:36 -07:00
2009-09-24 07:53:22 -07:00
2009-09-23 09:21:05 -07:00
2009-09-24 07:21:04 -07:00
2009-09-24 07:20:56 -07:00
2009-09-24 09:34:41 +09:30
2009-09-24 07:21:00 -07:00
2009-09-24 07:20:57 -07:00
2009-09-27 13:35:16 -07:00
2009-09-23 07:39:48 -07:00
2009-09-23 06:46:23 -07:00
2009-09-23 06:46:39 -07:00
2009-09-23 18:13:10 -07:00
2009-09-24 09:57:08 -07:00
2009-10-22 16:39:28 +10:30
2009-10-22 16:39:28 +10:30
2009-10-22 16:39:30 +10:30
2009-09-23 07:39:29 -07:00
2009-10-22 16:39:28 +10:30
2009-09-23 22:26:32 +09:30
2009-10-22 16:39:28 +10:30
2009-10-22 16:39:28 +10:30
2009-09-23 22:26:31 +09:30
2009-09-22 07:17:30 -07:00
2009-09-23 03:49:27 +04:00
2009-10-14 09:16:42 -07:00
2009-09-24 07:21:04 -07:00