]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xen-blkback: don't leak persistent grants from xen_blkbk_map()
authorJan Beulich <jbeulich@suse.com>
Fri, 26 Mar 2021 15:28:57 +0000 (16:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:30:31 +0000 (14:30 +0200)
commit632b046bb6120afe1df1bfa06943bee338dd97db
tree57f520d0993b2a0e632912cbfe482afa09459c56
parent039f4b3f2e920202c88f116cf2571222cff78a36
xen-blkback: don't leak persistent grants from xen_blkbk_map()

commit a846738f8c3788d846ed1f587270d2f2e3d32432 upstream.

The fix for XSA-365 zapped too many of the ->persistent_gnt[] entries.
Ones successfully obtained should not be overwritten, but instead left
for xen_blkbk_unmap_prepare() to pick up and put.

This is XSA-371.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: stable@vger.kernel.org
Reviewed-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wl@xen.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/xen-blkback/blkback.c