Re: [Qemu-devel] [PATCH v2 2/5] net: hub use lock to protect ports list

2013-03-12 Thread Paolo Bonzini
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

[Qemu-devel] [PATCH v2 2/5] net: hub use lock to protect ports list

2013-03-06 Thread Liu Ping Fan
From: Liu Ping Fan Signed-off-by: Liu Ping Fan --- net/hub.c | 27 ++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/net/hub.c b/net/hub.c index 73c1f26..47fe72c 100644 --- a/net/hub.c +++ b/net/hub.c @@ -39,6 +39,8 @@ struct NetHub { int id;