All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Cc: "David S . Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org,
	Santosh Shilimkar <santosh.shilimkar@oracle.com>,
	linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com
Subject: Re: [PATCH net-next] rds: debug: fix null check on static array
Date: Wed, 6 Dec 2017 06:32:11 -0500	[thread overview]
Message-ID: <20171206113211.GA8331@oracle.com> (raw)
In-Reply-To: <20171206014704.3796-1-bhole_prashant_q7@lab.ntt.co.jp>

On (12/06/17 10:47), Prashant Bhole wrote:
> 
> t_name cannot be NULL since it is an array field of a struct.
> Replacing null check on static array with string length check using
> strnlen()

t_name is always initialized for all rds transports today,  and would
be all zeros unless someone stomped over that memory (in which case
there could be more serious issues than a busted debug string) but
it's good  to be safe and check I suppose.

Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>

--Sowmini

  reply	other threads:[~2017-12-06 11:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06  1:47 [PATCH net-next] rds: debug: fix null check on static array Prashant Bhole
2017-12-06 11:32 ` Sowmini Varadhan [this message]
2017-12-06 16:36   ` Santosh Shilimkar
     [not found] ` <20171206014704.3796-1-bhole_prashant_q7-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2017-12-06 20:03   ` David Miller

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=20171206113211.GA8331@oracle.com \
    --to=sowmini.varadhan@oracle.com \
    --cc=bhole_prashant_q7@lab.ntt.co.jp \
    --cc=davem@davemloft.net \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rds-devel@oss.oracle.com \
    --cc=santosh.shilimkar@oracle.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.