From: Greg Kroah-Hartman Date: Mon, 31 May 2021 08:31:00 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v4.4.271~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c49b870cdfafb8790faf3cde20c4e34f4087e21;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: net-hso-bail-out-on-interrupt-urb-allocation-failure.patch revert-revert-alsa-usx2y-fix-potential-null-pointer-dereference.patch --- diff --git a/queue-5.4/net-hso-bail-out-on-interrupt-urb-allocation-failure.patch b/queue-5.4/net-hso-bail-out-on-interrupt-urb-allocation-failure.patch new file mode 100644 index 00000000000..32fad7fdb33 --- /dev/null +++ b/queue-5.4/net-hso-bail-out-on-interrupt-urb-allocation-failure.patch @@ -0,0 +1,49 @@ +From 4d52ebc7ace491d58f96d1f4a1cb9070c506b2e7 Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Wed, 19 May 2021 14:47:17 +0200 +Subject: net: hso: bail out on interrupt URB allocation failure + +From: Johan Hovold + +commit 4d52ebc7ace491d58f96d1f4a1cb9070c506b2e7 upstream. + +Commit 31db0dbd7244 ("net: hso: check for allocation failure in +hso_create_bulk_serial_device()") recently started returning an error +when the driver fails to allocate resources for the interrupt endpoint +and tiocmget functionality. + +For consistency let's bail out from probe also if the URB allocation +fails. + +Signed-off-by: Johan Hovold +Reviewed-by: Dan Carpenter +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/usb/hso.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +--- a/drivers/net/usb/hso.c ++++ b/drivers/net/usb/hso.c +@@ -2636,14 +2636,14 @@ static struct hso_device *hso_create_bul + } + + tiocmget->urb = usb_alloc_urb(0, GFP_KERNEL); +- if (tiocmget->urb) { +- mutex_init(&tiocmget->mutex); +- init_waitqueue_head(&tiocmget->waitq); +- } else +- hso_free_tiomget(serial); +- } +- else ++ if (!tiocmget->urb) ++ goto exit; ++ ++ mutex_init(&tiocmget->mutex); ++ init_waitqueue_head(&tiocmget->waitq); ++ } else { + num_urbs = 1; ++ } + + if (hso_serial_common_create(serial, num_urbs, BULK_URB_RX_SIZE, + BULK_URB_TX_SIZE)) diff --git a/queue-5.4/revert-revert-alsa-usx2y-fix-potential-null-pointer-dereference.patch b/queue-5.4/revert-revert-alsa-usx2y-fix-potential-null-pointer-dereference.patch new file mode 100644 index 00000000000..c1cf9c83f31 --- /dev/null +++ b/queue-5.4/revert-revert-alsa-usx2y-fix-potential-null-pointer-dereference.patch @@ -0,0 +1,38 @@ +From 27b57bb76a897be80494ee11ee4e85326d19383d Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Thu, 13 May 2021 21:40:38 +0200 +Subject: Revert "Revert "ALSA: usx2y: Fix potential NULL pointer dereference"" + +From: Greg Kroah-Hartman + +commit 27b57bb76a897be80494ee11ee4e85326d19383d upstream. + +This reverts commit 4667a6fc1777ce071504bab570d3599107f4790f. + +Takashi writes: + I have already started working on the bigger cleanup of this driver + code based on 5.13-rc1, so could you drop this revert? + +I missed our previous discussion about this, my fault for applying it. + +Reported-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/usx2y/usb_stream.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/sound/usb/usx2y/usb_stream.c ++++ b/sound/usb/usx2y/usb_stream.c +@@ -91,7 +91,12 @@ static int init_urbs(struct usb_stream_k + + for (u = 0; u < USB_STREAM_NURBS; ++u) { + sk->inurb[u] = usb_alloc_urb(sk->n_o_ps, GFP_KERNEL); ++ if (!sk->inurb[u]) ++ return -ENOMEM; ++ + sk->outurb[u] = usb_alloc_urb(sk->n_o_ps, GFP_KERNEL); ++ if (!sk->outurb[u]) ++ return -ENOMEM; + } + + if (init_pipe_urbs(sk, use_packsize, sk->inurb, indata, dev, in_pipe) || diff --git a/queue-5.4/series b/queue-5.4/series index 420dba29761..cb070c7836d 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -171,3 +171,5 @@ drm-i915-display-fix-compiler-warning-about-array-overrun.patch i915-fix-build-warning-in-intel_dp_get_link_status.patch drivers-net-ethernet-clean-up-unused-assignments.patch net-hns3-check-the-return-of-skb_checksum_help.patch +revert-revert-alsa-usx2y-fix-potential-null-pointer-dereference.patch +net-hso-bail-out-on-interrupt-urb-allocation-failure.patch