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

Commit 0c47a70a authored by Hank Janssen's avatar Hank Janssen Committed by Greg Kroah-Hartman
Browse files

staging: hv: Fixed bounce kmap problem by using correct index



Fixed bounce offset kmap problem by using correct index.
The symptom of the problem is that in some NAS appliances this problem
represents Itself by a unresponsive VM under a load with many clients writing
small files.

Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b681b588
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -495,7 +495,7 @@ static unsigned int copy_to_bounce_buffer(struct scatterlist *orig_sgl,


		/* ASSERT(orig_sgl[i].offset + orig_sgl[i].length <= PAGE_SIZE); */
		/* ASSERT(orig_sgl[i].offset + orig_sgl[i].length <= PAGE_SIZE); */


		if (j == 0)
		if (bounce_addr == 0)
			bounce_addr = (unsigned long)kmap_atomic(sg_page((&bounce_sgl[j])), KM_IRQ0);
			bounce_addr = (unsigned long)kmap_atomic(sg_page((&bounce_sgl[j])), KM_IRQ0);


		while (srclen) {
		while (srclen) {
@@ -556,7 +556,7 @@ static unsigned int copy_from_bounce_buffer(struct scatterlist *orig_sgl,
		destlen = orig_sgl[i].length;
		destlen = orig_sgl[i].length;
		/* ASSERT(orig_sgl[i].offset + orig_sgl[i].length <= PAGE_SIZE); */
		/* ASSERT(orig_sgl[i].offset + orig_sgl[i].length <= PAGE_SIZE); */


		if (j == 0)
		if (bounce_addr == 0)
			bounce_addr = (unsigned long)kmap_atomic(sg_page((&bounce_sgl[j])), KM_IRQ0);
			bounce_addr = (unsigned long)kmap_atomic(sg_page((&bounce_sgl[j])), KM_IRQ0);


		while (destlen) {
		while (destlen) {