From owner-freebsd-pf@FreeBSD.ORG Mon Jul 22 17:11:59 2013 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 91650170; Mon, 22 Jul 2013 17:11:59 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D1FA92960; Mon, 22 Jul 2013 17:11:58 +0000 (UTC) Received: by mail-wi0-f175.google.com with SMTP id m6so2159850wiv.2 for ; Mon, 22 Jul 2013 10:11:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=YbN64UG9gjLS2ugbrB9SAtdRrLPVCm3M/xVAMBbefg0=; b=OjGCVlM3dX6+yHeVE2MqD3NCozRr3JJH+OdbPmhVQPlgasGiKUIaWa8aUuDgQPJG7v dn1ZkHX0b99lMapVfU2iviAOoFE3oBoSfXe18eH/zamzZ2Q3KYYMd7Ue6t3HuojSzs4f 4S2toLF7IhxIAnzxyc8+hbkbNSg+Q9Y2J6By5uZgjm5agNGE5fPJ+JiMLktCil1Yn0He +YWN7YvoyVldJEQxiMEATtvGkjBlRwGTbEnq9Yv04QXe4ylMaTousuZ14/Yurm8Rae+L U0dn0yqATdZVbPbVDFvmtqHLjcP7XKUpHlvPMdLWpNQob+/Xhr9ilPJ1mbyLQvUQn0D+ DdPg== MIME-Version: 1.0 X-Received: by 10.194.11.72 with SMTP id o8mr20693027wjb.0.1374513117128; Mon, 22 Jul 2013 10:11:57 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Mon, 22 Jul 2013 10:11:57 -0700 (PDT) In-Reply-To: <51ED5308.3020008@gmx.com> References: <51ED5308.3020008@gmx.com> Date: Mon, 22 Jul 2013 10:11:57 -0700 X-Google-Sender-Auth: izKPMuXWKHEBcYxYnS4wEWHbiwA Message-ID: Subject: Re: VIMAGE + PF crash in mbuf destructor From: Adrian Chadd To: Nikos Vassiliadis Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-virtualization@freebsd.org" , freebsd-pf@freebsd.org X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jul 2013 17:11:59 -0000 On 22 July 2013 08:43, Nikos Vassiliadis wrote: > Hi, > > I think this comes from the eventhandlers pf installs to handle > ifnet events. It seems like a wifi event causes this code to run > and the context is not set. Does the panic happen only when you > use vnet jails? > > Could you try putting all evenhandlers in an > 'if (IS_DEFAULT_VNET(curvnet))' block? > > It's here: > http://fxr.watson.org/fxr/source/netpfil/pf/pf_if.c#L127 > the pfi_*_cookie = ... lines. > > I am not sure if this would be enough though since it might > panic in other places. I don't think the default vnet context is the correct behaviour there. We'd need to figure out what the vnet context of the mbuf is and set that. -adrian