rcu.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dexuan-Linux Cui <dexuan.linux@gmail.com>
To: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: madhuparnabhowmik10@gmail.com,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Joel Fernandes <joel@joelfernandes.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	rcu@vger.kernel.org, open list <linux-kernel@vger.kernel.org>,
	X86 ML <x86@kernel.org>, kvm list <kvm@vger.kernel.org>,
	frextrite@gmail.com, lkft-triage@lists.linaro.org,
	Dexuan Cui <decui@microsoft.com>,
	juhlee@microsoft.com
Subject: Re: [PATCH 2/2] kvm: mmu: page_track: Fix RCU list API usage
Date: Thu, 16 Jul 2020 17:19:52 -0700	[thread overview]
Message-ID: <CAA42JLY2L6xFju_qZsVguGtXvDMqfCKbO_h1K9NJPjmqJEav=Q@mail.gmail.com> (raw)
In-Reply-To: <CA+G9fYuVmTcttBpVtegwPbKxufupPOtk_WqEtOdS+HDQi7WS9Q@mail.gmail.com>

On Thu, Jul 16, 2020 at 7:47 AM Naresh Kamboju
<naresh.kamboju@linaro.org> wrote:
>
> On Sun, 12 Jul 2020 at 21:39, Paul E. McKenney <paulmck@kernel.org> wrote:
> >
> > On Sun, Jul 12, 2020 at 06:40:03PM +0530, madhuparnabhowmik10@gmail.com wrote:
> > > From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> > >
> > > Use hlist_for_each_entry_srcu() instead of hlist_for_each_entry_rcu()
> > > as it also checkes if the right lock is held.
> > > Using hlist_for_each_entry_rcu() with a condition argument will not
> > > report the cases where a SRCU protected list is traversed using
> > > rcu_read_lock(). Hence, use hlist_for_each_entry_srcu().
> > >
> > > Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> >
> > I queued both for testing and review, thank you!
> >
> > In particular, this one needs an ack by the maintainer.
> >
> >                                                         Thanx, Paul
> >
> > >  arch/x86/kvm/mmu/page_track.c | 6 ++++--
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/arch/x86/kvm/mmu/page_track.c b/arch/x86/kvm/mmu/page_track.c
> > > index a7bcde34d1f2..a9cd17625950 100644
> > > --- a/arch/x86/kvm/mmu/page_track.c
> > > +++ b/arch/x86/kvm/mmu/page_track.c
> > > @@ -229,7 +229,8 @@ void kvm_page_track_write(struct kvm_vcpu *vcpu, gpa_t gpa, const u8 *new,
> > >               return;
> > >
> > >       idx = srcu_read_lock(&head->track_srcu);
> > > -     hlist_for_each_entry_rcu(n, &head->track_notifier_list, node)
> > > +     hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
> > > +                             srcu_read_lock_held(&head->track_srcu))
>
> x86 build failed on linux -next 20200716.
>
> arch/x86/kvm/mmu/page_track.c: In function 'kvm_page_track_write':
> include/linux/rculist.h:727:30: error: left-hand operand of comma
> expression has no effect [-Werror=unused-value]
>   for (__list_check_srcu(cond),     \
>                               ^
> arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro
> 'hlist_for_each_entry_srcu'
>   hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
>   ^~~~~~~~~~~~~~~~~~~~~~~~~
> arch/x86/kvm/mmu/page_track.c: In function 'kvm_page_track_flush_slot':
> include/linux/rculist.h:727:30: error: left-hand operand of comma
> expression has no effect [-Werror=unused-value]
>   for (__list_check_srcu(cond),     \
>                               ^
> arch/x86/kvm/mmu/page_track.c:258:2: note: in expansion of macro
> 'hlist_for_each_entry_srcu'
>   hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
>   ^~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[3]: *** [arch/x86/kvm/mmu/page_track.o] Error 1
>
> build link,
> https://ci.linaro.org/view/lkft/job/openembedded-lkft-linux-next/DISTRO=lkft,MACHINE=intel-corei7-64,label=docker-lkft/815/consoleText
>
> --
> Linaro LKFT
> https://lkft.linaro.org

Hi, we're seeing the same building failure with the latest linux-next tree.

Thanks,
Dexuan

  reply	other threads:[~2020-07-17  0:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-12 13:10 [PATCH 1/2] rculist : Introduce list/hlist_for_each_entry_srcu() macros madhuparnabhowmik10
2020-07-12 13:10 ` [PATCH 2/2] kvm: mmu: page_track: Fix RCU list API usage madhuparnabhowmik10
2020-07-12 16:08   ` Paul E. McKenney
2020-07-16 14:44     ` Naresh Kamboju
2020-07-17  0:19       ` Dexuan-Linux Cui [this message]
2020-07-17 17:07         ` Paul E. McKenney
2020-07-17 18:03           ` Daniel Díaz
2020-07-17 18:25             ` Daniel Díaz
2020-07-17 19:05           ` Naresh Kamboju
2020-07-18  0:12             ` Paul E. McKenney
2020-07-19 12:22               ` Naresh Kamboju
2020-07-19 16:08                 ` Paul E. McKenney
2020-07-20 14:13                   ` Naresh Kamboju
2020-07-20 23:31                     ` Paul E. McKenney

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='CAA42JLY2L6xFju_qZsVguGtXvDMqfCKbO_h1K9NJPjmqJEav=Q@mail.gmail.com' \
    --to=dexuan.linux@gmail.com \
    --cc=decui@microsoft.com \
    --cc=frextrite@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=juhlee@microsoft.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=madhuparnabhowmik10@gmail.com \
    --cc=naresh.kamboju@linaro.org \
    --cc=paulmck@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rcu@vger.kernel.org \
    --cc=x86@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;
as well as URLs for NNTP newsgroup(s).