summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-03-30 17:55:47 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2021-03-30 17:55:47 +0200
commita080642d2f831cc34b68663c0db1c447d3807421 (patch)
tree6fc9b8508e491f37e742c6bef4149dc65c50399f /drivers/block
parentMerge tag 'xtensa-20210329' of git://github.com/jcmvbkbc/linux-xtensa (diff)
parentxen-blkback: don't leak persistent grants from xen_blkbk_map() (diff)
downloadlinux-a080642d2f831cc34b68663c0db1c447d3807421.tar.xz
linux-a080642d2f831cc34b68663c0db1c447d3807421.zip
Merge tag 'for-linus-5.12b-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen fix from Juergen Gross: "One Xen related security fix (XSA-371)" * tag 'for-linus-5.12b-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen-blkback: don't leak persistent grants from xen_blkbk_map()
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/xen-blkback/blkback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
index 1cdf09ff67b6..14e452896d04 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -891,7 +891,7 @@ next:
out:
for (i = last_map; i < num; i++) {
/* Don't zap current batch's valid persistent grants. */
- if(i >= last_map + segs_to_map)
+ if(i >= map_until)
pages[i]->persistent_gnt = NULL;
pages[i]->handle = BLKBACK_INVALID_HANDLE;
}