linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: hugetlb: fix the wrong return value for huge_ptep_set_access_flags
Date: Wed, 11 Jan 2017 10:19:25 +0000	[thread overview]
Message-ID: <20170111101924.GA18044@e104818-lin.cambridge.arm.com> (raw)
In-Reply-To: <20170111060044.GA6112@sha-win-210.asiapac.arm.com>

On Wed, Jan 11, 2017 at 02:00:46PM +0800, Huang Shijie wrote:
> On Wed, Jan 11, 2017 at 01:58:28PM +0800, Huang Shijie wrote:
> > In current code, the @changed always returns the last one's
> > status for the huge page with the contiguous bit set.
> > This is really not what we want. Even one of the PTEs is changed,
> > we should tell it to the caller.
> > 
> > This patch fixes this issue.
> > 
> > Fixes: 66b3923a1a0f ("arm64: hugetlb: add support for PTE contiguous bit")
> > Cc: stable at vger.kernel.org
> > Signed-off-by: Huang Shijie <shijie.huang@arm.com>
> > ---
> >  arch/arm64/mm/hugetlbpage.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
> > index 964b7549af5c..e25584d72396 100644
> > --- a/arch/arm64/mm/hugetlbpage.c
> > +++ b/arch/arm64/mm/hugetlbpage.c
> > @@ -239,7 +239,7 @@ int huge_ptep_set_access_flags(struct vm_area_struct *vma,
> >  		ncontig = find_num_contig(vma->vm_mm, addr, cpte,
> >  					  *cpte, &pgsize);
> >  		for (i = 0; i < ncontig; ++i, ++cpte, addr += pgsize) {
> > -			changed = ptep_set_access_flags(vma, addr, cpte,
> > +			changed |= ptep_set_access_flags(vma, addr, cpte,
> >  							pfn_pte(pfn,
> >  								hugeprot),
> >  							dirty);
> > -- 
> > 2.5.5
> > 
> sorry, I missed to remove the disclaimer.

The disclaimer is not the main issue. The patch that ended up on the
list seems to have been corrupted probably by the SMTP server (all tabs
converted to spaces).

-- 
Catalin

  reply	other threads:[~2017-01-11 10:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11  5:58 [PATCH] arm64: hugetlb: fix the wrong return value for huge_ptep_set_access_flags Huang Shijie
2017-01-11  6:00 ` Huang Shijie
2017-01-11 10:19   ` Catalin Marinas [this message]
2017-01-13  2:50     ` Huang Shijie

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=20170111101924.GA18044@e104818-lin.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).