aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/macvtap.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-02-24 12:03:18 +0800
committerAlex Shi <alex.shi@linaro.org>2017-02-24 12:03:18 +0800
commitaedb4a24b9ae4fbd6ced45ae64ae3d84b423f5c2 (patch)
tree222bb3ce7eb552c8f92bd836bb0b9dcad0020cb3 /drivers/net/macvtap.c
parent332efa4adbb90f2e335a405504fdfa6c1469701e (diff)
parentf1924ac09c968c94c922b723979d344b8ff106cd (diff)
downloadlinux-linaro-stable-aedb4a24b9ae4fbd6ced45ae64ae3d84b423f5c2.tar.gz
Merge tag 'v4.4.51' into linux-linaro-lsk-v4.4
This is the 4.4.51 stable release
Diffstat (limited to 'drivers/net/macvtap.c')
-rw-r--r--drivers/net/macvtap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 159a68782bec..79de9608ac48 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -725,7 +725,7 @@ static ssize_t macvtap_get_user(struct macvtap_queue *q, struct msghdr *m,
ssize_t n;
if (q->flags & IFF_VNET_HDR) {
- vnet_hdr_len = q->vnet_hdr_sz;
+ vnet_hdr_len = READ_ONCE(q->vnet_hdr_sz);
err = -EINVAL;
if (len < vnet_hdr_len)
@@ -865,7 +865,7 @@ static ssize_t macvtap_put_user(struct macvtap_queue *q,
if (q->flags & IFF_VNET_HDR) {
struct virtio_net_hdr vnet_hdr;
- vnet_hdr_len = q->vnet_hdr_sz;
+ vnet_hdr_len = READ_ONCE(q->vnet_hdr_sz);
if (iov_iter_count(iter) < vnet_hdr_len)
return -EINVAL;