On 13/03/2015 09:32, Paolo Bonzini wrote:
>
>
> On 13/03/2015 09:16, Fam Zheng wrote:
>> +if (atomic_cmpxchg(&bounce.in_use, false, true)) {
atomic_or is enough...
>> atomic_cmpxchg is here to take the ownership of bounce iff it is not in use,
>> so
>> I think it is neces
On Fri, 03/13 09:32, Paolo Bonzini wrote:
>
>
> On 13/03/2015 09:16, Fam Zheng wrote:
> >>> > > +if (atomic_cmpxchg(&bounce.in_use, false, true)) {
> >> >
> >> > atomic_or is enough...
> > atomic_cmpxchg is here to take the ownership of bounce iff it is not in
> > use, so
> > I think it
On 13/03/2015 09:16, Fam Zheng wrote:
>>> > > +if (atomic_cmpxchg(&bounce.in_use, false, true)) {
>> >
>> > atomic_or is enough...
> atomic_cmpxchg is here to take the ownership of bounce iff it is not in use,
> so
> I think it is necessary.
It's changing false to true and true to true
On Fri, 03/13 09:09, Paolo Bonzini wrote:
>
>
> On 13/03/2015 02:38, Fam Zheng wrote:
> > There could be a race condition when two processes call
> > address_space_map concurrently and both want to use the bounce buffer.
> >
> > Add an in_use flag in BounceBuffer to sync it.
> >
> > Signed-off-
On 13/03/2015 02:38, Fam Zheng wrote:
> There could be a race condition when two processes call
> address_space_map concurrently and both want to use the bounce buffer.
>
> Add an in_use flag in BounceBuffer to sync it.
>
> Signed-off-by: Fam Zheng
> ---
> exec.c | 5 -
> 1 file changed,
There could be a race condition when two processes call
address_space_map concurrently and both want to use the bounce buffer.
Add an in_use flag in BounceBuffer to sync it.
Signed-off-by: Fam Zheng
---
exec.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/exec.c b/exec