From: Paolo Bonzini <pbonzini@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH 0/7] memory: address_space_to_flatview needs RCU lock
Date: Tue, 6 Mar 2018 09:16:38 +0100 [thread overview]
Message-ID: <a8de2fd6-a34b-4efa-d3ec-4fbc76c3dac4@redhat.com> (raw)
In-Reply-To: <36ea5e9f-a6c8-fc36-34c6-4295f441c5eb@ozlabs.ru>
On 06/03/2018 08:47, Alexey Kardashevskiy wrote:
> On 05/03/18 19:36, Paolo Bonzini wrote:
>> I noticed that the introduction of flatview_{read,write} placed
>> address_space_to_flatview outside the RCU lock. This is wrong and has
>> to be fixed, because address_space_to_flatview does an atomic_rcu_read.
>> These patches fix this one function at a time.
>
> out of curiosity - has this caused any actual bug? should be hard to
> reproduce, I suppose...
No, I just noticed it by code inspection, while looking at a
reimplementation of MemoryRegionCache (reverted in 2.9). One of the
differences between address_space_read and address_space_read_cached was
that the latter expects to be called within rcu_read_lock, so it was
surprising that address_space_read was expecting the same. :)
Paolo
prev parent reply other threads:[~2018-03-06 8:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-05 8:36 [Qemu-devel] [PATCH 0/7] memory: address_space_to_flatview needs RCU lock Paolo Bonzini
2018-03-05 8:36 ` [Qemu-devel] [PATCH 1/7] openpic_kvm: drop address_space_to_flatview call Paolo Bonzini
2018-03-06 0:10 ` David Gibson
2018-03-06 12:25 ` Paolo Bonzini
2018-03-06 7:46 ` Alexey Kardashevskiy
2018-03-05 8:36 ` [Qemu-devel] [PATCH 2/7] memory: inline some performance-sensitive accessors Paolo Bonzini
2018-03-06 7:46 ` Alexey Kardashevskiy
2018-03-05 8:36 ` [Qemu-devel] [PATCH 3/7] address_space_write: address_space_to_flatview needs RCU lock Paolo Bonzini
2018-03-06 7:46 ` Alexey Kardashevskiy
2018-03-05 8:36 ` [Qemu-devel] [PATCH 4/7] address_space_read: " Paolo Bonzini
2018-03-06 7:46 ` Alexey Kardashevskiy
2018-03-05 8:36 ` [Qemu-devel] [PATCH 5/7] address_space_access_valid: " Paolo Bonzini
2018-03-06 7:46 ` Alexey Kardashevskiy
2018-03-05 8:36 ` [Qemu-devel] [PATCH 6/7] address_space_map: " Paolo Bonzini
2018-03-06 7:46 ` Alexey Kardashevskiy
2018-03-05 8:36 ` [Qemu-devel] [PATCH 7/7] address_space_rw: " Paolo Bonzini
2018-03-06 7:47 ` Alexey Kardashevskiy
2018-03-06 7:47 ` [Qemu-devel] [PATCH 0/7] memory: " Alexey Kardashevskiy
2018-03-06 8:16 ` Paolo Bonzini [this message]
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=a8de2fd6-a34b-4efa-d3ec-4fbc76c3dac4@redhat.com \
--to=pbonzini@redhat.com \
--cc=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.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).