<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/edac/edac_mc.c, branch linux-3.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-02-13T10:34:05Z</updated>
<entry>
<title>EDAC: Robustify workqueues destruction</title>
<updated>2016-02-13T10:34:05Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2015-11-27T09:38:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=516e06bfb9eb3e85c9b9540c7b2fae2f4f257f38'/>
<id>urn:sha1:516e06bfb9eb3e85c9b9540c7b2fae2f4f257f38</id>
<content type='text'>
commit fcd5c4dd8201595d4c598c9cca5e54760277d687 upstream.

EDAC workqueue destruction is really fragile. We cancel delayed work
but if it is still running and requeues itself, we still go ahead and
destroy the workqueue and the queued work explodes when workqueue core
attempts to run it.

Make the destruction more robust by switching op_state to offline so
that requeuing stops. Cancel any pending work *synchronously* too.

  EDAC i7core: Driver loaded.
  general protection fault: 0000 [#1] SMP
  CPU 12
  Modules linked in:
  Supported: Yes
  Pid: 0, comm: kworker/0:1 Tainted: G          IE   3.0.101-0-default #1 HP ProLiant DL380 G7
  RIP: 0010:[&lt;ffffffff8107dcd7&gt;]  [&lt;ffffffff8107dcd7&gt;] __queue_work+0x17/0x3f0
  &lt; ... regs ...&gt;
  Process kworker/0:1 (pid: 0, threadinfo ffff88019def6000, task ffff88019def4600)
  Stack:
   ...
  Call Trace:
   call_timer_fn
   run_timer_softirq
   __do_softirq
   call_softirq
   do_softirq
   irq_exit
   smp_apic_timer_interrupt
   apic_timer_interrupt
   intel_idle
   cpuidle_idle_call
   cpu_idle
  Code: ...
  RIP  __queue_work
   RSP &lt;...&gt;

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>EDAC: Correct workqueue setup path</title>
<updated>2014-04-01T23:58:52Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2014-02-12T17:15:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fff691886ed8c83d3ba90e097f1b2c241d11c5e7'/>
<id>urn:sha1:fff691886ed8c83d3ba90e097f1b2c241d11c5e7</id>
<content type='text'>
commit cb6ef42e516cb8948f15e4b70dc03af8020050a2 upstream.

We're using edac_mc_workq_setup() both on the init path, when
we load an edac driver and when we change the polling period
(edac_mc_reset_delay_period) through /sys/.../edac_mc_poll_msec.

On that second path we don't need to init the workqueue which has been
initialized already.

Thanks to Tejun for workqueue insights.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: http://lkml.kernel.org/r/1391457913-881-1-git-send-email-prarit@redhat.com
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>edac,rcu: use synchronize_rcu() instead of call_rcu()+rcu_barrier()</title>
<updated>2011-05-27T00:12:37Z</updated>
<author>
<name>Lai Jiangshan</name>
</author>
<published>2011-05-26T23:25:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2e77098764636456ba7092a8b3b3b34b2a8e8d8'/>
<id>urn:sha1:e2e77098764636456ba7092a8b3b3b34b2a8e8d8</id>
<content type='text'>
synchronize_rcu() does the stuff as needed.

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Cc: Doug Thompson &lt;dougthompson@xmission.com&gt;
Cc: "Paul E. McKenney" &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Mauro Carvalho Chehab &lt;mchehab@infradead.org&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>Fix common misspellings</title>
<updated>2011-03-31T14:26:23Z</updated>
<author>
<name>Lucas De Marchi</name>
</author>
<published>2011-03-31T01:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>urn:sha1:25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
</entry>
<entry>
<title>amd64_edac: Rework printk macros</title>
<updated>2011-01-07T10:33:56Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2010-10-07T16:29:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=24f9a7fe3f19f3fd310f556364d01a22911724b3'/>
<id>urn:sha1:24f9a7fe3f19f3fd310f556364d01a22911724b3</id>
<content type='text'>
Add a macro per printk level, shorten up error messages. Add relevant
information to KERN_INFO level. No functional change.

Signed-off-by: Borislav Petkov &lt;borislav.petkov@amd.com&gt;
</content>
</entry>
<entry>
<title>EDAC: Fix workqueue-related crashes</title>
<updated>2010-12-08T18:52:27Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2010-12-02T16:48:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bb31b3122c0dd07d2d958da17a50ad771ce79e2b'/>
<id>urn:sha1:bb31b3122c0dd07d2d958da17a50ad771ce79e2b</id>
<content type='text'>
00740c58541b6087d78418cebca1fcb86dc6077d changed edac_core to
un-/register a workqueue item only if a lowlevel driver supplies a
polling routine. Normally, when we remove a polling low-level driver, we
go and cancel all the queued work. However, the workqueue unreg happens
based on the -&gt;op_state setting, and edac_mc_del_mc() sets this to
OP_OFFLINE _before_ we cancel the work item, leading to NULL ptr oops on
the workqueue list.

Fix it by putting the unreg stuff in proper order.

Cc: &lt;stable@kernel.org&gt; #36.x
Reported-and-tested-by: Tobias Karnat &lt;tobias.karnat@googlemail.com&gt;
LKML-Reference: &lt;1291201307.3029.21.camel@Tobias-Karnat&gt;
Signed-off-by: Borislav Petkov &lt;borislav.petkov@amd.com&gt;
</content>
</entry>
<entry>
<title>i7core_edac: don't use a freed mci struct</title>
<updated>2010-10-24T13:20:38Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2010-08-16T21:34:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=accf74fff36315a31dc7319dae2927af06e9296f'/>
<id>urn:sha1:accf74fff36315a31dc7319dae2927af06e9296f</id>
<content type='text'>
This is a nasty bug. Since kobject count will be reduced by zero by
edac_mc_del_mc(), and this triggers the kobj release method, the
mci memory will be freed automatically. So, all we have left is ctl_name,
as shown by enabling debug:

[   80.822186] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 1020: edac_remove_sysfs_mci_device()  remove_link
[   80.832590] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 1024: edac_remove_sysfs_mci_device()  remove_mci_instance
[   80.843776] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 640: edac_mci_control_release() mci instance idx=0 releasing
[   80.855163] EDAC MC: Removed device 0 for i7core_edac.c i7 core #0: DEV 0000:3f:03.0
[   80.862936] EDAC DEBUG: in drivers/edac/i7core_edac.c, line at 2089: (null): free structs
[   80.871134] EDAC DEBUG: in drivers/edac/edac_mc.c, line at 238: edac_mc_free()
[   80.878379] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 726: edac_mc_unregister_sysfs_main_kobj()
[   80.888043] EDAC DEBUG: in drivers/edac/i7core_edac.c, line at 1232: drivers/edac/i7core_edac.c: i7core_put_devices()

Also, kfree(mci) shouldn't happen at the kobj.release, as it happens
when edac_remove_sysfs_mci_device() is called, but the logic is:
	edac_remove_sysfs_mci_device(mci);
	edac_printk(KERN_INFO, EDAC_MC,
		"Removed device %d for %s %s: DEV %s\n", mci-&gt;mc_idx,
		mci-&gt;mod_name, mci-&gt;ctl_name, edac_dev_name(mci));
So, as the edac_printk() needs the mci struct, this generates an OOPS.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>edac_core: Print debug messages at release calls</title>
<updated>2010-10-24T13:20:38Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2010-08-16T21:22:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bbc560ae677c0f4d7ff8404a21409c99f35b297b'/>
<id>urn:sha1:bbc560ae677c0f4d7ff8404a21409c99f35b297b</id>
<content type='text'>
This is important to track a nasty bug at the free logic.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>edac_core: Do a better job with node removal</title>
<updated>2010-10-24T13:20:37Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2010-08-12T03:30:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6fe1108f14f4f9581af97cab752f37dc8fa9fdec'/>
<id>urn:sha1:6fe1108f14f4f9581af97cab752f37dc8fa9fdec</id>
<content type='text'>
Make sure we remove groups at the right order

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>i7core_edac: Be sure that the edac pci handler will be properly released</title>
<updated>2010-10-24T13:20:12Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2010-08-10T14:22:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=939747bd680eb09bb98792b17a5bfd2f525afe9d'/>
<id>urn:sha1:939747bd680eb09bb98792b17a5bfd2f525afe9d</id>
<content type='text'>
With multi-sockets, more than one edac pci handler is enabled. Be sure to
un-register all instances.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
</feed>
