Re: [PATCH for-next] RDMA/core: Fix best page size finding when it can cross SG entries

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

 



On Thu, Feb 13, 2025 at 07:35:10PM +0200, Leon Romanovsky wrote:
 
> Initially curr_base is 0xFF.....FF and curr_len is 0.

curr base can't be so unaligned can it?

> So if this "if ..." is skipped (not possible but static checkers don't know),
> we will advance curr_len and curr_base + curr_len will overflow.
> 
> I don't want to take original patch.

Subtracting is no better, it will just randomly fail for low dma addrs
instead of high.

You need to call check_add_overflow()

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