<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/module.h, branch v2.6.37.2</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.37.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.37.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2010-11-24T04:51:11Z</updated>
<entry>
<title>module: Update prototype for ref_module (formerly use_module)</title>
<updated>2010-11-24T04:51:11Z</updated>
<author>
<name>Anders Kaseorg</name>
<email>andersk@ksplice.com</email>
</author>
<published>2010-11-24T21:21:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dfd62d1d84d83f9421792c78bcf72de9bc2bb603'/>
<id>urn:sha1:dfd62d1d84d83f9421792c78bcf72de9bc2bb603</id>
<content type='text'>
Commit 9bea7f23952d5948f8e5dfdff4de09bb9981fb5f renamed use_module to
ref_module (and changed its return value), but forgot to update this
prototype in module.h.

Signed-off-by: Anders Kaseorg &lt;andersk@ksplice.com&gt;
Acked-by: WANG Cong &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>Merge commit 'v2.6.36-rc7' into perf/core</title>
<updated>2010-10-08T08:46:27Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2010-10-08T08:46:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7cd2541cf2395962daf98ec32a141aba3398a9b2'/>
<id>urn:sha1:7cd2541cf2395962daf98ec32a141aba3398a9b2</id>
<content type='text'>
Conflicts:
	arch/x86/kernel/module.c

Merge reason: Resolve the conflict, pick up fixes.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>modules: Fix module_bug_list list corruption race</title>
<updated>2010-10-05T18:29:27Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-10-05T18:29:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5336377d6225959624146629ce3fc88ee8ecda3d'/>
<id>urn:sha1:5336377d6225959624146629ce3fc88ee8ecda3d</id>
<content type='text'>
With all the recent module loading cleanups, we've minimized the code
that sits under module_mutex, fixing various deadlocks and making it
possible to do most of the module loading in parallel.

However, that whole conversion totally missed the rather obscure code
that adds a new module to the list for BUG() handling.  That code was
doubly obscure because (a) the code itself lives in lib/bugs.c (for
dubious reasons) and (b) it gets called from the architecture-specific
"module_finalize()" rather than from generic code.

Calling it from arch-specific code makes no sense what-so-ever to begin
with, and is now actively wrong since that code isn't protected by the
module loading lock any more.

So this commit moves the "module_bug_{finalize,cleanup}()" calls away
from the arch-specific code, and into the generic code - and in the
process protects it with the module_mutex so that the list operations
are now safe.

Future fixups:
 - move the module list handling code into kernel/module.c where it
   belongs.
 - get rid of 'module_bug_list' and just use the regular list of modules
   (called 'modules' - imagine that) that we already create and maintain
   for other reasons.

Reported-and-tested-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Adrian Bunk &lt;bunk@kernel.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>jump label: Base patch for jump label</title>
<updated>2010-09-22T20:29:41Z</updated>
<author>
<name>Jason Baron</name>
<email>jbaron@redhat.com</email>
</author>
<published>2010-09-17T15:09:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bf5438fca2950b03c21ad868090cc1a8fcd49536'/>
<id>urn:sha1:bf5438fca2950b03c21ad868090cc1a8fcd49536</id>
<content type='text'>
base patch to implement 'jump labeling'. Based on a new 'asm goto' inline
assembly gcc mechanism, we can now branch to labels from an 'asm goto'
statment. This allows us to create a 'no-op' fastpath, which can subsequently
be patched with a jump to the slowpath code. This is useful for code which
might be rarely used, but which we'd like to be able to call, if needed.
Tracepoints are the current usecase that these are being implemented for.

Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jason Baron &lt;jbaron@redhat.com&gt;
LKML-Reference: &lt;ee8b3595967989fdaf84e698dc7447d315ce972a.1284733808.git.jbaron@redhat.com&gt;

[ cleaned up some formating ]

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>module: Make module sysfs functions private.</title>
<updated>2010-06-05T01:47:36Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2010-06-05T17:17:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6407ebb271fc34440b306f305e1efb7685eece26'/>
<id>urn:sha1:6407ebb271fc34440b306f305e1efb7685eece26</id>
<content type='text'>
These were placed in the header in ef665c1a06 to get the various
SYSFS/MODULE config combintations to compile.

That may have been necessary then, but it's not now.  These functions
are all local to module.c.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
</content>
</entry>
<entry>
<title>module: fix kdb's illicit use of struct module_use.</title>
<updated>2010-06-05T01:47:36Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2010-06-05T17:17:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c8e21ced08b39ef8dfe7236fb2a923a95f645262'/>
<id>urn:sha1:c8e21ced08b39ef8dfe7236fb2a923a95f645262</id>
<content type='text'>
Linus changed the structure, and luckily this didn't compile any more.

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Martin Hicks &lt;mort@sgi.com&gt;
</content>
</entry>
<entry>
<title>module: Make the 'usage' lists be two-way</title>
<updated>2010-06-05T01:47:35Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-05-31T19:19:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2c02dfe7fe3fba97a5665d329d039d2415ea5607'/>
<id>urn:sha1:2c02dfe7fe3fba97a5665d329d039d2415ea5607</id>
<content type='text'>
When adding a module that depends on another one, we used to create a
one-way list of "modules_which_use_me", so that module unloading could
see who needs a module.

It's actually quite simple to make that list go both ways: so that we
not only can see "who uses me", but also see a list of modules that are
"used by me".

In fact, we always wanted that list in "module_unload_free()": when we
unload a module, we want to also release all the other modules that are
used by that module.  But because we didn't have that list, we used to
first iterate over all modules, and then iterate over each "used by me"
list of that module.

By making the list two-way, we simplify module_unload_free(), and it
allows for some trivial fixes later too.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt; (cleaned &amp; rebased)
</content>
</entry>
<entry>
<title>Merge branch 'linus' into tracing/core</title>
<updated>2010-04-08T08:18:47Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2010-04-08T07:06:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c1ab9cab75098924fa8226a8a371de66977439df'/>
<id>urn:sha1:c1ab9cab75098924fa8226a8a371de66977439df</id>
<content type='text'>
Conflicts:
	include/linux/module.h
	kernel/module.c

Semantic conflict:
	include/trace/events/module.h

Merge reason: Resolve the conflict with upstream commit 5fbfb18 ("Fix up
              possibly racy module refcounting")

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Fix up possibly racy module refcounting</title>
<updated>2010-04-06T02:50:02Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2010-04-01T08:09:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5fbfb18d7a5b846946d52c4a10e3aaa213ec31b6'/>
<id>urn:sha1:5fbfb18d7a5b846946d52c4a10e3aaa213ec31b6</id>
<content type='text'>
Module refcounting is implemented with a per-cpu counter for speed.
However there is a race when tallying the counter where a reference may
be taken by one CPU and released by another.  Reference count summation
may then see the decrement without having seen the previous increment,
leading to lower than expected count.  A module which never has its
actual reference drop below 1 may return a reference count of 0 due to
this race.

Module removal generally runs under stop_machine, which prevents this
race causing bugs due to removal of in-use modules.  However there are
other real bugs in module.c code and driver code (module_refcount is
exported) where the callers do not run under stop_machine.

Fix this by maintaining running per-cpu counters for the number of
module refcount increments and the number of refcount decrements.  The
increments are tallied after the decrements, so any decrement seen will
always have its corresponding increment counted.  The final refcount is
the difference of the total increments and decrements, preventing a
low-refcount from being returned.

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Acked-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>tracing: Remove side effect from module tracepoints that caused a GPF</title>
<updated>2010-04-01T02:56:58Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2010-03-24T02:57:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ae832d1e03ac9bf09fb8a07fb37908ab40c7cd0e'/>
<id>urn:sha1:ae832d1e03ac9bf09fb8a07fb37908ab40c7cd0e</id>
<content type='text'>
Remove the @refcnt argument, because it has side-effects, and arguments with
side-effects are not skipped by the jump over disabled instrumentation and are
executed even when the tracepoint is disabled.

This was also causing a GPF as found by Randy Dunlap:

Subject: 2.6.33 GP fault only when built with tracing
LKML-Reference: &lt;4BA2B69D.3000309@oracle.com&gt;

Note, the current 2.6.34-rc has a fix for the actual cause of the GPF,
but this fixes one of its triggers.

Tested-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Acked-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
LKML-Reference: &lt;4BA97FA7.6040406@cn.fujitsu.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
