From eaa8fbc2f4463c515bc3f895614285d946f16525 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 Mar 2016 11:36:20 -0800 Subject: [PATCH] 3.10-stable patches added patches: drm-vmwgfx-respect-nomodeset.patch mmc-mmci-fix-an-ages-old-detection-error.patch posix-clock-fix-return-code-on-the-poll-method-s-error-path.patch sparc64-fix-incorrect-sign-extension-in-sys_sparc64_personality.patch --- queue-3.10/drm-vmwgfx-respect-nomodeset.patch | 41 +++++++++++++++ ...mmci-fix-an-ages-old-detection-error.patch | 37 ++++++++++++++ ...code-on-the-poll-method-s-error-path.patch | 50 +++++++++++++++++++ queue-3.10/series | 4 ++ ...extension-in-sys_sparc64_personality.patch | 39 +++++++++++++++ 5 files changed, 171 insertions(+) create mode 100644 queue-3.10/drm-vmwgfx-respect-nomodeset.patch create mode 100644 queue-3.10/mmc-mmci-fix-an-ages-old-detection-error.patch create mode 100644 queue-3.10/posix-clock-fix-return-code-on-the-poll-method-s-error-path.patch create mode 100644 queue-3.10/sparc64-fix-incorrect-sign-extension-in-sys_sparc64_personality.patch diff --git a/queue-3.10/drm-vmwgfx-respect-nomodeset.patch b/queue-3.10/drm-vmwgfx-respect-nomodeset.patch new file mode 100644 index 00000000000..60a0205755c --- /dev/null +++ b/queue-3.10/drm-vmwgfx-respect-nomodeset.patch @@ -0,0 +1,41 @@ +From 96c5d076f0a5e2023ecdb44d8261f87641ee71e0 Mon Sep 17 00:00:00 2001 +From: Rob Clark +Date: Wed, 15 Oct 2014 15:00:47 -0400 +Subject: drm/vmwgfx: respect 'nomodeset' + +From: Rob Clark + +commit 96c5d076f0a5e2023ecdb44d8261f87641ee71e0 upstream. + +Signed-off-by: Rob Clark +Reviewed-by: Thomas Hellstrom . +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +@@ -25,6 +25,7 @@ + * + **************************************************************************/ + #include ++#include + + #include + #include "vmwgfx_drv.h" +@@ -1192,6 +1193,12 @@ static int vmw_probe(struct pci_dev *pde + static int __init vmwgfx_init(void) + { + int ret; ++ ++#ifdef CONFIG_VGA_CONSOLE ++ if (vgacon_text_force()) ++ return -EINVAL; ++#endif ++ + ret = drm_pci_init(&driver, &vmw_pci_driver); + if (ret) + DRM_ERROR("Failed initializing DRM.\n"); diff --git a/queue-3.10/mmc-mmci-fix-an-ages-old-detection-error.patch b/queue-3.10/mmc-mmci-fix-an-ages-old-detection-error.patch new file mode 100644 index 00000000000..ddac69bf75b --- /dev/null +++ b/queue-3.10/mmc-mmci-fix-an-ages-old-detection-error.patch @@ -0,0 +1,37 @@ +From 0bcb7efdff63564e80fe84dd36a9fbdfbf6697a4 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Mon, 4 Jan 2016 02:21:55 +0100 +Subject: mmc: mmci: fix an ages old detection error + +From: Linus Walleij + +commit 0bcb7efdff63564e80fe84dd36a9fbdfbf6697a4 upstream. + +commit 4956e10903fd ("ARM: 6244/1: mmci: add variant data and default +MCICLOCK support") added variant data for ARM, U300 and Ux500 variants. +The Nomadik NHK8815/8820 variant was erroneously labeled as a U300 +variant, and when the proper Nomadik variant was later introduced in +commit 34fd421349ff ("ARM: 7378/1: mmci: add support for the Nomadik MMCI +variant") this was not fixes. Let's say this fixes the latter commit as +there was no proper Nomadik support until then. + +Fixes: 34fd421349ff ("ARM: 7378/1: mmci: add support for the Nomadik...") +Signed-off-by: Linus Walleij +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/host/mmci.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/mmc/host/mmci.c ++++ b/drivers/mmc/host/mmci.c +@@ -1740,7 +1740,7 @@ static struct amba_id mmci_ids[] = { + { + .id = 0x00280180, + .mask = 0x00ffffff, +- .data = &variant_u300, ++ .data = &variant_nomadik, + }, + { + .id = 0x00480180, diff --git a/queue-3.10/posix-clock-fix-return-code-on-the-poll-method-s-error-path.patch b/queue-3.10/posix-clock-fix-return-code-on-the-poll-method-s-error-path.patch new file mode 100644 index 00000000000..a5bf92f103a --- /dev/null +++ b/queue-3.10/posix-clock-fix-return-code-on-the-poll-method-s-error-path.patch @@ -0,0 +1,50 @@ +From 1b9f23727abb92c5e58f139e7d180befcaa06fe0 Mon Sep 17 00:00:00 2001 +From: Richard Cochran +Date: Tue, 22 Dec 2015 22:19:58 +0100 +Subject: posix-clock: Fix return code on the poll method's error path + +From: Richard Cochran + +commit 1b9f23727abb92c5e58f139e7d180befcaa06fe0 upstream. + +The posix_clock_poll function is supposed to return a bit mask of +POLLxxx values. However, in case the hardware has disappeared (due to +hot plugging for example) this code returns -ENODEV in a futile +attempt to throw an error at the file descriptor level. The kernel's +file_operations interface does not accept such error codes from the +poll method. Instead, this function aught to return POLLERR. + +The value -ENODEV does, in fact, contain the POLLERR bit (and almost +all the other POLLxxx bits as well), but only by chance. This patch +fixes code to return a proper bit mask. + +Credit goes to Markus Elfring for pointing out the suspicious +signed/unsigned mismatch. + +Reported-by: Markus Elfring +igned-off-by: Richard Cochran +Cc: John Stultz +Cc: Julia Lawall +Link: http://lkml.kernel.org/r/1450819198-17420-1-git-send-email-richardcochran@gmail.com +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/time/posix-clock.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/kernel/time/posix-clock.c ++++ b/kernel/time/posix-clock.c +@@ -69,10 +69,10 @@ static ssize_t posix_clock_read(struct f + static unsigned int posix_clock_poll(struct file *fp, poll_table *wait) + { + struct posix_clock *clk = get_posix_clock(fp); +- int result = 0; ++ unsigned int result = 0; + + if (!clk) +- return -ENODEV; ++ return POLLERR; + + if (clk->ops.poll) + result = clk->ops.poll(clk, fp, wait); diff --git a/queue-3.10/series b/queue-3.10/series index d5f771ed722..a20454892a3 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -57,3 +57,7 @@ media-dvb-core-don-t-force-can_inversion_auto-in-oneshot-mode.patch gspca-ov534-topro-prevent-a-division-by-0.patch tda1004x-only-update-the-frontend-properties-if-locked.patch dm-snapshot-fix-hung-bios-when-copy-error-occurs.patch +posix-clock-fix-return-code-on-the-poll-method-s-error-path.patch +mmc-mmci-fix-an-ages-old-detection-error.patch +sparc64-fix-incorrect-sign-extension-in-sys_sparc64_personality.patch +drm-vmwgfx-respect-nomodeset.patch diff --git a/queue-3.10/sparc64-fix-incorrect-sign-extension-in-sys_sparc64_personality.patch b/queue-3.10/sparc64-fix-incorrect-sign-extension-in-sys_sparc64_personality.patch new file mode 100644 index 00000000000..98c265a32c2 --- /dev/null +++ b/queue-3.10/sparc64-fix-incorrect-sign-extension-in-sys_sparc64_personality.patch @@ -0,0 +1,39 @@ +From 525fd5a94e1be0776fa652df5c687697db508c91 Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" +Date: Sun, 27 Dec 2015 02:13:27 +0300 +Subject: sparc64: fix incorrect sign extension in sys_sparc64_personality + +From: Dmitry V. Levin + +commit 525fd5a94e1be0776fa652df5c687697db508c91 upstream. + +The value returned by sys_personality has type "long int". +It is saved to a variable of type "int", which is not a problem +yet because the type of task_struct->pesonality is "unsigned int". +The problem is the sign extension from "int" to "long int" +that happens on return from sys_sparc64_personality. + +For example, a userspace call personality((unsigned) -EINVAL) will +result to any subsequent personality call, including absolutely +harmless read-only personality(0xffffffff) call, failing with +errno set to EINVAL. + +Signed-off-by: Dmitry V. Levin +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + arch/sparc/kernel/sys_sparc_64.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/sparc/kernel/sys_sparc_64.c ++++ b/arch/sparc/kernel/sys_sparc_64.c +@@ -416,7 +416,7 @@ out: + + SYSCALL_DEFINE1(sparc64_personality, unsigned long, personality) + { +- int ret; ++ long ret; + + if (personality(current->personality) == PER_LINUX32 && + personality(personality) == PER_LINUX) -- 2.47.3