<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/kernel/module.c, branch linux-2.6.16.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>load_module: no BUG if module_subsys uninitialized</title>
<updated>2007-03-20T23:28:30+00:00</updated>
<author>
<name>Ed Swierk</name>
<email>eswierk@arastra.com</email>
</author>
<published>2007-03-20T23:28:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=de37843b235a600c2402a44ab235d0d1634f82ca'/>
<id>de37843b235a600c2402a44ab235d0d1634f82ca</id>
<content type='text'>
Invoking load_module() before param_sysfs_init() is called crashes in
mod_sysfs_setup(), since the kset in module_subsys is not initialized yet.

In my case, net-pf-1 is getting modprobed as a result of hotplug trying to
create a UNIX socket.  Calls to hotplug begin after the topology_init
initcall.

Another patch for the same symptom (module_subsys-initialize-earlier.patch)
moves param_sysfs_init() to the subsys initcalls, but this is still not
early enough in the boot process in some cases.  In particular,
topology_init() causes /sbin/hotplug to run, which requests net-pf-1 (the
UNIX socket protocol) which can be compiled as a module.  Moving
param_sysfs_init() to the postcore initcalls fixes this particular race,
but there might well be other cases where a usermodehelper causes a module
to load earlier still.

The patch makes load_module() return an error rather than crashing the
kernel if invoked before module_subsys is initialized.

Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Invoking load_module() before param_sysfs_init() is called crashes in
mod_sysfs_setup(), since the kset in module_subsys is not initialized yet.

In my case, net-pf-1 is getting modprobed as a result of hotplug trying to
create a UNIX socket.  Calls to hotplug begin after the topology_init
initcall.

Another patch for the same symptom (module_subsys-initialize-earlier.patch)
moves param_sysfs_init() to the subsys initcalls, but this is still not
early enough in the boot process in some cases.  In particular,
topology_init() causes /sbin/hotplug to run, which requests net-pf-1 (the
UNIX socket protocol) which can be compiled as a module.  Moving
param_sysfs_init() to the postcore initcalls fixes this particular race,
but there might well be other cases where a usermodehelper causes a module
to load earlier still.

The patch makes load_module() return an error rather than crashing the
kernel if invoked before module_subsys is initialized.

Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] module: strlen_user() race fix</title>
<updated>2006-02-08T00:12:32+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2006-02-07T20:58:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8e08b756869eeb08ace17ad64c2a8cb97b18e856'/>
<id>8e08b756869eeb08ace17ad64c2a8cb97b18e856</id>
<content type='text'>
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Tell kallsyms_lookup_name() to ignore type U entries</title>
<updated>2006-02-03T16:32:02+00:00</updated>
<author>
<name>Keith Owens</name>
<email>kaos@sgi.com</email>
</author>
<published>2006-02-03T11:03:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=54e8ce463a7e21dbe9dad57723ed47653ee5db15'/>
<id>54e8ce463a7e21dbe9dad57723ed47653ee5db15</id>
<content type='text'>
When one module exports a function symbol and another module uses that
symbol then kallsyms shows the symbol twice.  Once from the consumer with a
type of 'U' and once from the provider with a type of 't' or 'T'.  On most
architectures, both entries have the same address so it does not matter
which one is returned by kallsyms_lookup_name().  But on architectures with
function descriptors, the 'U' entry points to the descriptor, not to the
code body, which is not what we want.

IA64 # grep -w qla2x00_remove_one /proc/kallsyms
a000000208c25ef8 U qla2x00_remove_one   [qla2300]   &lt;= descriptor
a000000208bf44c0 t qla2x00_remove_one   [qla2xxx]   &lt;= function body

Tell kallsyms_lookup_name() to ignore type U entries in modules.

Signed-off-by: Keith Owens &lt;kaos@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When one module exports a function symbol and another module uses that
symbol then kallsyms shows the symbol twice.  Once from the consumer with a
type of 'U' and once from the provider with a type of 't' or 'T'.  On most
architectures, both entries have the same address so it does not matter
which one is returned by kallsyms_lookup_name().  But on architectures with
function descriptors, the 'U' entry points to the descriptor, not to the
code body, which is not what we want.

IA64 # grep -w qla2x00_remove_one /proc/kallsyms
a000000208c25ef8 U qla2x00_remove_one   [qla2300]   &lt;= descriptor
a000000208bf44c0 t qla2x00_remove_one   [qla2xxx]   &lt;= function body

Tell kallsyms_lookup_name() to ignore type U entries in modules.

Signed-off-by: Keith Owens &lt;kaos@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] move capable() to capability.h</title>
<updated>2006-01-12T02:42:13+00:00</updated>
<author>
<name>Randy.Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2006-01-11T20:17:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c59ede7b78db329949d9cdcd7064e22d357560ef'/>
<id>c59ede7b78db329949d9cdcd7064e22d357560ef</id>
<content type='text'>
- Move capable() from sched.h to capability.h;

- Use &lt;linux/capability.h&gt; where capable() is used
	(in include/, block/, ipc/, kernel/, a few drivers/,
	mm/, security/, &amp; sound/;
	many more drivers/ to go)

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Move capable() from sched.h to capability.h;

- Use &lt;linux/capability.h&gt; where capable() is used
	(in include/, block/, ipc/, kernel/, a few drivers/,
	mm/, security/, &amp; sound/;
	many more drivers/ to go)

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] kernel/module.c: remove redundant spinlock in resolve_symbol()</title>
<updated>2006-01-09T04:14:04+00:00</updated>
<author>
<name>Ashutosh Naik</name>
<email>ashutosh.naik@gmail.com</email>
</author>
<published>2006-01-08T09:04:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=eb46996f90a0826921f1a0d81535537a9c7f91b0'/>
<id>eb46996f90a0826921f1a0d81535537a9c7f91b0</id>
<content type='text'>
Remove the redundant spinlock in the function resolve_symbol() as we are
not altering the module list, and we already hold the semaphore.

Signed-off-by: Ashutosh Naik &lt;ashutosh.naik@gmail.com&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the redundant spinlock in the function resolve_symbol() as we are
not altering the module list, and we already hold the semaphore.

Signed-off-by: Ashutosh Naik &lt;ashutosh.naik@gmail.com&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] modules: mark TAINT_FORCED_RMMOD correctly</title>
<updated>2006-01-09T04:14:03+00:00</updated>
<author>
<name>Akinobu Mita</name>
<email>mita@miraclelinux.com</email>
</author>
<published>2006-01-08T09:04:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fb1697933a03ec47d794b38e2a4e3ccc2463fd22'/>
<id>fb1697933a03ec47d794b38e2a4e3ccc2463fd22</id>
<content type='text'>
Currently TAINT_FORCED_RMMOD is totally unused.  Because it is marked as
TAINT_FORCED_MODULE instead when user forced a module unload.  This patch
marks it correctly

Signed-off-by: Akinobu Mita &lt;mita@miraclelinux.com&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Dave Jones &lt;davej@codemonkey.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently TAINT_FORCED_RMMOD is totally unused.  Because it is marked as
TAINT_FORCED_MODULE instead when user forced a module unload.  This patch
marks it correctly

Signed-off-by: Akinobu Mita &lt;mita@miraclelinux.com&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Dave Jones &lt;davej@codemonkey.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] modules: prevent overriding of symbols</title>
<updated>2006-01-09T04:14:03+00:00</updated>
<author>
<name>Ashutosh Naik</name>
<email>ashutosh.naik@gmail.com</email>
</author>
<published>2006-01-08T09:04:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=eea8b54dc0dceb740da697a89c54d20dde340306'/>
<id>eea8b54dc0dceb740da697a89c54d20dde340306</id>
<content type='text'>
Ensure that an exported symbol does not already exist in the kernel or in
some other module's exported symbol table.  This is done by checking the
symbol tables for the exported symbol at the time of loading the module.
Currently this is done after the relocation of the symbol.

Signed-off-by: Ashutosh Naik &lt;ashutosh.naik@gmail.com&gt;
Signed-off-by: Anand Krishnan &lt;anandhkrishnan@yahoo.co.in&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure that an exported symbol does not already exist in the kernel or in
some other module's exported symbol table.  This is done by checking the
symbol tables for the exported symbol at the time of loading the module.
Currently this is done after the relocation of the symbol.

Signed-off-by: Ashutosh Naik &lt;ashutosh.naik@gmail.com&gt;
Signed-off-by: Anand Krishnan &lt;anandhkrishnan@yahoo.co.in&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Add tainting for proprietary helper modules</title>
<updated>2006-01-09T04:13:59+00:00</updated>
<author>
<name>Dave Jones</name>
<email>davej@redhat.com</email>
</author>
<published>2006-01-08T09:03:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9841d61d75da5e46ed7a978bed4f50c78b1d87fd'/>
<id>9841d61d75da5e46ed7a978bed4f50c78b1d87fd</id>
<content type='text'>
Kernels that have had Windows drivers loaded into them are undebuggable.
I've wasted a number of hours chasing bugs filed in Fedora bugzilla only to
find out much later that the user had used such 'helpers', and their
problems were unreproducable without them loaded.

Acked-by: Arjan van de Ven &lt;arjan@infradead.org&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Kernels that have had Windows drivers loaded into them are undebuggable.
I've wasted a number of hours chasing bugs filed in Fedora bugzilla only to
find out much later that the user had used such 'helpers', and their
problems were unreproducable without them loaded.

Acked-by: Arjan van de Ven &lt;arjan@infradead.org&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] kernel/module.c: removed dead code</title>
<updated>2006-01-06T16:33:59+00:00</updated>
<author>
<name>Jayachandran C</name>
<email>c.jayachandran@gmail.com</email>
</author>
<published>2006-01-06T08:19:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6fe2e70bbed3995d930f39452fb6ce3be7dc47dc'/>
<id>6fe2e70bbed3995d930f39452fb6ce3be7dc47dc</id>
<content type='text'>
This patch fixes an issue reported by Coverity in kernel/module.c

Error reported: Cannot reach this line of code "else return ptr;"

Patch description:
  This is the error path, so 'err' will be negative, the else case
  is not required, this patch removes it.

Signed-off-by: Jayachandran C. &lt;c.jayachandran@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes an issue reported by Coverity in kernel/module.c

Error reported: Cannot reach this line of code "else return ptr;"

Patch description:
  This is the error path, so 'err' will be negative, the else case
  is not required, this patch removes it.

Signed-off-by: Jayachandran C. &lt;c.jayachandran@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] fix remaining missing includes</title>
<updated>2005-11-07T15:53:41+00:00</updated>
<author>
<name>Tim Schmielau</name>
<email>tim@physik3.uni-rostock.de</email>
</author>
<published>2005-11-07T08:59:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8c65b4a60450590e79a28e9717ceffa9e4debb3f'/>
<id>8c65b4a60450590e79a28e9717ceffa9e4debb3f</id>
<content type='text'>
Fix more include file problems that surfaced since I submitted the previous
fix-missing-includes.patch.  This should now allow not to include sched.h
from module.h, which is done by a followup patch.

Signed-off-by: Tim Schmielau &lt;tim@physik3.uni-rostock.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix more include file problems that surfaced since I submitted the previous
fix-missing-includes.patch.  This should now allow not to include sched.h
from module.h, which is done by a followup patch.

Signed-off-by: Tim Schmielau &lt;tim@physik3.uni-rostock.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
