From owner-cvs-src@FreeBSD.ORG Tue Sep 2 06:13:14 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 7598D1065696; Tue, 2 Sep 2008 06:13:14 +0000 (UTC) (envelope-from vova@sw.ru) Received: from relay.sw.ru (mailhub.sw.ru [195.214.232.25]) by mx1.freebsd.org (Postfix) with ESMTP id 27ECC8FC12; Tue, 2 Sep 2008 06:13:12 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vbook.fbsd.ru ([10.30.1.111]) (authenticated bits=0) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id m825XZHl027532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Sep 2008 09:33:36 +0400 (MSD) Received: from vova by vbook.fbsd.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KaOWE-0001qf-FM; Tue, 02 Sep 2008 09:33:34 +0400 From: Vladimir Grebenschikov To: Attilio Rao In-Reply-To: <200808281530.m7SFU3h7013986@repoman.freebsd.org> References: <200808281530.m7SFU3h7013986@repoman.freebsd.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Tue, 02 Sep 2008 09:33:33 +0400 Message-Id: <1220333613.6499.5.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, amistry@am-productions.biz, cvs-all@FreeBSD.org Subject: Re: cvs commit: VOP_ATTRIB ... and sysutils/fusefs-kmod 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: Tue, 02 Sep 2008 06:13:14 -0000 On Thu, 2008-08-28 at 15:23 +0000, Attilio Rao wrote: > attilio 2008-08-28 15:23:18 UTC This patch makes CURRENT with Gnome badly crash (just crash while starting Gnome). I've found that it is due to ABI change, and tried to rebuild fusefs-kmod - it just fails due to changed interface. Patch below fixes problem for me. (but I still does not completely sure about td = curthread) Please fix fusefs-kmod port also. Side question, is there any way to prevent loading of kmod's with broken ABI ? > FreeBSD src repository > > Modified files: > share/man/man9 VOP_ATTRIB.9 ... > Log: > SVN rev 182371 on 2008-08-28 15:23:18Z by attilio > > Decontextualize the couplet VOP_GETATTR / VOP_SETATTR as the passed thread > was always curthread and totally unuseful. > > Tested by: Giovanni Trematerra --- fuse_module/fuse_vfsops.c.orig 2008-09-02 09:16:27.000000000 +0400 +++ fuse_module/fuse_vfsops.c 2008-09-02 09:16:50.000000000 +0400 @@ -668,7 +668,7 @@ if (vp->v_type == VNON) { struct vattr va; - (void)VOP_GETATTR(vp, &va, td->td_ucred, td); + (void)VOP_GETATTR(vp, &va, td->td_ucred); } *vpp = vp; #if _DEBUG2G --- fuse_module/fuse_vnops.c.orig 2008-09-02 09:17:32.000000000 +0400 +++ fuse_module/fuse_vnops.c 2008-09-02 09:21:02.000000000 +0400 @@ -799,7 +799,7 @@ struct vnode *vp = ap->a_vp; struct vattr *vap = ap->a_vap; struct ucred *cred = ap->a_cred; - struct thread *td = ap->a_td; + struct thread *td = curthread; struct fuse_dispatcher fdi; struct timespec uptsp; @@ -946,7 +946,7 @@ /* We are to do the check in-kernel */ if (! (facp->facc_flags & FACCESS_VA_VALID)) { - err = VOP_GETATTR(vp, VTOVA(vp), cred, td); + err = VOP_GETATTR(vp, VTOVA(vp), cred); if (err) return (err); facp->facc_flags |= FACCESS_VA_VALID; @@ -3005,7 +3005,7 @@ struct vattr *vap = ap->a_vap; struct vnode *vp = ap->a_vp; struct ucred *cred = ap->a_cred; - struct thread *td = ap->a_td; + struct thread *td = curthread; int err = 0; struct fuse_dispatcher fdi; --- fuse_module/fuse_io.c.orig 2008-09-02 09:21:25.000000000 +0400 +++ fuse_module/fuse_io.c 2008-09-02 09:21:49.000000000 +0400 @@ -157,7 +157,7 @@ goto out; if (uio->uio_rw == UIO_WRITE && fp->f_flag & O_APPEND) { - if ((err = VOP_GETATTR(vp, &va, cred, td))) + if ((err = VOP_GETATTR(vp, &va, cred))) goto out; uio->uio_offset = va.va_size; } else if ((flags & FOF_OFFSET) == 0) @@ -823,7 +823,7 @@ #if FUSELIB_CONFORM_BIOREAD struct vattr va; - if ((err = VOP_GETATTR(vp, &va, cred, curthread))) + if ((err = VOP_GETATTR(vp, &va, cred))) goto out; #endif -- Vladimir B. Grebenschikov vova@fbsd.ru