]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Mar 2021 14:10:36 +0000 (15:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Mar 2021 14:10:36 +0000 (15:10 +0100)
added patches:
media-usbtv-fix-deadlock-on-suspend.patch
media-v4l-vsp1-fix-bru-null-pointer-access.patch
media-v4l-vsp1-fix-uif-null-pointer-access.patch
sh_eth-fix-trscer-mask-for-r7s9210.patch

queue-4.19/media-usbtv-fix-deadlock-on-suspend.patch [new file with mode: 0644]
queue-4.19/media-v4l-vsp1-fix-bru-null-pointer-access.patch [new file with mode: 0644]
queue-4.19/media-v4l-vsp1-fix-uif-null-pointer-access.patch [new file with mode: 0644]
queue-4.19/series
queue-4.19/sh_eth-fix-trscer-mask-for-r7s9210.patch [new file with mode: 0644]

diff --git a/queue-4.19/media-usbtv-fix-deadlock-on-suspend.patch b/queue-4.19/media-usbtv-fix-deadlock-on-suspend.patch
new file mode 100644 (file)
index 0000000..ec8ae05
--- /dev/null
@@ -0,0 +1,42 @@
+From 8a7e27fd5cd696ba564a3f62cedef7269cfd0723 Mon Sep 17 00:00:00 2001
+From: Maxim Mikityanskiy <maxtram95@gmail.com>
+Date: Fri, 5 Feb 2021 23:51:39 +0100
+Subject: media: usbtv: Fix deadlock on suspend
+
+From: Maxim Mikityanskiy <maxtram95@gmail.com>
+
+commit 8a7e27fd5cd696ba564a3f62cedef7269cfd0723 upstream.
+
+usbtv doesn't support power management, so on system suspend the
+.disconnect callback of the driver is called. The teardown sequence
+includes a call to snd_card_free. Its implementation waits until the
+refcount of the sound card device drops to zero, however, if its file is
+open, snd_card_file_add takes a reference, which can't be dropped during
+the suspend, because the userspace processes are already frozen at this
+point. snd_card_free waits for completion forever, leading to a hang on
+suspend.
+
+This commit fixes this deadlock condition by replacing snd_card_free
+with snd_card_free_when_closed, that doesn't wait until all references
+are released, allowing suspend to progress.
+
+Fixes: 63ddf68de52e ("[media] usbtv: add audio support")
+Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
+Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/usb/usbtv/usbtv-audio.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/media/usb/usbtv/usbtv-audio.c
++++ b/drivers/media/usb/usbtv/usbtv-audio.c
+@@ -399,7 +399,7 @@ void usbtv_audio_free(struct usbtv *usbt
+       cancel_work_sync(&usbtv->snd_trigger);
+       if (usbtv->snd && usbtv->udev) {
+-              snd_card_free(usbtv->snd);
++              snd_card_free_when_closed(usbtv->snd);
+               usbtv->snd = NULL;
+       }
+ }
diff --git a/queue-4.19/media-v4l-vsp1-fix-bru-null-pointer-access.patch b/queue-4.19/media-v4l-vsp1-fix-bru-null-pointer-access.patch
new file mode 100644 (file)
index 0000000..15d4680
--- /dev/null
@@ -0,0 +1,32 @@
+From ac8d82f586c8692b501cb974604a71ef0e22a04c Mon Sep 17 00:00:00 2001
+From: Biju Das <biju.das.jz@bp.renesas.com>
+Date: Mon, 1 Mar 2021 13:08:27 +0100
+Subject: media: v4l: vsp1: Fix bru null pointer access
+
+From: Biju Das <biju.das.jz@bp.renesas.com>
+
+commit ac8d82f586c8692b501cb974604a71ef0e22a04c upstream.
+
+RZ/G2L SoC has only BRS. This patch fixes null pointer access,when only
+BRS is enabled.
+
+Fixes: cbb7fa49c7466("media: v4l: vsp1: Rename BRU to BRx")
+Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
+Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/platform/vsp1/vsp1_drm.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/media/platform/vsp1/vsp1_drm.c
++++ b/drivers/media/platform/vsp1/vsp1_drm.c
+@@ -243,7 +243,7 @@ static int vsp1_du_pipeline_setup_brx(st
+               brx = &vsp1->bru->entity;
+       else if (pipe->brx && !drm_pipe->force_brx_release)
+               brx = pipe->brx;
+-      else if (!vsp1->bru->entity.pipe)
++      else if (vsp1_feature(vsp1, VSP1_HAS_BRU) && !vsp1->bru->entity.pipe)
+               brx = &vsp1->bru->entity;
+       else
+               brx = &vsp1->brs->entity;
diff --git a/queue-4.19/media-v4l-vsp1-fix-uif-null-pointer-access.patch b/queue-4.19/media-v4l-vsp1-fix-uif-null-pointer-access.patch
new file mode 100644 (file)
index 0000000..a0f7668
--- /dev/null
@@ -0,0 +1,35 @@
+From 6732f313938027a910e1f7351951ff52c0329e70 Mon Sep 17 00:00:00 2001
+From: Biju Das <biju.das.jz@bp.renesas.com>
+Date: Mon, 1 Mar 2021 13:08:28 +0100
+Subject: media: v4l: vsp1: Fix uif null pointer access
+
+From: Biju Das <biju.das.jz@bp.renesas.com>
+
+commit 6732f313938027a910e1f7351951ff52c0329e70 upstream.
+
+RZ/G2L SoC has no UIF. This patch fixes null pointer access, when UIF
+module is not used.
+
+Fixes: 5e824f989e6e8("media: v4l: vsp1: Integrate DISCOM in display pipeline")
+Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
+Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/platform/vsp1/vsp1_drm.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/platform/vsp1/vsp1_drm.c
++++ b/drivers/media/platform/vsp1/vsp1_drm.c
+@@ -460,9 +460,9 @@ static int vsp1_du_pipeline_setup_inputs
+        * make sure it is present in the pipeline's list of entities if it
+        * wasn't already.
+        */
+-      if (!use_uif) {
++      if (drm_pipe->uif && !use_uif) {
+               drm_pipe->uif->pipe = NULL;
+-      } else if (!drm_pipe->uif->pipe) {
++      } else if (drm_pipe->uif && !drm_pipe->uif->pipe) {
+               drm_pipe->uif->pipe = pipe;
+               list_add_tail(&drm_pipe->uif->list_pipe, &pipe->entities);
+       }
index 957314ad6b4e5f0b9b2206df4e4ebb79d7a2330f..a565c48319323c4de5ccf41f03e469a404a3f320 100644 (file)
@@ -34,3 +34,7 @@ s390-cio-return-efault-if-copy_to_user-fails.patch
 drm-compat-clear-bounce-structures.patch
 drm-meson_drv-add-shutdown-function.patch
 s390-cio-return-efault-if-copy_to_user-fails-take-2.patch
+sh_eth-fix-trscer-mask-for-r7s9210.patch
+media-usbtv-fix-deadlock-on-suspend.patch
+media-v4l-vsp1-fix-uif-null-pointer-access.patch
+media-v4l-vsp1-fix-bru-null-pointer-access.patch
diff --git a/queue-4.19/sh_eth-fix-trscer-mask-for-r7s9210.patch b/queue-4.19/sh_eth-fix-trscer-mask-for-r7s9210.patch
new file mode 100644 (file)
index 0000000..ca10950
--- /dev/null
@@ -0,0 +1,33 @@
+From 165bc5a4f30eee4735845aa7dbd6b738643f2603 Mon Sep 17 00:00:00 2001
+From: Sergey Shtylyov <s.shtylyov@omprussia.ru>
+Date: Sun, 28 Feb 2021 23:27:32 +0300
+Subject: sh_eth: fix TRSCER mask for R7S9210
+
+From: Sergey Shtylyov <s.shtylyov@omprussia.ru>
+
+commit 165bc5a4f30eee4735845aa7dbd6b738643f2603 upstream.
+
+According  to the RZ/A2M Group User's Manual: Hardware, Rev. 2.00,
+the TRSCER register has bit 9 reserved, hence we can't use the driver's
+default TRSCER mask.  Add the explicit initializer for sh_eth_cpu_data::
+trscer_err_mask for R7S9210.
+
+Fixes: 6e0bb04d0e4f ("sh_eth: Add R7S9210 support")
+Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/renesas/sh_eth.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/ethernet/renesas/sh_eth.c
++++ b/drivers/net/ethernet/renesas/sh_eth.c
+@@ -825,6 +825,8 @@ static struct sh_eth_cpu_data r7s9210_da
+       .fdr_value      = 0x0000070f,
++      .trscer_err_mask = DESC_I_RINT8 | DESC_I_RINT5,
++
+       .apr            = 1,
+       .mpr            = 1,
+       .tpauser        = 1,