diff options
author | Jean-Pierre André <jpandre@users.sourceforge.net> | 2012-08-22 10:00:22 +0200 |
---|---|---|
committer | Jean-Pierre André <jpandre@users.sourceforge.net> | 2012-08-22 10:00:22 +0200 |
commit | dc34383d0dae60435470bc74fb3b3382fcc3d9a5 (patch) | |
tree | 73ba77ed72a8305d6f80015dd3548dc5865c6dea | |
parent | ad43d9b576213da888caf8d8960747942d114f76 (diff) | |
download | illumos-fusefs-dc34383d0dae60435470bc74fb3b3382fcc3d9a5.tar.gz |
Defended against a wrong condition
-rw-r--r-- | kernel/fuse_vnops.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/fuse_vnops.c b/kernel/fuse_vnops.c index 7a7be25..3413040 100644 --- a/kernel/fuse_vnops.c +++ b/kernel/fuse_vnops.c @@ -618,6 +618,13 @@ get_filehandle(struct vnode *vp, int flag, struct cred *credp, fh_param.credp = credp; fh_param.rw_mode = flag; fh_param.fufh = NULL; + if (!VTOFD(vp)) { + /* + * Very bad : do not panic. + */ + err = ENODEV; + goto out; + } /* * Check if we already have retrieved the file handle * from user space before |