Skip to content

Commit

Permalink
[PATCH] x86-64: Fix off by one in pfn_valid
Browse files Browse the repository at this point in the history
When I gave proposed the fix to pfn_valid() for RHEL4, Stephen Tweedie's
sharp eyes caught this:

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jim Paradis authored and Linus Torvalds committed Sep 12, 2005
1 parent 6e44f12 commit fb04892
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-x86_64/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr)

#define pfn_valid(pfn) ((pfn) >= num_physpages ? 0 : \
({ 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

#define local_mapnr(kvaddr) \
Expand Down

0 comments on commit fb04892

Please sign in to comment.