Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Sep 2008 09:33:33 +0400
From:      Vladimir Grebenschikov <vova@fbsd.ru>
To:        Attilio Rao <attilio@FreeBSD.org>
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
Message-ID:  <1220333613.6499.5.camel@localhost>
In-Reply-To: <200808281530.m7SFU3h7013986@repoman.freebsd.org>
References:  <200808281530.m7SFU3h7013986@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <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?1220333613.6499.5.camel>