Date: Thu, 24 Apr 2003 11:30:17 -0600 (MDT) From: Steve M Passe <smp@timing.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/51389: smbfs fails to work on SMP kernels. Message-ID: <200304241730.h3OHUHE9087777@RoadRunner.timing.com> Resent-Message-ID: <200304241740.h3OHeJO0011589@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 51389 >Category: kern >Synopsis: smbfs fails to work on SMP kernels. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 24 10:40:19 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Steve M Passe >Release: FreeBSD 4.8-RC i386 >Organization: Timing Solutions Corp. >Environment: System: FreeBSD 4.8-RC FreeBSD 4.8-RC #0: Wed Mar 5 11:15:07 MST 2003 /usr/src/sys/compile/LOCAL_MP i386 $FreeBSD: src/sys/netsmb/smb_subr.c,v 1.1.2.2 2001/09/03 08:55:11 bp Exp $ >Description: The function smb_checksmp() contains the following lines, causing smbfs to fail on an SMP enabled kernel: #ifndef SMP if (ncpu > 1) { printf("error: module compiled without SMP support\n"); return EPERM; } #else if (ncpu < 2) { printf("warning: only one CPU active on in SMP kernel ?\n"); } #endif Specifically, the define of 'SMP' found in opt_global.h doesn't appear to be passed thru to kmod builds. The "#ifndef SMP" path is compiled, ncpu is found to be greater than 1 at runtime, and EPERM is returned. >How-To-Repeat: Build an SMP enabled kernel/modules with smbfs.ko, attempt to mount an SMB file system. >Fix: Either arrange for module builds to get opt_global.h included in their builds, or drop the need for smbfs to care about SMP/UP. I defined 'SMP' one line above the offending lines, rebuilt smbfs.ko, and have been using it for several days now without problem. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304241730.h3OHUHE9087777>