All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: Philip Elcan <pelcan@codeaurora.org>,
	Wei Liu <wei.liu2@citrix.com>, Wei Chen <Wei.Chen@arm.com>,
	Vikram Sethi <vikrams@codeaurora.org>,
	Steve Capper <Steve.Capper@arm.com>,
	xen-devel <xen-devel@lists.xensource.com>,
	Shannon Zhao <shannon.zhao@linaro.org>,
	Shanker Donthineni <shankerd@codeaurora.org>
Subject: Re: [PATCH] arm/acpi: Fix the deadlock in function vgic_lock_rank()
Date: Wed, 1 Jun 2016 11:49:27 +0100	[thread overview]
Message-ID: <574EBDB7.2000806@arm.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1606011018350.3896@sstabellini-ThinkPad-X260>

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.

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-06-01 10:49 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 [this message]
2016-06-01 13:55               ` Shannon Zhao
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=574EBDB7.2000806@arm.com \
    --to=julien.grall@arm.com \
    --cc=Steve.Capper@arm.com \
    --cc=Wei.Chen@arm.com \
    --cc=pelcan@codeaurora.org \
    --cc=shankerd@codeaurora.org \
    --cc=shannon.zhao@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.