lkml.org 
[lkml]   [2020]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] [net/ipv6] ip6_output: Add ipv6_pinfo null check
From
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.

\
 
 \ /
  Last update: 2020-07-27 20:40    [W:0.607 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site