From owner-freebsd-hackers Sun Nov 24 3:57:53 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C68A137B401; Sun, 24 Nov 2002 03:57:49 -0800 (PST) Received: from angelica.unixdaemons.com (angelica.unixdaemons.com [209.148.64.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6746A43E88; Sun, 24 Nov 2002 03:57:48 -0800 (PST) (envelope-from hiten@angelica.unixdaemons.com) Received: from angelica.unixdaemons.com (hiten@localhost.unixdaemons.com [127.0.0.1]) by angelica.unixdaemons.com (8.12.5/8.12.1) with ESMTP id gAOBvjU9031402; Sun, 24 Nov 2002 06:57:45 -0500 (EST) X-Authentication-Warning: angelica.unixdaemons.com: Host hiten@localhost.unixdaemons.com [127.0.0.1] claimed to be angelica.unixdaemons.com Received: (from hiten@localhost) by angelica.unixdaemons.com (8.12.5/8.12.1/Submit) id gAOBvi1n031401; Sun, 24 Nov 2002 06:57:44 -0500 (EST) (envelope-from hiten) Date: Sun, 24 Nov 2002 06:57:44 -0500 From: Hiten Pandya To: freebsd-hackers@FreeBSD.org Cc: bp@FreeBSD.org Subject: SMBFS uses incorrect field for process identification. Message-ID: <20021124065744.B29384@angelica.unixdaemons.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="YZ5djTAD1cGYuMQK" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-Operating-System: FreeBSD i386 X-Public-Key: http://www.pittgoth.com/~hiten/pubkey.asc X-URL: http://www.unixdaemons.com/~hiten X-PGP: http://pgp.mit.edu:11371/pks/lookup?search=Hiten+Pandya&op=index Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello there. The SMBFS build fails miserably, if SMB_VNODE_DEBUG is defined. It fails in smbfs_vnops.c, line 255. Only in -CURRENT. This is, because it enquires the wrong / inexistent field (struct thread)->td_pid. I am submitting a teeny weeny delta, which changes this, to use the correct field, which is: (struct thread)->td_proc->p_pid. You can get justification for this, by: # cd /sys/fs/smbfs # cvs log -r1.13 smbfs_vnops.c ---------------------------- revision 1.13 date: 2001/12/02 08:56:58; author: bp; state: Exp; lines: +66 -65 Catch up with KSE changes. Submitted by: Max Khon ---------------------------- # cvs diff -u -r1.12 -r1.13 smbfs_vnops.c %-- (extract from the diff) - SMBVDEBUG("name=%s, pid=%d, c=%d\n",np->n_name, p->p_pid, np->n_opencount); + SMBVDEBUG("name=%s, pid=%d, c=%d\n",np->n_name, td->td_pid, np->n_opencount); --% Fix is attached. I have tested it with build/ and it works. Debug extract: "smbfs_closel: name=TheRooT, pid=927, c=1" Cheers. -- Hiten Pandya (hiten@unixdaemons.com, hiten@uk.FreeBSD.org) http://www.unixdaemons.com/~hiten/ --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="smbfs_vnops.c.patch" Index: smbfs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/smbfs/smbfs_vnops.c,v retrieving revision 1.24 diff -u -r1.24 smbfs_vnops.c --- smbfs_vnops.c 2002/09/26 14:07:43 1.24 +++ smbfs_vnops.c 2002/11/24 11:43:06 @@ -252,7 +252,7 @@ struct vattr vattr; int error; - SMBVDEBUG("name=%s, pid=%d, c=%d\n",np->n_name, td->td_pid, np->n_opencount); + SMBVDEBUG("name=%s, pid=%d, c=%d\n",np->n_name, td->td_proc->p_pid, np->n_opencount); smb_makescred(&scred, td, ap->a_cred); --YZ5djTAD1cGYuMQK-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message