Re: [PATCH bpf] bpf: bpf_skc_to_* casting helpers require a NULL check on sk

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

 



On Tue, Sep 15, 2020 at 2:45 PM Song Liu <song@xxxxxxxxxx> wrote:
>
> On Tue, Sep 15, 2020 at 11:32 AM Martin KaFai Lau <kafai@xxxxxx> wrote:
> >
> > The bpf_skc_to_* type casting helpers are available to
> > BPF_PROG_TYPE_TRACING.  The traced PTR_TO_BTF_ID may be NULL.
> > For example, the skb->sk may be NULL.  Thus, these casting helpers
> > need to check "!sk" also and this patch fixes them.
> >
> > Fixes: 0d4fad3e57df ("bpf: Add bpf_skc_to_udp6_sock() helper")
> > Fixes: 478cfbdf5f13 ("bpf: Add bpf_skc_to_{tcp, tcp_timewait, tcp_request}_sock() helpers")
> > Fixes: af7ec1383361 ("bpf: Add bpf_skc_to_tcp6_sock() helper")
> > Signed-off-by: Martin KaFai Lau <kafai@xxxxxx>
>
> Acked-by: Song Liu <songliubraving@xxxxxx>

Applied. Thanks



[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