Re: [PATCH 2/2] net/mlx4: avoid overloading user/kernel pointers

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

 



On Wed, Apr 19, 2023, at 09:09, Tariq Toukan wrote:
> On 18/04/2023 14:47, Arnd Bergmann wrote:
>
> Now we should maintain the values of the two pointers before any call. 
> I'm not sure this is less error-prune. One can mistakenly update 
> kbuf_addr for example without nullifying ubuf_addr.

That would cause a compiler warning about the uninitialized variable.

> Also, I'm not a big fan of passing two pointers when exactly one of them 
> is effectively used.
> We can think maybe of passing a union of both types, and a boolean 
> indicating which pointer type is to be used.

This is basically what you have today. I've dropped this patch from
my randconfig tree and will ignore the problem.

    Arnd



[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