svn commit: r347482 - stable/11/sys/fs/fuse
Alan Somers
asomers at FreeBSD.org
Sat May 11 03:41:59 UTC 2019
Author: asomers
Date: Sat May 11 03:41:58 2019
New Revision: 347482
URL: https://svnweb.freebsd.org/changeset/base/347482
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 at plan-b.pwste.edu.pl>
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19836
Modified:
stable/11/sys/fs/fuse/fuse_vfsops.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/fs/fuse/fuse_vfsops.c
==============================================================================
--- stable/11/sys/fs/fuse/fuse_vfsops.c Sat May 11 03:39:34 2019 (r347481)
+++ stable/11/sys/fs/fuse/fuse_vfsops.c Sat May 11 03:41:58 2019 (r347482)
@@ -215,7 +215,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;
@@ -355,7 +355,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
More information about the svn-src-all
mailing list