]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Sep 2018 08:56:14 +0000 (10:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Sep 2018 08:56:14 +0000 (10:56 +0200)
added patches:
hid-sony-support-ds4-dongle.patch
hid-sony-update-device-ids.patch
iw_cxgb4-only-allow-1-flush-on-user-qps.patch

queue-4.4/hid-sony-support-ds4-dongle.patch [new file with mode: 0644]
queue-4.4/hid-sony-update-device-ids.patch [new file with mode: 0644]
queue-4.4/iw_cxgb4-only-allow-1-flush-on-user-qps.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/hid-sony-support-ds4-dongle.patch b/queue-4.4/hid-sony-support-ds4-dongle.patch
new file mode 100644 (file)
index 0000000..da35c75
--- /dev/null
@@ -0,0 +1,54 @@
+From de66a1a04c25f2560a8dca7a95e2a150b0d5e17e Mon Sep 17 00:00:00 2001
+From: Roderick Colenbrander <roderick.colenbrander@sony.com>
+Date: Wed, 23 Nov 2016 14:07:11 -0800
+Subject: HID: sony: Support DS4 dongle
+
+From: Roderick Colenbrander <roderick.colenbrander@sony.com>
+
+commit de66a1a04c25f2560a8dca7a95e2a150b0d5e17e upstream.
+
+Add support for USB based DS4 dongle device, which allows connecting
+a DS4 through Bluetooth, but hides Bluetooth from the host system.
+
+Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ drivers/hid/hid-core.c |    1 +
+ drivers/hid/hid-ids.h  |    1 +
+ drivers/hid/hid-sony.c |    2 ++
+ 3 files changed, 4 insertions(+)
+
+--- a/drivers/hid/hid-core.c
++++ b/drivers/hid/hid-core.c
+@@ -2013,6 +2013,7 @@ static const struct hid_device_id hid_ha
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) },
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) },
++      { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_STEELSERIES, USB_DEVICE_ID_STEELSERIES_SRWS1) },
+--- a/drivers/hid/hid-ids.h
++++ b/drivers/hid/hid-ids.h
+@@ -880,6 +880,7 @@
+ #define USB_DEVICE_ID_SONY_PS3_CONTROLLER     0x0268
+ #define USB_DEVICE_ID_SONY_PS4_CONTROLLER     0x05c4
+ #define USB_DEVICE_ID_SONY_PS4_CONTROLLER_2   0x09cc
++#define USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE      0x0ba0
+ #define USB_DEVICE_ID_SONY_MOTION_CONTROLLER  0x03d5
+ #define USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER      0x042f
+ #define USB_DEVICE_ID_SONY_BUZZ_CONTROLLER            0x0002
+--- a/drivers/hid/hid-sony.c
++++ b/drivers/hid/hid-sony.c
+@@ -2464,6 +2464,8 @@ static const struct hid_device_id sony_d
+               .driver_data = DUALSHOCK4_CONTROLLER_USB },
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2),
+               .driver_data = DUALSHOCK4_CONTROLLER_BT },
++      { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE),
++              .driver_data = DUALSHOCK4_CONTROLLER_USB },
+       { }
+ };
+ MODULE_DEVICE_TABLE(hid, sony_devices);
diff --git a/queue-4.4/hid-sony-update-device-ids.patch b/queue-4.4/hid-sony-update-device-ids.patch
new file mode 100644 (file)
index 0000000..0731bdd
--- /dev/null
@@ -0,0 +1,56 @@
+From cf1015d65d7c8a5504a4c03afb60fb86bff0f032 Mon Sep 17 00:00:00 2001
+From: Roderick Colenbrander <roderick.colenbrander@sony.com>
+Date: Fri, 7 Oct 2016 12:39:40 -0700
+Subject: HID: sony: Update device ids
+
+From: Roderick Colenbrander <roderick.colenbrander@sony.com>
+
+commit cf1015d65d7c8a5504a4c03afb60fb86bff0f032 upstream.
+
+Support additional DS4 model.
+
+Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
+Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hid/hid-core.c |    2 ++
+ drivers/hid/hid-ids.h  |    1 +
+ drivers/hid/hid-sony.c |    4 ++++
+ 3 files changed, 7 insertions(+)
+
+--- a/drivers/hid/hid-core.c
++++ b/drivers/hid/hid-core.c
+@@ -2011,6 +2011,8 @@ static const struct hid_device_id hid_ha
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER) },
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER) },
++      { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) },
++      { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_STEELSERIES, USB_DEVICE_ID_STEELSERIES_SRWS1) },
+--- a/drivers/hid/hid-ids.h
++++ b/drivers/hid/hid-ids.h
+@@ -879,6 +879,7 @@
+ #define USB_DEVICE_ID_SONY_PS3_BDREMOTE               0x0306
+ #define USB_DEVICE_ID_SONY_PS3_CONTROLLER     0x0268
+ #define USB_DEVICE_ID_SONY_PS4_CONTROLLER     0x05c4
++#define USB_DEVICE_ID_SONY_PS4_CONTROLLER_2   0x09cc
+ #define USB_DEVICE_ID_SONY_MOTION_CONTROLLER  0x03d5
+ #define USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER      0x042f
+ #define USB_DEVICE_ID_SONY_BUZZ_CONTROLLER            0x0002
+--- a/drivers/hid/hid-sony.c
++++ b/drivers/hid/hid-sony.c
+@@ -2460,6 +2460,10 @@ static const struct hid_device_id sony_d
+               .driver_data = DUALSHOCK4_CONTROLLER_USB },
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER),
+               .driver_data = DUALSHOCK4_CONTROLLER_BT },
++      { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2),
++              .driver_data = DUALSHOCK4_CONTROLLER_USB },
++      { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2),
++              .driver_data = DUALSHOCK4_CONTROLLER_BT },
+       { }
+ };
+ MODULE_DEVICE_TABLE(hid, sony_devices);
diff --git a/queue-4.4/iw_cxgb4-only-allow-1-flush-on-user-qps.patch b/queue-4.4/iw_cxgb4-only-allow-1-flush-on-user-qps.patch
new file mode 100644 (file)
index 0000000..87f5d0b
--- /dev/null
@@ -0,0 +1,57 @@
+From 308aa2b8f7b7db3332a7d41099fd37851fb793b2 Mon Sep 17 00:00:00 2001
+From: Steve Wise <swise@opengridcomputing.com>
+Date: Fri, 31 Aug 2018 07:15:56 -0700
+Subject: iw_cxgb4: only allow 1 flush on user qps
+
+From: Steve Wise <swise@opengridcomputing.com>
+
+commit 308aa2b8f7b7db3332a7d41099fd37851fb793b2 upstream.
+
+Once the qp has been flushed, it cannot be flushed again.  The user qp
+flush logic wasn't enforcing it however.  The bug can cause
+touch-after-free crashes like:
+
+Unable to handle kernel paging request for data at address 0x000001ec
+Faulting instruction address: 0xc008000016069100
+Oops: Kernel access of bad area, sig: 11 [#1]
+...
+NIP [c008000016069100] flush_qp+0x80/0x480 [iw_cxgb4]
+LR [c00800001606cd6c] c4iw_modify_qp+0x71c/0x11d0 [iw_cxgb4]
+Call Trace:
+[c00800001606cd6c] c4iw_modify_qp+0x71c/0x11d0 [iw_cxgb4]
+[c00800001606e868] c4iw_ib_modify_qp+0x118/0x200 [iw_cxgb4]
+[c0080000119eae80] ib_security_modify_qp+0xd0/0x3d0 [ib_core]
+[c0080000119c4e24] ib_modify_qp+0xc4/0x2c0 [ib_core]
+[c008000011df0284] iwcm_modify_qp_err+0x44/0x70 [iw_cm]
+[c008000011df0fec] destroy_cm_id+0xcc/0x370 [iw_cm]
+[c008000011ed4358] rdma_destroy_id+0x3c8/0x520 [rdma_cm]
+[c0080000134b0540] ucma_close+0x90/0x1b0 [rdma_ucm]
+[c000000000444da4] __fput+0xe4/0x2f0
+
+So fix flush_qp() to only flush the wq once.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Steve Wise <swise@opengridcomputing.com>
+Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ drivers/infiniband/hw/cxgb4/qp.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/infiniband/hw/cxgb4/qp.c
++++ b/drivers/infiniband/hw/cxgb4/qp.c
+@@ -1183,6 +1183,12 @@ static void flush_qp(struct c4iw_qp *qhp
+       t4_set_wq_in_error(&qhp->wq);
+       if (qhp->ibqp.uobject) {
++
++              /* for user qps, qhp->wq.flushed is protected by qhp->mutex */
++              if (qhp->wq.flushed)
++                      return;
++
++              qhp->wq.flushed = 1;
+               t4_set_cq_in_error(&rchp->cq);
+               spin_lock_irqsave(&rchp->comp_handler_lock, flag);
+               (*rchp->ibcq.comp_handler)(&rchp->ibcq, rchp->ibcq.cq_context);
index 8fc2fd7358ea48b7832337f9294dd1258ec449ea..1b294e89d8d9d9635258466c0ae8cf740f4c4c70 100644 (file)
@@ -23,3 +23,6 @@ ext4-fix-online-resize-s-handling-of-a-too-small-final-block-group.patch
 ext4-fix-online-resizing-for-bigalloc-file-systems-with-a-1k-block-size.patch
 ext4-don-t-mark-mmp-buffer-head-dirty.patch
 arm64-add-trace_hardirqs_off-annotation-in-ret_to_user.patch
+hid-sony-update-device-ids.patch
+hid-sony-support-ds4-dongle.patch
+iw_cxgb4-only-allow-1-flush-on-user-qps.patch