Date: Wed, 13 Mar 2013 11:25:09 +0530 From: Dheeraj Kandula <dkandula@gmail.com> To: markj@freebsd.org Cc: freebsd-net@freebsd.org Subject: NDP prefix list locking Message-ID: <CA%2BqNgxRywCrKnDLJUqw9HwrBcid-ha03EB4Z6KjOWBCFneHRzA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi Mark,
In the patch that you provided to freebsd-net,
http://lists.freebsd.org/pipermail/freebsd-net/2013-February/034695.html, I
have a question.
nd6_timer() acquires the write lock using ND_DEFRTR_WLOCK. However,
defrouter_select again tries to acquire a read lock using ND_DEFRTR_RLOCK.
This will lead to a deadlock as the read lock can't be acquired as the
write lock is already acquired.
The solution is to check if the write lock is already acquired. If not the
read lock can be acquired, else there is no need to acquire the read lock.
Can you share your thoughts on the same.
Dheeraj
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BqNgxRywCrKnDLJUqw9HwrBcid-ha03EB4Z6KjOWBCFneHRzA>
