Skip to content

Commit 28cb085

Browse files
Jérôme Glissegregkh
authored andcommitted
mm/hmm: hmm_pfns_bad() was accessing wrong struct
commit c719547 upstream. 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 963722d commit 28cb085

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
@@ -277,7 +277,8 @@ static int hmm_pfns_bad(unsigned long addr,
277277
unsigned long end,
278278
struct mm_walk *walk)
279279
{
280-
struct hmm_range *range = walk->private;
280+
struct hmm_vma_walk *hmm_vma_walk = walk->private;
281+
struct hmm_range *range = hmm_vma_walk->range;
281282
hmm_pfn_t *pfns = range->pfns;
282283
unsigned long i;
283284

0 commit comments

Comments
 (0)