]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 May 2019 15:43:47 +0000 (17:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 May 2019 15:43:47 +0000 (17:43 +0200)
added patches:
fbdev-sm712fb-fix-memory-frequency-by-avoiding-a-switch-case-fallthrough.patch

queue-4.9/fbdev-sm712fb-fix-memory-frequency-by-avoiding-a-switch-case-fallthrough.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/fbdev-sm712fb-fix-memory-frequency-by-avoiding-a-switch-case-fallthrough.patch b/queue-4.9/fbdev-sm712fb-fix-memory-frequency-by-avoiding-a-switch-case-fallthrough.patch
new file mode 100644 (file)
index 0000000..18840c6
--- /dev/null
@@ -0,0 +1,46 @@
+From 9dc20113988b9a75ea6b3abd68dc45e2d73ccdab Mon Sep 17 00:00:00 2001
+From: Yifeng Li <tomli@tomli.me>
+Date: Tue, 2 Apr 2019 17:14:10 +0200
+Subject: fbdev: sm712fb: fix memory frequency by avoiding a switch/case fallthrough
+
+From: Yifeng Li <tomli@tomli.me>
+
+commit 9dc20113988b9a75ea6b3abd68dc45e2d73ccdab upstream.
+
+A fallthrough in switch/case was introduced in f627caf55b8e ("fbdev:
+sm712fb: fix crashes and garbled display during DPMS modesetting"),
+due to my copy-paste error, which would cause the memory clock frequency
+for SM720 to be programmed to SM712.
+
+Since it only reprograms the clock to a different frequency, it's only
+a benign issue without visible side-effect, so it also evaded Sudip
+Mukherjee's code review and regression tests. scripts/checkpatch.pl
+also failed to discover the issue, possibly due to nested switch
+statements.
+
+This issue was found by Stephen Rothwell by building linux-next with
+-Wimplicit-fallthrough.
+
+Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
+Fixes: f627caf55b8e ("fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting")
+Signed-off-by: Yifeng Li <tomli@tomli.me>
+Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
+Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
+Cc: Kees Cook <keescook@chromium.org>
+Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/video/fbdev/sm712fb.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/video/fbdev/sm712fb.c
++++ b/drivers/video/fbdev/sm712fb.c
+@@ -898,6 +898,7 @@ static int smtc_blank(int blank_mode, st
+               case 0x712:
+                       smtc_seqw(0x6a, 0x16);
+                       smtc_seqw(0x6b, 0x02);
++                      break;
+               case 0x720:
+                       smtc_seqw(0x6a, 0x0d);
+                       smtc_seqw(0x6b, 0x02);
index b185dc7efa0be5a52b4b4a476e6ada068ba1566b..1453795835d968c6a82d630a434baf8a97cb5e90 100644 (file)
@@ -51,3 +51,4 @@ perf-bench-numa-add-define-for-rusage_thread-if-not-.patch
 revert-don-t-jump-to-compute_result-state-from-check_result-state.patch
 md-raid-raid5-preserve-the-writeback-action-after-the-parity-check.patch
 btrfs-honour-fitrim-range-constraints-during-free-space-trim.patch
+fbdev-sm712fb-fix-memory-frequency-by-avoiding-a-switch-case-fallthrough.patch