Re: svn commit: r315136 - head/sys/netpfil/pf

2017-03-15 Thread John Baldwin
On Thursday, March 16, 2017 11:32:38 AM Kristof Provost wrote: > On 15 Mar 2017, at 15:45, John Baldwin wrote: > > You are ignoring interrupts and preemption. Suppose you get an > > interrupt > > after 'wakeup_one(pf_purge_thread)' and before 'tsleep(..., 0)' in > > pf_unload(). If the interrupt

Re: svn commit: r315136 - head/sys/netpfil/pf

2017-03-15 Thread Kristof Provost
On 15 Mar 2017, at 15:45, John Baldwin wrote: You are ignoring interrupts and preemption. Suppose you get an interrupt after 'wakeup_one(pf_purge_thread)' and before 'tsleep(..., 0)' in pf_unload(). If the interrupt preempts and results in the purge thread running and issuing its wakeup befo

Re: svn commit: r315136 - head/sys/netpfil/pf

2017-03-15 Thread John Baldwin
On Wednesday, March 15, 2017 10:26:39 AM Kristof Provost wrote: > On 15 Mar 2017, at 6:57, Gleb Smirnoff wrote: > > On Sun, Mar 12, 2017 at 05:42:57AM +, Kristof Provost wrote: > > K> Log: > > K> pf: Fix incorrect rw_sleep() in pf_unload() > > K> > > K> When we unload we don't hold the pf_r

Re: svn commit: r315136 - head/sys/netpfil/pf

2017-03-14 Thread Kristof Provost
On 15 Mar 2017, at 6:57, Gleb Smirnoff wrote: On Sun, Mar 12, 2017 at 05:42:57AM +, Kristof Provost wrote: K> Log: K> pf: Fix incorrect rw_sleep() in pf_unload() K> K> When we unload we don't hold the pf_rules_lock, so we cannot call rw_sleep() K> with it, because it would release a lo

Re: svn commit: r315136 - head/sys/netpfil/pf

2017-03-14 Thread Ermal Luçi
On Tue, Mar 14, 2017 at 2:57 PM, Gleb Smirnoff wrote: > Kristof, > > On Sun, Mar 12, 2017 at 05:42:57AM +, Kristof Provost wrote: > K> Log: > K> pf: Fix incorrect rw_sleep() in pf_unload() > K> > K> When we unload we don't hold the pf_rules_lock, so we cannot call > rw_sleep() > K> wi

Re: svn commit: r315136 - head/sys/netpfil/pf

2017-03-14 Thread Gleb Smirnoff
Kristof, On Sun, Mar 12, 2017 at 05:42:57AM +, Kristof Provost wrote: K> Log: K> pf: Fix incorrect rw_sleep() in pf_unload() K> K> When we unload we don't hold the pf_rules_lock, so we cannot call rw_sleep() K> with it, because it would release a lock we do not hold. There's no nee

svn commit: r315136 - head/sys/netpfil/pf

2017-03-11 Thread Kristof Provost
Author: kp Date: Sun Mar 12 05:42:57 2017 New Revision: 315136 URL: https://svnweb.freebsd.org/changeset/base/315136 Log: pf: Fix incorrect rw_sleep() in pf_unload() When we unload we don't hold the pf_rules_lock, so we cannot call rw_sleep() with it, because it would release a lock we do