]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xen/events: fix delayed eoi list handling
authorJuergen Gross <jgross@suse.com>
Mon, 25 Sep 2023 15:54:13 +0000 (17:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 16:56:23 +0000 (16:56 +0000)
commitb67d16b2373b757aec2252560e5308432d20f183
tree907dcce47c8f8b634de8427dd35185be5ddc9e14
parent8531a4194e59c57cd5043359a30e4925dbac4b38
xen/events: fix delayed eoi list handling

[ Upstream commit 47d970204054f859f35a2237baa75c2d84fcf436 ]

When delaying eoi handling of events, the related elements are queued
into the percpu lateeoi list. In case the list isn't empty, the
elements should be sorted by the time when eoi handling is to happen.

Unfortunately a new element will never be queued at the start of the
list, even if it has a handling time lower than all other list
elements.

Fix that by handling that case the same way as for an empty list.

Fixes: e99502f76271 ("xen/events: defer eoi in case of excessive number of events")
Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/xen/events/events_base.c