[PATCH] improving netncp locking

From: Attilio Rao <attilio_at_freebsd.org>
Date: Wed, 28 Jan 2009 19:45:00 +0100
Attached there is a patch that fixes netncp locking.
Actually, netncp tries to drain connections without any protection for
the nc_id field (which is supposed to discriminate between a valid
connection and one under draining).
Also, the drain still uses loose ending LK_DRAIN.
This patch adds correct locking for draining path adding an interlock,
control flags, a refcount and using it accordingly.
Ultimately 2 locks are switched to be sx as they don't rely on any
particular lockmgr feature.

The patch compiles and boots ok, but if someone could test and review
it I would appreciate a lot.

Thanks,
Attilio

-- 
Peace can only be achieved by understanding - A. Einstein

Received on Wed Jan 28 2009 - 18:17:36 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:41 UTC