|
@@ -218,13 +218,9 @@ int param_set_charp(const char *val, struct kernel_param *kp)
|
|
|
return -ENOSPC;
|
|
|
}
|
|
|
|
|
|
- if (kp->flags & KPARAM_KMALLOCED)
|
|
|
- kfree(*(char **)kp->arg);
|
|
|
-
|
|
|
/* This is a hack. We can't need to strdup in early boot, and we
|
|
|
* don't need to; this mangled commandline is preserved. */
|
|
|
if (slab_is_available()) {
|
|
|
- kp->flags |= KPARAM_KMALLOCED;
|
|
|
*(char **)kp->arg = kstrdup(val, GFP_KERNEL);
|
|
|
if (!kp->arg)
|
|
|
return -ENOMEM;
|
|
@@ -605,11 +601,7 @@ void module_param_sysfs_remove(struct module *mod)
|
|
|
|
|
|
void destroy_params(const struct kernel_param *params, unsigned num)
|
|
|
{
|
|
|
- unsigned int i;
|
|
|
-
|
|
|
- for (i = 0; i < num; i++)
|
|
|
- if (params[i].flags & KPARAM_KMALLOCED)
|
|
|
- kfree(*(char **)params[i].arg);
|
|
|
+ /* FIXME: This should free kmalloced charp parameters. It doesn't. */
|
|
|
}
|
|
|
|
|
|
static void __init kernel_add_sysfs_param(const char *name,
|