From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH 2/3] kvm tools: Make virtio-console kvm__irq_line thread safe Date: Fri, 29 Apr 2011 08:44:57 +0200 Message-ID: <20110429064457.GC13893@elte.hu> References: <1304058985-13833-1-git-send-email-asias.hejun@gmail.com> <1304058985-13833-2-git-send-email-asias.hejun@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Pekka Enberg , Cyrill Gorcunov , Sasha Levin , Prasad Joshi , kvm@vger.kernel.org To: Asias He Return-path: Received: from mx2.mail.elte.hu ([157.181.151.9]:35800 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751842Ab1D2GpC (ORCPT ); Fri, 29 Apr 2011 02:45:02 -0400 Content-Disposition: inline In-Reply-To: <1304058985-13833-2-git-send-email-asias.hejun@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: * Asias He wrote: > Signed-off-by: Asias He > --- > tools/kvm/virtio-console.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/tools/kvm/virtio-console.c b/tools/kvm/virtio-console.c > index e66d198..492c859 100644 > --- a/tools/kvm/virtio-console.c > +++ b/tools/kvm/virtio-console.c > @@ -162,7 +162,9 @@ static void virtio_console_handle_callback(struct kvm *self, void *param) > virt_queue__set_used_elem(vq, head, len); > } > > + mutex_lock(&console_device.mutex); > kvm__irq_line(self, VIRTIO_CONSOLE_IRQ, 1); > + mutex_unlock(&console_device.mutex); > } This looks wrong for similar reasons as for virtio-blk.c. Thanks, Ingo