Re: [PATCH bpf-next v3 09/15] bpf: add bpf_skc_to_udp6_sock() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 6/22/20 7:22 PM, Yonghong Song wrote:
> 
> 
> On 6/22/20 6:47 PM, Eric Dumazet wrote:
&
>>
>> Why is the sk_fullsock(sk) needed ?
> 
> The parameter 'sk' could be a sock_common. That is why the
> helper name bpf_skc_to_udp6_sock implies. The sock_common cannot
> access sk_protocol, hence we requires sk_fullsock(sk) here.
> Did I miss anything?

OK, if arbitrary sockets can land here, you need also to check sk_type





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux