<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/params.c, branch v3.10.44</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.10.44</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.10.44'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-03-18T11:40:21Z</updated>
<entry>
<title>params: Fix potential memory leak in add_sysfs_param()</title>
<updated>2013-03-18T11:40:21Z</updated>
<author>
<name>David Woodhouse</name>
<email>David.Woodhouse@intel.com</email>
</author>
<published>2013-03-14T13:23:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=63662139e519ce06090b2759cf4a1d291b9cc0e2'/>
<id>urn:sha1:63662139e519ce06090b2759cf4a1d291b9cc0e2</id>
<content type='text'>
On allocation failure, it would fail to free the old attrs array which
was no longer referenced by anything (since it would free the old
module_param_attrs struct on the way out).

Comment the suspicious-looking krealloc() usage to explain why it *isn't*
actually buggy, despite looking like a classic realloc() usage bug.

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>params: replace printk(KERN_&lt;LVL&gt;...) with pr_&lt;lvl&gt;(...)</title>
<updated>2012-05-05T00:28:18Z</updated>
<author>
<name>Jim Cromie</name>
<email>jim.cromie@gmail.com</email>
</author>
<published>2012-05-04T00:22:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b5f3abf950f16fa615dc621e38eec63b2cc67946'/>
<id>urn:sha1:b5f3abf950f16fa615dc621e38eec63b2cc67946</id>
<content type='text'>
I left 1 printk which uses __FILE__, __LINE__ explicitly, which should
not be subject to generic preferences expressed via pr_fmt().

+ tweaks suggested by Joe Perches:
- add doing to irq-enabled warning, like others.  It wont happen often..
- change sysfs failure crit, not just err, make it 1 line in logs.
- coalese 2 format fragments into 1 &gt;80 char line

cc: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Jim Cromie &lt;jim.cromie@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>params.c: fix Smack complaint about parse_args</title>
<updated>2012-05-05T00:24:22Z</updated>
<author>
<name>Jim Cromie</name>
<email>jim.cromie@gmail.com</email>
</author>
<published>2012-05-03T17:57:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1ef9eaf2bf8901e92bb931875a5621692c8a0b84'/>
<id>urn:sha1:1ef9eaf2bf8901e92bb931875a5621692c8a0b84</id>
<content type='text'>
In commit 9fb48c744: "params: add 3rd arg to option handler callback
signature", the if-guard added to the pr_debug was overzealous; no
callers pass NULL, and existing code above and below the guard assumes
as much.  Change the if-guard to match, and silence the Smack
complaint.

CC: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Jim Cromie &lt;jim.cromie@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>params: add 3rd arg to option handler callback signature</title>
<updated>2012-04-30T18:05:27Z</updated>
<author>
<name>Jim Cromie</name>
<email>jim.cromie@gmail.com</email>
</author>
<published>2012-04-27T20:30:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9fb48c744ba6a4bf58b666f4e6fdac3008ea1bd4'/>
<id>urn:sha1:9fb48c744ba6a4bf58b666f4e6fdac3008ea1bd4</id>
<content type='text'>
Add a 3rd arg, named "doing", to unknown-options callbacks invoked
from parse_args(). The arg is passed as:

  "Booting kernel" from start_kernel(),
  initcall_level_names[i] from do_initcall_level(),
  mod-&gt;name from load_module(), via parse_args(), parse_one()

parse_args() already has the "name" parameter, which is renamed to
"doing" to better reflect current uses 1,2 above.  parse_args() passes
it to an altered parse_one(), which now passes it down into the
unknown option handler callbacks.

The mod-&gt;name will be needed to handle dyndbg for loadable modules,
since params passed by modprobe are not qualified (they do not have a
"$modname." prefix), and by the time the unknown-param callback is
called, the module name is not otherwise available.

Minor tweaks:

Add param-name to parse_one's pr_debug(), current message doesnt
identify the param being handled, add it.

Add a pr_info to print current level and level_name of the initcall,
and number of registered initcalls at that level.  This adds 7 lines
to dmesg output, like:

   initlevel:6=device, 172 registered initcalls

Drop "parameters" from initcall_level_names[], its unhelpful in the
pr_info() added above.  This array is passed into parse_args() by
do_initcall_level().

CC: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Jim Cromie &lt;jim.cromie@gmail.com&gt;
Acked-by: Jason Baron &lt;jbaron@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>params: &lt;level&gt;_initcall-like kernel parameters</title>
<updated>2012-03-26T02:20:51Z</updated>
<author>
<name>Pawel Moll</name>
<email>pawel.moll@arm.com</email>
</author>
<published>2012-03-26T02:20:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=026cee0086fe1df4cf74691cf273062cc769617d'/>
<id>urn:sha1:026cee0086fe1df4cf74691cf273062cc769617d</id>
<content type='text'>
This patch adds a set of macros that can be used to declare
kernel parameters to be parsed _before_ initcalls at a chosen
level are executed.  We rename the now-unused "flags" field of
struct kernel_param as the level.  It's signed, for when we
use this for early params as well, in future.

Linker macro collating init calls had to be modified in order
to add additional symbols between levels that are later used
by the init code to split the calls into blocks.

Signed-off-by: Pawel Moll &lt;pawel.moll@arm.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>module_param: remove support for bool parameters which are really int.</title>
<updated>2012-03-26T02:20:51Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2012-03-26T02:20:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8b8252813dee8e8cd453bb219731c36b268c69a7'/>
<id>urn:sha1:8b8252813dee8e8cd453bb219731c36b268c69a7</id>
<content type='text'>
module_param(bool) used to counter-intuitively take an int.  In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

This eliminates that code (though leaves the flags field in the struct,
for impending use).

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>includecheck: delete any duplicate instances of module.h</title>
<updated>2012-02-29T00:31:56Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2012-01-29T20:44:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=13ae246db4a02971ef4f557af1f6d3e21d64b710'/>
<id>urn:sha1:13ae246db4a02971ef4f557af1f6d3e21d64b710</id>
<content type='text'>
Different tree maintainers picked up independently generated
trivial compile fixes based on linux-next testing, resulting
in some cases where a file would have got more than one addition
of module.h once everything was all merged together.

Delete any duplicates so includecheck isn't complaining about
anything related to module.h/export.h changes.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>module: make module param bint handle nul value</title>
<updated>2012-02-14T00:32:15Z</updated>
<author>
<name>Dave Young</name>
<email>dyoung@redhat.com</email>
</author>
<published>2012-02-01T02:33:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=10f296cbfe3b93188c41463fd7a53808ebdbcbe3'/>
<id>urn:sha1:10f296cbfe3b93188c41463fd7a53808ebdbcbe3</id>
<content type='text'>
Allow bint param accept nul values, just do same as bool param.

Signed-off-by: Dave Young &lt;dyoung@redhat.com&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>module_param: avoid bool abuse, add bint for special cases.</title>
<updated>2012-01-12T23:02:17Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2012-01-12T23:02:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=69116f279a9eaf4c540934269342d9149538fc79'/>
<id>urn:sha1:69116f279a9eaf4c540934269342d9149538fc79</id>
<content type='text'>
For historical reasons, we allow module_param(bool) to take an int (or
an unsigned int).  That's going away.

A few drivers really want an int: they set it to -1 and a parameter
will set it to 0 or 1.  This sucks: reading them from sysfs will give
'Y' for both -1 and 1, but if we change it to an int, then the users
might be broken (if they did "param" instead of "param=1").

Use a new 'bint' parser for them.

(ntfs has a different problem: it needs an int for debug_msgs because
it's also exposed via sysctl.)

Cc: Steve Glendinning &lt;steve.glendinning@smsc.com&gt;
Cc: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Cc: Hoang-Nam Nguyen &lt;hnguyen@de.ibm.com&gt;
Cc: Christoph Raisch &lt;raisch@de.ibm.com&gt;
Cc: Roland Dreier &lt;roland@kernel.org&gt;
Cc: Sean Hefty &lt;sean.hefty@intel.com&gt;
Cc: Hal Rosenstock &lt;hal.rosenstock@gmail.com&gt;
Cc: linux390@de.ibm.com
Cc: Anton Altaparmakov &lt;anton@tuxera.com&gt;
Cc: Jaroslav Kysela &lt;perex@perex.cz&gt;
Cc: Takashi Iwai &lt;tiwai@suse.de&gt;
Cc: lm-sensors@lm-sensors.org
Cc: linux-rdma@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: linux-ntfs-dev@lists.sourceforge.net
Cc: alsa-devel@alsa-project.org
Acked-by: Takashi Iwai &lt;tiwai@suse.de&gt; (For the sound part)
Acked-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt; (For the hwmon driver)
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>kernel/params: replace DEBUGP with pr_debug</title>
<updated>2012-01-12T23:02:15Z</updated>
<author>
<name>Jim Cromie</name>
<email>jim.cromie@gmail.com</email>
</author>
<published>2011-12-06T19:11:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8487bfd954928660a52e91384a9b1f1049217e35'/>
<id>urn:sha1:8487bfd954928660a52e91384a9b1f1049217e35</id>
<content type='text'>
Use more flexible pr_debug.  This allows:

  echo "module params +p" &gt; /dbg/dynamic_debug/control

to turn on debug messages when needed.

Signed-off-by: Jim Cromie &lt;jim.cromie@gmail.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
</feed>
