[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200827124540.GA4024180@nvidia.com>
Date: Thu, 27 Aug 2020 09:45:40 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Leon Romanovsky <leon@...nel.org>
CC: Doug Ledford <dledford@...hat.com>,
Aharon Landau <aharonl@...lanox.com>,
Achiad Shochat <achiad@...lanox.com>,
Jakub Kicinski <kuba@...nel.org>, <linux-rdma@...r.kernel.org>,
Michael Guralnik <michaelgur@...dia.com>,
<netdev@...r.kernel.org>, Saeed Mahameed <saeedm@...dia.com>
Subject: Re: [PATCH mlx5-next 1/3] net/mlx5: Refactor query port speed
functions
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
Powered by blists - more mailing lists