Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7c138d12 authored by SeongJae Park's avatar SeongJae Park Committed by Greg Kroah-Hartman
Browse files

xenbus/backend: Protect xenbus callback with lock



[ Upstream commit 060eabe8fbe726aca341b518366da4d79e338100 ]

A driver's 'reclaim_memory' callback can race with 'probe' or 'remove'
because it will be called whenever memory pressure is detected.  To
avoid such race, this commit embeds a spinlock in each 'xenbus_device'
and make 'xenbus' to hold the lock while the corresponded callbacks are
running.

Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarSeongJae Park <sjpark@amazon.de>
Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
Stable-dep-of: afc545da381b ("xen: Fix the issue of resource not being properly released in xenbus_dev_probe()")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent bae18180
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment