From: Shannon Zhao <shannon.zhao@linaro.org>
To: Julien Grall <julien.grall@arm.com>,
Stefano Stabellini <sstabellini@kernel.org>
Cc: Philip Elcan <pelcan@codeaurora.org>,
Wei Liu <wei.liu2@citrix.com>,
Vikram Sethi <vikrams@codeaurora.org>,
Wei Chen <Wei.Chen@arm.com>, Steve Capper <Steve.Capper@arm.com>,
xen-devel <xen-devel@lists.xensource.com>,
Shanker Donthineni <shankerd@codeaurora.org>
Subject: Re: [PATCH] arm/acpi: Fix the deadlock in function vgic_lock_rank()
Date: Wed, 1 Jun 2016 21:55:23 +0800 [thread overview]
Message-ID: <574EE94B.6000306@linaro.org> (raw)
In-Reply-To: <574EBDB7.2000806@arm.com>
On 2016年06月01日 18:49, Julien Grall wrote:
> Hi Stefano,
>
> On 01/06/16 10:54, Stefano Stabellini wrote:
>>> spin_is_locked does not work as you expect. The function will not
>>> tell you if
>>> the lock was taken by the current CPU, but if the lock was taken by
>>> *a* CPU.
>>>
>>> It would be possible to have CPU A calling this function and have CPU
>>> B with
>>> the lock taken. So the data structure would be accessed by 2 CPUs
>>> concurrently, which is unsafe.
>>
>> Damn, you are right. I don't think we have a spin_lock function which
>> tells us if the spin_lock was taken by us.
>
> Unfortunately not.
>
>> The only other option I see would be duplicating route_irq_to_guest and
>> gic_route_irq_to_guest, introducing a second version of those functions
>> which assume that the rank lock was already taken. Very very ugly. I'll
>> just revert the commit and wait for better patches from Shannon.
>
> I am working on a patch series to decouple IRQ configuration and
> routing. It should be ready soon.
>
Thanks, Julien :)
--
Shannon
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-06-01 13:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-27 0:39 [PATCH] arm/acpi: Fix the deadlock in function vgic_lock_rank() Shanker Donthineni
2016-05-27 13:56 ` Julien Grall
2016-05-30 13:16 ` Stefano Stabellini
2016-05-30 19:45 ` Julien Grall
2016-05-31 0:55 ` Shannon Zhao
2016-05-31 9:40 ` Stefano Stabellini
2016-05-31 10:11 ` Julien Grall
2016-06-01 9:54 ` Stefano Stabellini
2016-06-01 10:49 ` Julien Grall
2016-06-01 13:55 ` Shannon Zhao [this message]
2016-05-31 11:37 ` Wei Liu
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=574EE94B.6000306@linaro.org \
--to=shannon.zhao@linaro.org \
--cc=Steve.Capper@arm.com \
--cc=Wei.Chen@arm.com \
--cc=julien.grall@arm.com \
--cc=pelcan@codeaurora.org \
--cc=shankerd@codeaurora.org \
--cc=sstabellini@kernel.org \
--cc=vikrams@codeaurora.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xensource.com \
/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).