Re: [PATCH] mm/memblock: fix potential issue in memblock_search_pfn_nid()

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

 



On Fri, 30 Mar 2018 11:30:55 +0800 Wei Yang <richard.weiyang@xxxxxxxxx> wrote:

> memblock_search_pfn_nid() returns the nid and the [start|end]_pfn of the
> memory region where pfn sits in. While the calculation of start_pfn has
> potential issue when the regions base is not page aligned.
> 
> For example, we assume PAGE_SHIFT is 12 and base is 0x1234. Current
> implementation would return 1 while this is not correct.

Why is this not correct?  The caller might want the pfn of the page
which covers the base?

> This patch fixes this by using PFN_UP().
> 
> The original commit is commit e76b63f80d93 ("memblock, numa: binary search
> node id") and merged in v3.12.
> 
> Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx>
> Cc: 3.12+ <stable@xxxxxxxxxxxxxxx>

Please fully describe the runtime effects of a bug when fixing that
bug.  This description doesn't give enough justification for merging
the patch into mainline, let alone -stable.




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]