From owner-svn-src-all@FreeBSD.ORG Thu Oct 17 19:35:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A2807745; Thu, 17 Oct 2013 19:35:52 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-ee0-x22b.google.com (mail-ee0-x22b.google.com [IPv6:2a00:1450:4013:c00::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4EA222C77; Thu, 17 Oct 2013 19:35:51 +0000 (UTC) Received: by mail-ee0-f43.google.com with SMTP id e52so1358509eek.16 for ; Thu, 17 Oct 2013 12:35:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Ve8/f0mCynhqvIu4DwyGx7huWjsbbgIU/6HlydSCCNU=; b=M8xB7acPMTiB0CpxFUtZnFqTKjCCP48XDRxqkaJ0JcONAVWUigdwuzeFAbowuOlS3W pKV6ga0dBDOxDL9m7ABsBQcQJn1qwwxnfUzlwJUVDy9nD3Y+VLIEkaihr7zycXZmiAMn nnuLuYWNfwl0rHfYo9enp3MCUuR78OMsfyctl4vAQqnoTEJMncgWfUIwe5+Bp9prTw66 tpsZ8kUntdY6jxHPaVWbu6uz+3MCR+AvrytKVCcV9l6aLM7yfHNWD9JWujgLm2HXJJkx xoNQSjHc/zqyX1KOEWIrl6sWGvNOlADena1QkGCYquAjTkZvWH/ZROG8NVKW9637T0vM hSOA== X-Received: by 10.14.206.131 with SMTP id l3mr200307eeo.86.1382038549647; Thu, 17 Oct 2013 12:35:49 -0700 (PDT) Received: from localhost ([178.150.115.244]) by mx.google.com with ESMTPSA id l49sm112703884eeo.12.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Oct 2013 12:35:49 -0700 (PDT) Sender: Mikolaj Golub Date: Thu, 17 Oct 2013 22:35:46 +0300 From: Mikolaj Golub To: John Baldwin Subject: Re: svn commit: r228969 - head/sys/netinet Message-ID: <20131017193545.GA3683@gmail.com> References: <201112292041.pBTKfGkj071711@svn.freebsd.org> <201204020848.04775.jhb@freebsd.org> <86sjdbnziw.fsf@kopusha.home.net> <201310161709.04489.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201310161709.04489.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, hrs@freebsd.org, Bjoern Zeeb , glebius@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Oct 2013 19:35:52 -0000 On Wed, Oct 16, 2013 at 05:09:04PM -0400, John Baldwin wrote: ... > > >> #10 0x80b6f1fd in igmp_change_state (inm=0x8ae70480) > > >> at /home/golub/freebsd/base/head/sys/netinet/igmp.c:2595 > > >> #11 0x80b76f68 in in_leavegroup_locked (inm=0x8ae70480, imf=0x8a655a00) > > >> at /home/golub/freebsd/base/head/sys/netinet/in_mcast.c:1239 > > >> #12 0x80b76fbd in in_leavegroup (inm=0x8ae70480, imf=0x8a655a00) > > >> at /home/golub/freebsd/base/head/sys/netinet/in_mcast.c:1184 > > >> #13 0x80b770b4 in inp_gcmoptions (context=0x0, pending=1) > > >> at /home/golub/freebsd/base/head/sys/netinet/in_mcast.c:1554 > > >> #14 0x80a8ff2b in taskqueue_run_locked (queue=0x87594880) > > >> at /home/golub/freebsd/base/head/sys/kern/subr_taskqueue.c:308 > > >> #15 0x80a90987 in taskqueue_thread_loop (arg=0x81186bcc) > > >> at /home/golub/freebsd/base/head/sys/kern/subr_taskqueue.c:497 > > >> #16 0x80a1b2d8 in fork_exit (callout=0x80a90920 > > >> , arg=0x81186bcc, > > >> frame=0x872b2d28) at /home/golub/freebsd/base/head/sys/kern/kern_fork.c:992 ... > > >> VNET context is not set at that point. ... > > I think this was just fixed by glebius@ in r256587: > > Author: glebius > Date: Wed Oct 16 05:02:01 2013 > New Revision: 256587 > URL: http://svnweb.freebsd.org/changeset/base/256587 > > Log: > For VIMAGE kernels store vnet in the struct task, and set vnet context > during task processing. > > Reported & tested by: mm I think that particular issue was fixed earlier by hrs in r252510: Fix a panic when leaving MC group in a kernel with VIMAGE enabled. in_leavegroup() is called from an asynchronous task, and igmp_change_state() requires that curvnet is set by the caller. Concerning this more general solution from Gleb, with storing the vnet pointer in the task, I wander how it is safe when the vnet is being removed? In vnet_destroy() the vnet interfaces are moved back to their parent vnets, so setting the vnet context from the interface looks safer. -- Mikolaj Golub