From owner-svn-src-all@FreeBSD.ORG Sat Jun 12 13:21:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44AEB106566C; Sat, 12 Jun 2010 13:21:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 349578FC18; Sat, 12 Jun 2010 13:21:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5CDLQSf010404; Sat, 12 Jun 2010 13:21:26 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5CDLQd5010402; Sat, 12 Jun 2010 13:21:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201006121321.o5CDLQd5010402@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 12 Jun 2010 13:21:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209105 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 12 Jun 2010 13:21:26 -0000 Author: kib Date: Sat Jun 12 13:21:25 2010 New Revision: 209105 URL: http://svn.freebsd.org/changeset/base/209105 Log: When make_dev_credf(MAKEDEV_WAITOK) is called, use devctl_notify_f(M_WAITOK) for devfs notifications. Suggested by: jh Reviewed by: imp, jh MFC after: 3 weeks Modified: head/sys/kern/kern_conf.c Modified: head/sys/kern/kern_conf.c ============================================================================== --- head/sys/kern/kern_conf.c Sat Jun 12 13:20:38 2010 (r209104) +++ head/sys/kern/kern_conf.c Sat Jun 12 13:21:25 2010 (r209105) @@ -509,18 +509,18 @@ notify(struct cdev *dev, const char *ev, { static const char prefix[] = "cdev="; char *data; - int namelen; + int namelen, mflags; if (cold) return; + mflags = (flags & MAKEDEV_NOWAIT) ? M_NOWAIT : M_WAITOK; namelen = strlen(dev->si_name); - data = malloc(namelen + sizeof(prefix), M_TEMP, - (flags & MAKEDEV_NOWAIT) ? M_NOWAIT : M_WAITOK); + data = malloc(namelen + sizeof(prefix), M_TEMP, mflags); if (data == NULL) return; memcpy(data, prefix, sizeof(prefix) - 1); memcpy(data + sizeof(prefix) - 1, dev->si_name, namelen + 1); - devctl_notify("DEVFS", "CDEV", ev, data); + devctl_notify_f("DEVFS", "CDEV", ev, data, mflags); free(data, M_TEMP); }