Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1639844
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.11 09/28] tcp: fix access to sk->sk_state in tcp_poll() |
| Date | 2017-05-11 18:10 +0200 |
| Message-ID | <tFYP9-7g-51@gated-at.bofh.it> (permalink) |
| References | <tFX6H-7p4-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Davide Caratti <dcaratti@redhat.com>
[ Upstream commit d68be71ea14d609a5f31534003319be5db422595 ]
avoid direct access to sk->sk_state when tcp_poll() is called on a socket
using active TCP fastopen with deferred connect. Use local variable
'state', which stores the result of sk_state_load(), like it was done in
commit 00fd38d938db ("tcp: ensure proper barriers in lockless contexts").
Fixes: 19f6d3f3c842 ("net/tcp-fastopen: Add new API support")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Acked-by: Wei Wang <weiwan@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -533,7 +533,7 @@ unsigned int tcp_poll(struct file *file,
if (tp->urg_data & TCP_URG_VALID)
mask |= POLLPRI;
- } else if (sk->sk_state == TCP_SYN_SENT && inet_sk(sk)->defer_connect) {
+ } else if (state == TCP_SYN_SENT && inet_sk(sk)->defer_connect) {
/* Active TCP fastopen socket with defer_connect
* Return POLLOUT so application can call write()
* in order for kernel to generate SYN+data
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.11 00/28] 4.11.1-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 13/28] tcp: fix wraparound issue in tcp_lp Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 27/28] xen: Revert commits da72ff5bfcb0 and 72a9b186292d Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 18/28] rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 26/28] xen/arm,arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..." Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 06/28] sparc64: fix fault handling in NGbzero.S and GENbzero.S Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 28/28] block: get rid of blk_integrity_revalidate() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 08/28] net: macb: fix phy interrupt parsing Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 23/28] bpf: dont let ldimm64 leak map addresses on unprivileged Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 22/28] bnxt_en: allocate enough space for ->ntp_fltr_bmap Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 21/28] tcp: randomize timestamps on syncookies Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 14/28] net: ipv6: Do not duplicate DAD on link up Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 16/28] tcp: do not inherit fastopen_req from parent Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 20/28] ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 09/28] tcp: fix access to sk->sk_state in tcp_poll() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 24/28] net: mdio-mux: bcm-iproc: call mdiobus_free() in error path Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 12/28] bpf, arm64: fix jit branch offset related to ldimm64 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 17/28] ipv4, ipv6: ensure raw socket message is big enough to hold an IP header Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
[PATCH 4.11 19/28] ipv6: initialize route null entry in addrconf_init() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 18:10 +0200
Re: [PATCH 4.11 00/28] 4.11.1-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-05-12 17:30 +0200
Re: [PATCH 4.11 00/28] 4.11.1-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-12 17:50 +0200
Re: [PATCH 4.11 00/28] 4.11.1-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-05-12 18:10 +0200
Re: [PATCH 4.11 00/28] 4.11.1-stable review Matt Fleming <matt@codeblueprint.co.uk> - 2017-05-15 16:40 +0200
Re: [PATCH 4.11 00/28] 4.11.1-stable review Guenter Roeck <linux@roeck-us.net> - 2017-05-12 22:00 +0200
Re: [PATCH 4.11 00/28] 4.11.1-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-14 13:10 +0200
csiph-web