DragonFly BSD
DragonFly commits List (threaded) for 2010-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: git: network - Remove crit_exit/crit_enter wrappers in pf.c


From: YONETANI Tomokazu <qhwt.dfly@xxxxxxxxxx>
Date: Sat, 18 Sep 2010 09:48:44 +0900

On Fri, Sep 17, 2010 at 04:40:15PM -0700, Matthew Dillon wrote:
> commit b8a167909d6e02262d0f8fa42ae3e75a2febc3b0
> Author: Matthew Dillon <dillon@apollo.backplane.com>
> Date:   Fri Sep 17 16:38:37 2010 -0700
> 
>     network - Remove crit_exit/crit_enter wrappers in pf.c
>     
>     * Note I'm talking about exit/enter wrappers, not enter/exit wrappers.
>       I believe the enter/exit wrappers can be removed too but for now
>       we have to remove the exit/enter wrappers which assumed a critical
>       section would be held on entry.
>     
>       This is no longer the case.  Since so much of the network stack is
>       now threaded callers into PF are not necessarily holding a critical
>       section to exit out of.
>     
>     Reported-by: lentferj, Rumko
> 
> Summary of changes:
>  sys/dev/netif/fxp/if_fxp.c |    7 ++++---
>  sys/net/pf/pf.c            |   24 ++----------------------
>  2 files changed, 6 insertions(+), 25 deletions(-)

While looking at this change, I found an odd piece of code in pf_route6()
at line 5384; there's no prior call to crit_exit() in this function.
Is this OK?

	/* Cheat. XXX why only in the v6 case??? */
	if (r->rt == PF_FASTROUTE) {
		m0->m_pkthdr.pf.flags |= PF_TAG_GENERATED;
		ip6_output(m0, NULL, NULL, 0, NULL, NULL, NULL);
		crit_enter();
		return;
	}



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]