Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d3553a52 authored by Takuya Yoshikawa's avatar Takuya Yoshikawa Committed by Michael S. Tsirkin
Browse files

vhost-net: fix to check the return value of copy_to/from_user() correctly



copy_to/from_user() returns the number of bytes that could not be copied.

So we need to check if it is not zero, and in that case, we should return
the error number -EFAULT rather than directly return the return value from
copy_to/from_user().

Signed-off-by: default avatarTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 7ad9c9d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment