From owner-freebsd-bugs Tue Oct 9 9:30: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 13D1F37B406 for ; Tue, 9 Oct 2001 09:30:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f99GU1S21023; Tue, 9 Oct 2001 09:30:01 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C6B1737B407 for ; Tue, 9 Oct 2001 09:25:16 -0700 (PDT) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f99GPGb20474; Tue, 9 Oct 2001 09:25:16 -0700 (PDT) (envelope-from nobody) Message-Id: <200110091625.f99GPGb20474@freefall.freebsd.org> Date: Tue, 9 Oct 2001 09:25:16 -0700 (PDT) From: Brad Laue To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/31166: smbfs.ko module loads when compiled in, causes panic Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 31166 >Category: kern >Synopsis: smbfs.ko module loads when compiled in, causes panic >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 09 09:30:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Brad Laue >Release: 4.4-STABLE >Organization: brad-x.com >Environment: FreeBSD Odyssey.brad-x.com 4.4-STABLE FreeBSD 4.4-STABLE #0: Sun Oct 7 00:39:55 EDT 2001 root@Odyssey.brad-x.com:/usr/src/sys/compile/HAVEN i386 >Description: If the following are compiled into the kernel: options NETSMB #SMB/CIFS requester options NETSMBCRYPTO #encrypted password support for SMB # mchain library. It can be either loaded as KLD or compiled into kernel options LIBMCHAIN #mbuf management library options LIBICONV mount_smbfs will load smbfs.ko, and any attempt to unload this module will panic the system with a fatal trap If this is added: options SMBFS It is possible to load the smbfs.ko module anyway, generating seven lines worth of error messaging reading like so: module_register: module dev_netsmb already exists! linker_file_sysinit: "smbfs.ko" failed to register! 17 module_register: module smbfs already exists! linker_file_sysinit: "smbfs.ko" failed to register! 17 WARNING: "nsmb" is usurping "nsmb"'s cdevsw[] netsmb_dev: loaded module_register_init: MOD_LOAD (smbfs, c016ebfc, 0xc3c46b00) error 17 kldstat shows smbfs.ko loaded. kldunload smbfs.ko will now crash the system. >How-To-Repeat: 1) Add the following to a kernel: options NETSMB #SMB/CIFS requester options NETSMBCRYPTO #encrypted password support for SMB # mchain library. It can be either loaded as KLD or compiled into kernel options LIBMCHAIN #mbuf management library options LIBICONV reboot, mount a windows share, and attempt to unload the smbfs.ko module. Panic is immediate 2) Add "options SMBFS", and recompile; reboot kldload smbfs.ko, kldunload smbfs.ko, panic is immediate. >Fix: The best workaround is not to ever attempt unloading the smbfs.ko module, and to include SMBFS in the kernel itself. This is not however a fix. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message