[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: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 19 May 2023 10:33:26 +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=QI7nFyGxmmFoMXbiNr4biDnPFS64C3AU2e1jSgYKMu4=; b=ISwlaSISVbaGhjeDmOOOz+4yeOIBtckJmVvZYuwySQdtoWH9Gs3DzidOM1/Gz+2X6Qed5HlPRAxxKr2DpAWeWiG0jnfPD2c7Sah7LXuf1DOvW6SH+UFNAdeoEP3VPR77E7xzVUjzk/FpV90sxrTfTeBxpuWUx9iR9DgkLEkesAb+xCPTvldMNYBW/v+4VvwpS05tJn8MfseV5Ag4zypeW2Q6RVej3eXqvXx47JlcVN+JzH6aw36pGcFg0dgWZkls8mQHwBa58J2zUZ4wRdST0X/zYpVvF3TSs9ausTGU11dUyWGmhMyQ9emnBAjsIrQy73gbX4hVZ0/fjiny3AazAQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gpkGAt8Mhi898t1IkGT6F6u3iJWxj4wPb17mtztAA3nqjjs448Ul98ZljC6YnEhFfoyunH/68AwdVA9rY32JsWrmuSwbeZUuQpK5BFzAoA03rK8hjnYDUx9LTazWj5xIjXh2QohzMWgKM/yhielYb7XWC0UYVSAuAUTcb+XMz0rNjcvkt1lLmHhHrWJ6Svk5+6t91riwlMZcvlu8ejoQJWKMGglXdFLwbkSYnA6pFtGLGxReV5u1dmLsPB83CU5l/j2H3gEwITF54VAIwakaFkf0AOSbcZ/QKHmTv9vh1uPR6joECLRx0gnYYD4+9gLH4Ac8IQikDYTyUBiICggyFQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: George Dunlap <george.dunlap@xxxxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 19 May 2023 08:33:37 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18.05.2023 23:27, Stewart Hildebrand wrote:
> 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?

In principle yes. I might be willing to time out at some point, but
not before at least one ping was sent (and some more time has passed
afterwards).

Jan



 


Rackspace

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