<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/module.h, branch linux-2.6.34.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.34.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.34.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2010-04-06T02:50:02+00:00</updated>
<entry>
<title>Fix up possibly racy module refcounting</title>
<updated>2010-04-06T02:50:02+00:00</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2010-04-01T08:09:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/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>module: add stub for is_module_percpu_address</title>
<updated>2010-03-31T02:33:42+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2010-03-31T02:33:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d5e50daf92df8afcb701fd717b301985691e802f'/>
<id>urn:sha1:d5e50daf92df8afcb701fd717b301985691e802f</id>
<content type='text'>
Fix build for CONFIG_MODULES not enabled by providing a stub
for is_module_percpu_address().

kernel/lockdep.c:605: error: implicit declaration of function 'is_module_percpu_address'

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>percpu, module: implement and use is_kernel/module_percpu_address()</title>
<updated>2010-03-29T14:07:12+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-10T09:57:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=10fad5e46f6c7bdfb01b1a012380a38e3c6ab346'/>
<id>urn:sha1:10fad5e46f6c7bdfb01b1a012380a38e3c6ab346</id>
<content type='text'>
lockdep has custom code to check whether a pointer belongs to static
percpu area which is somewhat broken.  Implement proper
is_kernel/module_percpu_address() and replace the custom code.

On UP, percpu variables are regular static variables and can't be
distinguished from them.  Always return %false on UP.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
</content>
</entry>
<entry>
<title>module: encapsulate percpu handling better and record percpu_size</title>
<updated>2010-03-29T14:07:12+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-10T09:56:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=259354deaaf03d49a02dbb9975d6ec2a54675672'/>
<id>urn:sha1:259354deaaf03d49a02dbb9975d6ec2a54675672</id>
<content type='text'>
Better encapsulate module static percpu area handling so that code
outsidef of CONFIG_SMP ifdef doesn't deal with mod-&gt;percpu directly
and add mod-&gt;percpu_size and record percpu_size in it.  Both percpu
fields are compiled out on UP.  While at it, mark mod-&gt;percpu w/
__percpu.

This is to prepare for is_module_percpu_address().

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>sysctl extern cleanup: module</title>
<updated>2010-03-12T23:53:10+00:00</updated>
<author>
<name>Dave Young</name>
<email>hidave.darkstar@gmail.com</email>
</author>
<published>2010-03-10T23:24:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5ed109103d73b0bafc92e860cead56725231384d'/>
<id>urn:sha1:5ed109103d73b0bafc92e860cead56725231384d</id>
<content type='text'>
Extern declarations in sysctl.c should be moved to their own header file,
and then include them in relavant .c files.

Move modprobe_path extern declaration to linux/kmod.h
Move modules_disabled extern declaration to linux/module.h

Signed-off-by: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>percpu: add __percpu sparse annotations to core kernel subsystems</title>
<updated>2010-02-17T02:17:38+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-02-02T05:38:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=43cf38eb5cea91245502df3fcee4dbfc1c74dd1c'/>
<id>urn:sha1:43cf38eb5cea91245502df3fcee4dbfc1c74dd1c</id>
<content type='text'>
Add __percpu sparse annotations to core subsystems.

These annotations are to make sparse consider percpu variables to be
in a different address space and warn if accessed without going
through percpu accessors.  This patch doesn't affect normal builds.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reviewed-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: linux-mm@kvack.org
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Dipankar Sarma &lt;dipankar@in.ibm.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Eric Biederman &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>local_t: Move local.h include to ringbuffer.c and ring_buffer_benchmark.c</title>
<updated>2010-01-05T06:34:50+00:00</updated>
<author>
<name>Christoph Lameter</name>
<email>cl@linux-foundation.org</email>
</author>
<published>2010-01-05T06:34:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=79615760f380ec86cd58204744e774c33fab9211'/>
<id>urn:sha1:79615760f380ec86cd58204744e774c33fab9211</id>
<content type='text'>
ringbuffer*.c are the last users of local.h.

Remove the include from modules.h and add it to ringbuffer files.

Signed-off-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>module: Use this_cpu_xx to dynamically allocate counters</title>
<updated>2010-01-05T06:34:50+00:00</updated>
<author>
<name>Christoph Lameter</name>
<email>cl@linux-foundation.org</email>
</author>
<published>2010-01-05T06:34:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e1783a240f491fb233f04edc042e16b18a7a79ba'/>
<id>urn:sha1:e1783a240f491fb233f04edc042e16b18a7a79ba</id>
<content type='text'>
Use cpu ops to deal with the per cpu data instead of a local_t. Reduces memory
requirements, cache footprint and decreases cycle counts.

The this_cpu_xx operations are also used for !SMP mode. Otherwise we could
not drop the use of __module_ref_addr() which would make per cpu data handling
complicated. this_cpu_xx operations have their own fallback for !SMP.

V8-V9:
- Leave include asm/module.h since ringbuffer.c depends on it. Nothing else
  does though. Another patch will deal with that.
- Remove spurious free.

Signed-off-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Acked-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>module: make MODULE_SYMBOL_PREFIX into a CONFIG option</title>
<updated>2009-12-15T05:58:26+00:00</updated>
<author>
<name>Alan Jenkins</name>
<email>alan-jenkins@tuffmail.co.uk</email>
</author>
<published>2009-11-07T21:03:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9e1b9b80721661bd63b3662453767b22cd614fe7'/>
<id>urn:sha1:9e1b9b80721661bd63b3662453767b22cd614fe7</id>
<content type='text'>
The next commit will require the use of MODULE_SYMBOL_PREFIX in
.tmp_exports-asm.S.  Currently it is mixed in with C structure
definitions in "asm/module.h".  Move the definition of this arch option
into Kconfig, so it can be easily accessed by any code.

This also lets modpost.c use the same definition.  Previously modpost
relied on a hardcoded list of architectures in mk_elfconfig.c.

A build test for blackfin, one of the two MODULE_SYMBOL_PREFIX archs,
showed the generated code was unchanged.  vmlinux was identical save
for build ids, and an apparently randomized suffix on a single "__key"
symbol in the kallsyms data).

Signed-off-by: Alan Jenkins &lt;alan-jenkins@tuffmail.co.uk&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt; (blackfin)
CC: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>module: preferred way to use MODULE_AUTHOR</title>
<updated>2009-09-24T15:02:58+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes@sipsolutions.net</email>
</author>
<published>2009-09-25T06:32:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1d7015caa082d465faeae5d6fd1be077ee6dfa87'/>
<id>urn:sha1:1d7015caa082d465faeae5d6fd1be077ee6dfa87</id>
<content type='text'>
For the longest time now we've been using multiple MODULE_AUTHOR()
statements when a module has more than one author, but the comment here
disagrees.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Luciano Coelho &lt;luciano.coelho@nokia.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
</feed>
