mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
s390/cio: Fix how vfio-ccw checks pinned pages
commit 24abf2901b upstream.
We have two nested loops to check the entries within the pfn_array_table
arrays. But we mistakenly use the outer array as an index in our check,
and completely ignore the indexing performed by the inner loop.
Cc: stable@vger.kernel.org
Signed-off-by: Eric Farman <farman@linux.ibm.com>
Message-Id: <20181002010235.42483-1-farman@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e3f725f5c4
commit
8d2f62cb2d
@@ -172,7 +172,7 @@ static bool pfn_array_table_iova_pinned(struct pfn_array_table *pat,
|
||||
|
||||
for (i = 0; i < pat->pat_nr; i++, pa++)
|
||||
for (j = 0; j < pa->pa_nr; j++)
|
||||
if (pa->pa_iova_pfn[i] == iova_pfn)
|
||||
if (pa->pa_iova_pfn[j] == iova_pfn)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user