[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] Xen crashes on ASSERT on suspend/resume, suggested fix
- To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 26 May 2023 09:03:54 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jZS4E3RE0DPANCemp9MMAnYN7VeL3U/TsArg9jnn23o=; b=LAhNLJ+IQfjRbS1NuXV0lwQqfra0uPwCXUjKy9V86FJS98hgGghJPge7MTfDrTh0DRmRWvlueD4iaV66efaja0GXKelYco9MgJm59zqo4a1WOYwEL9TZDZaaYYdrZYDileh8ZaDivnUev5mBwktasaKgPYdnbuwRHOsvT4srzpHeAOStyjzFAZpAe2quy7/32jWMzGsGTAs4iSSH5saqDoxNG8wvxo0uSUJ8lVzNHLa/1XN5ajM1gt+Oi5firg7D8v158Wkmjk/Qbwkq7p4ITpnt3HxrPJqDJfTU/wxWpUkCNCzrwpDPy2DSGpYGTdG9joQR2daM1/Tox2s6dX4Faw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pe5paRYqS0CjEzBmXzIAog+9OPWjuUY6UPLRklSI0q08rBQ2UBsiYA0PJ85k6cbkOTGoQsAbBM0vX6DD3YE9UB1mkh+cLzXhiMz7Yb8CiVDFI3UHQ2p1tbhxn185PGbtBYiVNFzsLKSpEiHK75Trd6/lbdU4W4YbR1CGI1zeg07V/ZheJzCYaX6g3GAepghme3npG1qpv+sB0DPsahUyCV1j0nPolg6HYrbFkof/Qd19PywFUNGwZ5BQ+GLqrYHiPh2Xzf3S52resybSwf78uXT4+aLpmsvQlkBQKN3Z0r970RZQAJG7rSdJhdkdQecAORCxIFKQBNpgsvgLfXmO+A==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Stefano Stabellini <stefano.stabellini@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, xenia.ragiadakou@xxxxxxx, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Fri, 26 May 2023 07:04:24 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 25.05.2023 21:54, Stefano Stabellini wrote:
> On Thu, 25 May 2023, Jan Beulich wrote:
>> On 25.05.2023 01:51, Stefano Stabellini wrote:
>>> xen/irq: fix races between send_cleanup_vector and _clear_irq_vector
>>
>> This title is, I'm afraid, already misleading. No such race can occur
>> afaict, as both callers of _clear_irq_vector() acquire the IRQ
>> descriptor lock first, and irq_complete_move() (the sole caller of
>> send_cleanup_vector()) is only ever invoked as or by an ->ack()
>> hook, which in turn is only invoked with, again, the descriptor lock
>> held.
>
> Yes I see that you are right about the locking, and thank you for taking
> the time to look into it.
>
> One last question: could it be that a second interrupt arrives while
> ->ack() is being handled? do_IRQ() is running with interrupts disabled?
It is, at least as far as the invocation of ->ack() is concerned. Else
the locking scheme would be broken. You may not that around ->handler()
invocation we enable interrupts.
Jan
|