Messages in this thread | | | Date | Mon, 27 Jul 2020 11:39:16 -0700 (PDT) | Subject | Re: [PATCH] [net/ipv6] ip6_output: Add ipv6_pinfo null check | From | David Miller <> |
| |
From: Gaurav Singh <gaurav1086@gmail.com> Date: Sun, 26 Jul 2020 23:38:10 -0400
> ipv6_pinfo is initlialized by inet6_sk() which returns NULL. > Hence it can cause segmentation fault. Fix this by adding a > NULL check.
Please take your time with such changes and actually look at the compiler output, it will warn that you are adding a new problem.
Specifically, the function now fails to return a value at all.
But even more important, how is the situation you are fixing possible? Do you have a sample crash? Can you please describe the code paths and conditions that lead to the problem?
You must also provide a valid and properly formatted Fixes: tag for bug fixes such as this.
Thank you.
| |