kern/162947: pfsync_defer return ignored with __FreeBSD__

Matthieu Kraus matthieu.kraus at
Tue Nov 29 13:30:13 UTC 2011

>Number:         162947
>Category:       kern
>Synopsis:       pfsync_defer return ignored with __FreeBSD__
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 29 13:30:12 UTC 2011
>Originator:     Matthieu Kraus
>Release:        FreeBSD 10.0-CURRENT arm
FreeBSD dreamplug 10.0-CURRENT FreeBSD 10.0-CURRENT #1 r228127M: Tue Nov 29 12:15:21 UTC 2011 root at dreamplug:/usr/obj/us
r/src/sys/DREAMPLUG arm
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)
have device pfsync enabled in the kernel config
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))
 		if (pfsync_defer(*sm, m))


More information about the freebsd-bugs mailing list