提交 fb048927 编写于 作者: J Jim Paradis 提交者: Linus Torvalds

[PATCH] x86-64: Fix off by one in pfn_valid

When I gave proposed the fix to pfn_valid() for RHEL4, Stephen Tweedie's
sharp eyes caught this:
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 6e44f12b
...@@ -54,7 +54,7 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr) ...@@ -54,7 +54,7 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr)
#define pfn_valid(pfn) ((pfn) >= num_physpages ? 0 : \ #define pfn_valid(pfn) ((pfn) >= num_physpages ? 0 : \
({ u8 nid__ = pfn_to_nid(pfn); \ ({ u8 nid__ = pfn_to_nid(pfn); \
nid__ != 0xff && (pfn) >= node_start_pfn(nid__) && (pfn) <= node_end_pfn(nid__); })) nid__ != 0xff && (pfn) >= node_start_pfn(nid__) && (pfn) < node_end_pfn(nid__); }))
#endif #endif
#define local_mapnr(kvaddr) \ #define local_mapnr(kvaddr) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册