From owner-svn-src-stable-10@freebsd.org Mon Jan 11 19:59:57 2016 Return-Path: Delivered-To: svn-src-stable-10@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 7F6AFA6B6AC; Mon, 11 Jan 2016 19:59:57 +0000 (UTC) (envelope-from trasz@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 458051C00; Mon, 11 Jan 2016 19:59:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0BJxuXu075963; Mon, 11 Jan 2016 19:59:56 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0BJxujQ075962; Mon, 11 Jan 2016 19:59:56 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201601111959.u0BJxujQ075962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 11 Jan 2016 19:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r293688 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2016 19:59:57 -0000 Author: trasz Date: Mon Jan 11 19:59:56 2016 New Revision: 293688 URL: https://svnweb.freebsd.org/changeset/base/293688 Log: MFC r289111: Provide better debug message on kernel module name clash. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/kern/kern_module.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_module.c ============================================================================== --- stable/10/sys/kern/kern_module.c Mon Jan 11 19:36:44 2016 (r293687) +++ stable/10/sys/kern/kern_module.c Mon Jan 11 19:59:56 2016 (r293688) @@ -158,16 +158,12 @@ module_register(const moduledata_t *data newmod = module_lookupbyname(data->name); if (newmod != NULL) { MOD_XUNLOCK; - printf("module_register: module %s already exists!\n", - data->name); + printf("%s: cannot register %s from %s; already loaded from %s\n", + __func__, data->name, container->filename, newmod->file->filename); return (EEXIST); } namelen = strlen(data->name) + 1; newmod = malloc(sizeof(struct module) + namelen, M_MODULE, M_WAITOK); - if (newmod == NULL) { - MOD_XUNLOCK; - return (ENOMEM); - } newmod->refs = 1; newmod->id = nextid++; newmod->name = (char *)(newmod + 1);