Skip to contentSkip to conversation

module_param() doesn't seem to work in 2.6.6-rc1

PATCH Rusty Russell 1 participant 1 message Apr 17, 2004 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 1 line · Andrew Morton

OK?

Yes, but I prefer this version, which actually checks whether the section exists, rather than checking the size (same effect, but this is clearer).

Name: Warn if module_param and MODULE_PARM mixed
Status: Trivial
From: Pavel Roskin <[email protected]>

If you use both module_param (new) and MODULE_PARM (obsolete) in a module, only the second gets recognised. Warn.

kernel/module.c +4 -0
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .14500-linux-2.6.6-rc1-bk1/kernel/module.c .14500-linux-2.6.6-rc1-bk1.updated/kernel/module.c
@@ -1541,6 +1541,10 @@ static struct module *load_module(void _
 				      / sizeof(struct obsolete_modparm),
 				      sechdrs, symindex,
 				      (char *)sechdrs[strindex].sh_addr);
+		if (setupindex)
+			printk(KERN_WARNING "%s: Ignoring new-style "
+			       "parameters in presence of obsolete ones\n",
+			       mod->name);
 	} else {
 		/* Size of section 0 is 0, so this works well if no params */
 		err = parse_args(mod->name, mod->args,
Signature · 1 line
Anyone who quotes me in their signature is an idiot -- Rusty Russell