<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/lib/kref.c, branch tegra-10.7.1</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>kref: add kref_set()</title>
<updated>2008-01-25T04:40:05+00:00</updated>
<author>
<name>Evgeniy Polyakov</name>
<email>johnpol@2ka.mipt.ru</email>
</author>
<published>2007-12-10T20:03:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=41ca28ab2abd76dc203e2c3a7cd609607cb927c3'/>
<id>41ca28ab2abd76dc203e2c3a7cd609607cb927c3</id>
<content type='text'>
This adds kref_set() to the kref api for future use by people who really
know what they are doing with krefs...

From: Evgeniy Polyakov &lt;johnpol@2ka.mipt.ru&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds kref_set() to the kref api for future use by people who really
know what they are doing with krefs...

From: Evgeniy Polyakov &lt;johnpol@2ka.mipt.ru&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>kref: fix CPU ordering with respect to krefs</title>
<updated>2007-04-27T17:57:29+00:00</updated>
<author>
<name>Oliver Neukum</name>
<email>oneukum@suse.de</email>
</author>
<published>2007-04-02T12:47:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1b0b3b9980e482ab7c603430462538334f69f14a'/>
<id>1b0b3b9980e482ab7c603430462538334f69f14a</id>
<content type='text'>
some atomic operations are only atomic, not ordered. Thus a CPU is allowed
to reorder memory references to an object to before the reference is
obtained. This fixes it.

Signed-off-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
some atomic operations are only atomic, not ordered. Thus a CPU is allowed
to reorder memory references to an object to before the reference is
obtained. This fixes it.

Signed-off-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>kref refcnt and false positives</title>
<updated>2006-12-20T18:56:43+00:00</updated>
<author>
<name>Venkatesh Pallipadi</name>
<email>venkatesh.pallipadi@intel.com</email>
</author>
<published>2006-12-19T21:01:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f334b60b43a0927f4ab1187cbdb4582f5227c3b1'/>
<id>f334b60b43a0927f4ab1187cbdb4582f5227c3b1</id>
<content type='text'>
With WARN_ON addition to kobject_init()
[ http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.19/2.6.19-mm1/dont-use/broken-out/gregkh-driver-kobject-warn.patch ]

I started seeing following WARNING on CPU offline followed by online on my
x86_64 system.

WARNING at lib/kobject.c:172 kobject_init()

Call Trace:
 [&lt;ffffffff8020ab45&gt;] dump_trace+0xaa/0x3ef
 [&lt;ffffffff8020aec4&gt;] show_trace+0x3a/0x50
 [&lt;ffffffff8020b0f6&gt;] dump_stack+0x15/0x17
 [&lt;ffffffff80350abc&gt;] kobject_init+0x3f/0x8a
 [&lt;ffffffff80350be1&gt;] kobject_register+0x1a/0x3e
 [&lt;ffffffff803bbd89&gt;] sysdev_register+0x5b/0xf9
 [&lt;ffffffff80211d0b&gt;] mce_create_device+0x77/0xf4
 [&lt;ffffffff80211dc2&gt;] mce_cpu_callback+0x3a/0xe5
 [&lt;ffffffff805632fd&gt;] notifier_call_chain+0x26/0x3b
 [&lt;ffffffff8023f6f3&gt;] raw_notifier_call_chain+0x9/0xb
 [&lt;ffffffff802519bf&gt;] _cpu_up+0xb4/0xdc
 [&lt;ffffffff80251a12&gt;] cpu_up+0x2b/0x42
 [&lt;ffffffff803bef00&gt;] store_online+0x4a/0x72
 [&lt;ffffffff803bb6ce&gt;] sysdev_store+0x24/0x26
 [&lt;ffffffff802baaa2&gt;] sysfs_write_file+0xcf/0xfc
 [&lt;ffffffff8027fc6f&gt;] vfs_write+0xae/0x154
 [&lt;ffffffff80280418&gt;] sys_write+0x47/0x6f
 [&lt;ffffffff8020963e&gt;] system_call+0x7e/0x83
DWARF2 unwinder stuck at system_call+0x7e/0x83
Leftover inexact backtrace:

This is a false positive as mce.c is unregistering/registering sysfs
interfaces cleanly on hotplug.

kref_put() and conditional decrement of refcnt seems to be the root cause
for this and the patch below resolves the issue for me.

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With WARN_ON addition to kobject_init()
[ http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.19/2.6.19-mm1/dont-use/broken-out/gregkh-driver-kobject-warn.patch ]

I started seeing following WARNING on CPU offline followed by online on my
x86_64 system.

WARNING at lib/kobject.c:172 kobject_init()

Call Trace:
 [&lt;ffffffff8020ab45&gt;] dump_trace+0xaa/0x3ef
 [&lt;ffffffff8020aec4&gt;] show_trace+0x3a/0x50
 [&lt;ffffffff8020b0f6&gt;] dump_stack+0x15/0x17
 [&lt;ffffffff80350abc&gt;] kobject_init+0x3f/0x8a
 [&lt;ffffffff80350be1&gt;] kobject_register+0x1a/0x3e
 [&lt;ffffffff803bbd89&gt;] sysdev_register+0x5b/0xf9
 [&lt;ffffffff80211d0b&gt;] mce_create_device+0x77/0xf4
 [&lt;ffffffff80211dc2&gt;] mce_cpu_callback+0x3a/0xe5
 [&lt;ffffffff805632fd&gt;] notifier_call_chain+0x26/0x3b
 [&lt;ffffffff8023f6f3&gt;] raw_notifier_call_chain+0x9/0xb
 [&lt;ffffffff802519bf&gt;] _cpu_up+0xb4/0xdc
 [&lt;ffffffff80251a12&gt;] cpu_up+0x2b/0x42
 [&lt;ffffffff803bef00&gt;] store_online+0x4a/0x72
 [&lt;ffffffff803bb6ce&gt;] sysdev_store+0x24/0x26
 [&lt;ffffffff802baaa2&gt;] sysfs_write_file+0xcf/0xfc
 [&lt;ffffffff8027fc6f&gt;] vfs_write+0xae/0x154
 [&lt;ffffffff80280418&gt;] sys_write+0x47/0x6f
 [&lt;ffffffff8020963e&gt;] system_call+0x7e/0x83
DWARF2 unwinder stuck at system_call+0x7e/0x83
Leftover inexact backtrace:

This is a false positive as mce.c is unregistering/registering sysfs
interfaces cleanly on hotplug.

kref_put() and conditional decrement of refcnt seems to be the root cause
for this and the patch below resolves the issue for me.

Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] kref: avoid an atomic operation in kref_put()</title>
<updated>2006-03-20T21:42:57+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>dada1@cosmosbay.com</email>
</author>
<published>2006-01-30T05:19:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8b5536bbee53620f8d5f367987e5727ba36d886d'/>
<id>8b5536bbee53620f8d5f367987e5727ba36d886d</id>
<content type='text'>
Avoid an atomic operation in kref_put() when the last reference is
dropped. On most platforms, atomic_read() is a plan read of the counter
and involves no atomic at all.

Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid an atomic operation in kref_put() when the last reference is
dropped. On most platforms, atomic_read() is a plan read of the counter
and involves no atomic at all.

Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Linux-2.6.12-rc2</title>
<updated>2005-04-16T22:20:36+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@ppc970.osdl.org</email>
</author>
<published>2005-04-16T22:20:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2'/>
<id>1da177e4c3f41524e886b7f1b8a0c1fc7321cac2</id>
<content type='text'>
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
</pre>
</div>
</content>
</entry>
</feed>
