From owner-svn-src-head@freebsd.org Fri Dec 18 14:10:01 2015 Return-Path: Delivered-To: svn-src-head@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 6EA0CA4AAB1; Fri, 18 Dec 2015 14:10:01 +0000 (UTC) (envelope-from imp@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 3CE221BA5; Fri, 18 Dec 2015 14:10:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBIEA0N6099701; Fri, 18 Dec 2015 14:10:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBIEA0FD099700; Fri, 18 Dec 2015 14:10:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201512181410.tBIEA0FD099700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 18 Dec 2015 14:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292436 - head/sys/geom/sched X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Dec 2015 14:10:01 -0000 Author: imp Date: Fri Dec 18 14:10:00 2015 New Revision: 292436 URL: https://svnweb.freebsd.org/changeset/base/292436 Log: It turns out that it's OK to sleep in this context, so use M_WAITOK for the softc for the delay module. Noticed by: rpokala@ Modified: head/sys/geom/sched/gs_delay.c Modified: head/sys/geom/sched/gs_delay.c ============================================================================== --- head/sys/geom/sched/gs_delay.c Fri Dec 18 11:20:50 2015 (r292435) +++ head/sys/geom/sched/gs_delay.c Fri Dec 18 14:10:00 2015 (r292436) @@ -201,8 +201,7 @@ g_delay_init(struct g_geom *geom) { struct g_delay_softc *sc; - /* XXX check whether we can sleep */ - sc = malloc(sizeof *sc, M_GEOM_SCHED, M_NOWAIT | M_ZERO); + sc = malloc(sizeof *sc, M_GEOM_SCHED, M_WAITOK | M_ZERO); sc->sc_geom = geom; bioq_init(&sc->sc_bioq); callout_init(&sc->sc_wait, CALLOUT_MPSAFE);