From 4d5803180ca48e92d93b45d92afb9fa311572f22 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 4 Dec 2017 13:19:19 +0100 Subject: [PATCH] 3.18-stable patches added patches: drm-panel-simple-add-missing-panel_simple_unprepare-calls.patch nfs-revalidate-.-etc-correctly-on-open.patch --- ...missing-panel_simple_unprepare-calls.patch | 41 +++++++++++++ ...s-revalidate-.-etc-correctly-on-open.patch | 60 +++++++++++++++++++ queue-3.18/series | 2 + 3 files changed, 103 insertions(+) create mode 100644 queue-3.18/drm-panel-simple-add-missing-panel_simple_unprepare-calls.patch create mode 100644 queue-3.18/nfs-revalidate-.-etc-correctly-on-open.patch diff --git a/queue-3.18/drm-panel-simple-add-missing-panel_simple_unprepare-calls.patch b/queue-3.18/drm-panel-simple-add-missing-panel_simple_unprepare-calls.patch new file mode 100644 index 00000000000..3edec7e25fd --- /dev/null +++ b/queue-3.18/drm-panel-simple-add-missing-panel_simple_unprepare-calls.patch @@ -0,0 +1,41 @@ +From f3621a8eb59a913612c8e6e37d81f16b649f8b6c Mon Sep 17 00:00:00 2001 +From: Jonathan Liu +Date: Mon, 7 Aug 2017 21:55:45 +1000 +Subject: drm/panel: simple: Add missing panel_simple_unprepare() calls + +From: Jonathan Liu + +commit f3621a8eb59a913612c8e6e37d81f16b649f8b6c upstream. + +During panel removal or system shutdown panel_simple_disable() is called +which disables the panel backlight but the panel is still powered due to +missing calls to panel_simple_unprepare(). + +Fixes: d02fd93e2cd8 ("drm/panel: simple - Disable panel on shutdown") +Signed-off-by: Jonathan Liu +Signed-off-by: Thierry Reding +Link: https://patchwork.freedesktop.org/patch/msgid/20170807115545.27747-1-net147@gmail.com +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/panel/panel-simple.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/gpu/drm/panel/panel-simple.c ++++ b/drivers/gpu/drm/panel/panel-simple.c +@@ -312,6 +312,7 @@ static int panel_simple_remove(struct de + drm_panel_remove(&panel->base); + + panel_simple_disable(&panel->base); ++ panel_simple_unprepare(&panel->base); + + if (panel->ddc) + put_device(&panel->ddc->dev); +@@ -327,6 +328,7 @@ static void panel_simple_shutdown(struct + struct panel_simple *panel = dev_get_drvdata(dev); + + panel_simple_disable(&panel->base); ++ panel_simple_unprepare(&panel->base); + } + + static const struct drm_display_mode auo_b101aw03_mode = { diff --git a/queue-3.18/nfs-revalidate-.-etc-correctly-on-open.patch b/queue-3.18/nfs-revalidate-.-etc-correctly-on-open.patch new file mode 100644 index 00000000000..9722e36c7f2 --- /dev/null +++ b/queue-3.18/nfs-revalidate-.-etc-correctly-on-open.patch @@ -0,0 +1,60 @@ +From b688741cb06695312f18b730653d6611e1bad28d Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Fri, 25 Aug 2017 17:34:41 +1000 +Subject: NFS: revalidate "." etc correctly on "open". + +From: NeilBrown + +commit b688741cb06695312f18b730653d6611e1bad28d upstream. + +For correct close-to-open semantics, NFS must validate +the change attribute of a directory (or file) on open. + +Since commit ecf3d1f1aa74 ("vfs: kill FS_REVAL_DOT by adding a +d_weak_revalidate dentry op"), open() of "." or a path ending ".." is +not revalidated reliably (except when that direct is a mount point). + +Prior to that commit, "." was revalidated using nfs_lookup_revalidate() +which checks the LOOKUP_OPEN flag and forces revalidation if the flag is +set. +Since that commit, nfs_weak_revalidate() is used for NFSv3 (which +ignores the flags) and nothing is used for NFSv4. + +This is fixed by using nfs_lookup_verify_inode() in +nfs_weak_revalidate(). This does the revalidation exactly when needed. +Also, add a definition of .d_weak_revalidate for NFSv4. + +The incorrect behavior is easily demonstrated by running "echo *" in +some non-mountpoint NFS directory while watching network traffic. +Without this patch, "echo *" sometimes doesn't produce any traffic. +With the patch it always does. + +Fixes: ecf3d1f1aa74 ("vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op") +cc: stable@vger.kernel.org (3.9+) +Signed-off-by: NeilBrown +Signed-off-by: Anna Schumaker +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfs/dir.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/fs/nfs/dir.c ++++ b/fs/nfs/dir.c +@@ -1266,7 +1266,7 @@ static int nfs_weak_revalidate(struct de + return 0; + } + +- error = nfs_revalidate_inode(NFS_SERVER(inode), inode); ++ error = nfs_lookup_verify_inode(inode, flags); + dfprintk(LOOKUPCACHE, "NFS: %s: inode %lu is %s\n", + __func__, inode->i_ino, error ? "invalid" : "valid"); + return !error; +@@ -1426,6 +1426,7 @@ static int nfs4_lookup_revalidate(struct + + const struct dentry_operations nfs4_dentry_operations = { + .d_revalidate = nfs4_lookup_revalidate, ++ .d_weak_revalidate = nfs_weak_revalidate, + .d_delete = nfs_dentry_delete, + .d_iput = nfs_dentry_iput, + .d_automount = nfs_d_automount, diff --git a/queue-3.18/series b/queue-3.18/series index 3ed87d3d5f5..c2e7778a3ee 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -6,3 +6,5 @@ btrfs-clear-space-cache-inode-generation-always.patch kvm-x86-exit-to-user-mode-on-ud-intercept-when-emulator-requires.patch kvm-x86-inject-exceptions-produced-by-x86_decode_insn.patch eeprom-at24-check-at24_read-write-arguments.patch +drm-panel-simple-add-missing-panel_simple_unprepare-calls.patch +nfs-revalidate-.-etc-correctly-on-open.patch -- 2.47.3