Re: edac_core: crashes on shutdown

From: Florian Mickler
Date: Thu Dec 02 2010 - 13:15:16 EST


On Thu, 2 Dec 2010 18:06:10 +0100
Borislav Petkov <bp@xxxxxxxxx> wrote:

> From: Borislav Petkov <borislav.petkov@xxxxxxx>
> Date: Thu, 2 Dec 2010 17:48:35 +0100
> Subject: [PATCH] EDAC: Fix workqueue-related crashes
>
> 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 teardown the workqueue and cancel all the queued work.
> However, the workqueue unreg happens based on the ->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.

Yes. That should work. Once we stopped the workqueue and removed it
from the global list, do we actually need to set it to OP_OFFLINE?

Also 00740c585 did fix a hang in edac_mc.c... could this also
happen in the edac_device_del_device/edac_pci_del_device functions?

Regards,
Flo

--
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/