Skip to content

Commit c719547

Browse files
Jérôme Glissetorvalds
authored andcommitted
mm/hmm: hmm_pfns_bad() was accessing wrong struct
The private field of mm_walk struct point to an hmm_vma_walk struct and not to the hmm_range struct desired. Fix to get proper struct pointer. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Jérôme Glisse <[email protected]> Cc: Evgeny Baskakov <[email protected]> Cc: Ralph Campbell <[email protected]> Cc: Mark Hairgrove <[email protected]> Cc: John Hubbard <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent c01cbba commit c719547

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mm/hmm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,8 @@ static int hmm_pfns_bad(unsigned long addr,
336336
unsigned long end,
337337
struct mm_walk *walk)
338338
{
339-
struct hmm_range *range = walk->private;
339+
struct hmm_vma_walk *hmm_vma_walk = walk->private;
340+
struct hmm_range *range = hmm_vma_walk->range;
340341
hmm_pfn_t *pfns = range->pfns;
341342
unsigned long i;
342343

0 commit comments

Comments
 (0)