Re: edac_core: crashes on shutdown

From: Florian Mickler
Date: Thu Dec 02 2010 - 12:03:49 EST


On Thu, 02 Dec 2010 17:21:12 +0100
Tobias Karnat <tobias.karnat@xxxxxxxxxxxxxx> wrote:

> Am Donnerstag, den 02.12.2010, 16:21 +0100 schrieb Borislav Petkov:
> > Well, thanks for the photos. I don't have an idea what might cause this
> > workqueue corruption I'm seeing, all reg/unreg paths look ok. The only
> > change that came in between .35 and .36.1 I can think of being relevant
> > is 00740c58541b6087d78418cebca1fcb86dc6077d. You could try backing that
> > one out to see whether it fixes the issue.
>
> Yes, reverting this fixed the issue!
>
> But why?
>
> -Tobias
>
>

It doesnt work because op_state is set to OP_OFFLINE in edac_mc_del_mc
before calling edac_mc_workq_teardown. Or am I seeing things?

<snip>
577 struct mem_ctl_info *edac_mc_del_mc(struct device *dev)
578 {
<snip>
592 /* marking MCI offline */
593 mci->op_state = OP_OFFLINE;
594
595 del_mc_from_global_list(mci);
596 mutex_unlock(&mem_ctls_mutex);
597
598 /* flush workq processes and remove sysfs */
599 edac_mc_workq_teardown(mci);
<snip>

Probably a better check in _teardown is on a bool that get's set in
edac_mc_workq_setup...?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/