summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2010-08-12 07:04:18 +0200
committerRusty Russell <rusty@rustcorp.com.au>2010-08-11 15:34:18 +0200
commita1054322afc8120ea5a50bc84e5beeda54571862 (patch)
treeee7d56b7b72ee51193067ede97d61d14535244fc /init
parentparam: add a free hook to kernel_param_ops. (diff)
downloadlinux-a1054322afc8120ea5a50bc84e5beeda54571862.tar.xz
linux-a1054322afc8120ea5a50bc84e5beeda54571862.zip
param: use free hook for charp (fix leak of charp parameters)
Instead of using a "I kmalloced this" flag, we keep track of the kmalloced strings and use that list to check if we need to kfree (in practice, the list is very short). This means that kparams can be const again, and plugs a leak. This is important for drivers/usb/gadget/nokia.c which gets modprobe/rmmod'ed frequently on the N9000. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Cc: Artem Bityutskiy <dedekind1@gmail.com> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions