All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
	Aharon Landau <aharonl@mellanox.com>,
	Achiad Shochat <achiad@mellanox.com>,
	Jakub Kicinski <kuba@kernel.org>, <linux-rdma@vger.kernel.org>,
	Michael Guralnik <michaelgur@nvidia.com>,
	<netdev@vger.kernel.org>, Saeed Mahameed <saeedm@nvidia.com>
Subject: Re: [PATCH mlx5-next 1/3] net/mlx5: Refactor query port speed functions
Date: Thu, 27 Aug 2020 09:45:40 -0300	[thread overview]
Message-ID: <20200827124540.GA4024180@nvidia.com> (raw)
In-Reply-To: <20200824105826.1093613-2-leon@kernel.org>

On Mon, Aug 24, 2020 at 01:58:24PM +0300, Leon Romanovsky wrote:

> @@ -490,7 +490,7 @@ static int mlx5_query_port_roce(struct ib_device *device, u8 port_num,
>  	props->active_width     = IB_WIDTH_4X;
>  	props->active_speed     = IB_SPEED_QDR;
>  
> -	translate_eth_proto_oper(eth_prot_oper, &props->active_speed,
> +	translate_eth_proto_oper(eth_prot_oper, (u16 *)&props->active_speed,
>  				 &props->active_width, ext);

This is memory corruption, put it on a stack u16 then truncate it.

Jason

  reply	other threads:[~2020-08-27 12:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24 10:58 [PATCH rdma-next 0/3] Fix in-kernel active_speed type Leon Romanovsky
2020-08-24 10:58 ` [PATCH mlx5-next 1/3] net/mlx5: Refactor query port speed functions Leon Romanovsky
2020-08-27 12:45   ` Jason Gunthorpe [this message]
2020-08-24 10:58 ` [PATCH mlx5-next 2/3] RDMA/mlx5: Delete duplicated mlx5_ptys_width enum Leon Romanovsky
2020-08-24 10:58 ` [PATCH rdma-next 3/3] RDMA: Fix link active_speed size Leon Romanovsky

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=20200827124540.GA4024180@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=achiad@mellanox.com \
    --cc=aharonl@mellanox.com \
    --cc=dledford@redhat.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=michaelgur@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@nvidia.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.