[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1] xen/sched/null: avoid crash after failed domU creation


  • To: Juergen Gross <jgross@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Thu, 18 May 2023 17:27:05 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=xppf23Ldn6VHQaqMu3fTD0tDbMfuwtf5e9zTUkPLz9g=; b=XnpWOIiL19pRoUuvewRmZ5dugnxN0bCKtJ+kWjwfbE3AG1Kbv2we7j+LIbGAmSx7PwaMgrE+TSzBd1hsD9t6OBTc7II3NW5PsqqDegrU97HaUQZcEzSTQ3/RyTBh1XrPqYKDdGiMalAY+QeHWcnA3J3RE66BAf2DLpAPq2vPuqVdLMYqiDo7TjULO1ywTqiCmIvdTFAgZna7Us7/r3uEMO066xqXnalpz44C4Nftfbh3ANrbtZ3cngvSr2WcvwiwjCIlTzMYbV0uLPrsvjVIlgMLka7p8rKHKcDto5nP8PIuZcKO4u6uqwTh4OKZdF0Ge2oI5d47r4r1wR3sIRzt8g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GFuKoENbNPnebXoLEdzjJBAtns+18JEWgH+L0KI3D4eSp2TLcq249KogLMfwp7u177/0K8EnkfTAhp8y76df+2TVEyf2tc6BrRbXjsacxqjSPkwSTI9w7tksznTiQxr3sUQ+Iko1U6R2gjk0/340ZOYUFwGcjrF9Vy03jSeQk6Y1EgI6K/1kTFirP++tXquPOWyLhlpfqfEXjiKeTWg3F8oiZbkJX0aCAWiYE/4H536b+BW/jN6mjoh+yGDnXFIzPADPnsreHN8zC/3hPOkQde3JGplUugDUsjFoay6B5JoHPjVZQHXeBRsT+w15MPhQ90zYajht2h3k66oOoX1I0w==
  • Cc: George Dunlap <george.dunlap@xxxxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>
  • Delivery-date: Thu, 18 May 2023 21:27:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 5/5/23 01:59, Juergen Gross wrote:
> On 01.05.23 22:30, Stewart Hildebrand wrote:
>> When creating a domU, but the creation fails, there is a corner case that may
>> lead to a crash in the null scheduler when running a debug build of Xen.
>>
>> (XEN) ****************************************
>> (XEN) Panic on CPU 0:
>> (XEN) Assertion 'npc->unit == unit' failed at common/sched/null.c:379
>> (XEN) ****************************************
>>
>> The events leading to the crash are:
>>
>> * null_unit_insert() was invoked with the unit offline. Since the unit was
>>    offline, unit_assign() was not called, and null_unit_insert() returned.
>> * Later during domain creation, the unit was onlined
>> * Eventually, domain creation failed due to bad configuration
>> * null_unit_remove() was invoked with the unit still online. Since the unit 
>> was
>>    online, it called unit_deassign() and triggered an ASSERT.
>>
>> To fix this, only call unit_deassign() when npc->unit is non-NULL in
>> null_unit_remove.
>>
>> Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
> 
> Reviewed-by: Juergen Gross <jgross@xxxxxxxx>

Thanks for the review. Does this still need a maintainer ack?



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.