Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Sep 2019 18:08:14 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r351945 - stable/12/sys/fs/fuse
Message-ID:  <201909061808.x86I8Euc012971@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Fri Sep  6 18:08:13 2019
New Revision: 351945
URL: https://svnweb.freebsd.org/changeset/base/351945

Log:
  MFC r345986:
  
  fusefs: fix a panic on mount
  
  Don't page fault if the file descriptor provided with "-o fd" is invalid.
  This is a merge of r345419 from the projects/fuse2 branch.
  
  Reviewed by:	ngie
  Tested by:	Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
  Sponsored by: The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D19836

Modified:
  stable/12/sys/fs/fuse/fuse_vfsops.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/fs/fuse/fuse_vfsops.c
==============================================================================
--- stable/12/sys/fs/fuse/fuse_vfsops.c	Fri Sep  6 18:02:58 2019	(r351944)
+++ stable/12/sys/fs/fuse/fuse_vfsops.c	Fri Sep  6 18:08:13 2019	(r351945)
@@ -225,7 +225,7 @@ fuse_vfsop_mount(struct mount *mp)
 	size_t len;
 
 	struct cdev *fdev;
-	struct fuse_data *data;
+	struct fuse_data *data = NULL;
 	struct thread *td;
 	struct file *fp, *fptmp;
 	char *fspec, *subtype;
@@ -361,7 +361,7 @@ fuse_vfsop_mount(struct mount *mp)
 out:
 	if (err) {
 		FUSE_LOCK();
-		if (data->mp == mp) {
+		if (data != NULL && data->mp == mp) {
 			/*
 			 * Destroy device only if we acquired reference to
 			 * it



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