From owner-svn-src-all@freebsd.org Mon Dec 7 02:56:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8997D9B7E67; Mon, 7 Dec 2015 02:56:09 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 585221F42; Mon, 7 Dec 2015 02:56:09 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB72u8Mo057989; Mon, 7 Dec 2015 02:56:08 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB72u8C6057988; Mon, 7 Dec 2015 02:56:08 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201512070256.tB72u8C6057988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 7 Dec 2015 02:56:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291911 - head/sys/dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 07 Dec 2015 02:56:09 -0000 Author: smh Date: Mon Dec 7 02:56:08 2015 New Revision: 291911 URL: https://svnweb.freebsd.org/changeset/base/291911 Log: Fix panic on shutdown due to iscsi event priority iscsi's shutdown_pre_sync prio was SHUTDOWN_PRI_FIRST which caused it to run before other high priority handlers such as filesystems e.g. ZFS. This meant the iscsi sessions where removed before the ZFS geom consumer was closed, resulting in a panic from g_access calls on debug kernels due to negative acr. Instead use the same as the old iscsi_initiator SHUTDOWN_PRI_DEFAULT-1 which allows it to run before dashutdown etc but after filesystems. MFC after: 2 weeks Sponsored by: Multiplay Modified: head/sys/dev/iscsi/iscsi.c Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Sun Dec 6 21:31:09 2015 (r291910) +++ head/sys/dev/iscsi/iscsi.c Mon Dec 7 02:56:08 2015 (r291911) @@ -2365,7 +2365,7 @@ iscsi_load(void) sc->sc_cdev->si_drv1 = sc; sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_pre_sync, - iscsi_shutdown, sc, SHUTDOWN_PRI_FIRST); + iscsi_shutdown, sc, SHUTDOWN_PRI_DEFAULT-1); return (0); }