From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFL0z-0006IX-S5 for qemu-devel@nongnu.org; Tue, 12 Mar 2013 04:57:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFL0y-00049n-0X for qemu-devel@nongnu.org; Tue, 12 Mar 2013 04:56:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFL0x-00049c-PY for qemu-devel@nongnu.org; Tue, 12 Mar 2013 04:56:55 -0400 Message-ID: <513EEDCF.8000100@redhat.com> Date: Tue, 12 Mar 2013 09:56:47 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1362624800-10682-1-git-send-email-qemulist@gmail.com> <1362624800-10682-3-git-send-email-qemulist@gmail.com> In-Reply-To: <1362624800-10682-3-git-send-email-qemulist@gmail.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/5] net: hub use lock to protect ports list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Ping Fan Cc: Stefan Hajnoczi , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Anthony Liguori , mdroth Il 07/03/2013 03:53, Liu Ping Fan ha scritto: > From: Liu Ping Fan > > Signed-off-by: Liu Ping Fan > --- > net/hub.c | 27 ++++++++++++++++++++++++++- > 1 files changed, 26 insertions(+), 1 deletions(-) You are introducing three locks. Please document for each one how can concurrent access to the lock happen, and also the lock hierarchy. Paolo