Re: [PATCH v11 4/6] xen/blkback: Protect 'reclaim_memory()' with 'reclaim_lock'

From: JÃrgen GroÃ
Date: Tue Dec 17 2019 - 11:15:20 EST


On 17.12.19 17:07, SeongJae Park wrote:
From: SeongJae Park <sjpark@xxxxxxxxx>

The 'reclaim_memory()' callback of blkback could race with
'xen_blkbk_probe()' and 'xen_blkbk_remove()'. In the case, incompletely
linked 'backend_info' and 'blkif' might be exposed to the callback, thus
result in bad results including NULL dereference. This commit fixes the
problem by applying the 'reclaim_lock' protection to those.

Note that this commit is separated for review purpose only. As the
previous commit might result in race condition and might make bisect
confuse, please squash this commit into previous commit if possible.

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

Please merge this patch into patch 2.


Juergen