netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tobias Klauser <tklauser@distanz.ch>
To: Yotam Gigi <yotamg@mellanox.com>
Cc: davem@davemloft.net, zhangshengju@cmss.chinamobile.com,
	roopa@cumulusnetworks.com, sd@queasysnail.net,
	bblanco@plumgrid.com, minipli@googlemail.com,
	nogahf@mellanox.com, moshe@mellanox.com, rshearma@brocade.com,
	daniel@iogearbox.net, netdev@vger.kernel.org,
	David Ahern <dsa@cumulusnetworks.com>
Subject: Re: [PATCH net] rtnetlink: Fix the IFLA_PHYS_PORT_NAME TLV to include terminating NULL
Date: Tue, 9 May 2017 14:31:07 +0200	[thread overview]
Message-ID: <20170509123107.GG10395@distanz.ch> (raw)
In-Reply-To: <1494331922-16451-1-git-send-email-yotamg@mellanox.com>

On 2017-05-09 at 14:12:02 +0200, Yotam Gigi <yotamg@mellanox.com> wrote:
> The IFLA_PHYS_PORT_NAME rtnetlink TLV length does not include the
> terminating NULL character, which is different from other string typed
> TLVs. Due to the fact that libnl checks for the terminating NULL in every
> string typed attribute, it crashes on every RTM_GETLINK response on
> drivers that implement ndo_get_phys_port_name.
> 
> Make the fill_phys_port_name function include the terminating NULL in the
> TLV size by using the nla_put_string helper function.
> 
> Fixes: db24a9044ee1 ("net: add support for phys_port_name")
> Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
> Cc: David Ahern <dsa@cumulusnetworks.com>
> Reviewed-by: Ido Schimmel <idosch@mellanox.com>
> Acked-by: Jiri Pirko <jiri@mellanox.com>
> ---
> Please consider this for stable too. Thanks!

This is already fixed in commit 77ef033b687c ("rtnetlink: NUL-terminate
IFLA_PHYS_PORT_NAME string").

  reply	other threads:[~2017-05-09 12:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-09 12:12 [PATCH net] rtnetlink: Fix the IFLA_PHYS_PORT_NAME TLV to include terminating NULL Yotam Gigi
2017-05-09 12:31 ` Tobias Klauser [this message]
2017-05-09 12:48   ` Yotam Gigi

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=20170509123107.GG10395@distanz.ch \
    --to=tklauser@distanz.ch \
    --cc=bblanco@plumgrid.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=minipli@googlemail.com \
    --cc=moshe@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=nogahf@mellanox.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=rshearma@brocade.com \
    --cc=sd@queasysnail.net \
    --cc=yotamg@mellanox.com \
    --cc=zhangshengju@cmss.chinamobile.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 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).