Re: x86/mce: machine check warning during poweroff
From: Linus Torvalds
Date: Fri Jan 13 2012 - 21:53:54 EST
On Fri, Jan 13, 2012 at 6:41 PM, Srivatsa S. Bhat
<srivatsa.bhat@xxxxxxxxxxxxxxxxxx> wrote:
>
> YES!! Finally I have a fix for this whole MCE thing! :-)
Goodie.
> The patch below works perfectly for me - I tested multiple CPU hotplug
> operations as well as multiple pm_test runs at core level. Please let me
> know if this solves the suspend issue as well..
Ok, I'll try, and I bet it does.
HOWEVER.
I'd be a whole lot happier knowing exactly which field in "struct
device" that needed to be NULL before it gets registered.
I don't like how
device_register() + device_create_file(dev)..
is not sufficiently undone by
.. device_remove_file(dev) + device_unregister()
so that it can't be repeated. Exactly *what* state is stale and
re-used incorrectly if you do that device_register() a second time.
It smells like a misfeature of the device core handling.
But that does obviously explain why this started happening with a
fairly straightforward conversion from sysdev to struct device. It
just makes me worry about any *other* such conversions.
Of course, normal users will allocate and free the memory, so never
see this "re-use the same piece of memory" issue. But still..
Linus
--
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/