Date: Tue, 2 Sep 2008 07:41:05 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: Vladimir Grebenschikov <vova@fbsd.ru> Cc: Attilio Rao <attilio@FreeBSD.org>, 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 Message-ID: <alpine.BSF.1.10.0809020739390.1150@fledge.watson.org> In-Reply-To: <1220333613.6499.5.camel@localhost> References: <200808281530.m7SFU3h7013986@repoman.freebsd.org> <1220333613.6499.5.camel@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <giovanni dot trematerra at gmail dot com> > > --- 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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.1.10.0809020739390.1150>