From owner-cvs-src@FreeBSD.ORG Fri Jan 11 23:57:40 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87A7F16A41B; Fri, 11 Jan 2008 23:57:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 854F413C447; Fri, 11 Jan 2008 23:57:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0BNvexr034650; Fri, 11 Jan 2008 23:57:40 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0BNve3Z034649; Fri, 11 Jan 2008 23:57:40 GMT (envelope-from jhb) Message-Id: <200801112357.m0BNve3Z034649@repoman.freebsd.org> From: John Baldwin Date: Fri, 11 Jan 2008 23:57:40 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/nfsclient nfs_socket.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2008 23:57:40 -0000 jhb 2008-01-11 23:57:40 UTC FreeBSD src repository Modified files: sys/nfsclient nfs_socket.c Log: The previous revision broke the case of reconnecting to a TCP NFS server via a new socket during an NFS operation as that reconnect takes place in the context of an arbitrary thread with an arbitrary credential. Ideally we would like to use the mount point's credential for the entire process of setting up the socket to connect to the NFS server. Since some of the APIs (sobind(), etc.) only take a thread pointer and infer the credential from that instead of a direct credential, work around the problem by temporarily changing the current thread's credential to that of the mount point while connecting the socket and then reverting back to the original credential when we are done. Reviewed by: rwatson Tested on: UDP, TCP, TCP with forced reconnect Revision Changes Path 1.157 +22 -1 src/sys/nfsclient/nfs_socket.c