Home Home > GIT Browse > SLE12-SP3
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-03-19 15:28:48 +0100
committerTakashi Iwai <tiwai@suse.de>2019-03-19 15:28:48 +0100
commit8fbe33ffb0f095632a275d9b959311cfec3d2b7f (patch)
tree97bec286271baa8e27b8f8bba2338c03fe8b2ce7
parentaa123513212258184f3ff9ec8db8c1655fb3520d (diff)
parent81ee6566fd67a3b9a96af9b81558ec63af64a936 (diff)
Merge branch 'users/oneukum/SLE12-SP3/for-next' into SLE12-SP3SLE12-SP3
Pull device fix from Oliver Neukum (bsc#1129770)
-rw-r--r--patches.fixes/0001-device-property-Fix-the-length-used-in-PROPERTY_ENTR.patch40
-rw-r--r--series.conf1
2 files changed, 41 insertions, 0 deletions
diff --git a/patches.fixes/0001-device-property-Fix-the-length-used-in-PROPERTY_ENTR.patch b/patches.fixes/0001-device-property-Fix-the-length-used-in-PROPERTY_ENTR.patch
new file mode 100644
index 0000000000..4a9c9a23bc
--- /dev/null
+++ b/patches.fixes/0001-device-property-Fix-the-length-used-in-PROPERTY_ENTR.patch
@@ -0,0 +1,40 @@
+From 2b6e492467c78183bb629bb0a100ea3509b615a5 Mon Sep 17 00:00:00 2001
+From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Date: Wed, 23 Jan 2019 17:44:16 +0300
+Subject: [PATCH] device property: Fix the length used in
+ PROPERTY_ENTRY_STRING()
+Git-commit: 2b6e492467c78183bb629bb0a100ea3509b615a5
+Patch-mainline: v5.1-rc1
+References: bsc#1129770
+
+With string type property entries we need to use
+sizeof(const char *) instead of the number of characters as
+the length of the entry.
+
+If the string was shorter then sizeof(const char *),
+attempts to read it would have failed with -EOVERFLOW. The
+problem has been hidden because all build-in string
+properties have had a string longer then 8 characters until
+now.
+
+Fixes: a85f42047533 ("device property: helper macros for property entry creation")
+Cc: 4.5+ <stable@vger.kernel.org> # 4.5+
+Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Oliver Neukum <oneukum@suse.com>
+---
+ include/linux/property.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/linux/property.h
++++ b/include/linux/property.h
+@@ -220,7 +220,7 @@ struct property_entry {
+ #define PROPERTY_ENTRY_STRING(_name_, _val_) \
+ { \
+ .name = _name_, \
+- .length = sizeof(_val_), \
++ .length = sizeof(const char *), \
+ .is_string = true, \
+ .value.str = _val_, \
+ }
diff --git a/series.conf b/series.conf
index 19f6d11697..0a1d4cf621 100644
--- a/series.conf
+++ b/series.conf
@@ -24495,6 +24495,7 @@
patches.drivers/iommu-dmar-fix-buffer-overflow-during-pci-bus-notification
patches.fixes/copy_mount_string-Limit-string-length-to-PATH_MAX.patch
patches.fixes/0001-team-Free-BPF-filter-when-unregistering-netdev.patch
+ patches.fixes/0001-device-property-Fix-the-length-used-in-PROPERTY_ENTR.patch
patches.suse/btrfs-ensure-that-a-dup-or-raid1-block-group-has-exactly-two-stripes.patch
patches.arch/powerpc-pseries-Perform-full-re-add-of-CPU-for-topol.patch
patches.fixes/0001-drm-Fix-error-handling-in-drm_legacy_addctx.patch