]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
bpf: sk_msg, fix socket data_ready events
authorJohn Fastabend <john.fastabend@gmail.com>
Thu, 20 Dec 2018 19:35:33 +0000 (11:35 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 20 Dec 2018 22:47:09 +0000 (23:47 +0100)
commit552de91068828daef50a227a665068cf8dde835e
treea85f552adba93a72b5b66d0127a05a77927faa13
parent51199405f967207de372d9b60989eb87d7ae8809
bpf: sk_msg, fix socket data_ready events

When a skb verdict program is in-use and either another BPF program
redirects to that socket or the new SK_PASS support is used the
data_ready callback does not wake up application. Instead because
the stream parser/verdict is using the sk data_ready callback we wake
up the stream parser/verdict block.

Fix this by adding a helper to check if the stream parser block is
enabled on the sk and if so call the saved pointer which is the
upper layers wake up function.

This fixes application stalls observed when an application is waiting
for data in a blocking read().

Fixes: d829e9c4112b ("tls: convert to generic sk_msg interface")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/linux/skmsg.h
net/core/skmsg.c
net/ipv4/tcp_bpf.c