From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 21 19:04:47 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E7D2D289; Sun, 21 Oct 2012 19:04:47 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id AD8B88FC14; Sun, 21 Oct 2012 19:04:47 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so1545973pbb.13 for ; Sun, 21 Oct 2012 12:04:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=uq7T6Yrnz95wG1fhFQRkfDB1nstfvF9tfZSBFz+bVhY=; b=HI/euCG3XCHsOSs0+JQ4QhRz7yJEdaOtux1jkLfJg1+69R874dZYpA/EcR32lacWd7 vwK2c74/BRSDoyKxJBKdWHSKH3fynf8DNt8eyvaTkqD4HCP1vJy8oEPAYLoyWYme3ojr 2DX63MNVW0reRZTC2P+PhNI0ivow1/QpL0DJvaKXvKEeJDJ8RsAQGP8Da8H0VoUKElz5 3Qu5gLVvfhJWUOboPhFZ28mcjqMKTpREdgdV9X4zTb633GOTKiWrljqNy35D3X1FzAi7 3Hrsc1meNbcvvpSOVeL+DR6nOWM0GXInq+2PKliggTbL7g3bIeSHaUTtyL5rLD/RqeDm /0aw== MIME-Version: 1.0 Received: by 10.68.223.37 with SMTP id qr5mr23889260pbc.101.1350846281636; Sun, 21 Oct 2012 12:04:41 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.146.233 with HTTP; Sun, 21 Oct 2012 12:04:41 -0700 (PDT) Date: Sun, 21 Oct 2012 12:04:41 -0700 X-Google-Sender-Auth: PUggmPaaoMBg7H4PZrPpatlH9Lo Message-ID: Subject: VIMAGE crashes on 9.x with hotplug net80211 devices From: Adrian Chadd To: FreeBSD Net , freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 19:04:48 -0000 Hi all, I have some crashes in the VIMAGE code on releng_9. Specifically, when I enable VIMAGE and then hotplug some cardbus ath(4) NICs. The panics are dereferencing the V_ ifindex and related fields. If I start adding CURVNET_SET(vnet0) and CURVNET_RESTORE() around the ifnet calls (attach, detach) then things stop panicing - however, things are slightly more complicated than that. Since it's possible that the cloned interfaces (and maybe the parent interface?) are placed into other VNETs, I have to make sure that the right vnet context is switched to before I free interfaces. So, may I please have some help by some VIMAGE-cluey people to sort out how to _properly_ get VIMAGE up on net80211? I'd like to fix this in -HEAD and -9 so people are able to use VIMAGEs for hostapd interfaces (and so I can abuse it for lots of local testing on a single laptop.) Thanks! Adrian