stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Suwan Kim <suwan.kim027@gmail.com>,
	Shuah khan <skhan@linuxfoundation.org>
Subject: [PATCH 5.3 090/193] usbip: Implement SG support to vhci-hcd and stub driver
Date: Mon, 11 Nov 2019 19:27:52 +0100	[thread overview]
Message-ID: <20191111181507.791877577@linuxfoundation.org> (raw)
In-Reply-To: <20191111181459.850623879@linuxfoundation.org>

From: Suwan Kim <suwan.kim027@gmail.com>

commit ea44d190764b4422af4d1c29eaeb9e69e353b406 upstream.

There are bugs on vhci with usb 3.0 storage device. In USB, each SG
list entry buffer should be divisible by the bulk max packet size.
But with native SG support, this problem doesn't matter because the
SG buffer is treated as contiguous buffer. But without native SG
support, USB storage driver breaks SG list into several URBs and the
error occurs because of a buffer size of URB that cannot be divided
by the bulk max packet size. The error situation is as follows.

When USB Storage driver requests 31.5 KB data and has SG list which
has 3584 bytes buffer followed by 7 4096 bytes buffer for some
reason. USB Storage driver splits this SG list into several URBs
because VHCI doesn't support SG and sends them separately. So the
first URB buffer size is 3584 bytes. When receiving data from device,
USB 3.0 device sends data packet of 1024 bytes size because the max
packet size of BULK pipe is 1024 bytes. So device sends 4096 bytes.
But the first URB buffer has only 3584 bytes buffer size. So host
controller terminates the transfer even though there is more data to
receive. So, vhci needs to support SG transfer to prevent this error.

In this patch, vhci supports SG regardless of whether the server's
host controller supports SG or not, because stub driver splits SG
list into several URBs if the server's host controller doesn't
support SG.

To support SG, vhci sets URB_DMA_MAP_SG flag in urb->transfer_flags
if URB has SG list and this flag will tell stub driver to use SG
list. After receiving urb from stub driver, vhci clear URB_DMA_MAP_SG
flag to avoid unnecessary DMA unmapping in HCD.

vhci sends each SG list entry to stub driver. Then, stub driver sees
the total length of the buffer and allocates SG table and pages
according to the total buffer length calling sgl_alloc(). After stub
driver receives completed URB, it again sends each SG list entry to
vhci.

If the server's host controller doesn't support SG, stub driver
breaks a single SG request into several URBs and submits them to
the server's host controller. When all the split URBs are completed,
stub driver reassembles the URBs into a single return command and
sends it to vhci.

Moreover, in the situation where vhci supports SG, but stub driver
does not, or vice versa, usbip works normally. Because there is no
protocol modification, there is no problem in communication between
server and client even if the one has a kernel without SG support.

In the case of vhci supports SG and stub driver doesn't, because
vhci sends only the total length of the buffer to stub driver as
it did before the patch applied, stub driver only needs to allocate
the required length of buffers using only kmalloc() regardless of
whether vhci supports SG or not. But stub driver has to allocate
buffer with kmalloc() as much as the total length of SG buffer which
is quite huge when vhci sends SG request, so it has overhead in
buffer allocation in this situation.

If stub driver needs to send data buffer to vhci because of IN pipe,
stub driver also sends only total length of buffer as metadata and
then sends real data as vhci does. Then vhci receive data from stub
driver and store it to the corresponding buffer of SG list entry.

And for the case of stub driver supports SG and vhci doesn't, since
the USB storage driver checks that vhci doesn't support SG and sends
the request to stub driver by splitting the SG list into multiple
URBs, stub driver allocates a buffer for each URB with kmalloc() as
it did before this patch.

* Test environment

Test uses two difference machines and two different kernel version
to make mismatch situation between the client and the server where
vhci supports SG, but stub driver does not, or vice versa. All tests
are conducted in both full SG support that both vhci and stub support
SG and half SG support that is the mismatch situation. Test kernel
version is 5.3-rc6 with commit "usb: add a HCD_DMA flag instead of
guestimating DMA capabilities" to avoid unnecessary DMA mapping and
unmapping.

 - Test kernel version
    - 5.3-rc6 with SG support
    - 5.1.20-200.fc29.x86_64 without SG support

* SG support test

 - Test devices
    - Super-speed storage device - SanDisk Ultra USB 3.0
    - High-speed storage device - SMI corporation USB 2.0 flash drive

 - Test description

Test read and write operation of mass storage device that uses the
BULK transfer. In test, the client reads and writes files whose size
is over 1G and it works normally.

* Regression test

 - Test devices
    - Super-speed device - Logitech Brio webcam
    - High-speed device  - Logitech C920 HD Pro webcam
    - Full-speed device  - Logitech bluetooth mouse
                         - Britz BR-Orion speaker
    - Low-speed device   - Logitech wired mouse

 - Test description

Moving and click test for mouse. To test the webcam, use gnome-cheese.
To test the speaker, play music and video on the client. All works
normally.

* VUDC compatibility test

VUDC also works well with this patch. Tests are done with two USB
gadget created by CONFIGFS USB gadget. Both use the BULK pipe.

        1. Serial gadget
        2. Mass storage gadget

 - Serial gadget test

Serial gadget on the host sends and receives data using cat command
on the /dev/ttyGS<N>. The client uses minicom to communicate with
the serial gadget.

 - Mass storage gadget test

After connecting the gadget with vhci, use "dd" to test read and
write operation on the client side.

Read  - dd if=/dev/sd<N> iflag=direct of=/dev/null bs=1G count=1
Write - dd if=<my file path> iflag=direct of=/dev/sd<N> bs=1G count=1

Signed-off-by: Suwan Kim <suwan.kim027@gmail.com>
Acked-by: Shuah khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20190828032741.12234-1-suwan.kim027@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/usbip/stub.h         |    7 +
 drivers/usb/usbip/stub_main.c    |   57 ++++++++---
 drivers/usb/usbip/stub_rx.c      |  202 +++++++++++++++++++++++++++------------
 drivers/usb/usbip/stub_tx.c      |   99 ++++++++++++++-----
 drivers/usb/usbip/usbip_common.c |   59 +++++++----
 drivers/usb/usbip/vhci_hcd.c     |   12 ++
 drivers/usb/usbip/vhci_rx.c      |    3 
 drivers/usb/usbip/vhci_tx.c      |   66 ++++++++++--
 8 files changed, 379 insertions(+), 126 deletions(-)

--- a/drivers/usb/usbip/stub.h
+++ b/drivers/usb/usbip/stub.h
@@ -52,7 +52,11 @@ struct stub_priv {
 	unsigned long seqnum;
 	struct list_head list;
 	struct stub_device *sdev;
-	struct urb *urb;
+	struct urb **urbs;
+	struct scatterlist *sgl;
+	int num_urbs;
+	int completed_urbs;
+	int urb_status;
 
 	int unlinking;
 };
@@ -86,6 +90,7 @@ extern struct usb_device_driver stub_dri
 struct bus_id_priv *get_busid_priv(const char *busid);
 void put_busid_priv(struct bus_id_priv *bid);
 int del_match_busid(char *busid);
+void stub_free_priv_and_urb(struct stub_priv *priv);
 void stub_device_cleanup_urbs(struct stub_device *sdev);
 
 /* stub_rx.c */
--- a/drivers/usb/usbip/stub_main.c
+++ b/drivers/usb/usbip/stub_main.c
@@ -6,6 +6,7 @@
 #include <linux/string.h>
 #include <linux/module.h>
 #include <linux/device.h>
+#include <linux/scatterlist.h>
 
 #include "usbip_common.h"
 #include "stub.h"
@@ -281,13 +282,49 @@ static struct stub_priv *stub_priv_pop_f
 	struct stub_priv *priv, *tmp;
 
 	list_for_each_entry_safe(priv, tmp, listhead, list) {
-		list_del(&priv->list);
+		list_del_init(&priv->list);
 		return priv;
 	}
 
 	return NULL;
 }
 
+void stub_free_priv_and_urb(struct stub_priv *priv)
+{
+	struct urb *urb;
+	int i;
+
+	for (i = 0; i < priv->num_urbs; i++) {
+		urb = priv->urbs[i];
+
+		if (!urb)
+			return;
+
+		kfree(urb->setup_packet);
+		urb->setup_packet = NULL;
+
+
+		if (urb->transfer_buffer && !priv->sgl) {
+			kfree(urb->transfer_buffer);
+			urb->transfer_buffer = NULL;
+		}
+
+		if (urb->num_sgs) {
+			sgl_free(urb->sg);
+			urb->sg = NULL;
+			urb->num_sgs = 0;
+		}
+
+		usb_free_urb(urb);
+	}
+	if (!list_empty(&priv->list))
+		list_del(&priv->list);
+	if (priv->sgl)
+		sgl_free(priv->sgl);
+	kfree(priv->urbs);
+	kmem_cache_free(stub_priv_cache, priv);
+}
+
 static struct stub_priv *stub_priv_pop(struct stub_device *sdev)
 {
 	unsigned long flags;
@@ -314,25 +351,15 @@ done:
 void stub_device_cleanup_urbs(struct stub_device *sdev)
 {
 	struct stub_priv *priv;
-	struct urb *urb;
+	int i;
 
 	dev_dbg(&sdev->udev->dev, "Stub device cleaning up urbs\n");
 
 	while ((priv = stub_priv_pop(sdev))) {
-		urb = priv->urb;
-		dev_dbg(&sdev->udev->dev, "free urb seqnum %lu\n",
-			priv->seqnum);
-		usb_kill_urb(urb);
-
-		kmem_cache_free(stub_priv_cache, priv);
+		for (i = 0; i < priv->num_urbs; i++)
+			usb_kill_urb(priv->urbs[i]);
 
-		kfree(urb->transfer_buffer);
-		urb->transfer_buffer = NULL;
-
-		kfree(urb->setup_packet);
-		urb->setup_packet = NULL;
-
-		usb_free_urb(urb);
+		stub_free_priv_and_urb(priv);
 	}
 }
 
--- a/drivers/usb/usbip/stub_rx.c
+++ b/drivers/usb/usbip/stub_rx.c
@@ -7,6 +7,7 @@
 #include <linux/kthread.h>
 #include <linux/usb.h>
 #include <linux/usb/hcd.h>
+#include <linux/scatterlist.h>
 
 #include "usbip_common.h"
 #include "stub.h"
@@ -201,7 +202,7 @@ static void tweak_special_requests(struc
 static int stub_recv_cmd_unlink(struct stub_device *sdev,
 				struct usbip_header *pdu)
 {
-	int ret;
+	int ret, i;
 	unsigned long flags;
 	struct stub_priv *priv;
 
@@ -246,12 +247,14 @@ static int stub_recv_cmd_unlink(struct s
 		 * so a driver in a client host will know the failure
 		 * of the unlink request ?
 		 */
-		ret = usb_unlink_urb(priv->urb);
-		if (ret != -EINPROGRESS)
-			dev_err(&priv->urb->dev->dev,
-				"failed to unlink a urb # %lu, ret %d\n",
-				priv->seqnum, ret);
-
+		for (i = priv->completed_urbs; i < priv->num_urbs; i++) {
+			ret = usb_unlink_urb(priv->urbs[i]);
+			if (ret != -EINPROGRESS)
+				dev_err(&priv->urbs[i]->dev->dev,
+					"failed to unlink %d/%d urb of seqnum %lu, ret %d\n",
+					i + 1, priv->num_urbs,
+					priv->seqnum, ret);
+		}
 		return 0;
 	}
 
@@ -433,14 +436,36 @@ static void masking_bogus_flags(struct u
 	urb->transfer_flags &= allowed;
 }
 
+static int stub_recv_xbuff(struct usbip_device *ud, struct stub_priv *priv)
+{
+	int ret;
+	int i;
+
+	for (i = 0; i < priv->num_urbs; i++) {
+		ret = usbip_recv_xbuff(ud, priv->urbs[i]);
+		if (ret < 0)
+			break;
+	}
+
+	return ret;
+}
+
 static void stub_recv_cmd_submit(struct stub_device *sdev,
 				 struct usbip_header *pdu)
 {
-	int ret;
 	struct stub_priv *priv;
 	struct usbip_device *ud = &sdev->ud;
 	struct usb_device *udev = sdev->udev;
+	struct scatterlist *sgl = NULL, *sg;
+	void *buffer = NULL;
+	unsigned long long buf_len;
+	int nents;
+	int num_urbs = 1;
 	int pipe = get_pipe(sdev, pdu);
+	int use_sg = pdu->u.cmd_submit.transfer_flags & URB_DMA_MAP_SG;
+	int support_sg = 1;
+	int np = 0;
+	int ret, i;
 
 	if (pipe == -1)
 		return;
@@ -449,76 +474,139 @@ static void stub_recv_cmd_submit(struct
 	if (!priv)
 		return;
 
-	/* setup a urb */
-	if (usb_pipeisoc(pipe))
-		priv->urb = usb_alloc_urb(pdu->u.cmd_submit.number_of_packets,
-					  GFP_KERNEL);
-	else
-		priv->urb = usb_alloc_urb(0, GFP_KERNEL);
+	buf_len = (unsigned long long)pdu->u.cmd_submit.transfer_buffer_length;
 
-	if (!priv->urb) {
-		usbip_event_add(ud, SDEV_EVENT_ERROR_MALLOC);
-		return;
+	/* allocate urb transfer buffer, if needed */
+	if (buf_len) {
+		if (use_sg) {
+			sgl = sgl_alloc(buf_len, GFP_KERNEL, &nents);
+			if (!sgl)
+				goto err_malloc;
+		} else {
+			buffer = kzalloc(buf_len, GFP_KERNEL);
+			if (!buffer)
+				goto err_malloc;
+		}
 	}
 
-	/* allocate urb transfer buffer, if needed */
-	if (pdu->u.cmd_submit.transfer_buffer_length > 0) {
-		priv->urb->transfer_buffer =
-			kzalloc(pdu->u.cmd_submit.transfer_buffer_length,
-				GFP_KERNEL);
-		if (!priv->urb->transfer_buffer) {
+	/* Check if the server's HCD supports SG */
+	if (use_sg && !udev->bus->sg_tablesize) {
+		/*
+		 * If the server's HCD doesn't support SG, break a single SG
+		 * request into several URBs and map each SG list entry to
+		 * corresponding URB buffer. The previously allocated SG
+		 * list is stored in priv->sgl (If the server's HCD support SG,
+		 * SG list is stored only in urb->sg) and it is used as an
+		 * indicator that the server split single SG request into
+		 * several URBs. Later, priv->sgl is used by stub_complete() and
+		 * stub_send_ret_submit() to reassemble the divied URBs.
+		 */
+		support_sg = 0;
+		num_urbs = nents;
+		priv->completed_urbs = 0;
+		pdu->u.cmd_submit.transfer_flags &= ~URB_DMA_MAP_SG;
+	}
+
+	/* allocate urb array */
+	priv->num_urbs = num_urbs;
+	priv->urbs = kmalloc_array(num_urbs, sizeof(*priv->urbs), GFP_KERNEL);
+	if (!priv->urbs)
+		goto err_urbs;
+
+	/* setup a urb */
+	if (support_sg) {
+		if (usb_pipeisoc(pipe))
+			np = pdu->u.cmd_submit.number_of_packets;
+
+		priv->urbs[0] = usb_alloc_urb(np, GFP_KERNEL);
+		if (!priv->urbs[0])
+			goto err_urb;
+
+		if (buf_len) {
+			if (use_sg) {
+				priv->urbs[0]->sg = sgl;
+				priv->urbs[0]->num_sgs = nents;
+				priv->urbs[0]->transfer_buffer = NULL;
+			} else {
+				priv->urbs[0]->transfer_buffer = buffer;
+			}
+		}
+
+		/* copy urb setup packet */
+		priv->urbs[0]->setup_packet = kmemdup(&pdu->u.cmd_submit.setup,
+					8, GFP_KERNEL);
+		if (!priv->urbs[0]->setup_packet) {
 			usbip_event_add(ud, SDEV_EVENT_ERROR_MALLOC);
 			return;
 		}
-	}
 
-	/* copy urb setup packet */
-	priv->urb->setup_packet = kmemdup(&pdu->u.cmd_submit.setup, 8,
-					  GFP_KERNEL);
-	if (!priv->urb->setup_packet) {
-		dev_err(&udev->dev, "allocate setup_packet\n");
-		usbip_event_add(ud, SDEV_EVENT_ERROR_MALLOC);
-		return;
+		usbip_pack_pdu(pdu, priv->urbs[0], USBIP_CMD_SUBMIT, 0);
+	} else {
+		for_each_sg(sgl, sg, nents, i) {
+			priv->urbs[i] = usb_alloc_urb(0, GFP_KERNEL);
+			/* The URBs which is previously allocated will be freed
+			 * in stub_device_cleanup_urbs() if error occurs.
+			 */
+			if (!priv->urbs[i])
+				goto err_urb;
+
+			usbip_pack_pdu(pdu, priv->urbs[i], USBIP_CMD_SUBMIT, 0);
+			priv->urbs[i]->transfer_buffer = sg_virt(sg);
+			priv->urbs[i]->transfer_buffer_length = sg->length;
+		}
+		priv->sgl = sgl;
 	}
 
-	/* set other members from the base header of pdu */
-	priv->urb->context                = (void *) priv;
-	priv->urb->dev                    = udev;
-	priv->urb->pipe                   = pipe;
-	priv->urb->complete               = stub_complete;
+	for (i = 0; i < num_urbs; i++) {
+		/* set other members from the base header of pdu */
+		priv->urbs[i]->context = (void *) priv;
+		priv->urbs[i]->dev = udev;
+		priv->urbs[i]->pipe = pipe;
+		priv->urbs[i]->complete = stub_complete;
 
-	usbip_pack_pdu(pdu, priv->urb, USBIP_CMD_SUBMIT, 0);
+		/* no need to submit an intercepted request, but harmless? */
+		tweak_special_requests(priv->urbs[i]);
 
+		masking_bogus_flags(priv->urbs[i]);
+	}
 
-	if (usbip_recv_xbuff(ud, priv->urb) < 0)
+	if (stub_recv_xbuff(ud, priv) < 0)
 		return;
 
-	if (usbip_recv_iso(ud, priv->urb) < 0)
+	if (usbip_recv_iso(ud, priv->urbs[0]) < 0)
 		return;
 
-	/* no need to submit an intercepted request, but harmless? */
-	tweak_special_requests(priv->urb);
-
-	masking_bogus_flags(priv->urb);
 	/* urb is now ready to submit */
-	ret = usb_submit_urb(priv->urb, GFP_KERNEL);
-
-	if (ret == 0)
-		usbip_dbg_stub_rx("submit urb ok, seqnum %u\n",
-				  pdu->base.seqnum);
-	else {
-		dev_err(&udev->dev, "submit_urb error, %d\n", ret);
-		usbip_dump_header(pdu);
-		usbip_dump_urb(priv->urb);
+	for (i = 0; i < priv->num_urbs; i++) {
+		ret = usb_submit_urb(priv->urbs[i], GFP_KERNEL);
 
-		/*
-		 * Pessimistic.
-		 * This connection will be discarded.
-		 */
-		usbip_event_add(ud, SDEV_EVENT_ERROR_SUBMIT);
+		if (ret == 0)
+			usbip_dbg_stub_rx("submit urb ok, seqnum %u\n",
+					pdu->base.seqnum);
+		else {
+			dev_err(&udev->dev, "submit_urb error, %d\n", ret);
+			usbip_dump_header(pdu);
+			usbip_dump_urb(priv->urbs[i]);
+
+			/*
+			 * Pessimistic.
+			 * This connection will be discarded.
+			 */
+			usbip_event_add(ud, SDEV_EVENT_ERROR_SUBMIT);
+			break;
+		}
 	}
 
 	usbip_dbg_stub_rx("Leave\n");
+	return;
+
+err_urb:
+	kfree(priv->urbs);
+err_urbs:
+	kfree(buffer);
+	sgl_free(sgl);
+err_malloc:
+	usbip_event_add(ud, SDEV_EVENT_ERROR_MALLOC);
 }
 
 /* recv a pdu */
--- a/drivers/usb/usbip/stub_tx.c
+++ b/drivers/usb/usbip/stub_tx.c
@@ -5,25 +5,11 @@
 
 #include <linux/kthread.h>
 #include <linux/socket.h>
+#include <linux/scatterlist.h>
 
 #include "usbip_common.h"
 #include "stub.h"
 
-static void stub_free_priv_and_urb(struct stub_priv *priv)
-{
-	struct urb *urb = priv->urb;
-
-	kfree(urb->setup_packet);
-	urb->setup_packet = NULL;
-
-	kfree(urb->transfer_buffer);
-	urb->transfer_buffer = NULL;
-
-	list_del(&priv->list);
-	kmem_cache_free(stub_priv_cache, priv);
-	usb_free_urb(urb);
-}
-
 /* be in spin_lock_irqsave(&sdev->priv_lock, flags) */
 void stub_enqueue_ret_unlink(struct stub_device *sdev, __u32 seqnum,
 			     __u32 status)
@@ -85,6 +71,22 @@ void stub_complete(struct urb *urb)
 		break;
 	}
 
+	/*
+	 * If the server breaks single SG request into the several URBs, the
+	 * URBs must be reassembled before sending completed URB to the vhci.
+	 * Don't wake up the tx thread until all the URBs are completed.
+	 */
+	if (priv->sgl) {
+		priv->completed_urbs++;
+
+		/* Only save the first error status */
+		if (urb->status && !priv->urb_status)
+			priv->urb_status = urb->status;
+
+		if (priv->completed_urbs < priv->num_urbs)
+			return;
+	}
+
 	/* link a urb to the queue of tx. */
 	spin_lock_irqsave(&sdev->priv_lock, flags);
 	if (sdev->ud.tcp_socket == NULL) {
@@ -156,18 +158,22 @@ static int stub_send_ret_submit(struct s
 	size_t total_size = 0;
 
 	while ((priv = dequeue_from_priv_tx(sdev)) != NULL) {
-		int ret;
-		struct urb *urb = priv->urb;
+		struct urb *urb = priv->urbs[0];
 		struct usbip_header pdu_header;
 		struct usbip_iso_packet_descriptor *iso_buffer = NULL;
 		struct kvec *iov = NULL;
+		struct scatterlist *sg;
+		u32 actual_length = 0;
 		int iovnum = 0;
+		int ret;
+		int i;
 
 		txsize = 0;
 		memset(&pdu_header, 0, sizeof(pdu_header));
 		memset(&msg, 0, sizeof(msg));
 
-		if (urb->actual_length > 0 && !urb->transfer_buffer) {
+		if (urb->actual_length > 0 && !urb->transfer_buffer &&
+		   !urb->num_sgs) {
 			dev_err(&sdev->udev->dev,
 				"urb: actual_length %d transfer_buffer null\n",
 				urb->actual_length);
@@ -176,6 +182,11 @@ static int stub_send_ret_submit(struct s
 
 		if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS)
 			iovnum = 2 + urb->number_of_packets;
+		else if (usb_pipein(urb->pipe) && urb->actual_length > 0 &&
+			urb->num_sgs)
+			iovnum = 1 + urb->num_sgs;
+		else if (usb_pipein(urb->pipe) && priv->sgl)
+			iovnum = 1 + priv->num_urbs;
 		else
 			iovnum = 2;
 
@@ -192,6 +203,15 @@ static int stub_send_ret_submit(struct s
 		setup_ret_submit_pdu(&pdu_header, urb);
 		usbip_dbg_stub_tx("setup txdata seqnum: %d\n",
 				  pdu_header.base.seqnum);
+
+		if (priv->sgl) {
+			for (i = 0; i < priv->num_urbs; i++)
+				actual_length += priv->urbs[i]->actual_length;
+
+			pdu_header.u.ret_submit.status = priv->urb_status;
+			pdu_header.u.ret_submit.actual_length = actual_length;
+		}
+
 		usbip_header_correct_endian(&pdu_header, 1);
 
 		iov[iovnum].iov_base = &pdu_header;
@@ -200,12 +220,47 @@ static int stub_send_ret_submit(struct s
 		txsize += sizeof(pdu_header);
 
 		/* 2. setup transfer buffer */
-		if (usb_pipein(urb->pipe) &&
+		if (usb_pipein(urb->pipe) && priv->sgl) {
+			/* If the server split a single SG request into several
+			 * URBs because the server's HCD doesn't support SG,
+			 * reassemble the split URB buffers into a single
+			 * return command.
+			 */
+			for (i = 0; i < priv->num_urbs; i++) {
+				iov[iovnum].iov_base =
+					priv->urbs[i]->transfer_buffer;
+				iov[iovnum].iov_len =
+					priv->urbs[i]->actual_length;
+				iovnum++;
+			}
+			txsize += actual_length;
+		} else if (usb_pipein(urb->pipe) &&
 		    usb_pipetype(urb->pipe) != PIPE_ISOCHRONOUS &&
 		    urb->actual_length > 0) {
-			iov[iovnum].iov_base = urb->transfer_buffer;
-			iov[iovnum].iov_len  = urb->actual_length;
-			iovnum++;
+			if (urb->num_sgs) {
+				unsigned int copy = urb->actual_length;
+				int size;
+
+				for_each_sg(urb->sg, sg, urb->num_sgs, i) {
+					if (copy == 0)
+						break;
+
+					if (copy < sg->length)
+						size = copy;
+					else
+						size = sg->length;
+
+					iov[iovnum].iov_base = sg_virt(sg);
+					iov[iovnum].iov_len = size;
+
+					iovnum++;
+					copy -= size;
+				}
+			} else {
+				iov[iovnum].iov_base = urb->transfer_buffer;
+				iov[iovnum].iov_len  = urb->actual_length;
+				iovnum++;
+			}
 			txsize += urb->actual_length;
 		} else if (usb_pipein(urb->pipe) &&
 			   usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) {
--- a/drivers/usb/usbip/usbip_common.c
+++ b/drivers/usb/usbip/usbip_common.c
@@ -680,8 +680,12 @@ EXPORT_SYMBOL_GPL(usbip_pad_iso);
 /* some members of urb must be substituted before. */
 int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb)
 {
-	int ret;
+	struct scatterlist *sg;
+	int ret = 0;
+	int recv;
 	int size;
+	int copy;
+	int i;
 
 	if (ud->side == USBIP_STUB || ud->side == USBIP_VUDC) {
 		/* the direction of urb must be OUT. */
@@ -701,29 +705,48 @@ int usbip_recv_xbuff(struct usbip_device
 	if (!(size > 0))
 		return 0;
 
-	if (size > urb->transfer_buffer_length) {
+	if (size > urb->transfer_buffer_length)
 		/* should not happen, probably malicious packet */
-		if (ud->side == USBIP_STUB) {
-			usbip_event_add(ud, SDEV_EVENT_ERROR_TCP);
-			return 0;
-		} else {
-			usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
-			return -EPIPE;
-		}
-	}
+		goto error;
+
+	if (urb->num_sgs) {
+		copy = size;
+		for_each_sg(urb->sg, sg, urb->num_sgs, i) {
+			int recv_size;
+
+			if (copy < sg->length)
+				recv_size = copy;
+			else
+				recv_size = sg->length;
+
+			recv = usbip_recv(ud->tcp_socket, sg_virt(sg),
+						recv_size);
 
-	ret = usbip_recv(ud->tcp_socket, urb->transfer_buffer, size);
-	if (ret != size) {
-		dev_err(&urb->dev->dev, "recv xbuf, %d\n", ret);
-		if (ud->side == USBIP_STUB || ud->side == USBIP_VUDC) {
-			usbip_event_add(ud, SDEV_EVENT_ERROR_TCP);
-		} else {
-			usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
-			return -EPIPE;
+			if (recv != recv_size)
+				goto error;
+
+			copy -= recv;
+			ret += recv;
 		}
+
+		if (ret != size)
+			goto error;
+	} else {
+		ret = usbip_recv(ud->tcp_socket, urb->transfer_buffer, size);
+		if (ret != size)
+			goto error;
 	}
 
 	return ret;
+
+error:
+	dev_err(&urb->dev->dev, "recv xbuf, %d\n", ret);
+	if (ud->side == USBIP_STUB || ud->side == USBIP_VUDC)
+		usbip_event_add(ud, SDEV_EVENT_ERROR_TCP);
+	else
+		usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
+
+	return -EPIPE;
 }
 EXPORT_SYMBOL_GPL(usbip_recv_xbuff);
 
--- a/drivers/usb/usbip/vhci_hcd.c
+++ b/drivers/usb/usbip/vhci_hcd.c
@@ -697,7 +697,8 @@ static int vhci_urb_enqueue(struct usb_h
 	}
 	vdev = &vhci_hcd->vdev[portnum-1];
 
-	if (!urb->transfer_buffer && urb->transfer_buffer_length) {
+	if (!urb->transfer_buffer && !urb->num_sgs &&
+	     urb->transfer_buffer_length) {
 		dev_dbg(dev, "Null URB transfer buffer\n");
 		return -EINVAL;
 	}
@@ -1143,6 +1144,15 @@ static int vhci_setup(struct usb_hcd *hc
 		hcd->speed = HCD_USB3;
 		hcd->self.root_hub->speed = USB_SPEED_SUPER;
 	}
+
+	/*
+	 * Support SG.
+	 * sg_tablesize is an arbitrary value to alleviate memory pressure
+	 * on the host.
+	 */
+	hcd->self.sg_tablesize = 32;
+	hcd->self.no_sg_constraint = 1;
+
 	return 0;
 }
 
--- a/drivers/usb/usbip/vhci_rx.c
+++ b/drivers/usb/usbip/vhci_rx.c
@@ -90,6 +90,9 @@ static void vhci_recv_ret_submit(struct
 	if (usbip_dbg_flag_vhci_rx)
 		usbip_dump_urb(urb);
 
+	if (urb->num_sgs)
+		urb->transfer_flags &= ~URB_DMA_MAP_SG;
+
 	usbip_dbg_vhci_rx("now giveback urb %u\n", pdu->base.seqnum);
 
 	spin_lock_irqsave(&vhci->lock, flags);
--- a/drivers/usb/usbip/vhci_tx.c
+++ b/drivers/usb/usbip/vhci_tx.c
@@ -5,6 +5,7 @@
 
 #include <linux/kthread.h>
 #include <linux/slab.h>
+#include <linux/scatterlist.h>
 
 #include "usbip_common.h"
 #include "vhci.h"
@@ -50,19 +51,23 @@ static struct vhci_priv *dequeue_from_pr
 
 static int vhci_send_cmd_submit(struct vhci_device *vdev)
 {
+	struct usbip_iso_packet_descriptor *iso_buffer = NULL;
 	struct vhci_priv *priv = NULL;
+	struct scatterlist *sg;
 
 	struct msghdr msg;
-	struct kvec iov[3];
+	struct kvec *iov;
 	size_t txsize;
 
 	size_t total_size = 0;
+	int iovnum;
+	int err = -ENOMEM;
+	int i;
 
 	while ((priv = dequeue_from_priv_tx(vdev)) != NULL) {
 		int ret;
 		struct urb *urb = priv->urb;
 		struct usbip_header pdu_header;
-		struct usbip_iso_packet_descriptor *iso_buffer = NULL;
 
 		txsize = 0;
 		memset(&pdu_header, 0, sizeof(pdu_header));
@@ -72,18 +77,45 @@ static int vhci_send_cmd_submit(struct v
 		usbip_dbg_vhci_tx("setup txdata urb seqnum %lu\n",
 				  priv->seqnum);
 
+		if (urb->num_sgs && usb_pipeout(urb->pipe))
+			iovnum = 2 + urb->num_sgs;
+		else
+			iovnum = 3;
+
+		iov = kcalloc(iovnum, sizeof(*iov), GFP_KERNEL);
+		if (!iov) {
+			usbip_event_add(&vdev->ud, SDEV_EVENT_ERROR_MALLOC);
+			return -ENOMEM;
+		}
+
+		if (urb->num_sgs)
+			urb->transfer_flags |= URB_DMA_MAP_SG;
+
 		/* 1. setup usbip_header */
 		setup_cmd_submit_pdu(&pdu_header, urb);
 		usbip_header_correct_endian(&pdu_header, 1);
+		iovnum = 0;
 
-		iov[0].iov_base = &pdu_header;
-		iov[0].iov_len  = sizeof(pdu_header);
+		iov[iovnum].iov_base = &pdu_header;
+		iov[iovnum].iov_len  = sizeof(pdu_header);
 		txsize += sizeof(pdu_header);
+		iovnum++;
 
 		/* 2. setup transfer buffer */
 		if (!usb_pipein(urb->pipe) && urb->transfer_buffer_length > 0) {
-			iov[1].iov_base = urb->transfer_buffer;
-			iov[1].iov_len  = urb->transfer_buffer_length;
+			if (urb->num_sgs &&
+				      !usb_endpoint_xfer_isoc(&urb->ep->desc)) {
+				for_each_sg(urb->sg, sg, urb->num_sgs, i) {
+					iov[iovnum].iov_base = sg_virt(sg);
+					iov[iovnum].iov_len = sg->length;
+					iovnum++;
+				}
+			} else {
+				iov[iovnum].iov_base = urb->transfer_buffer;
+				iov[iovnum].iov_len  =
+						urb->transfer_buffer_length;
+				iovnum++;
+			}
 			txsize += urb->transfer_buffer_length;
 		}
 
@@ -95,23 +127,26 @@ static int vhci_send_cmd_submit(struct v
 			if (!iso_buffer) {
 				usbip_event_add(&vdev->ud,
 						SDEV_EVENT_ERROR_MALLOC);
-				return -1;
+				goto err_iso_buffer;
 			}
 
-			iov[2].iov_base = iso_buffer;
-			iov[2].iov_len  = len;
+			iov[iovnum].iov_base = iso_buffer;
+			iov[iovnum].iov_len  = len;
+			iovnum++;
 			txsize += len;
 		}
 
-		ret = kernel_sendmsg(vdev->ud.tcp_socket, &msg, iov, 3, txsize);
+		ret = kernel_sendmsg(vdev->ud.tcp_socket, &msg, iov, iovnum,
+				     txsize);
 		if (ret != txsize) {
 			pr_err("sendmsg failed!, ret=%d for %zd\n", ret,
 			       txsize);
-			kfree(iso_buffer);
 			usbip_event_add(&vdev->ud, VDEV_EVENT_ERROR_TCP);
-			return -1;
+			err = -EPIPE;
+			goto err_tx;
 		}
 
+		kfree(iov);
 		kfree(iso_buffer);
 		usbip_dbg_vhci_tx("send txdata\n");
 
@@ -119,6 +154,13 @@ static int vhci_send_cmd_submit(struct v
 	}
 
 	return total_size;
+
+err_tx:
+	kfree(iso_buffer);
+err_iso_buffer:
+	kfree(iov);
+
+	return err;
 }
 
 static struct vhci_unlink *dequeue_from_unlink_tx(struct vhci_device *vdev)



  parent reply	other threads:[~2019-11-11 19:01 UTC|newest]

Thread overview: 200+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 18:26 [PATCH 5.3 000/193] 5.3.11-stable review Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 001/193] bonding: fix state transition issue in link monitoring Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 002/193] CDC-NCM: handle incomplete transfer of MTU Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 003/193] ipv4: Fix table id reference in fib_sync_down_addr Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 004/193] net: ethernet: octeon_mgmt: Account for second possible VLAN header Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 005/193] net: fix data-race in neigh_event_send() Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 006/193] net: qualcomm: rmnet: Fix potential UAF when unregistering Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 007/193] net/tls: fix sk_msg trim on fallback to copy mode Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 008/193] net: usb: qmi_wwan: add support for DW5821e with eSIM support Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 009/193] NFC: fdp: fix incorrect free object Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 010/193] nfc: netlink: fix double device reference drop Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 011/193] NFC: st21nfca: fix double free Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 012/193] qede: fix NULL pointer deref in __qede_remove() Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 013/193] net: mscc: ocelot: dont handle netdev events for other netdevs Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 014/193] net: mscc: ocelot: fix NULL pointer on LAG slave removal Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 015/193] net/tls: dont pay attention to sk_write_pending when pushing partial records Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 016/193] net/tls: add a TX lock Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 017/193] selftests/tls: add test for concurrent recv and send Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 018/193] ipv6: fixes rt6_probe() and fib6_nh->last_probe init Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 019/193] net: hns: Fix the stray netpoll locks causing deadlock in NAPI path Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 020/193] net: prevent load/store tearing on sk->sk_stamp Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 021/193] net: sched: prevent duplicate flower rules from tcf_proto destroy race Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 022/193] net/smc: fix ethernet interface refcounting Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 023/193] vsock/virtio: fix sock refcnt holding during the shutdown Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 024/193] r8169: fix page read in r8168g_mdio_read Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 025/193] ALSA: timer: Fix incorrectly assigned timer instance Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 026/193] ALSA: bebob: fix to detect configured source of sampling clock for Focusrite Saffire Pro i/o series Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 027/193] ALSA: hda/ca0132 - Fix possible workqueue stall Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 028/193] mm: memcontrol: fix NULL-ptr deref in percpu stats flush Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 029/193] mm: memcontrol: fix network errors from failing __GFP_ATOMIC charges Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 030/193] mm, meminit: recalculate pcpu batch and high limits after init completes Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 031/193] mm: thp: handle page cache THP correctly in PageTransCompoundMap Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 032/193] mm, vmstat: hide /proc/pagetypeinfo from normal users Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 033/193] dump_stack: avoid the livelock of the dump_lock Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 034/193] mm: slab: make page_cgroup_ino() to recognize non-compound slab pages properly Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 035/193] btrfs: Consider system chunk array size for new SYSTEM chunks Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 036/193] btrfs: tree-checker: Fix wrong check on max devid Greg Kroah-Hartman
2019-11-11 18:26 ` [PATCH 5.3 037/193] btrfs: save i_size to avoid double evaluation of i_size_read in compress_file_range Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 038/193] tools: gpio: Use !building_out_of_srctree to determine srctree Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 039/193] pinctrl: intel: Avoid potential glitches if pin is in GPIO mode Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 040/193] perf tools: Fix time sorting Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 041/193] perf map: Use zalloc for map_groups Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 042/193] drm/radeon: fix si_enable_smc_cac() failed issue Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 043/193] HID: wacom: generic: Treat serial number and related fields as unsigned Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 044/193] mm/khugepaged: fix might_sleep() warn with CONFIG_HIGHPTE=y Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 045/193] soundwire: depend on ACPI Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 046/193] soundwire: depend on ACPI || OF Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 047/193] soundwire: bus: set initial value to port_status Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 048/193] blkcg: make blkcg_print_stat() print stats only for online blkgs Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 049/193] arm64: Do not mask out PTE_RDONLY in pte_same() Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 050/193] ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 051/193] ceph: fix use-after-free in __ceph_remove_cap() Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 052/193] ceph: fix RCU case handling in ceph_d_revalidate() Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 053/193] ceph: add missing check in d_revalidate snapdir handling Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 054/193] ceph: dont try to handle hashed dentries in non-O_CREAT atomic_open Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 055/193] ceph: dont allow copy_file_range when stripe_count != 1 Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 056/193] iio: adc: stm32-adc: fix stopping dma Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 057/193] iio: imu: adis16480: make sure provided frequency is positive Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 058/193] iio: imu: inv_mpu6050: fix no data on MPU6050 Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 059/193] iio: srf04: fix wrong limitation in distance measuring Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 060/193] ARM: sunxi: Fix CPU powerdown on A83T Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 061/193] ARM: dts: imx6-logicpd: Re-enable SNVS power key Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 062/193] cpufreq: intel_pstate: Fix invalid EPB setting Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 063/193] clone3: validate stack arguments Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 064/193] netfilter: nf_tables: Align nft_expr private data to 64-bit Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 065/193] netfilter: ipset: Fix an error code in ip_set_sockfn_get() Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 066/193] intel_th: gth: Fix the window switching sequence Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 067/193] intel_th: pci: Add Comet Lake PCH support Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 068/193] intel_th: pci: Add Jasper " Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 069/193] x86/dumpstack/64: Dont evaluate exception stacks before setup Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 070/193] x86/apic/32: Avoid bogus LDR warnings Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 071/193] SMB3: Fix persistent handles reconnect Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 072/193] can: usb_8dev: fix use-after-free on disconnect Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 073/193] can: flexcan: disable completely the ECC mechanism Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 074/193] can: c_can: c_can_poll(): only read status register after status IRQ Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 075/193] can: peak_usb: fix a potential out-of-sync while decoding packets Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 076/193] can: rx-offload: can_rx_offload_queue_sorted(): fix error handling, avoid skb mem leak Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 077/193] can: gs_usb: gs_can_open(): prevent memory leak Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 078/193] can: dev: add missing of_node_put() after calling of_get_child_by_name() Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 079/193] can: mcba_usb: fix use-after-free on disconnect Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 080/193] can: peak_usb: fix slab info leak Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 081/193] configfs: fix a deadlock in configfs_symlink() Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 082/193] ALSA: usb-audio: More validations of descriptor units Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 083/193] ALSA: usb-audio: Simplify parse_audio_unit() Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 084/193] ALSA: usb-audio: Unify the release of usb_mixer_elem_info objects Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 085/193] ALSA: usb-audio: Remove superfluous bLength checks Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 086/193] ALSA: usb-audio: Clean up check_input_term() Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 087/193] ALSA: usb-audio: Fix possible NULL dereference at create_yamaha_midi_quirk() Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 088/193] ALSA: usb-audio: remove some dead code Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 089/193] ALSA: usb-audio: Fix copy&paste error in the validator Greg Kroah-Hartman
2019-11-11 18:27 ` Greg Kroah-Hartman [this message]
2019-11-11 18:27 ` [PATCH 5.3 091/193] HID: google: add magnemite/masterball USB ids Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 092/193] dmaengine: sprd: Fix the link-list pointer register configuration issue Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 093/193] bpf: lwtunnel: Fix reroute supplying invalid dst Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 094/193] dmaengine: xilinx_dma: Fix 64-bit simple AXIDMA transfer Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 095/193] dmaengine: xilinx_dma: Fix control reg update in vdma_channel_set_config Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 096/193] dmaengine: sprd: Fix the possible memory leak issue Greg Kroah-Hartman
2019-11-11 18:27 ` [PATCH 5.3 097/193] HID: intel-ish-hid: fix wrong error handling in ishtp_cl_alloc_tx_ring() Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 098/193] powerpc/32s: fix allow/prevent_user_access() when crossing segment boundaries Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 099/193] RDMA/mlx5: Clear old rate limit when closing QP Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 100/193] iw_cxgb4: fix ECN check on the passive accept Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 101/193] RDMA/siw: free siw_base_qp in kref release routine Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 102/193] RDMA/qedr: Fix reported firmware version Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 103/193] IB/core: Use rdma_read_gid_l2_fields to compare GID L2 fields Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 104/193] net/mlx5e: Tx, Fix assumption of single WQEBB of NOP in cleanup flow Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 105/193] net/mlx5e: kTLS, Release reference on DUMPed fragments in shutdown flow Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 106/193] net/mlx5e: TX, Fix consumer index of error cqe dump Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 107/193] net/mlx5: prevent memory leak in mlx5_fpga_conn_create_cq Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 108/193] net/mlx5: fix memory leak in mlx5_fw_fatal_reporter_dump Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 109/193] selftests/bpf: More compatible nc options in test_tc_edt Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 110/193] scsi: qla2xxx: fixup incorrect usage of host_byte Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 111/193] scsi: lpfc: Check queue pointer before use Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 112/193] scsi: ufs-bsg: Wake the device before sending raw upiu commands Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 113/193] ARC: [plat-hsdk]: Enable on-board SPI NOR flash IC Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 114/193] RDMA/uverbs: Prevent potential underflow Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 115/193] bpf: Fix use after free in subprogs jited symbol removal Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 116/193] net: stmmac: Fix the problem of tso_xmit Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 117/193] net: openvswitch: free vport unless register_netdevice() succeeds Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 118/193] scsi: lpfc: Honor module parameter lpfc_use_adisc Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 119/193] scsi: qla2xxx: Initialized mailbox to prevent driver load failure Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 120/193] bpf: Fix use after free in bpf_get_prog_name Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 121/193] iwlwifi: pcie: fix PCI ID 0x2720 configs that should be soc Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 122/193] iwlwifi: pcie: fix all 9460 entries for qnj Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 123/193] iwlwifi: pcie: 0x2720 is qu and 0x30DC is not Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 124/193] netfilter: nf_flow_table: set timeout before insertion into hashes Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 125/193] drm/v3d: Fix memory leak in v3d_submit_cl_ioctl Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 126/193] xsk: Fix registration of Rx-only sockets Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 127/193] net: phy: smsc: LAN8740: add PHY_RST_AFTER_CLK_EN flag Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 128/193] ipvs: dont ignore errors in case refcounting ip_vs module fails Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 129/193] ipvs: move old_secure_tcp into struct netns_ipvs Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 130/193] netfilter: nft_payload: fix missing check for matching length in offloads Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 131/193] RDMA/nldev: Skip counter if port doesnt match Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 132/193] bonding: fix unexpected IFF_BONDING bit unset Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 133/193] bonding: use dynamic lockdep key instead of subclass Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 134/193] macsec: fix refcnt leak in module exit routine Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 135/193] virt_wifi: " Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 136/193] scsi: sd: define variable dif as unsigned int instead of bool Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 137/193] usb: dwc3: select CONFIG_REGMAP_MMIO Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 138/193] usb: fsl: Check memory resource before releasing it Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 139/193] usb: gadget: udc: atmel: Fix interrupt storm in FIFO mode Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 140/193] usb: gadget: composite: Fix possible double free memory bug Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 141/193] usb: dwc3: pci: prevent memory leak in dwc3_pci_probe Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 142/193] usb: gadget: configfs: fix concurrent issue between composite APIs Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 143/193] usb: dwc3: remove the call trace of USBx_GFLADJ Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 144/193] perf/x86/amd/ibs: Fix reading of the IBS OpData register and thus precise RIP validity Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 145/193] perf/x86/amd/ibs: Handle erratum #420 only on the affected CPU family (10h) Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 146/193] perf/x86/uncore: Fix event group support Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 147/193] USB: Skip endpoints with 0 maxpacket length Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 148/193] USB: ldusb: use unsigned size format specifiers Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 149/193] usbip: tools: Fix read_usb_vudc_device() error path handling Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 150/193] RDMA/iw_cxgb4: Avoid freeing skb twice in arp failure case Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 151/193] RDMA/hns: Prevent memory leaks of eq->buf_list Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 152/193] hwmon: (ina3221) Fix read timeout issue Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 153/193] scsi: qla2xxx: stop timer in shutdown path Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 154/193] sched/topology: Dont try to build empty sched domains Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 155/193] sched/topology: Allow sched_asym_cpucapacity to be disabled Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 156/193] nvme-multipath: fix possible io hang after ctrl reconnect Greg Kroah-Hartman
2019-11-11 18:28 ` [PATCH 5.3 157/193] fjes: Handle workqueue allocation failure Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 158/193] net: hisilicon: Fix "Trying to free already-free IRQ" Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 159/193] wimax: i2400: Fix memory leak in i2400m_op_rfkill_sw_toggle Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 160/193] net: mscc: ocelot: fix vlan_filtering when enslaving to bridge before link is up Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 161/193] net: mscc: ocelot: refuse to overwrite the ports native vlan Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 162/193] iommu/amd: Apply the same IVRS IOAPIC workaround to Acer Aspire A315-41 Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 163/193] mt76: dma: fix buffer unmap with non-linear skbs Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 164/193] drm/amdgpu/sdma5: do not execute 0-sized IBs (v2) Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 165/193] drm/sched: Set error to s_fence if HW job submission failed Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 166/193] drm/amdgpu: If amdgpu_ib_schedule fails return back the error Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 167/193] drm/amd/display: do not synchronize "drr" displays Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 168/193] drm/amd/display: add 50us buffer as WA for pstate switch in active Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 169/193] drm/amd/display: Passive DP->HDMI dongle detection fix Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 170/193] dc.c:use kzalloc without test Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 171/193] SUNRPC: The TCP back channel mustnt disappear while requests are outstanding Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 172/193] SUNRPC: The RDMA " Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 173/193] SUNRPC: Destroy the back channel when we destroy the host transport Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 174/193] hv_netvsc: Fix error handling in netvsc_attach() Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 175/193] efi/tpm: Return -EINVAL when determining tpm final events log size fails Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 176/193] efi: libstub/arm: Account for firmware reserved memory at the base of RAM Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 177/193] x86, efi: Never relocate kernel below lowest acceptable address Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 178/193] arm64: cpufeature: Enable Qualcomm Falkor errata 1009 for Kryo Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 179/193] usb: dwc3: gadget: fix race when disabling ep with cancelled xfers Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 180/193] arm64: apply ARM64_ERRATUM_845719 workaround for Brahma-B53 core Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 181/193] arm64: Brahma-B53 is SSB and spectre v2 safe Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 182/193] arm64: apply ARM64_ERRATUM_843419 workaround for Brahma-B53 core Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 183/193] NFSv4: Dont allow a cached open with a revoked delegation Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 184/193] net: ethernet: arc: add the missed clk_disable_unprepare Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 185/193] igb: Fix constant media auto sense switching when no cable is connected Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 186/193] e1000: fix memory leaks Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 187/193] gve: Fixes DMA synchronization Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 188/193] ocfs2: protect extent tree in ocfs2_prepare_inode_for_write() Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 189/193] pinctrl: cherryview: Fix irq_valid_mask calculation Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 190/193] clk: imx8m: Use SYS_PLL1_800M as intermediate parent of CLK_ARM Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 191/193] timekeeping/vsyscall: Update VDSO data unconditionally Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 192/193] mm/filemap.c: dont initiate writeback if mapping has no dirty pages Greg Kroah-Hartman
2019-11-11 18:29 ` [PATCH 5.3 193/193] cgroup,writeback: dont switch wbs immediately on dead wbs if the memcg is dead Greg Kroah-Hartman
2019-11-12  2:39 ` [PATCH 5.3 000/193] 5.3.11-stable review kernelci.org bot
2019-11-12  5:42 ` Naresh Kamboju
2019-11-12 13:52   ` Greg Kroah-Hartman
2019-11-12 12:01 ` Jon Hunter
2019-11-12 18:20 ` Guenter Roeck
2019-11-12 18:26   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191111181507.791877577@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=stable@vger.kernel.org \
    --cc=suwan.kim027@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).