Re: [bpf-next PATCH 1/2] bpf: skmsg, fix psock create on existing kcm/tls port

2018-10-17 Thread Alexei Starovoitov
On Wed, Oct 17, 2018 at 08:37:39PM -0700, John Fastabend wrote: > Before using the psock returned by sk_psock_get() when adding it to a > sockmap we need to ensure it is actually a sockmap based psock. > Previously we were only checking this after incrementing the reference > counter which was an e

[bpf-next PATCH 1/2] bpf: skmsg, fix psock create on existing kcm/tls port

2018-10-17 Thread John Fastabend
Before using the psock returned by sk_psock_get() when adding it to a sockmap we need to ensure it is actually a sockmap based psock. Previously we were only checking this after incrementing the reference counter which was an error. This resulted in a slab-out-of-bounds error when the psock was not