]> git.baikalelectronics.ru Git - kernel.git/commit
net/tls: fix poll ignoring partially copied records
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 4 Jul 2019 21:50:36 +0000 (14:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 7 Jul 2019 21:11:44 +0000 (14:11 -0700)
commit74099828c05a1b1884f0bff0cd1abc9a83510d0f
treec2af474db0ca07e784e760348511260f93d66b1d
parent02f82f127995b2860558440258b1f85e03af61cb
net/tls: fix poll ignoring partially copied records

David reports that RPC applications which use epoll() occasionally
get stuck, and that TLS ULP causes the kernel to not wake applications,
even though read() will return data.

This is indeed true. The ctx->rx_list which holds partially copied
records is not consulted when deciding whether socket is readable.

Note that SO_RCVLOWAT with epoll() is and has always been broken for
kernel TLS. We'd need to parse all records from the TCP layer, instead
of just the first one.

Fixes: b359aa1a348b ("tls: Fix recvmsg() to be able to peek across multiple records")
Reported-by: David Beckett <david.beckett@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_sw.c