Commit 420593bb506126a92935d5a350cad7dfac8fa982

Authored by Matthew Wilcox
Committed by Greg Kroah-Hartman
1 parent 68ba0558dc

axonram: Fix bug in direct_access

commit 91117a20245b59f70b563523edbf998a62fc6383 upstream.

The 'pfn' returned by axonram was completely bogus, and has been since
2008.

Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

arch/powerpc/sysdev/axonram.c
... ... @@ -156,7 +156,7 @@
156 156 }
157 157  
158 158 *kaddr = (void *)(bank->ph_addr + offset);
159   - *pfn = virt_to_phys(kaddr) >> PAGE_SHIFT;
  159 + *pfn = virt_to_phys(*kaddr) >> PAGE_SHIFT;
160 160  
161 161 return 0;
162 162 }