Skip to content

Commit

Permalink
Merge tag '9p-for-5.4' of git://github.com/martinetd/linux
Browse files Browse the repository at this point in the history
Pull 9p updates from Dominique Martinet:
 "Some of the usual small fixes and cleanup.

  Small fixes all around:
   - avoid overlayfs copy-up for PRIVATE mmaps
   - KUMSAN uninitialized warning for transport error
   - one syzbot memory leak fix in 9p cache
   - internal API cleanup for v9fs_fill_super"

* tag '9p-for-5.4' of git://github.com/martinetd/linux:
  9p/vfs_super.c: Remove unused parameter data in v9fs_fill_super
  9p/cache.c: Fix memory leak in v9fs_cache_session_get_cookie
  9p: Transport error uninitialized
  9p: avoid attaching writeback_fid on mmap with type PRIVATE
  • Loading branch information
torvalds committed Sep 27, 2019
2 parents 568d850 + aafee43 commit 9977b1a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions fs/9p/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ void v9fs_cache_session_get_cookie(struct v9fs_session_info *v9ses)
if (!v9ses->cachetag) {
if (v9fs_random_cachetag(v9ses) < 0) {
v9ses->fscache = NULL;
kfree(v9ses->cachetag);
v9ses->cachetag = NULL;
return;
}
}
Expand Down
3 changes: 3 additions & 0 deletions fs/9p/vfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ v9fs_mmap_file_mmap(struct file *filp, struct vm_area_struct *vma)
v9inode = V9FS_I(inode);
mutex_lock(&v9inode->v_mutex);
if (!v9inode->writeback_fid &&
(vma->vm_flags & VM_SHARED) &&
(vma->vm_flags & VM_WRITE)) {
/*
* clone a fid and add it to writeback_fid
Expand Down Expand Up @@ -614,6 +615,8 @@ static void v9fs_mmap_vm_close(struct vm_area_struct *vma)
(vma->vm_end - vma->vm_start - 1),
};

if (!(vma->vm_flags & VM_SHARED))
return;

p9_debug(P9_DEBUG_VFS, "9p VMA close, %p, flushing", vma);

Expand Down
4 changes: 2 additions & 2 deletions fs/9p/vfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static int v9fs_set_super(struct super_block *s, void *data)

static int
v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses,
int flags, void *data)
int flags)
{
int ret;

Expand Down Expand Up @@ -132,7 +132,7 @@ static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags,
retval = PTR_ERR(sb);
goto clunk_fid;
}
retval = v9fs_fill_super(sb, v9ses, flags, data);
retval = v9fs_fill_super(sb, v9ses, flags);
if (retval)
goto release_sb;

Expand Down
1 change: 1 addition & 0 deletions net/9p/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ p9_tag_alloc(struct p9_client *c, int8_t type, unsigned int max_size)

p9pdu_reset(&req->tc);
p9pdu_reset(&req->rc);
req->t_err = 0;
req->status = REQ_STATUS_ALLOC;
init_waitqueue_head(&req->wq);
INIT_LIST_HEAD(&req->req_list);
Expand Down

0 comments on commit 9977b1a

Please sign in to comment.