Commit e5a92362 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
  fuse: invalidate target of rename
  fuse: fix kunmap in fuse_ioctl_copy_user
  fuse: prevent fuse_put_request on invalid pointer
parents 4397989f 5219f346
...@@ -712,8 +712,10 @@ static int fuse_rename(struct inode *olddir, struct dentry *oldent, ...@@ -712,8 +712,10 @@ static int fuse_rename(struct inode *olddir, struct dentry *oldent,
fuse_invalidate_attr(newdir); fuse_invalidate_attr(newdir);
/* newent will end up negative */ /* newent will end up negative */
if (newent->d_inode) if (newent->d_inode) {
fuse_invalidate_attr(newent->d_inode);
fuse_invalidate_entry_cache(newent); fuse_invalidate_entry_cache(newent);
}
} else if (err == -EINTR) { } else if (err == -EINTR) {
/* If request was interrupted, DEITY only knows if the /* If request was interrupted, DEITY only knows if the
rename actually took place. If the invalidation rename actually took place. If the invalidation
......
...@@ -1063,7 +1063,8 @@ ssize_t fuse_direct_io(struct file *file, const char __user *buf, ...@@ -1063,7 +1063,8 @@ ssize_t fuse_direct_io(struct file *file, const char __user *buf,
break; break;
} }
} }
fuse_put_request(fc, req); if (!IS_ERR(req))
fuse_put_request(fc, req);
if (res > 0) if (res > 0)
*ppos = pos; *ppos = pos;
...@@ -1599,7 +1600,7 @@ static int fuse_ioctl_copy_user(struct page **pages, struct iovec *iov, ...@@ -1599,7 +1600,7 @@ static int fuse_ioctl_copy_user(struct page **pages, struct iovec *iov,
kaddr += copy; kaddr += copy;
} }
kunmap(map); kunmap(page);
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment