Hello community, here is the log from the commit of package kernel-source for openSUSE:Factory checked in at 2016-03-02 14:19:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kernel-source (Old) and /work/SRC/openSUSE:Factory/.kernel-source.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kernel-source" Changes: -------- --- /work/SRC/openSUSE:Factory/kernel-source/kernel-debug.changes 2016-02-26 22:18:18.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kernel-source.new/kernel-debug.changes 2016-03-02 14:20:00.000000000 +0100 @@ -1,0 +2,38 @@ +Fri Feb 26 10:54:10 CET 2016 - [email protected] + +- genirq: Validate action before dereferencing it in + handle_irq_event_percpu() (bnc#968396). +- commit 171b8f1 + +------------------------------------------------------------------- +Fri Feb 26 08:35:54 CET 2016 - [email protected] + +- Linux 4.4.3 (boo#962250 bsc#960910). +- Delete + patches.fixes/Revert-xfs-clear-PF_NOFREEZE-for-xfsaild-kthread. +- Delete + patches.suse/btrfs-fix-fitrim-discarding-device-area-reserved-for.patch. +- commit 3ae1dff + +------------------------------------------------------------------- +Wed Feb 24 18:29:02 CET 2016 - [email protected] + +- btrfs: remove error message from search ioctl for nonexistent tree. +- commit 2629d17 + +------------------------------------------------------------------- +Wed Feb 24 17:08:52 CET 2016 - [email protected] + +- drm/nouveau/display: Enable vblank irqs after display engine + is on again (bsc#962535). +- drm: Fix treatment of drm_vblank_offdelay in drm_vblank_on() + (v2) (bsc#962535). +- drm: Fix drm_vblank_pre/post_modeset regression from Linux 4.4 + (bsc#962535). +- drm: Prevent vblank counter bumps > 1 with active vblank + clients. (v2) (bsc#962535). +- drm: No-Op redundant calls to drm_vblank_off() (v2) + (bsc#962535). +- commit 46e3b92 + +------------------------------------------------------------------- kernel-default.changes: same change kernel-docs.changes: same change kernel-lpae.changes: same change kernel-obs-build.changes: same change kernel-obs-qa.changes: same change kernel-pae.changes: same change kernel-source.changes: same change kernel-syms.changes: same change kernel-vanilla.changes: same change ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kernel-debug.spec ++++++ --- /var/tmp/diff_new_pack.L4FMfq/_old 2016-03-02 14:20:05.000000000 +0100 +++ /var/tmp/diff_new_pack.L4FMfq/_new 2016-03-02 14:20:05.000000000 +0100 @@ -20,7 +20,7 @@ # needssslcertforbuild %define srcversion 4.4 -%define patchversion 4.4.2 +%define patchversion 4.4.3 %define variant %{nil} %define vanilla_only 0 @@ -61,9 +61,9 @@ Summary: A Debug Version of the Kernel License: GPL-2.0 Group: System/Kernel -Version: 4.4.2 +Version: 4.4.3 %if 0%{?is_kotd} -Release: <RELEASE>.gc601f8d +Release: <RELEASE>.g171b8f1 %else Release: 0 %endif kernel-default.spec: same change ++++++ kernel-docs.spec ++++++ --- /var/tmp/diff_new_pack.L4FMfq/_old 2016-03-02 14:20:05.000000000 +0100 +++ /var/tmp/diff_new_pack.L4FMfq/_new 2016-03-02 14:20:05.000000000 +0100 @@ -16,7 +16,7 @@ # -%define patchversion 4.4.2 +%define patchversion 4.4.3 %define variant %{nil} %include %_sourcedir/kernel-spec-macros @@ -27,9 +27,9 @@ Summary: Kernel Documentation (man pages) License: GPL-2.0 Group: Documentation/Man -Version: 4.4.2 +Version: 4.4.3 %if 0%{?is_kotd} -Release: <RELEASE>.gc601f8d +Release: <RELEASE>.g171b8f1 %else Release: 0 %endif ++++++ kernel-lpae.spec ++++++ --- /var/tmp/diff_new_pack.L4FMfq/_old 2016-03-02 14:20:05.000000000 +0100 +++ /var/tmp/diff_new_pack.L4FMfq/_new 2016-03-02 14:20:05.000000000 +0100 @@ -20,7 +20,7 @@ # needssslcertforbuild %define srcversion 4.4 -%define patchversion 4.4.2 +%define patchversion 4.4.3 %define variant %{nil} %define vanilla_only 0 @@ -61,9 +61,9 @@ Summary: Kernel for LPAE enabled systems License: GPL-2.0 Group: System/Kernel -Version: 4.4.2 +Version: 4.4.3 %if 0%{?is_kotd} -Release: <RELEASE>.gc601f8d +Release: <RELEASE>.g171b8f1 %else Release: 0 %endif ++++++ kernel-obs-build.spec ++++++ --- /var/tmp/diff_new_pack.L4FMfq/_old 2016-03-02 14:20:05.000000000 +0100 +++ /var/tmp/diff_new_pack.L4FMfq/_new 2016-03-02 14:20:05.000000000 +0100 @@ -19,7 +19,7 @@ #!BuildIgnore: post-build-checks -%define patchversion 4.4.2 +%define patchversion 4.4.3 %define variant %{nil} %include %_sourcedir/kernel-spec-macros @@ -51,9 +51,9 @@ Summary: package kernel and initrd for OBS VM builds License: GPL-2.0 Group: SLES -Version: 4.4.2 +Version: 4.4.3 %if 0%{?is_kotd} -Release: <RELEASE>.gc601f8d +Release: <RELEASE>.g171b8f1 %else Release: 0 %endif ++++++ kernel-obs-qa.spec ++++++ --- /var/tmp/diff_new_pack.L4FMfq/_old 2016-03-02 14:20:05.000000000 +0100 +++ /var/tmp/diff_new_pack.L4FMfq/_new 2016-03-02 14:20:05.000000000 +0100 @@ -17,7 +17,7 @@ # needsrootforbuild -%define patchversion 4.4.2 +%define patchversion 4.4.3 %define variant %{nil} %include %_sourcedir/kernel-spec-macros @@ -36,9 +36,9 @@ Summary: Basic QA tests for the kernel License: GPL-2.0 Group: SLES -Version: 4.4.2 +Version: 4.4.3 %if 0%{?is_kotd} -Release: <RELEASE>.gc601f8d +Release: <RELEASE>.g171b8f1 %else Release: 0 %endif ++++++ kernel-pae.spec ++++++ --- /var/tmp/diff_new_pack.L4FMfq/_old 2016-03-02 14:20:05.000000000 +0100 +++ /var/tmp/diff_new_pack.L4FMfq/_new 2016-03-02 14:20:05.000000000 +0100 @@ -20,7 +20,7 @@ # needssslcertforbuild %define srcversion 4.4 -%define patchversion 4.4.2 +%define patchversion 4.4.3 %define variant %{nil} %define vanilla_only 0 @@ -61,9 +61,9 @@ Summary: Kernel with PAE Support License: GPL-2.0 Group: System/Kernel -Version: 4.4.2 +Version: 4.4.3 %if 0%{?is_kotd} -Release: <RELEASE>.gc601f8d +Release: <RELEASE>.g171b8f1 %else Release: 0 %endif ++++++ kernel-source.spec ++++++ --- /var/tmp/diff_new_pack.L4FMfq/_old 2016-03-02 14:20:05.000000000 +0100 +++ /var/tmp/diff_new_pack.L4FMfq/_new 2016-03-02 14:20:05.000000000 +0100 @@ -18,7 +18,7 @@ %define srcversion 4.4 -%define patchversion 4.4.2 +%define patchversion 4.4.3 %define variant %{nil} %define vanilla_only 0 @@ -30,9 +30,9 @@ Summary: The Linux Kernel Sources License: GPL-2.0 Group: Development/Sources -Version: 4.4.2 +Version: 4.4.3 %if 0%{?is_kotd} -Release: <RELEASE>.gc601f8d +Release: <RELEASE>.g171b8f1 %else Release: 0 %endif ++++++ kernel-syms.spec ++++++ --- /var/tmp/diff_new_pack.L4FMfq/_old 2016-03-02 14:20:05.000000000 +0100 +++ /var/tmp/diff_new_pack.L4FMfq/_new 2016-03-02 14:20:05.000000000 +0100 @@ -24,10 +24,10 @@ Summary: Kernel Symbol Versions (modversions) License: GPL-2.0 Group: Development/Sources -Version: 4.4.2 +Version: 4.4.3 %if %using_buildservice %if 0%{?is_kotd} -Release: <RELEASE>.gc601f8d +Release: <RELEASE>.g171b8f1 %else Release: 0 %endif ++++++ kernel-vanilla.spec ++++++ --- /var/tmp/diff_new_pack.L4FMfq/_old 2016-03-02 14:20:05.000000000 +0100 +++ /var/tmp/diff_new_pack.L4FMfq/_new 2016-03-02 14:20:05.000000000 +0100 @@ -20,7 +20,7 @@ # needssslcertforbuild %define srcversion 4.4 -%define patchversion 4.4.2 +%define patchversion 4.4.3 %define variant %{nil} %define vanilla_only 0 @@ -61,9 +61,9 @@ Summary: The Standard Kernel - without any SUSE patches License: GPL-2.0 Group: System/Kernel -Version: 4.4.2 +Version: 4.4.3 %if 0%{?is_kotd} -Release: <RELEASE>.gc601f8d +Release: <RELEASE>.g171b8f1 %else Release: 0 %endif ++++++ patches.fixes.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.fixes/Revert-xfs-clear-PF_NOFREEZE-for-xfsaild-kthread new/patches.fixes/Revert-xfs-clear-PF_NOFREEZE-for-xfsaild-kthread --- old/patches.fixes/Revert-xfs-clear-PF_NOFREEZE-for-xfsaild-kthread 2016-02-18 13:50:02.000000000 +0100 +++ new/patches.fixes/Revert-xfs-clear-PF_NOFREEZE-for-xfsaild-kthread 1970-01-01 01:00:00.000000000 +0100 @@ -1,38 +0,0 @@ -From 3e85286e75224fa3f08bdad20e78c8327742634e Mon Sep 17 00:00:00 2001 -From: Dave Chinner <[email protected]> -Date: Tue, 19 Jan 2016 08:21:46 +1100 -Subject: [PATCH] Revert "xfs: clear PF_NOFREEZE for xfsaild kthread" -Git-commit: 3e85286e75224fa3f08bdad20e78c8327742634e -Patch-mainline: 4.5-rc1 -References: boo#962250 - -This reverts commit 24ba16bb3d499c49974669cd8429c3e4138ab102 as it -prevents machines from suspending. This regression occurs when the -xfsaild is idle on entry to suspend, and so there s no activity to -wake it from it's idle sleep and hence see that it is supposed to -freeze. Hence the freezer times out waiting for it and suspend is -cancelled. - -There is no obvious fix for this short of freezing the filesystem -properly, so revert this change for now. - -Cc: <[email protected]> # 4.4 -Signed-off-by: Dave Chinner <[email protected]> -Acked-by: Jiri Kosina <[email protected]> -Reviewed-by: Brian Foster <[email protected]> -Acked-by: Takashi Iwai <[email protected]> - ---- - fs/xfs/xfs_trans_ail.c | 1 - - 1 file changed, 1 deletion(-) - ---- a/fs/xfs/xfs_trans_ail.c -+++ b/fs/xfs/xfs_trans_ail.c -@@ -497,7 +497,6 @@ xfsaild( - long tout = 0; /* milliseconds */ - - current->flags |= PF_MEMALLOC; -- set_freezable(); - - while (!kthread_should_stop()) { - if (tout && tout <= 20) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.fixes/drm-Fix-drm_vblank_pre-post_modeset-regression-from new/patches.fixes/drm-Fix-drm_vblank_pre-post_modeset-regression-from --- old/patches.fixes/drm-Fix-drm_vblank_pre-post_modeset-regression-from 1970-01-01 01:00:00.000000000 +0100 +++ new/patches.fixes/drm-Fix-drm_vblank_pre-post_modeset-regression-from 2016-02-26 10:54:10.000000000 +0100 @@ -0,0 +1,84 @@ +From c61934ed9a0e3911a9935df26858726a7ec35ec0 Mon Sep 17 00:00:00 2001 +From: Mario Kleiner <[email protected]> +Date: Fri, 12 Feb 2016 20:30:29 +0100 +Subject: [PATCH] drm: Fix drm_vblank_pre/post_modeset regression from Linux 4.4 +Git-commit: c61934ed9a0e3911a9935df26858726a7ec35ec0 +Patch-mainline: 4.5-rc5 +References: bsc#962535 + +Changes to drm_update_vblank_count() in Linux 4.4 broke the +behaviour of the pre/post modeset functions as the new update +code doesn't deal with hw vblank counter resets inbetween calls +to drm_vblank_pre_modeset an drm_vblank_post_modeset, as it +should. + +This causes mistreatment of such hw counter resets as counter +wraparound, and thereby large forward jumps of the software +vblank counter which in turn cause vblank event dispatching +and vblank waits to fail/hang --> userspace clients hang. + +This symptom was reported on radeon-kms to cause a infinite +hang of KDE Plasma 5 shell's login procedure, preventing users +from logging in. + +Fix this by detecting when drm_update_vblank_count() is called +inside a pre->post modeset interval. If so, clamp valid vblank +increments to the safe values 0 and 1, pretty much restoring +the update behavior of the old update code of Linux 4.3 and +earlier. Also reset the last recorded hw vblank count at call +to drm_vblank_post_modeset() to be safe against hw that after +modesetting, dpms on etc. only fires its first vblank irq after +drm_vblank_post_modeset() was already called. + +Reported-by: Vlastimil Babka <[email protected]> +Signed-off-by: Mario Kleiner <[email protected]> +Reviewed-by: Daniel Vetter <[email protected]> +Tested-by: Vlastimil Babka <[email protected]> + +Cc: <[email protected]> # 4.4+ +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Signed-off-by: Dave Airlie <[email protected]> +Acked-by: Takashi Iwai <[email protected]> + +--- + drivers/gpu/drm/drm_irq.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +--- a/drivers/gpu/drm/drm_irq.c ++++ b/drivers/gpu/drm/drm_irq.c +@@ -222,6 +222,21 @@ static void drm_update_vblank_count(stru + } + + /* ++ * Within a drm_vblank_pre_modeset - drm_vblank_post_modeset ++ * interval? If so then vblank irqs keep running and it will likely ++ * happen that the hardware vblank counter is not trustworthy as it ++ * might reset at some point in that interval and vblank timestamps ++ * are not trustworthy either in that interval. Iow. this can result ++ * in a bogus diff >> 1 which must be avoided as it would cause ++ * random large forward jumps of the software vblank counter. ++ */ ++ if (diff > 1 && (vblank->inmodeset & 0x2)) { ++ DRM_DEBUG_VBL("clamping vblank bump to 1 on crtc %u: diffr=%u" ++ " due to pre-modeset.\n", pipe, diff); ++ diff = 1; ++ } ++ ++ /* + * FIMXE: Need to replace this hack with proper seqlocks. + * + * Restrict the bump of the software vblank counter to a safe maximum +@@ -1575,6 +1590,7 @@ void drm_vblank_post_modeset(struct drm_ + if (vblank->inmodeset) { + spin_lock_irqsave(&dev->vbl_lock, irqflags); + dev->vblank_disable_allowed = true; ++ drm_reset_vblank_timestamp(dev, pipe); + spin_unlock_irqrestore(&dev->vbl_lock, irqflags); + + if (vblank->inmodeset & 0x2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.fixes/drm-Fix-treatment-of-drm_vblank_offdelay-in-drm_vbla new/patches.fixes/drm-Fix-treatment-of-drm_vblank_offdelay-in-drm_vbla --- old/patches.fixes/drm-Fix-treatment-of-drm_vblank_offdelay-in-drm_vbla 1970-01-01 01:00:00.000000000 +0100 +++ new/patches.fixes/drm-Fix-treatment-of-drm_vblank_offdelay-in-drm_vbla 2016-02-26 10:54:10.000000000 +0100 @@ -0,0 +1,61 @@ +From bb74fc1bf3072bd3ab4ed5f43afd287a63baf2d7 Mon Sep 17 00:00:00 2001 +From: Mario Kleiner <[email protected]> +Date: Fri, 12 Feb 2016 20:30:30 +0100 +Subject: [PATCH] drm: Fix treatment of drm_vblank_offdelay in drm_vblank_on() (v2) +Git-commit: bb74fc1bf3072bd3ab4ed5f43afd287a63baf2d7 +Patch-mainline: 4.5-rc5 +References: bsc#962535 + +drm_vblank_offdelay can have three different types of values: + +< 0 is to be always treated the same as dev->vblank_disable_immediate += 0 is to be treated as "never disable vblanks" +> 0 is to be treated as disable immediate if kms driver wants it + that way via dev->vblank_disable_immediate. Otherwise it is + a disable timeout in msecs. + +This got broken in Linux 3.18+ for the implementation of +drm_vblank_on. If the user specified a value of zero which should +always reenable vblank irqs in this function, a kms driver could +override the users choice by setting vblank_disable_immediate +to true. This patch fixes the regression and keeps the user in +control. + +V2: Only reenable vblank if there are clients left or the user requested to "never disable vblanks" via offdelay 0. Enabling vblanks even in the "delayed disable" case (offdelay > 0) was specifically added by Ville in commit cd19e52aee922 ("drm: Kick start vblank interrupts at drm_vblank_on()"), but after discussion it turns out that this was done by accident. + + Citing Ville: "I think it just ended up as a mess due to changing + some of the semantics of offdelay<0 vs. offdelay==0 vs. + disable_immediate during the review of the series. So yeah, given + how drm_vblank_put() works now, I'd just make this check for + offdelay==0." + +Signed-off-by: Mario Kleiner <[email protected]> +Reviewed-by: Daniel Vetter <[email protected]> + +Cc: <[email protected]> # 3.18+ +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Signed-off-by: Dave Airlie <[email protected]> +Acked-by: Takashi Iwai <[email protected]> + +--- + drivers/gpu/drm/drm_irq.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/gpu/drm/drm_irq.c ++++ b/drivers/gpu/drm/drm_irq.c +@@ -1494,8 +1494,7 @@ void drm_vblank_on(struct drm_device *de + * re-enable interrupts if there are users left, or the + * user wishes vblank interrupts to be enabled all the time. + */ +- if (atomic_read(&vblank->refcount) != 0 || +- (!dev->vblank_disable_immediate && drm_vblank_offdelay == 0)) ++ if (atomic_read(&vblank->refcount) != 0 || drm_vblank_offdelay == 0) + WARN_ON(drm_vblank_enable(dev, pipe)); + spin_unlock_irqrestore(&dev->vbl_lock, irqflags); + } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.fixes/drm-No-Op-redundant-calls-to-drm_vblank_off-v2 new/patches.fixes/drm-No-Op-redundant-calls-to-drm_vblank_off-v2 --- old/patches.fixes/drm-No-Op-redundant-calls-to-drm_vblank_off-v2 1970-01-01 01:00:00.000000000 +0100 +++ new/patches.fixes/drm-No-Op-redundant-calls-to-drm_vblank_off-v2 2016-02-26 10:54:10.000000000 +0100 @@ -0,0 +1,74 @@ +From e8235891b33799d597ff4ab5e45afe173a65da30 Mon Sep 17 00:00:00 2001 +From: Mario Kleiner <[email protected]> +Date: Fri, 12 Feb 2016 20:30:27 +0100 +Subject: [PATCH] drm: No-Op redundant calls to drm_vblank_off() (v2) +Git-commit: e8235891b33799d597ff4ab5e45afe173a65da30 +Patch-mainline: 4.5-rc5 +References: bsc#962535 + +Otherwise if a kms driver calls into drm_vblank_off() more than once +before calling drm_vblank_on() again, the redundant calls to +vblank_disable_and_save() will call drm_update_vblank_count() +while hw vblank counters and vblank timestamping are in a undefined +state during modesets, dpms off etc. + +At least with the legacy drm helpers it is not unusual to +get multiple calls to drm_vblank_off and drm_vblank_on, e.g., +half a dozen calls to drm_vblank_off and two calls to drm_vblank_on +were observed on radeon-kms during dpms-off -> dpms-on transition. + +We don't no-op calls from atomic modesetting drivers, as they +should do a proper job of tracking hw state. + +Fixes large jumps of the software maintained vblank counter due to +the hardware vblank counter resetting to zero during dpms off or +modeset, e.g., if radeon-kms is modified to use drm_vblank_off/on +instead of drm_vblank_pre/post_modeset(). + +This fixes a regression caused by the changes made to +drm_update_vblank_count() in Linux 4.4. + +V2: Don't no-op on atomic modesetting drivers, per suggestion of Daniel Vetter. + +Signed-off-by: Mario Kleiner <[email protected]> +Reviewed-by: Daniel Vetter <[email protected]> +Cc: <[email protected]> # 4.4+ +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Signed-off-by: Dave Airlie <[email protected]> +Acked-by: Takashi Iwai <[email protected]> + +--- + drivers/gpu/drm/drm_irq.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/drm_irq.c ++++ b/drivers/gpu/drm/drm_irq.c +@@ -1313,7 +1313,13 @@ void drm_vblank_off(struct drm_device *d + spin_lock_irqsave(&dev->event_lock, irqflags); + + spin_lock(&dev->vbl_lock); +- vblank_disable_and_save(dev, pipe); ++ DRM_DEBUG_VBL("crtc %d, vblank enabled %d, inmodeset %d\n", ++ pipe, vblank->enabled, vblank->inmodeset); ++ ++ /* Avoid redundant vblank disables without previous drm_vblank_on(). */ ++ if (drm_core_check_feature(dev, DRIVER_ATOMIC) || !vblank->inmodeset) ++ vblank_disable_and_save(dev, pipe); ++ + wake_up(&vblank->queue); + + /* +@@ -1415,6 +1421,9 @@ void drm_vblank_on(struct drm_device *de + return; + + spin_lock_irqsave(&dev->vbl_lock, irqflags); ++ DRM_DEBUG_VBL("crtc %d, vblank enabled %d, inmodeset %d\n", ++ pipe, vblank->enabled, vblank->inmodeset); ++ + /* Drop our private "prevent drm_vblank_get" refcount */ + if (vblank->inmodeset) { + atomic_dec(&vblank->refcount); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.fixes/drm-Prevent-vblank-counter-bumps-1-with-active-vblan new/patches.fixes/drm-Prevent-vblank-counter-bumps-1-with-active-vblan --- old/patches.fixes/drm-Prevent-vblank-counter-bumps-1-with-active-vblan 1970-01-01 01:00:00.000000000 +0100 +++ new/patches.fixes/drm-Prevent-vblank-counter-bumps-1-with-active-vblan 2016-02-26 10:54:10.000000000 +0100 @@ -0,0 +1,120 @@ +From 99b8e71597fadd6b2ac85e6e10f221f79dd9c1c1 Mon Sep 17 00:00:00 2001 +From: Mario Kleiner <[email protected]> +Date: Fri, 12 Feb 2016 20:30:28 +0100 +Subject: [PATCH] drm: Prevent vblank counter bumps > 1 with active vblank clients. (v2) +Git-commit: 99b8e71597fadd6b2ac85e6e10f221f79dd9c1c1 +Patch-mainline: 4.5-rc5 +References: bsc#962535 + +This fixes a regression introduced by the new drm_update_vblank_count() +implementation in Linux 4.4: + +Restrict the bump of the software vblank counter in drm_update_vblank_count() +to a safe maximum value of +1 whenever there is the possibility that +concurrent readers of vblank timestamps could be active at the moment, +as the current implementation of the timestamp caching and updating is +not safe against concurrent readers for calls to store_vblank() with a +bump of anything but +1. A bump != 1 would very likely return corrupted +timestamps to userspace, because the same slot in the cache could +be concurrently written by store_vblank() and read by one of those +readers in a non-atomic fashion and without the read-retry logic +detecting this collision. + +Concurrent readers can exist while drm_update_vblank_count() is called +from the drm_vblank_off() or drm_vblank_on() functions or other non-vblank- +irq callers. However, all those calls are happening with the vbl_lock +locked thereby preventing a drm_vblank_get(), so the vblank refcount +can't increase while drm_update_vblank_count() is executing. Therefore +a zero vblank refcount during execution of that function signals that +is safe for arbitrary counter bumps if called from outside vblank irq, +whereas a non-zero count is not safe. + +Whenever the function is called from vblank irq, we have to assume concurrent +readers could show up any time during its execution, even if the refcount +is currently zero, as vblank irqs are usually only enabled due to the +presence of readers, and because when it is called from vblank irq it +can't hold the vbl_lock to protect it from sudden bumps in vblank refcount. +Therefore also restrict bumps to +1 when the function is called from vblank +irq. + +Such bumps of more than +1 can happen at other times than reenabling +vblank irqs, e.g., when regular vblank interrupts get delayed by more +than 1 frame due to long held locks, long irq off periods, realtime +preemption on RT kernels, or system management interrupts. + +A better solution would be to rewrite the timestamp caching to use +full seqlocks to allow concurrent writes and reads for arbitrary +vblank counter increments. + +V2: Add code comment that this is essentially a hack and should be replaced by a full seqlock implementation for caching of timestamps. + +Signed-off-by: Mario Kleiner <[email protected]> +Reviewed-by: Daniel Vetter <[email protected]> + +Cc: <[email protected]> # 4.4+ +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Signed-off-by: Dave Airlie <[email protected]> +Acked-by: Takashi Iwai <[email protected]> + +--- + drivers/gpu/drm/drm_irq.c | 43 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 43 insertions(+) + +--- a/drivers/gpu/drm/drm_irq.c ++++ b/drivers/gpu/drm/drm_irq.c +@@ -221,6 +221,49 @@ static void drm_update_vblank_count(stru + diff = (flags & DRM_CALLED_FROM_VBLIRQ) != 0; + } + ++ /* ++ * FIMXE: Need to replace this hack with proper seqlocks. ++ * ++ * Restrict the bump of the software vblank counter to a safe maximum ++ * value of +1 whenever there is the possibility that concurrent readers ++ * of vblank timestamps could be active at the moment, as the current ++ * implementation of the timestamp caching and updating is not safe ++ * against concurrent readers for calls to store_vblank() with a bump ++ * of anything but +1. A bump != 1 would very likely return corrupted ++ * timestamps to userspace, because the same slot in the cache could ++ * be concurrently written by store_vblank() and read by one of those ++ * readers without the read-retry logic detecting the collision. ++ * ++ * Concurrent readers can exist when we are called from the ++ * drm_vblank_off() or drm_vblank_on() functions and other non-vblank- ++ * irq callers. However, all those calls to us are happening with the ++ * vbl_lock locked to prevent drm_vblank_get(), so the vblank refcount ++ * can't increase while we are executing. Therefore a zero refcount at ++ * this point is safe for arbitrary counter bumps if we are called ++ * outside vblank irq, a non-zero count is not 100% safe. Unfortunately ++ * we must also accept a refcount of 1, as whenever we are called from ++ * drm_vblank_get() -> drm_vblank_enable() the refcount will be 1 and ++ * we must let that one pass through in order to not lose vblank counts ++ * during vblank irq off - which would completely defeat the whole ++ * point of this routine. ++ * ++ * Whenever we are called from vblank irq, we have to assume concurrent ++ * readers exist or can show up any time during our execution, even if ++ * the refcount is currently zero, as vblank irqs are usually only ++ * enabled due to the presence of readers, and because when we are called ++ * from vblank irq we can't hold the vbl_lock to protect us from sudden ++ * bumps in vblank refcount. Therefore also restrict bumps to +1 when ++ * called from vblank irq. ++ */ ++ if ((diff > 1) && (atomic_read(&vblank->refcount) > 1 || ++ (flags & DRM_CALLED_FROM_VBLIRQ))) { ++ DRM_DEBUG_VBL("clamping vblank bump to 1 on crtc %u: diffr=%u " ++ "refcount %u, vblirq %u\n", pipe, diff, ++ atomic_read(&vblank->refcount), ++ (flags & DRM_CALLED_FROM_VBLIRQ) != 0); ++ diff = 1; ++ } ++ + DRM_DEBUG_VBL("updating vblank count on crtc %u:" + " current=%u, diff=%u, hw=%u hw_last=%u\n", + pipe, vblank->count, diff, cur_vblank, vblank->last); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.fixes/drm-nouveau-display-Enable-vblank-irqs-after-display new/patches.fixes/drm-nouveau-display-Enable-vblank-irqs-after-display --- old/patches.fixes/drm-nouveau-display-Enable-vblank-irqs-after-display 1970-01-01 01:00:00.000000000 +0100 +++ new/patches.fixes/drm-nouveau-display-Enable-vblank-irqs-after-display 2016-02-26 10:54:10.000000000 +0100 @@ -0,0 +1,60 @@ +From ff683df7bf34f90766a50c7e7454e219aef2710e Mon Sep 17 00:00:00 2001 +From: Mario Kleiner <[email protected]> +Date: Fri, 12 Feb 2016 20:30:32 +0100 +Subject: [PATCH] drm/nouveau/display: Enable vblank irqs after display engine is on again. +Git-commit: ff683df7bf34f90766a50c7e7454e219aef2710e +Patch-mainline: 4.5-rc5 +References: bsc#962535 + +In the display resume path, move the calls to drm_vblank_on() +after the point when the display engine is running again. + +Since changes were made to drm_update_vblank_count() in Linux 4.4+ +to emulate hw vblank counters via vblank timestamping, the function +drm_vblank_on() now needs working high precision vblank timestamping +and therefore working scanout position queries at time of call. +These don't work before the display engine gets restarted, causing +miscalculation of vblank counter increments and thereby large forward +jumps in vblank count at display resume. These jumps can cause client +hangs on resume, or desktop hangs in the case of composited desktops. + +Fix this Linux 4.4 regression by reordering calls accordingly. + +Signed-off-by: Mario Kleiner <[email protected]> +Cc: <[email protected]> # 4.4+ +Cc: Ben Skeggs <[email protected]> +Cc: [email protected] +Cc: [email protected] +Cc: [email protected] +Reviewed-by: Daniel Vetter <[email protected]> +Signed-off-by: Dave Airlie <[email protected]> +Acked-by: Takashi Iwai <[email protected]> + +--- + drivers/gpu/drm/nouveau/nouveau_display.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/gpu/drm/nouveau/nouveau_display.c ++++ b/drivers/gpu/drm/nouveau/nouveau_display.c +@@ -634,10 +634,6 @@ nouveau_display_resume(struct drm_device + nv_crtc->lut.depth = 0; + } + +- /* Make sure that drm and hw vblank irqs get resumed if needed. */ +- for (head = 0; head < dev->mode_config.num_crtc; head++) +- drm_vblank_on(dev, head); +- + /* This should ensure we don't hit a locking problem when someone + * wakes us up via a connector. We should never go into suspend + * while the display is on anyways. +@@ -647,6 +643,10 @@ nouveau_display_resume(struct drm_device + + drm_helper_resume_force_mode(dev); + ++ /* Make sure that drm and hw vblank irqs get resumed if needed. */ ++ for (head = 0; head < dev->mode_config.num_crtc; head++) ++ drm_vblank_on(dev, head); ++ + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { + struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.fixes/genirq-Validate-action-before-dereferencing-it-in-ha.patch new/patches.fixes/genirq-Validate-action-before-dereferencing-it-in-ha.patch --- old/patches.fixes/genirq-Validate-action-before-dereferencing-it-in-ha.patch 1970-01-01 01:00:00.000000000 +0100 +++ new/patches.fixes/genirq-Validate-action-before-dereferencing-it-in-ha.patch 2016-02-26 10:54:10.000000000 +0100 @@ -0,0 +1,98 @@ +From: Thomas Gleixner <[email protected]> +Date: Wed, 13 Jan 2016 14:07:25 +0100 +Subject: genirq: Validate action before dereferencing it in + handle_irq_event_percpu() +Git-commit: 570540d50710ed192e98e2f7f74578c9486b6b05 +Patch-mainline: v4.5-rc2 +References: bnc#968396 + +commit 71f64340fc0e changed the handling of irq_desc->action from + +CPU 0 CPU 1 +free_irq() lock(desc) + lock(desc) handle_edge_irq() + if (desc->action) { + handle_irq_event() + action = desc->action + unlock(desc) + desc->action = NULL handle_irq_event_percpu(desc, action) + action->xxx +to + +CPU 0 CPU 1 +free_irq() lock(desc) + lock(desc) handle_edge_irq() + if (desc->action) { + handle_irq_event() + unlock(desc) + desc->action = NULL handle_irq_event_percpu(desc, action) + action = desc->action + action->xxx + +So if free_irq manages to set the action to NULL between the unlock and before +the readout, we happily dereference a null pointer. + +We could simply revert 71f64340fc0e, but we want to preserve the better code +generation. A simple solution is to change the action loop from a do {} while +to a while {} loop. + +This is safe because we either see a valid desc->action or NULL. If the action +is about to be removed it is still valid as free_irq() is blocked on +synchronize_irq(). + +CPU 0 CPU 1 +free_irq() lock(desc) + lock(desc) handle_edge_irq() + handle_irq_event(desc) + set(INPROGRESS) + unlock(desc) + handle_irq_event_percpu(desc) + action = desc->action + desc->action = NULL while (action) { + action->xxx + ... + action = action->next; + sychronize_irq() + while(INPROGRESS); lock(desc) + clr(INPROGRESS) +free(action) + +That's basically the same mechanism as we have for shared +interrupts. action->next can become NULL while handle_irq_event_percpu() +runs. Either it sees the action or NULL. It does not matter, because action +itself cannot go away before the interrupt in progress flag has been cleared. + +Fixes: commit 71f64340fc0e "genirq: Remove the second parameter from handle_irq_event_percpu()" +Reported-by: [email protected] +Signed-off-by: Thomas Gleixner <[email protected]> +Cc: Huang Shijie <[email protected]> +Cc: Jiang Liu <[email protected]> +Cc: Peter Zijlstra <[email protected]> +Cc: [email protected] +Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1601131224190.3575@nanos +Signed-off-by: Jiri Slaby <[email protected]> +--- + kernel/irq/handle.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/kernel/irq/handle.c ++++ b/kernel/irq/handle.c +@@ -138,7 +138,8 @@ irqreturn_t handle_irq_event_percpu(stru + unsigned int flags = 0, irq = desc->irq_data.irq; + struct irqaction *action = desc->action; + +- do { ++ /* action might have become NULL since we dropped the lock */ ++ while (action) { + irqreturn_t res; + + trace_irq_handler_entry(irq, action); +@@ -173,7 +174,7 @@ irqreturn_t handle_irq_event_percpu(stru + + retval |= res; + action = action->next; +- } while (action); ++ } + + add_interrupt_randomness(irq, flags); + ++++++ patches.kernel.org.tar.bz2 ++++++ ++++ 5069 lines of diff (skipped) ++++++ patches.suse.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/btrfs-0061-remove-error-message-from-search-ioctl-for-non.patch new/patches.suse/btrfs-0061-remove-error-message-from-search-ioctl-for-non.patch --- old/patches.suse/btrfs-0061-remove-error-message-from-search-ioctl-for-non.patch 1970-01-01 01:00:00.000000000 +0100 +++ new/patches.suse/btrfs-0061-remove-error-message-from-search-ioctl-for-non.patch 2016-02-26 08:42:22.000000000 +0100 @@ -0,0 +1,33 @@ +From: David Sterba <[email protected]> +Date: Thu, 11 Feb 2016 15:30:07 +0100 +Patch-mainline: 4.6 +Subject: [PATCH] btrfs: remove error message from search ioctl for nonexistent + tree + +Let's remove the error message that appears when the tree_id is not +present. This can happen with the quota tree and has been observed in +practice. The applications are supposed to handle -ENOENT and we don't +need to report that in the system log as it's not a fatal error. + +Reported-by: Vlastimil Babka <[email protected]> +Signed-off-by: David Sterba <[email protected]> +--- + fs/btrfs/ioctl.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c +index 952172ca7e45..ab390c7958f5 100644 +--- a/fs/btrfs/ioctl.c ++++ b/fs/btrfs/ioctl.c +@@ -2097,8 +2097,6 @@ static noinline int search_ioctl(struct inode *inode, + key.offset = (u64)-1; + root = btrfs_read_fs_root_no_name(info, &key); + if (IS_ERR(root)) { +- btrfs_err(info, "could not find root %llu", +- sk->tree_id); + btrfs_free_path(path); + return -ENOENT; + } +-- +2.7.1 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patches.suse/btrfs-fix-fitrim-discarding-device-area-reserved-for.patch new/patches.suse/btrfs-fix-fitrim-discarding-device-area-reserved-for.patch --- old/patches.suse/btrfs-fix-fitrim-discarding-device-area-reserved-for.patch 2016-01-22 10:24:09.000000000 +0100 +++ new/patches.suse/btrfs-fix-fitrim-discarding-device-area-reserved-for.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,120 +0,0 @@ -From: Filipe Manana <[email protected]> -Date: Wed, 6 Jan 2016 22:42:35 +0000 -References: bsc#960910 -Patch-mainline: Submitted to linux-btrfs, 8 Jan 2016 -Subject: [PATCH] Btrfs: fix fitrim discarding device area reserved for boot - loader's use - -As of the 4.3 kernel release, the fitrim ioctl can now discard any region -of a disk that is not allocated to any chunk/block group, including the -first megabyte which is used for our primary superblock and by the boot -loader (grub for example). - -Fix this by not allowing to trim/discard any region in the device starting -with an offset not greater than min(alloc_start_mount_option, 1Mb), just -as it was not possible before 4.3. - -A reproducer test case for xfstests follows. - - seq=`basename $0` - seqres=$RESULT_DIR/$seq - echo "QA output created by $seq" - tmp=/tmp/$$ - status=1 # failure is the default! - trap "_cleanup; exit \$status" 0 1 2 3 15 - - _cleanup() - { - cd / - rm -f $tmp.* - } - - # get standard environment, filters and checks - . ./common/rc - . ./common/filter - - # real QA test starts here - _need_to_be_root - _supported_fs btrfs - _supported_os Linux - _require_scratch - - rm -f $seqres.full - - _scratch_mkfs >>$seqres.full 2>&1 - - # Write to the [0, 64Kb[ and [68Kb, 1Mb[ ranges of the device. These ranges are - # reserved for a boot loader to use (GRUB for example) and btrfs should never - # use them - neither for allocating metadata/data nor should trim/discard them. - # The range [64Kb, 68Kb[ is used for the primary superblock of the filesystem. - $XFS_IO_PROG -c "pwrite -S 0xfd 0 64K" $SCRATCH_DEV | _filter_xfs_io - $XFS_IO_PROG -c "pwrite -S 0xfd 68K 956K" $SCRATCH_DEV | _filter_xfs_io - - # Now mount the filesystem and perform a fitrim against it. - _scratch_mount - _require_batched_discard $SCRATCH_MNT - $FSTRIM_PROG $SCRATCH_MNT - - # Now unmount the filesystem and verify the content of the ranges was not - # modified (no trim/discard happened on them). - _scratch_unmount - echo "Content of the ranges [0, 64Kb] and [68Kb, 1Mb[ after fitrim:" - od -t x1 -N $((64 * 1024)) $SCRATCH_DEV - od -t x1 -j $((68 * 1024)) -N $((956 * 1024)) $SCRATCH_DEV - - status=0 - exit - -Reported-by: Vincent Petry <[email protected]> -Reported-by: Andrei Borzenkov <[email protected]> -Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109341 -Fixes: 499f377f49f0 (btrfs: iterate over unused chunk space in FITRIM) -Cc: [email protected] # 4.3+ -Signed-off-by: Filipe Manana <[email protected]> ---- - fs/btrfs/volumes.c | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - -diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c -index a114b7b..b0a0eb2 100644 ---- a/fs/btrfs/volumes.c -+++ b/fs/btrfs/volumes.c -@@ -1258,6 +1258,15 @@ int find_free_dev_extent_start(struct btrfs_transaction *transaction, - int ret; - int slot; - struct extent_buffer *l; -+ u64 min_search_start; -+ -+ /* -+ * We don't want to overwrite the superblock on the drive nor any area -+ * used by the boot loader (grub for example), so we make sure to start -+ * at an offset of at least 1MB. -+ */ -+ min_search_start = max(root->fs_info->alloc_start, 1024ull * 1024); -+ search_start = max(search_start, min_search_start); - - path = btrfs_alloc_path(); - if (!path) -@@ -1398,18 +1407,9 @@ int find_free_dev_extent(struct btrfs_trans_handle *trans, - struct btrfs_device *device, u64 num_bytes, - u64 *start, u64 *len) - { -- struct btrfs_root *root = device->dev_root; -- u64 search_start; -- - /* FIXME use last free of some kind */ -- -- /* -- * we don't want to overwrite the superblock on the drive, -- * so we make sure to start at an offset of at least 1MB -- */ -- search_start = max(root->fs_info->alloc_start, 1024ull * 1024); - return find_free_dev_extent_start(trans->transaction, device, -- num_bytes, search_start, start, len); -+ num_bytes, 0, start, len); - } - - static int btrfs_free_dev_extent(struct btrfs_trans_handle *trans, --- -1.8.4.5 - ++++++ series.conf ++++++ --- /var/tmp/diff_new_pack.L4FMfq/_old 2016-03-02 14:20:06.000000000 +0100 +++ /var/tmp/diff_new_pack.L4FMfq/_new 2016-03-02 14:20:06.000000000 +0100 @@ -29,6 +29,7 @@ ######################################################## patches.kernel.org/patch-4.4.1 patches.kernel.org/patch-4.4.1-2 + patches.kernel.org/patch-4.4.2-3 ######################################################## # Build fixes that apply to the vanilla kernel too. @@ -76,6 +77,7 @@ # Scheduler / Core ######################################################## patches.suse/setuid-dumpable-wrongdir + patches.fixes/genirq-Validate-action-before-dereferencing-it-in-ha.patch ######################################################## # Architecture-specific patches. These used to be all @@ -248,7 +250,7 @@ ######################################################## patches.suse/btrfs-advertise-which-crc32c-implementation-is-being-used-on-mount patches.suse/btrfs-provide-super_operations-get_inode_dev - patches.suse/btrfs-fix-fitrim-discarding-device-area-reserved-for.patch + patches.suse/btrfs-0061-remove-error-message-from-search-ioctl-for-non.patch ######################################################## # Reiserfs Patches @@ -269,7 +271,6 @@ ######################################################## # xfs ######################################################## - patches.fixes/Revert-xfs-clear-PF_NOFREEZE-for-xfsaild-kthread ######################################################## # other filesystem stuff @@ -345,6 +346,12 @@ patches.fixes/0002-drm-i915-Fix-failure-paths-around-initial-fbdev-allo.patch patches.fixes/0003-drm-i915-Pin-the-ifbdev-for-the-info-system_base-GGT.patch + patches.fixes/drm-No-Op-redundant-calls-to-drm_vblank_off-v2 + patches.fixes/drm-Prevent-vblank-counter-bumps-1-with-active-vblan + patches.fixes/drm-Fix-drm_vblank_pre-post_modeset-regression-from + patches.fixes/drm-Fix-treatment-of-drm_vblank_offdelay-in-drm_vbla + patches.fixes/drm-nouveau-display-Enable-vblank-irqs-after-display + ######################################################## # video4linux ######################################################## ++++++ source-timestamp ++++++ --- /var/tmp/diff_new_pack.L4FMfq/_old 2016-03-02 14:20:06.000000000 +0100 +++ /var/tmp/diff_new_pack.L4FMfq/_new 2016-03-02 14:20:06.000000000 +0100 @@ -1,3 +1,3 @@ -2016-02-23 11:30:49 +0100 -GIT Revision: c601f8d968ebc6e67356f602591365adcf716273 +2016-02-26 10:54:10 +0100 +GIT Revision: 171b8f1f4e35fcb98abec31cbf150e361718eac7 GIT Branch: stable
