Bug 160541

Summary: [vimage][pf][patch] panic: userret: Returning on td 0xxxxxxxxx (pid xxxx, pftop) with vnet 0xxxxxxxxx set in pfioctl
Product: Base System Reporter: nvass
Component: kernAssignee: freebsd-virtualization (Nobody) <virtualization>
Status: Closed DUPLICATE    
Severity: Affects Only Me CC: rodrigc
Priority: Normal    
Version: 9.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description nvass 2011-09-07 15:20:06 UTC
A VIMAGE kernel panics when certain pf IOCTLs are used. The
panic is triggered by pftop for example.

Unread portion of the kernel message buffer:
panic: userret: Returning on td 0xc3a0e2e0 (pid 1311, pftop) with vnet 0xc35a9000 set in pfioctl
cpuid = 0
KDB: enter: panic
Physical memory: 491 MB
Dumping 55 MB: 40 24 8

Fix: For certain IOCTLs, CURVNET_RESTORE() is not called
upon return from pfioctl():/sys/contrib/pf/net/pf_ioctl.c

Patch attached with submission follows:
How-To-Repeat: build a VIMAGE kernel
build pftop port
kldload pf
run pftop and cycle through the views
the kernel will panic
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-09-08 07:12:12 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-pf

Over to maintainer(s).
Comment 2 Bjoern A. Zeeb freebsd_committer freebsd_triage 2011-09-09 22:45:13 UTC
Responsible Changed
From-To: freebsd-pf->freebsd-virtualization

Re-assign to right mailing list
Comment 3 Craig Rodrigues freebsd_committer freebsd_triage 2014-12-13 12:56:24 UTC

*** This bug has been marked as a duplicate of bug 194515 ***