mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xen/arm: add lower-bound check in mfn_valid
mfn_valid only checks the upper-bound of mfn (max_page). Add the lower-bound check of mfn (frametable_base_mfn). Signed-off-by: Jaeyong Yoo <jaeyong.yoo@samsung.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Julien Grall <julien.grall@linaro.org>
This commit is contained in:
1 parent
604ab14cde
commit
ceb93c72d2
1 file changed
+1
-1
@@ -190,7 +190,7 @@ static inline void __iomem *ioremap_wc(paddr_t start, size_t len)
|
||||
|
||||
#define mfn_valid(mfn) ({ \
|
||||
unsigned long __m_f_n = (mfn); \
|
||||
likely(__m_f_n < max_page); \
|
||||
likely(__m_f_n >= frametable_base_mfn && __m_f_n < max_page); \
|
||||
})
|
||||
|
||||
#define max_pdx max_page
|
||||
|
||||