netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dan.carpenter@oracle.com
Cc: steffen.klassert@secunet.com, kuznet@ms2.inr.ac.ru,
	jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net,
	netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] xfrm6: remove unneeded NULL check in __xfrm6_output()
Date: Wed, 01 Feb 2012 02:53:10 -0500 (EST)	[thread overview]
Message-ID: <20120201.025310.1777485011852016937.davem@davemloft.net> (raw)
In-Reply-To: <20120201074526.GC22179@elgon.mountain>

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Wed, 1 Feb 2012 10:45:26 +0300

> We don't check for NULL consistently in __xfrm6_output().  If "x" were
> NULL here it would lead to an OOPs later.  I asked Steffen Klassert
> about this and he suggested that we remove the NULL check.
> 
> On 10/29/11, Steffen Klassert <steffen.klassert@secunet.com> wrote:
>>> net/ipv6/xfrm6_output.c
>>>    148	
>>>    149		if ((x && x->props.mode == XFRM_MODE_TUNNEL) &&
>>>                           ^
>>
>> x can't be null here. It would be a bug if __xfrm6_output() is called
>> without a xfrm_state attached to the skb. I think we can just remove
>> this null check.
> 
> Cc: Steffen Klassert <steffen.klassert@secunet.com>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thanks Dan.

      reply	other threads:[~2012-02-01  7:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-01  7:45 [patch] xfrm6: remove unneeded NULL check in __xfrm6_output() Dan Carpenter
2012-02-01  7:53 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120201.025310.1777485011852016937.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dan.carpenter@oracle.com \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=steffen.klassert@secunet.com \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).