Re: [PATCH mlx5-next 1/3] net/mlx5: Refactor query port speed functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux