Re: [bpf-next PATCH] bpf: sockmap, fix skmsg recvmsg handler to track size correctly

2018-10-16 Thread Daniel Borkmann
On 10/16/2018 07:36 PM, John Fastabend wrote: > When converting sockmap to new skmsg generic data structures we missed > that the recvmsg handler did not correctly use sg.size and instead was > using individual elements length. The result is if a sock is closed > with outstanding data we omit the

Re: [bpf-next PATCH] bpf: sockmap, fix skmsg recvmsg handler to track size correctly

2018-10-16 Thread Alexei Starovoitov
On Tue, Oct 16, 2018 at 10:36:01AM -0700, John Fastabend wrote: > When converting sockmap to new skmsg generic data structures we missed > that the recvmsg handler did not correctly use sg.size and instead was > using individual elements length. The result is if a sock is closed > with outstanding

[bpf-next PATCH] bpf: sockmap, fix skmsg recvmsg handler to track size correctly

2018-10-16 Thread John Fastabend
When converting sockmap to new skmsg generic data structures we missed that the recvmsg handler did not correctly use sg.size and instead was using individual elements length. The result is if a sock is closed with outstanding data we omit the call to sk_mem_uncharge() and can get the warning