netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <paul.moore@hp.com>
To: huzaifas@redhat.com
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, kaber@trash.net, yoshfuji@linux-ipv6.org,
	jmorris@namei.org, pekkas@netcore.fi, kuznet@ms2.inr.ac.ru
Subject: Re: [PATCH] Check the value of doi before referencing it
Date: Wed, 18 May 2011 18:32:17 -0400	[thread overview]
Message-ID: <201105181832.18196.paul.moore@hp.com> (raw)
In-Reply-To: <20110518.010453.1295824792800350412.davem@davemloft.net>

On Wednesday, May 18, 2011 1:04:53 AM David Miller wrote:
> From: Huzaifa Sidhpurwala <huzaifas@redhat.com>
> Date: Wed, 18 May 2011 09:59:40 +0530
> 
> > Value of doi is not checked before referencing it.
> > Though this does not cause any null pointer dereference since
> > all the callers of cipso_v4_doi_add check the value of doi
> > before calling the function, but it would be a good programming
> > practice to do so anyways :)
> > 
> > Signed-off-by: Huzaifa Sidhpurwala <huzaifas@redhat.com>
> 
> I don't think we should fix bugs that do not exist.

I agree with David.

If there were a large number of callers or cipso_v4_doi_add() was a more 
general function there might be some merit in performing more sanity checks on 
the values passed to the function.  However, as it stands, cipso_v4_doi_add() 
is a fairly specialized function which is called by a small number of 
functions all of which are internal to NetLabel.

--
paul moore
linux @ hp

      reply	other threads:[~2011-05-18 22:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18  4:29 [PATCH] Check the value of doi before referencing it Huzaifa Sidhpurwala
2011-05-18  5:04 ` David Miller
2011-05-18 22:32   ` Paul Moore [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=201105181832.18196.paul.moore@hp.com \
    --to=paul.moore@hp.com \
    --cc=davem@davemloft.net \
    --cc=huzaifas@redhat.com \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=pekkas@netcore.fi \
    --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).