X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=fs%2Ffhandle.c;h=d59712dfa3e701e86ff53609308e813cf8acf69e;hb=c24a26eb3845f8f86a3db9b1237aecf62f42ff98;hp=999ff5c3cab0edacd585447132180d5c35554e3c;hpb=c157750a901d767ecb95f1dbabd0972dee396b1e;p=firefly-linux-kernel-4.4.55.git diff --git a/fs/fhandle.c b/fs/fhandle.c index 999ff5c3cab0..d59712dfa3e7 100644 --- a/fs/fhandle.c +++ b/fs/fhandle.c @@ -195,8 +195,9 @@ static int handle_to_path(int mountdirfd, struct file_handle __user *ufh, goto out_err; } /* copy the full handle */ - if (copy_from_user(handle, ufh, - sizeof(struct file_handle) + + *handle = f_handle; + if (copy_from_user(&handle->f_handle, + &ufh->f_handle, f_handle.handle_bytes)) { retval = -EFAULT; goto out_handle;