From: Farhan Ali <alifm@linux.ibm.com>
To: Cornelia Huck <cohuck@redhat.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Halil Pasic <pasic@linux.ibm.com>,
linux-s390@vger.kernel.org, kvm@vger.kernel.org,
Eric Farman <farman@linux.ibm.com>,
stable@vger.kernel.org,
"Jason J. Herne" <jjherne@linux.vnet.ibm.com>
Subject: Re: [PULL 1/1] s390/cio: Fix how vfio-ccw checks pinned pages
Date: Wed, 3 Oct 2018 09:14:11 -0400 [thread overview]
Message-ID: <6d126fd1-3c51-34d3-18cf-b24459c9af39@linux.ibm.com> (raw)
In-Reply-To: <20181002153748.13503-2-cohuck@redhat.com>
On 10/02/2018 11:37 AM, Cornelia Huck wrote:
> From: Eric Farman <farman@linux.ibm.com>
>
> 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>
> ---
> drivers/s390/cio/vfio_ccw_cp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/s390/cio/vfio_ccw_cp.c b/drivers/s390/cio/vfio_ccw_cp.c
> index dbe7c7ac9ac8..fd77e46eb3b2 100644
> --- a/drivers/s390/cio/vfio_ccw_cp.c
> +++ b/drivers/s390/cio/vfio_ccw_cp.c
> @@ -163,7 +163,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;
>
Me and Jason have been looking at this code recently and we think this
is the right fix.
Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
Reviewed-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
next prev parent reply other threads:[~2018-10-03 13:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181002153748.13503-1-cohuck@redhat.com>
2018-10-02 15:37 ` [PULL 1/1] s390/cio: Fix how vfio-ccw checks pinned pages Cornelia Huck
2018-10-03 13:14 ` Farhan Ali [this message]
2018-10-08 7:20 ` [PULL 0/1] vfio-ccw: another bugfix Martin Schwidefsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6d126fd1-3c51-34d3-18cf-b24459c9af39@linux.ibm.com \
--to=alifm@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=farman@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=jjherne@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pasic@linux.ibm.com \
--cc=schwidefsky@de.ibm.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox