Re: [PATCH v13 2/5] xenbus/backend: Protect xenbus callback with lock

From: JÃrgen GroÃ
Date: Fri Dec 20 2019 - 06:42:20 EST


On 18.12.19 19:37, SeongJae Park wrote:
From: SeongJae Park <sjpark@xxxxxxxxx>

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.

Signed-off-by: SeongJae Park <sjpark@xxxxxxxxx>

Reviewed-by: Juergen Gross <jgross@xxxxxxxx>


Juergen