Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Nov 2011 13:22:11 GMT
From:      Matthieu Kraus <matthieu.kraus@s2008.tu-chemnitz.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/162947: pfsync_defer return ignored with __FreeBSD__
Message-ID:  <201111291322.pATDMB4g032741@red.freebsd.org>
Resent-Message-ID: <201111291330.pATDUC66027717@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         162947
>Category:       kern
>Synopsis:       pfsync_defer return ignored with __FreeBSD__
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 29 13:30:12 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Matthieu Kraus
>Release:        FreeBSD 10.0-CURRENT arm
>Organization:
>Environment:
FreeBSD dreamplug 10.0-CURRENT FreeBSD 10.0-CURRENT #1 r228127M: Tue Nov 29 12:15:21 UTC 2011 root@dreamplug:/usr/obj/us
r/src/sys/DREAMPLUG arm
>Description:
similiar to the recent issue that caused pf to leak states due to discarding the wanted return of a function, this one seems ver
y similiar and seemed to cause slowly leaking mbufs for me (not sure how to verify it's exactly that)
>How-To-Repeat:
have device pfsync enabled in the kernel config
>Fix:
see attached patch

Patch attached with submission follows:

Index: sys/contrib/pf/net/pf.c
===================================================================
--- sys/contrib/pf/net/pf.c	(revision 228127)
+++ sys/contrib/pf/net/pf.c	(working copy)
@@ -3770,8 +3770,8 @@
 		 * replies through it.
 		 */
 #ifdef __FreeBSD__
-		if (pfsync_defer_ptr != NULL)
-			pfsync_defer_ptr(*sm, m);
+		if (pfsync_defer_ptr != NULL &&
+			pfsync_defer_ptr(*sm, m))
 #else
 		if (pfsync_defer(*sm, m))
 #endif


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111291322.pATDMB4g032741>