Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Sep 2019 14:06:09 -0000
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r345814 - projects/fuse2/sys/fs/fuse
Message-ID:  <201904021920.x32JKts3058255@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Tue Apr  2 19:20:55 2019
New Revision: 345814
URL: https://svnweb.freebsd.org/changeset/base/345814

Log:
  fusefs: fix a just-introduced panic in readdir
  
  r345808 changed the interface of fuse_filehandle_open, but failed to update
  one caller.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/fuse2/sys/fs/fuse/fuse_vnops.c

Modified: projects/fuse2/sys/fs/fuse/fuse_vnops.c
==============================================================================
--- projects/fuse2/sys/fs/fuse/fuse_vnops.c	Tue Apr  2 19:08:06 2019	(r345813)
+++ projects/fuse2/sys/fs/fuse/fuse_vnops.c	Tue Apr  2 19:20:55 2019	(r345814)
@@ -1320,7 +1320,11 @@ fuse_vnop_readdir(struct vop_readdir_args *ap)
 	if ((err = fuse_filehandle_get_dir(vp, &fufh, cred, pid)) != 0) {
 		SDT_PROBE2(fuse, , vnops, trace, 1,
 			"calling readdir() before open()");
-		err = fuse_filehandle_open(vp, O_RDONLY, &fufh, NULL, cred);
+		/* 
+		 * This was seen to happen in getdirentries as used by
+		 * shells/fish, but I can't reproduce it.
+		 */
+		err = fuse_filehandle_open(vp, FREAD, &fufh, NULL, cred);
 		freefufh = 1;
 	}
 	if (err) {





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904021920.x32JKts3058255>