|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [PATCH v3 2/3] hvc_init(): Enforce one-time initializati
To: |
Miche Baker-Harvey <miche@xxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxx> |
Subject: |
[Xen-devel] Re: [PATCH v3 2/3] hvc_init(): Enforce one-time initialization. |
From: |
Rusty Russell <rusty@xxxxxxxxxxxxxxx> |
Date: |
Fri, 11 Nov 2011 15:00:31 +1030 |
Cc: |
Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, Anton Blanchard <anton@xxxxxxxxx>, Amit Shah <amit.shah@xxxxxxxxxx>, Mike Waychison <mikew@xxxxxxxxxx>, ppc-dev <linuxppc-dev@xxxxxxxxxxxxxxxx>, Eric Northrup <digitaleric@xxxxxxxxxx> |
Delivery-date: |
Sun, 13 Nov 2011 15:16:37 -0800 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<20111108214504.28884.61814.stgit@xxxxxxxxxxxxxxxxxxxxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<20111108214452.28884.14840.stgit@xxxxxxxxxxxxxxxxxxxxxxxxx> <20111108214504.28884.61814.stgit@xxxxxxxxxxxxxxxxxxxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
Notmuch/0.6.1-1 (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) |
On Tue, 08 Nov 2011 13:45:04 -0800, Miche Baker-Harvey <miche@xxxxxxxxxx> wrote:
> hvc_init() must only be called once, and no thread should continue with
> hvc_alloc()
> until after initialization is complete. The original code does not enforce
> either
> of these requirements. A new mutex limits entry to hvc_init() to a single
> thread,
> and blocks all later comers until it has completed.
>
> This patch fixes multiple crash symptoms.
No, it doesn't: not now your previous double-hvc_init patch has been
reverted.
It's easy to show this is the case though: replace mutex_lock() with:
if (!mutex_trylock()) {
WARN(1, "hvc_console: mutex is stopping us!\n");
mutex_lock();
}
If you get that warning, then your mutex is doing something.
Thanks,
Rusty.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|