From b235394bf2037df9f56f6607125209ebbd355c7c Mon Sep 17 00:00:00 2001 From: Kernel Build Daemon Date: Oct 06 2022 05:38:41 +0000 Subject: Merge branch 'SLE12-SP5' into SLE12-SP5-AZURE --- diff --git a/patches.suse/0001-Revert-video-hgafb-fix-potential-NULL-pointer-derefe.patch b/patches.suse/0001-Revert-video-hgafb-fix-potential-NULL-pointer-derefe.patch new file mode 100644 index 0000000..5fb22eb --- /dev/null +++ b/patches.suse/0001-Revert-video-hgafb-fix-potential-NULL-pointer-derefe.patch @@ -0,0 +1,54 @@ +From 58c0cc2d90f1e37c4eb63ae7f164c83830833f78 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Mon, 3 May 2021 13:57:05 +0200 +Subject: Revert "video: hgafb: fix potential NULL pointer dereference" +Git-commit: 58c0cc2d90f1e37c4eb63ae7f164c83830833f78 +Patch-mainline: v5.13-rc3 +References: bsc#1129770 + +This reverts commit ec7f6aad57ad29e4e66cc2e18e1e1599ddb02542. + +Because of recent interactions with developers from @umn.edu, all +commits from them have been recently re-reviewed to ensure if they were +correct or not. + +Upon review, this commit was found to be incorrect for the reasons +below, so it must be reverted. It will be fixed up "correctly" in a +later kernel change. + +This patch "looks" correct, but the driver keeps on running and will +fail horribly right afterward if this error condition ever trips. + +So points for trying to resolve an issue, but a huge NEGATIVE value for +providing a "fake" fix for the problem as nothing actually got resolved +at all. I'll go fix this up properly... + +Cc: Kangjie Lu +Cc: Aditya Pakki +Cc: Ferenc Bakonyi +Cc: Bartlomiej Zolnierkiewicz +Fixes: ec7f6aad57ad ("video: hgafb: fix potential NULL pointer dereference") +Cc: stable +Link: https://lore.kernel.org/r/20210503115736.2104747-39-gregkh@linuxfoundation.org +Signed-off-by: Greg Kroah-Hartman +Acked-by: Thomas Zimmermann +--- + drivers/video/fbdev/hgafb.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/drivers/video/fbdev/hgafb.c b/drivers/video/fbdev/hgafb.c +index 8bbac7182ad3..fca29f219f8b 100644 +--- a/drivers/video/fbdev/hgafb.c ++++ b/drivers/video/fbdev/hgafb.c +@@ -285,8 +285,6 @@ static int hga_card_detect(void) + hga_vram_len = 0x08000; + + hga_vram = ioremap(0xb0000, hga_vram_len); +- if (!hga_vram) +- goto error; + + if (request_region(0x3b0, 12, "hgafb")) + release_io_ports = 1; +-- +2.37.3 + diff --git a/patches.suse/0001-video-hgafb-fix-potential-NULL-pointer-dereference.patch b/patches.suse/0001-video-hgafb-fix-potential-NULL-pointer-dereference.patch index b70536d..6e99a0c 100644 --- a/patches.suse/0001-video-hgafb-fix-potential-NULL-pointer-dereference.patch +++ b/patches.suse/0001-video-hgafb-fix-potential-NULL-pointer-dereference.patch @@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman Acked-by: Thomas Zimmermann --- drivers/video/fbdev/hgafb.c | 57 +++++++++++++++++++++++--------------------- - 1 file changed, 30 insertions(+), 27 deletions(-) + 1 file changed, 31 insertions(+), 26 deletions(-) --- a/drivers/video/fbdev/hgafb.c +++ b/drivers/video/fbdev/hgafb.c @@ -88,16 +88,16 @@ Acked-by: Thomas Zimmermann base = (yoffset / 8) * 90 + xoffset; spin_lock_irqsave(&hga_reg_lock, flags); write_hga_w(base, 0x0c); /* start address */ -@@ -286,7 +286,7 @@ static int hga_card_detect(void) +@@ -285,6 +285,8 @@ static int hga_card_detect(void) + hga_vram_len = 0x08000; hga_vram = ioremap(0xb0000, hga_vram_len); - if (!hga_vram) -- goto error; ++ if (!hga_vram) + return -ENOMEM; if (request_region(0x3b0, 12, "hgafb")) release_io_ports = 1; -@@ -310,7 +310,7 @@ static int hga_card_detect(void) +@@ -308,7 +310,7 @@ static int hga_card_detect(void) /* Ok, there is definitely a card registering at the correct * memory location, so now we do an I/O port test. */ @@ -106,7 +106,7 @@ Acked-by: Thomas Zimmermann if (!test_hga_b(0x66, 0x0f)) /* cursor low register */ goto error; -@@ -321,7 +321,7 @@ static int hga_card_detect(void) +@@ -319,7 +321,7 @@ static int hga_card_detect(void) * bit of the status register is changing. This test lasts for * approximately 1/10th of a second. */ @@ -115,7 +115,7 @@ Acked-by: Thomas Zimmermann p_save = q_save = inb_p(HGA_STATUS_PORT) & HGA_STATUS_VSYNC; for (count=0; count < 50000 && p_save == q_save; count++) { -@@ -329,7 +329,7 @@ static int hga_card_detect(void) +@@ -327,7 +329,7 @@ static int hga_card_detect(void) udelay(2); } @@ -124,7 +124,7 @@ Acked-by: Thomas Zimmermann goto error; switch (inb_p(HGA_STATUS_PORT) & 0x70) { -@@ -346,13 +346,18 @@ static int hga_card_detect(void) +@@ -344,13 +346,18 @@ static int hga_card_detect(void) hga_type_name = "Hercules"; break; } @@ -145,7 +145,7 @@ Acked-by: Thomas Zimmermann } /** -@@ -410,7 +415,7 @@ static int hgafb_setcolreg(u_int regno, +@@ -408,7 +415,7 @@ static int hgafb_setcolreg(u_int regno, * @info:pointer to fb_info object containing info for current hga board * * This function looks only at xoffset, yoffset and the %FB_VMODE_YWRAP @@ -154,7 +154,7 @@ Acked-by: Thomas Zimmermann * program the hardware. @info->var is updated to the new values. * A zero is returned on success and %-EINVAL for failure. */ -@@ -437,9 +442,9 @@ static int hgafb_pan_display(struct fb_v +@@ -435,9 +442,9 @@ static int hgafb_pan_display(struct fb_v * hgafb_blank - (un)blank the screen * @blank_mode:blanking method to use * @info:unused @@ -167,7 +167,7 @@ Acked-by: Thomas Zimmermann * disabling hsync/vsync: * @blank_mode == 2 means suspend vsync, * @blank_mode == 3 means suspend hsync, -@@ -534,15 +539,15 @@ static struct fb_ops hgafb_ops = { +@@ -532,15 +539,15 @@ static struct fb_ops hgafb_ops = { .fb_copyarea = hgafb_copyarea, .fb_imageblit = hgafb_imageblit, }; @@ -186,7 +186,7 @@ Acked-by: Thomas Zimmermann /* * Initialization */ -@@ -550,13 +555,11 @@ static struct fb_ops hgafb_ops = { +@@ -548,13 +555,11 @@ static struct fb_ops hgafb_ops = { static int hgafb_probe(struct platform_device *pdev) { struct fb_info *info; diff --git a/patches.suse/0002-Revert-video-imsttfb-fix-potential-NULL-pointer-dere.patch b/patches.suse/0002-Revert-video-imsttfb-fix-potential-NULL-pointer-dere.patch new file mode 100644 index 0000000..4f4c274 --- /dev/null +++ b/patches.suse/0002-Revert-video-imsttfb-fix-potential-NULL-pointer-dere.patch @@ -0,0 +1,59 @@ +From ed04fe8a0e87d7b5ea17d47f4ac9ec962b24814a Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Mon, 3 May 2021 13:57:33 +0200 +Subject: Revert "video: imsttfb: fix potential NULL pointer dereferences" +Git-commit: ed04fe8a0e87d7b5ea17d47f4ac9ec962b24814a +Patch-mainline: v5.13-rc3 +References: bsc#1129770 + +This reverts commit 1d84353d205a953e2381044953b7fa31c8c9702d. + +Because of recent interactions with developers from @umn.edu, all +commits from them have been recently re-reviewed to ensure if they were +correct or not. + +Upon review, this commit was found to be incorrect for the reasons +below, so it must be reverted. It will be fixed up "correctly" in a +later kernel change. + +The original commit here, while technically correct, did not fully +handle all of the reported issues that the commit stated it was fixing, +so revert it until it can be "fixed" fully. + +Note, ioremap() probably will never fail for old hardware like this, and +if anyone actually used this hardware (a PowerMac era PCI display card), +they would not be using fbdev anymore. + +Cc: Kangjie Lu +Cc: Aditya Pakki +Cc: Finn Thain +Cc: Bartlomiej Zolnierkiewicz +Reviewed-by: Rob Herring +Fixes: 1d84353d205a ("video: imsttfb: fix potential NULL pointer dereferences") +Cc: stable +Link: https://lore.kernel.org/r/20210503115736.2104747-67-gregkh@linuxfoundation.org +Signed-off-by: Greg Kroah-Hartman +Acked-by: Thomas Zimmermann +--- + drivers/video/fbdev/imsttfb.c | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c +index 3ac053b88495..e04411701ec8 100644 +--- a/drivers/video/fbdev/imsttfb.c ++++ b/drivers/video/fbdev/imsttfb.c +@@ -1512,11 +1512,6 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) + info->fix.smem_start = addr; + info->screen_base = (__u8 *)ioremap(addr, par->ramdac == IBM ? + 0x400000 : 0x800000); +- if (!info->screen_base) { +- release_mem_region(addr, size); +- framebuffer_release(info); +- return -ENOMEM; +- } + info->fix.mmio_start = addr + 0x800000; + par->dc_regs = ioremap(addr + 0x800000, 0x1000); + par->cmap_regs_phys = addr + 0x840000; +-- +2.37.3 + diff --git a/patches.suse/0004-Revert-drivers-video-backlight-platform_lcd.c-add-su.patch b/patches.suse/0004-Revert-drivers-video-backlight-platform_lcd.c-add-su.patch new file mode 100644 index 0000000..a6929f6 --- /dev/null +++ b/patches.suse/0004-Revert-drivers-video-backlight-platform_lcd.c-add-su.patch @@ -0,0 +1,58 @@ +From e3ac5e8736c16306b9589f210a473aceb62347cb Mon Sep 17 00:00:00 2001 +From: Rob Herring +Date: Wed, 29 Jun 2022 15:00:23 -0600 +Subject: Revert "drivers/video/backlight/platform_lcd.c: add support for + device tree based probe" +Git-commit: e3ac5e8736c16306b9589f210a473aceb62347cb +Patch-mainline: v6.0-rc1 +References: bsc#1154048 + +This reverts commit 52e842432f36d5b15227d0ee0d2aa3d2bc3cc0b2. + +The DT support never would have worked because there's no platform_data +providing ops. There's not any documented binding for it either. + +Signed-off-by: Rob Herring +Reviewed-by: Daniel Thompson +Signed-off-by: Lee Jones +Link: https://lore.kernel.org/r/20220629210024.815761-1-robh@kernel.org +Acked-by: Thomas Zimmermann +--- + drivers/video/backlight/platform_lcd.c | 10 ---------- + 1 file changed, 10 deletions(-) + +diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c +index b2bfbf070200..dc37494baf42 100644 +--- a/drivers/video/backlight/platform_lcd.c ++++ b/drivers/video/backlight/platform_lcd.c +@@ -12,7 +12,6 @@ + #include + #include + #include +-#include + #include + + #include