--- /dev/null
+From 23fbd7c70aec7600e3227eb24259fc55bf6e4881 Mon Sep 17 00:00:00 2001
+From: Toshi Kani <toshi.kani@hpe.com>
+Date: Fri, 2 Feb 2018 14:00:36 -0700
+Subject: acpi, nfit: fix register dimm error handling
+
+From: Toshi Kani <toshi.kani@hpe.com>
+
+commit 23fbd7c70aec7600e3227eb24259fc55bf6e4881 upstream.
+
+A NULL pointer reference kernel bug was observed when
+acpi_nfit_add_dimm() called in acpi_nfit_register_dimms() failed. This
+error path does not set nfit_mem->nvdimm, but the 2nd
+list_for_each_entry() loop in the function assumes it's always set. Add
+a check to nfit_mem->nvdimm.
+
+Fixes: ba9c8dd3c222 ("acpi, nfit: add dimm device notification support")
+Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
+Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
+Signed-off-by: Dan Williams <dan.j.williams@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/nfit/core.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/acpi/nfit/core.c
++++ b/drivers/acpi/nfit/core.c
+@@ -1535,6 +1535,9 @@ static int acpi_nfit_register_dimms(stru
+ struct kernfs_node *nfit_kernfs;
+
+ nvdimm = nfit_mem->nvdimm;
++ if (!nvdimm)
++ continue;
++
+ nfit_kernfs = sysfs_get_dirent(nvdimm_kobj(nvdimm)->sd, "nfit");
+ if (nfit_kernfs)
+ nfit_mem->flags_attr = sysfs_get_dirent(nfit_kernfs,
--- /dev/null
+From 43cdd1b716b26f6af16da4e145b6578f98798bf6 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Fri, 19 Jan 2018 10:06:03 +0100
+Subject: ACPI: sbshc: remove raw pointer from printk() message
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+commit 43cdd1b716b26f6af16da4e145b6578f98798bf6 upstream.
+
+There's no need to be printing a raw kernel pointer to the kernel log at
+every boot. So just remove it, and change the whole message to use the
+correct dev_info() call at the same time.
+
+Reported-by: Wang Qize <wang_qize@venustech.com.cn>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/sbshc.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/acpi/sbshc.c
++++ b/drivers/acpi/sbshc.c
+@@ -275,8 +275,8 @@ static int acpi_smbus_hc_add(struct acpi
+ device->driver_data = hc;
+
+ acpi_ec_add_query_handler(hc->ec, hc->query_bit, NULL, smbus_alarm, hc);
+- printk(KERN_INFO PREFIX "SBS HC: EC = 0x%p, offset = 0x%0x, query_bit = 0x%0x\n",
+- hc->ec, hc->offset, hc->query_bit);
++ dev_info(&device->dev, "SBS HC: offset = 0x%0x, query_bit = 0x%0x\n",
++ hc->offset, hc->query_bit);
+
+ return 0;
+ }
--- /dev/null
+From 5643205c6340b565a3be0fe0e7305dc4aa551c74 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@intel.com>
+Date: Wed, 29 Nov 2017 19:51:37 +0200
+Subject: drm/i915: Avoid PPS HW/SW state mismatch due to rounding
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Imre Deak <imre.deak@intel.com>
+
+commit 5643205c6340b565a3be0fe0e7305dc4aa551c74 upstream.
+
+We store a SW state of the t11_t12 timing in 100usec units but have to
+program it in 100msec as required by HW. The rounding used during
+programming means there will be a mismatch between the SW and HW states
+of this value triggering a "PPS state mismatch" error. Avoid this by
+storing the already rounded-up value in the SW state.
+
+Note that we still calculate panel_power_cycle_delay with the finer
+100usec granularity to avoid any needless waits using that version of
+the delay.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103903
+Cc: joks <joks@linux.pl>
+Signed-off-by: Imre Deak <imre.deak@intel.com>
+Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20171129175137.2889-1-imre.deak@intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_dp.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/gpu/drm/i915/intel_dp.c
++++ b/drivers/gpu/drm/i915/intel_dp.c
+@@ -5063,6 +5063,12 @@ intel_dp_init_panel_power_sequencer(stru
+ */
+ final->t8 = 1;
+ final->t9 = 1;
++
++ /*
++ * HW has only a 100msec granularity for t11_t12 so round it up
++ * accordingly.
++ */
++ final->t11_t12 = roundup(final->t11_t12, 100 * 10);
+ }
+
+ static void
--- /dev/null
+From 7b6586562708d2b3a04fe49f217ddbadbbbb0546 Mon Sep 17 00:00:00 2001
+From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
+Date: Mon, 5 Feb 2018 22:05:31 -0500
+Subject: ftrace: Remove incorrect setting of glob search field
+
+From: Steven Rostedt (VMware) <rostedt@goodmis.org>
+
+commit 7b6586562708d2b3a04fe49f217ddbadbbbb0546 upstream.
+
+__unregister_ftrace_function_probe() will incorrectly parse the glob filter
+because it resets the search variable that was setup by filter_parse_regex().
+
+Al Viro reported this:
+
+ After that call of filter_parse_regex() we could have func_g.search not
+ equal to glob only if glob started with '!' or '*'. In the former case
+ we would've buggered off with -EINVAL (not = 1). In the latter we
+ would've set func_g.search equal to glob + 1, calculated the length of
+ that thing in func_g.len and proceeded to reset func_g.search back to
+ glob.
+
+ Suppose the glob is e.g. *foo*. We end up with
+ func_g.type = MATCH_MIDDLE_ONLY;
+ func_g.len = 3;
+ func_g.search = "*foo";
+ Feeding that to ftrace_match_record() will not do anything sane - we
+ will be looking for names containing "*foo" (->len is ignored for that
+ one).
+
+Link: http://lkml.kernel.org/r/20180127031706.GE13338@ZenIV.linux.org.uk
+
+Fixes: 3ba009297149f ("ftrace: Introduce ftrace_glob structure")
+Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com>
+Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
+Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
+Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/trace/ftrace.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/kernel/trace/ftrace.c
++++ b/kernel/trace/ftrace.c
+@@ -3911,7 +3911,6 @@ __unregister_ftrace_function_probe(char
+ func_g.type = filter_parse_regex(glob, strlen(glob),
+ &func_g.search, ¬);
+ func_g.len = strlen(func_g.search);
+- func_g.search = glob;
+
+ /* we do not support '!' for function probes */
+ if (WARN_ON(not))
--- /dev/null
+From 6ac1dc736b323011a55ecd1fc5897c24c4f77cbd Mon Sep 17 00:00:00 2001
+From: "Eric W. Biederman" <ebiederm@xmission.com>
+Date: Tue, 1 Aug 2017 05:02:38 -0500
+Subject: mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy
+
+From: Eric W. Biederman <ebiederm@xmission.com>
+
+commit 6ac1dc736b323011a55ecd1fc5897c24c4f77cbd upstream.
+
+Setting si_code to 0 is the same a setting si_code to SI_USER which is definitely
+not correct. With si_code set to SI_USER si_pid and si_uid will be copied to
+userspace instead of si_addr. Which is very wrong.
+
+So fix this by using a sensible si_code (SEGV_MAPERR) for this failure.
+
+Fixes: b920de1b77b7 ("mn10300: add the MN10300/AM33 architecture to the kernel")
+Cc: David Howells <dhowells@redhat.com>
+Cc: Masakazu Urade <urade.masakazu@jp.panasonic.com>
+Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
+Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mn10300/mm/misalignment.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/mn10300/mm/misalignment.c
++++ b/arch/mn10300/mm/misalignment.c
+@@ -437,7 +437,7 @@ transfer_failed:
+
+ info.si_signo = SIGSEGV;
+ info.si_errno = 0;
+- info.si_code = 0;
++ info.si_code = SEGV_MAPERR;
+ info.si_addr = (void *) regs->pc;
+ force_sig_info(SIGSEGV, &info, current);
+ return;
--- /dev/null
+From d796e77f1dd541fe34481af2eee6454688d13982 Mon Sep 17 00:00:00 2001
+From: Amir Goldstein <amir73il@gmail.com>
+Date: Wed, 8 Nov 2017 09:39:46 +0200
+Subject: ovl: fix failure to fsync lower dir
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Amir Goldstein <amir73il@gmail.com>
+
+commit d796e77f1dd541fe34481af2eee6454688d13982 upstream.
+
+As a writable mount, it is not expected for overlayfs to return
+EINVAL/EROFS for fsync, even if dir/file is not changed.
+
+This commit fixes the case of fsync of directory, which is easier to
+address, because overlayfs already implements fsync file operation for
+directories.
+
+The problem reported by Raphael is that new PostgreSQL 10.0 with a
+database in overlayfs where lower layer in squashfs fails to start.
+The failure is due to fsync error, when PostgreSQL does fsync on all
+existing db directories on startup and a specific directory exists
+lower layer with no changes.
+
+Reported-by: Raphael Hertzog <raphael@ouaza.com>
+Signed-off-by: Amir Goldstein <amir73il@gmail.com>
+Tested-by: Raphaël Hertzog <hertzog@debian.org>
+Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/overlayfs/readdir.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/fs/overlayfs/readdir.c
++++ b/fs/overlayfs/readdir.c
+@@ -434,10 +434,14 @@ static int ovl_dir_fsync(struct file *fi
+ struct dentry *dentry = file->f_path.dentry;
+ struct file *realfile = od->realfile;
+
++ /* Nothing to sync for lower */
++ if (!OVL_TYPE_UPPER(ovl_path_type(dentry)))
++ return 0;
++
+ /*
+ * Need to check if we started out being a lower dir, but got copied up
+ */
+- if (!od->is_upper && OVL_TYPE_UPPER(ovl_path_type(dentry))) {
++ if (!od->is_upper) {
+ struct inode *inode = file_inode(file);
+
+ realfile = lockless_dereference(od->upperfile);
lib-ubsan.c-s-missaligned-misaligned.patch
lib-ubsan-add-type-mismatch-handler-for-new-gcc-clang.patch
btrfs-handle-btrfs_set_extent_delalloc-failure-in-fixup-worker.patch
+drm-i915-avoid-pps-hw-sw-state-mismatch-due-to-rounding.patch
+acpi-sbshc-remove-raw-pointer-from-printk-message.patch
+acpi-nfit-fix-register-dimm-error-handling.patch
+ovl-fix-failure-to-fsync-lower-dir.patch
+mn10300-misalignment-use-sigsegv-segv_maperr-to-report-a-failed-user-copy.patch
+ftrace-remove-incorrect-setting-of-glob-search-field.patch