From: Daniel Borkmann <dan...@iogearbox.net> Date: Mon, 11 Jun 2018 23:22:04 +0200
> While hacking on kTLS, I ran into the following panic from an > unprivileged netserver / netperf TCP session: ... > Debugging further, it turns out that calling into ctx->sk_poll() is > invalid since sk_poll itself is NULL which was saved from the original > TCP socket in order for tls_sw_poll() to invoke it. > > Looks like the recent conversion from poll to poll_mask callback started > in 152524231023 ("net: add support for ->poll_mask in proto_ops") missed > to eventually convert kTLS, too: TCP's ->poll was converted over to the > ->poll_mask in commit 2c7d3dacebd4 ("net/tcp: convert to ->poll_mask") > and therefore kTLS wrongly saved the ->poll old one which is now NULL. > > Convert kTLS over to use ->poll_mask instead. Also instead of POLLIN | > POLLRDNORM use the proper EPOLLIN | EPOLLRDNORM bits as the case in > tcp_poll_mask() as well that is mangled here. > > Fixes: 2c7d3dacebd4 ("net/tcp: convert to ->poll_mask") > Signed-off-by: Daniel Borkmann <dan...@iogearbox.net> Applied, thanks Daniel.