|
[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")
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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |