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:
Jaeyong Yoo authored and Ian Campbell committed 2013-08-27 14:27:26 +01:00
1 parent 604ab14cde
commit ceb93c72d2
1 file changed
+1 -1
+1 -1
View File
@@ -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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.