Re: [PATCH] [net/ipv6] ip6_output: Add ipv6_pinfo null check
From: Cong Wang
Date: Sat Aug 08 2020 - 13:37:47 EST
On Sat, Aug 8, 2020 at 10:07 AM Gaurav Singh <gaurav1086@xxxxxxxxx> wrote:
>
> This PR fixes a possible segmentation violation.
>
> In function: ip6_xmit(), we have
> const struct ipv6_pinfo *np = inet6_sk(sk); which returns NULL
> unconditionally (regardless sk being NULL or not).
>
> In include/linux/ipv6.h:
>
> static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk)
> {
> return NULL;
> }
>
Tell us who will use ip6_autoflowlabel() when CONFIG_IPV6
is disabled. :)