Skip to contentSkip to conversation

Patch "netvsc: Deal with rescinded channels correctly" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Mar 22, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

netvsc: Deal with rescinded channels correctly

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
netvsc-deal-with-rescinded-channels-correctly.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Mar 22 14:40:23 CET 2018

From: "K. Y. Srinivasan" <[email protected]>
Date: Wed, 19 Apr 2017 13:53:49 -0700
Subject: netvsc: Deal with rescinded channels correctly

From: "K. Y. Srinivasan" <[email protected]>

[ Upstream commit 73e64fa4f417b22d8d5521999a631ced8e2d442e ]

We will not be able to send packets over a channel that has been rescinded. Make necessary adjustments so we can properly cleanup even when the channel is rescinded. This issue can be trigerred in the NIC hot-remove path.

---
 drivers/net/hyperv/netvsc.c |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/net/hyperv/netvsc.c +16 -0
@@ -151,6 +151,13 @@ static void netvsc_destroy_buf(struct hv
 				       sizeof(struct nvsp_message),
 				       (unsigned long)revoke_packet,
 				       VM_PKT_DATA_INBAND, 0);
+		/* If the failure is because the channel is rescinded;
+		 * ignore the failure since we cannot send on a rescinded
+		 * channel. This would allow us to properly cleanup
+		 * even when the channel is rescinded.
+		 */
+		if (device->channel->rescind)
+			ret = 0;
 		/*
 		 * If we failed here, we might as well return and
 		 * have a leak rather than continue and a bugchk
@@ -211,6 +218,15 @@ static void netvsc_destroy_buf(struct hv
 				       sizeof(struct nvsp_message),
 				       (unsigned long)revoke_packet,
 				       VM_PKT_DATA_INBAND, 0);
+
+		/* If the failure is because the channel is rescinded;
+		 * ignore the failure since we cannot send on a rescinded
+		 * channel. This would allow us to properly cleanup
+		 * even when the channel is rescinded.
+		 */
+		if (device->channel->rescind)
+			ret = 0;
+
 		/* If we failed here, we might as well return and
 		 * have a leak rather than continue and a bugchk
 		 */

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/netvsc-deal-with-rescinded-channels-correctly.patch