Home Home > GIT Browse > SLE12-SP5-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-10-07 12:54:05 +0200
committerPetr Tesarik <ptesarik@suse.cz>2019-10-07 12:54:05 +0200
commit3106fa5672fb170d26ee3a4d601510ee85099d4c (patch)
tree41012a734bf5bb1686fee9613716f89a3fcda0a0
parent76e2ca6dab98b6a44fae879c348b384dec604db7 (diff)
parentdc03fff40bcc7a75a778a9918498f79ffaa8045b (diff)
Merge branch 'users/pvorel/SLE15/for-next' into SLE15rpm-4.12.14-150.38--sle15-updatesrpm-4.12.14-150.38
Pull alarmtimer fix from Petr Vorel
-rw-r--r--patches.suse/alarmtimer-Use-EOPNOTSUPP-instead-of-ENOTSUPP.patch52
-rw-r--r--series.conf1
2 files changed, 53 insertions, 0 deletions
diff --git a/patches.suse/alarmtimer-Use-EOPNOTSUPP-instead-of-ENOTSUPP.patch b/patches.suse/alarmtimer-Use-EOPNOTSUPP-instead-of-ENOTSUPP.patch
new file mode 100644
index 0000000000..c294bfef40
--- /dev/null
+++ b/patches.suse/alarmtimer-Use-EOPNOTSUPP-instead-of-ENOTSUPP.patch
@@ -0,0 +1,52 @@
+From f18ddc13af981ce3c7b7f26925f099e7c6929aba Mon Sep 17 00:00:00 2001
+From: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
+Date: Tue, 3 Sep 2019 14:18:02 -0300
+Patch-mainline: v5.4-rc1
+Git-commit: f18ddc13af981ce3c7b7f26925f099e7c6929aba
+References: bsc#1151680
+Subject: [PATCH] alarmtimer: Use EOPNOTSUPP instead of ENOTSUPP
+
+ENOTSUPP is not supposed to be returned to userspace. This was found on an
+OpenPower machine, where the RTC does not support set_alarm.
+
+On that system, a clock_nanosleep(CLOCK_REALTIME_ALARM, ...) results in
+"524 Unknown error 524"
+
+Replace it with EOPNOTSUPP which results in the expected "95 Operation not
+supported" error.
+
+Fixes: 1c6b39ad3f01 (alarmtimers: Return -ENOTSUPP if no RTC device is present)
+Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Petr Vorel <pvorel@suse.cz>
+Cc: stable@vger.kernel.org
+Link: https://lkml.kernel.org/r/20190903171802.28314-1-cascardo@canonical.com
+---
+ kernel/time/alarmtimer.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
+index 57518efc3810..b7d75a9e8ccf 100644
+--- a/kernel/time/alarmtimer.c
++++ b/kernel/time/alarmtimer.c
+@@ -672,7 +672,7 @@ static int alarm_timer_create(struct k_itimer *new_timer)
+ enum alarmtimer_type type;
+
+ if (!alarmtimer_get_rtcdev())
+- return -ENOTSUPP;
++ return -EOPNOTSUPP;
+
+ if (!capable(CAP_WAKE_ALARM))
+ return -EPERM;
+@@ -790,7 +790,7 @@ static int alarm_timer_nsleep(const clockid_t which_clock, int flags,
+ int ret = 0;
+
+ if (!alarmtimer_get_rtcdev())
+- return -ENOTSUPP;
++ return -EOPNOTSUPP;
+
+ if (flags & ~TIMER_ABSTIME)
+ return -EINVAL;
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index cc7ca5a8d7..1f451148d5 100644
--- a/series.conf
+++ b/series.conf
@@ -24519,6 +24519,7 @@
patches.suse/iommu-dma-fix-for-dereferencing-before-null-checking
patches.suse/qla2xxx-remove-SGI-SN2-support.patch
patches.suse/platform-x86-pmc_atom-Add-Siemens-SIMATIC-IPC227E-to.patch
+ patches.suse/alarmtimer-Use-EOPNOTSUPP-instead-of-ENOTSUPP.patch
patches.suse/md-raid6-Set-R5_ReadError-when-there-is-read-failure.patch
patches.suse/blk-mq-fix-memory-leak-in-blk_mq_init_allocated_queue-error.patch
patches.suse/md-only-call-set_in_sync-when-it-is-expected-to-succ.patch