> In lacp_unref(), I think we need to move list_remove(&lacp->node);
> inside the lock/unlock. Otherwise we have a race here where
> lacp_find() can grab an entry that is being destroyed.
Good catch. I fixed this, and also systematically added lock
annotations to all of the function definitions
On Fri, Jul 26, 2013 at 06:07:05PM -0700, Ethan Jackson wrote:
> Signed-off-by: Ethan Jackson
In lacp_unref(), I think we need to move list_remove(&lacp->node);
inside the lock/unlock. Otherwise we have a race here where
lacp_find() can grab an entry that is being destroyed.
Acked-by: Ben Pfaff
Signed-off-by: Ethan Jackson
---
lib/lacp.c | 165 +++-
1 file changed, 120 insertions(+), 45 deletions(-)
diff --git a/lib/lacp.c b/lib/lacp.c
index 5d90850..a387a6e 100644
--- a/lib/lacp.c
+++ b/lib/lacp.c
@@ -103,7 +103,7 @@ struct lacp