lkml.org 
[lkml]   [2022]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH net] net/mlx5: fix invalid structure access
Date
From: Saeed Mahameed <saeed@kernel.org>
Date: Fri, 27 May 2022 15:29:05 -0700

> On 27 May 13:01, Alexander Lobakin wrote:
> >After pulling latest bpf-next, I started catching the following:

[...]

> We have a similar patch that is being reviewed internally.
> I don't like comparing strings to match devices. Also this could cause mlx5
> unwanted aux devices to be matched, e.g mlx5e, mlx5_ib, mlx5v, etc .., since
> they all share the same prefix ? yes, no ?
>
> We also have another patch/approach that is comparing drivers:
>
> if (dev->driver != curr->device->driver)
> return NULL;
>
> But also this is under discussion.

Ok, I spotted that implementation in your repo at korg, hope it will
hit mainline trees soon.

>
> I think the whole design of this function is wrong, it's being used to match
> devices of type mlx5_core_dev which are pci devices, but it is using aux class
> to lookup! It works since we always have some aux devices hanging on top of
> mlx5_core pci devs and since all of them share the same wrapper structure
> "mlx5_adev" we find the corresponding mdev "mlx5_core_dev" sort of correctly.

[...]

> >--
> >2.36.1

Thanks,
Al

\
 
 \ /
  Last update: 2022-05-30 11:56    [W:1.789 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site