Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2000 11:34:40 +0900
From:      Makoto MATSUSHITA <matusita@jp.FreeBSD.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/21405: PATCH: Default module patch mismatch between kernel and loader(8)
Message-ID:  <20000920113440T.matusita@jp.FreeBSD.org>

next in thread | raw e-mail | index | archive | help

>Number:         21405
>Category:       kern
>Synopsis:       Default module patch mismatch between kernel and loader(8)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 19 19:40:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Makoto MATSUSHITA
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
Japan FreeBSD Users' Group
>Environment:

	5.0-CURRENT as of Sep/19/2000

>Description:

	Default module path of loader(8) is changed a few days before,
	however, module path of kernel (shown as 'kern.module_path' MIB)
	is not changed yet.

	This should cause a problem, if a user upgrades their old
	-current box to the latest, and forget to remove /modules
	directory.

	Typical example is 'mfs' module. If a kernel does not have MFS
	feature, kernel try to load a mfs.ko module (this is easily
	happen if your /etc/fstab has 'mfs' entry). However, if
	/modules/mfs.ko exists, it is used instead of /boot/kernel/mfs.ko.

>How-To-Repeat:

	(Left old /modules/*.ko, then)
	kldload your_favorite_module_name

>Fix:
	
Change default module_path, to sync with src/sys/boot/loader.conf.

Index: kern_linker.c
===================================================================
RCS file: /usr/site/FreeBSD/ncvs/src/sys/kern/kern_linker.c,v
retrieving revision 1.51
diff -c -r1.51 kern_linker.c
*** kern_linker.c	2000/09/06 06:22:20	1.51
--- kern_linker.c	2000/09/20 02:24:29
***************
*** 1168,1174 ****
   * character as a separator to be consistent with the bootloader.
   */
  
! static char linker_path[MAXPATHLEN] = "/boot/modules/;/modules/;/boot/kernel/";
  
  SYSCTL_STRING(_kern, OID_AUTO, module_path, CTLFLAG_RW, linker_path,
  	      sizeof(linker_path), "module load search path");
--- 1168,1174 ----
   * character as a separator to be consistent with the bootloader.
   */
  
! static char linker_path[MAXPATHLEN] = "/boot/kernel/;/boot/modules/;/modules/;";
  
  SYSCTL_STRING(_kern, OID_AUTO, module_path, CTLFLAG_RW, linker_path,
  	      sizeof(linker_path), "module load search path");

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000920113440T.matusita>