Jakub Sitnicki wrote: > sk_msg and ULP frameworks override protocol callbacks pointer in > sk->sk_prot, while TCP accesses it locklessly when cloning the listening > socket. > > Once we enable use of listening sockets with sockmap (and hence sk_msg), > there can be shared access to sk->sk_prot if socket is getting cloned while > being inserted/deleted to/from the sockmap from another CPU. Mark the > shared access with READ_ONCE/WRITE_ONCE annotations. > > Signed-off-by: Jakub Sitnicki <jakub@xxxxxxxxxxxxxx> In sockmap side I fixed this by wrapping the access in a lock_sock[0]. So Do you think this is still needed with that in mind? The bpf_clone call is using sk_prot_creater and also setting the newsk's proto field. Even if the listening parent sock was being deleted in parallel would that be a problem? We don't touch sk_prot_creator from the tear down path. I've only scanned the 3..11 patches so maybe the answer is below. If that is the case probably an improved commit message would be helpful. [0] https://patchwork.ozlabs.org/patch/1221536/ Thanks.