From owner-cvs-all@FreeBSD.ORG Tue Sep 2 06:41:07 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DF93106566C; Tue, 2 Sep 2008 06:41:07 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2DA7B8FC24; Tue, 2 Sep 2008 06:41:07 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 236AD46C0D; Tue, 2 Sep 2008 02:41:05 -0400 (EDT) Date: Tue, 2 Sep 2008 07:41:05 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Vladimir Grebenschikov In-Reply-To: <1220333613.6499.5.camel@localhost> Message-ID: References: <200808281530.m7SFU3h7013986@repoman.freebsd.org> <1220333613.6499.5.camel@localhost> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Cc: Attilio Rao , 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-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2008 06:41:07 -0000 On Tue, 2 Sep 2008, Vladimir Grebenschikov wrote: > 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 > ? 8-CURRENT kernels should reject old modules from loading unless __FreeBSD_version hasn't been bumped. And indeed, it looks like this change did not come with a __FreeBSD_version bump, which it should have as a non-trivial change to the kernel KPI and KBI. Robert N M Watson Computer Laboratory University of Cambridge > >> 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 >