diff options
author | David S. Miller <davem@davemloft.net> | 2019-02-20 09:34:07 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-20 09:34:07 +0100 |
commit | 375ca548f7e3ac82acdd0959eddd1fa0e17c35cc (patch) | |
tree | 5360dc427e4eff7123613419ee522b7fda831de0 /net/xdp/xsk.c | |
parent | ptp_qoriq: don't pass a large struct by value but instead pass it by reference (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-375ca548f7e3ac82acdd0959eddd1fa0e17c35cc.tar.xz linux-375ca548f7e3ac82acdd0959eddd1fa0e17c35cc.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Two easily resolvable overlapping change conflicts, one in
TCP and one in the eBPF verifier.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xdp/xsk.c')
-rw-r--r-- | net/xdp/xsk.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 949d3bbccb2f..41731c9bb26f 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@ -669,6 +669,8 @@ static int xsk_mmap(struct file *file, struct socket *sock, if (!umem) return -EINVAL; + /* Matches the smp_wmb() in XDP_UMEM_REG */ + smp_rmb(); if (offset == XDP_UMEM_PGOFF_FILL_RING) q = READ_ONCE(umem->fq); else if (offset == XDP_UMEM_PGOFF_COMPLETION_RING) @@ -678,6 +680,8 @@ static int xsk_mmap(struct file *file, struct socket *sock, if (!q) return -EINVAL; + /* Matches the smp_wmb() in xsk_init_queue */ + smp_rmb(); qpg = virt_to_head_page(q->ring); if (size > (PAGE_SIZE << compound_order(qpg))) return -EINVAL; |