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

Re: BUG in 1f3d87c75129 ("x86/vpt: do not take pt_migrate rwlock in some cases")


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 15 Jun 2021 15:17:22 +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-SenderADCheck; bh=+2wv8m0t6FtTzNKuCaRqkZ+24yZa54s3jsZPKWq2ub4=; b=enBckFUi/9zEedkjVhL9cc41LFvkJR/Qwj8BlV3OweWVYr+/B3rs4ILgqbsd/bNNkH9Y3spr8LbH8MBIu1H8KnWkGRjl6gHzAIOx+Mo08FH7mMrFvT4Ve012sp8mPk0skENRn9ENG4xJL0z24aBkrvh9ZrWSowSsL2VWz/m5GH70IvAl1uXbgTwTUJgDiJfwCha8uwZgn/JynXrfJPJhXVpmSL+EgxIEYRLwg8UHEPY/o2PtFYXmynb0ff/a3LksGINEeyPqOJYXXtHlnDgdZOk2xT1UjVKHDfNJL5JGNRlSPvsH+6LLbi9990krHdUFuz2KdhjdmWUQ0F39Jmw5Fw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VaJ4qP5l5OqYfYSCKRwgu39GNw41W4SckKrfXferUAEBcmrs2dOLCtt6nldu1xxIhPt8x0SHyYNHn3eni2730Xf8RKUN0vf6X42NFHF07amfXv9uVJ6IsNCYsUjQIhIG7oG4P7DARyBAdUlvBgu4m6TKFANh02nPpywAgC5R+dFEja5NIdwcDkbwqIPh0Aa+BZabo3d1cjV2UGwu091DZeshHzmQ6SHuak4LGpx6NTdHsly5X5vF8FuPM+YIArrvqpjKaUnIgzMH0wy8C/TZ/YnijnAfapyiugMmH+E3NVYKgHIG4b1xNtkycvyHH3MKwHOQyS4VLjHkjYOUR+3iZg==
  • Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=suse.com;
  • Cc: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxx, boris.ostrovsky@xxxxxxxxxx, stephen.s.brennan@xxxxxxxxxx, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 15 Jun 2021 13:17:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.06.2021 11:17, Andrew Cooper wrote:
> On 15/06/2021 09:12, Roger Pau Monné wrote:
>> On Mon, Jun 14, 2021 at 06:01:17PM +0200, Jan Beulich wrote:
>>> On 14.06.2021 15:27, Roger Pau Monné wrote:
>>>> On Mon, Jun 14, 2021 at 01:53:09PM +0200, Jan Beulich wrote:
>>>>> x86/vpt: fully init timers before putting onto list
>>>>>
>>>>> With pt_vcpu_lock() no longer acquiring the pt_migrate lock, parties
>>>>> iterating the list and acting on the timers of the list entries will no
>>>>> longer be kept from entering their loops by create_periodic_time()'s
>>>>> holding of that lock. Therefore at least init_timer() needs calling
>>>>> ahead of list insertion, but keep this and set_timer() together.
>>>>>
>>>>> Fixes: 8113b02f0bf8 ("x86/vpt: do not take pt_migrate rwlock in some 
>>>>> cases")
>>>>> Reported-by: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>
>>>>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>>>> Thanks for looking into this so quickly, and sorry for not realizing
>>>> myself when relaxing the locking. Adding the timer to the list without
>>>> it being fully initialized was a latent issue even if protected by the
>>>> lock initially.
>>>>
>>>> Provided testing shows the issue is fixed:
>>> I guess the change here is needed anyway, even if testing finds there's
>>> still something amiss?
>> Indeed, just wondered whether there might be other instances using a
>> similar pattern, but I'm not able to spot any.
>>
>> It might even be better to fix other issues (if any) on a different
>> commit.
> 
> To be honest, this change is clearly good, and necessary.  I'd be
> tempted to commit it now, as is, irrespective of whether there are
> further bugs in this area.

Done.

Jan




 


Rackspace

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