From owner-freebsd-bugs@FreeBSD.ORG Thu Apr 24 10:40:20 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC43A37B401 for ; Thu, 24 Apr 2003 10:40:20 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC82843FBD for ; Thu, 24 Apr 2003 10:40:19 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h3OHeJUp011593 for ; Thu, 24 Apr 2003 10:40:19 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h3OHeJO0011589; Thu, 24 Apr 2003 10:40:19 -0700 (PDT) Resent-Date: Thu, 24 Apr 2003 10:40:19 -0700 (PDT) Resent-Message-Id: <200304241740.h3OHeJO0011589@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Steve M Passe Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E5E137B405 for ; Thu, 24 Apr 2003 10:30:19 -0700 (PDT) Received: from Daffy.timing.com (daffy.timing.com [206.168.13.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 81AF543F3F for ; Thu, 24 Apr 2003 10:30:18 -0700 (PDT) (envelope-from smp@timing.com) Received: from RoadRunner.timing.com (roadrunner.timing.com [206.168.13.190]) by Daffy.timing.com (8.11.3/8.11.3) with ESMTP id h3OHUIH09941 for ; Thu, 24 Apr 2003 11:30:18 -0600 (MDT) (envelope-from smp@timing.com) Received: from RoadRunner.timing.com (localhost.timing.com [127.0.0.1]) by RoadRunner.timing.com (8.12.8/8.12.6) with ESMTP id h3OHUHeO087778 for ; Thu, 24 Apr 2003 11:30:17 -0600 (MDT) (envelope-from smp@RoadRunner.timing.com) Received: (from smp@localhost) by RoadRunner.timing.com (8.12.8/8.12.8/Submit) id h3OHUHE9087777; Thu, 24 Apr 2003 11:30:17 -0600 (MDT) Message-Id: <200304241730.h3OHUHE9087777@RoadRunner.timing.com> Date: Thu, 24 Apr 2003 11:30:17 -0600 (MDT) From: Steve M Passe To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/51389: smbfs fails to work on SMP kernels. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Steve M Passe List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2003 17:40:21 -0000 >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: