]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 May 2020 11:27:16 +0000 (13:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 May 2020 11:27:16 +0000 (13:27 +0200)
added patches:
acpi-pm-s2idle-fix-comment-in-acpi_s2idle_prepare_late.patch
cgroup-netclassid-remove-double-cond_resched.patch
mac80211-add-ieee80211_is_any_nullfunc.patch
mm-mremap-add-comment-explaining-the-untagging-behaviour-of-mremap.patch
platform-x86-gpd-pocket-fan-fix-error-message-when-temp-limits-are-out-of-range.patch

queue-5.6/acpi-pm-s2idle-fix-comment-in-acpi_s2idle_prepare_late.patch [new file with mode: 0644]
queue-5.6/cgroup-netclassid-remove-double-cond_resched.patch [new file with mode: 0644]
queue-5.6/mac80211-add-ieee80211_is_any_nullfunc.patch [new file with mode: 0644]
queue-5.6/mm-mremap-add-comment-explaining-the-untagging-behaviour-of-mremap.patch [new file with mode: 0644]
queue-5.6/platform-x86-gpd-pocket-fan-fix-error-message-when-temp-limits-are-out-of-range.patch [new file with mode: 0644]
queue-5.6/series

diff --git a/queue-5.6/acpi-pm-s2idle-fix-comment-in-acpi_s2idle_prepare_late.patch b/queue-5.6/acpi-pm-s2idle-fix-comment-in-acpi_s2idle_prepare_late.patch
new file mode 100644 (file)
index 0000000..a663922
--- /dev/null
@@ -0,0 +1,34 @@
+From 243a98894dc525ad2fbeb608722fcb682be3186d Mon Sep 17 00:00:00 2001
+From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+Date: Fri, 20 Mar 2020 15:07:29 +0100
+Subject: ACPI: PM: s2idle: Fix comment in acpi_s2idle_prepare_late()
+
+From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+
+commit 243a98894dc525ad2fbeb608722fcb682be3186d upstream.
+
+Fix a comment in acpi_s2idle_prepare_late() that has become outdated
+after commit f0ac20c3f613 ("ACPI: EC: Fix flushing of pending work").
+
+Fixes: f0ac20c3f613 ("ACPI: EC: Fix flushing of pending work")
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/sleep.c |    5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+--- a/drivers/acpi/sleep.c
++++ b/drivers/acpi/sleep.c
+@@ -982,10 +982,7 @@ static int acpi_s2idle_prepare_late(void
+ static void acpi_s2idle_sync(void)
+ {
+-      /*
+-       * The EC driver uses the system workqueue and an additional special
+-       * one, so those need to be flushed too.
+-       */
++      /* The EC driver uses special workqueues that need to be flushed. */
+       acpi_ec_flush_work();
+       acpi_os_wait_events_complete(); /* synchronize Notify handling */
+ }
diff --git a/queue-5.6/cgroup-netclassid-remove-double-cond_resched.patch b/queue-5.6/cgroup-netclassid-remove-double-cond_resched.patch
new file mode 100644 (file)
index 0000000..8f9ec05
--- /dev/null
@@ -0,0 +1,38 @@
+From 526f3d96b8f83b1b13d73bd0b5c79cc2c487ec8e Mon Sep 17 00:00:00 2001
+From: Jiri Slaby <jslaby@suse.cz>
+Date: Mon, 20 Apr 2020 09:04:24 +0200
+Subject: cgroup, netclassid: remove double cond_resched
+
+From: Jiri Slaby <jslaby@suse.cz>
+
+commit 526f3d96b8f83b1b13d73bd0b5c79cc2c487ec8e upstream.
+
+Commit 018d26fcd12a ("cgroup, netclassid: periodically release file_lock
+on classid") added a second cond_resched to write_classid indirectly by
+update_classid_task. Remove the one in write_classid.
+
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+Cc: Dmitry Yakunin <zeil@yandex-team.ru>
+Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
+Cc: David S. Miller <davem@davemloft.net>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/core/netclassid_cgroup.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/net/core/netclassid_cgroup.c
++++ b/net/core/netclassid_cgroup.c
+@@ -127,10 +127,8 @@ static int write_classid(struct cgroup_s
+       cs->classid = (u32)value;
+       css_task_iter_start(css, 0, &it);
+-      while ((p = css_task_iter_next(&it))) {
++      while ((p = css_task_iter_next(&it)))
+               update_classid_task(p, cs->classid);
+-              cond_resched();
+-      }
+       css_task_iter_end(&it);
+       return 0;
diff --git a/queue-5.6/mac80211-add-ieee80211_is_any_nullfunc.patch b/queue-5.6/mac80211-add-ieee80211_is_any_nullfunc.patch
new file mode 100644 (file)
index 0000000..eeb3f6a
--- /dev/null
@@ -0,0 +1,128 @@
+From 30b2f0be23fb40e58d0ad2caf8702c2a44cda2e1 Mon Sep 17 00:00:00 2001
+From: Thomas Pedersen <thomas@adapt-ip.com>
+Date: Mon, 13 Jan 2020 21:59:40 -0800
+Subject: mac80211: add ieee80211_is_any_nullfunc()
+
+From: Thomas Pedersen <thomas@adapt-ip.com>
+
+commit 30b2f0be23fb40e58d0ad2caf8702c2a44cda2e1 upstream.
+
+commit 08a5bdde3812 ("mac80211: consider QoS Null frames for STA_NULLFUNC_ACKED")
+Fixed a bug where we failed to take into account a
+nullfunc frame can be either non-QoS or QoS. It turns out
+there is at least one more bug in
+ieee80211_sta_tx_notify(), introduced in
+commit 7b6ddeaf27ec ("mac80211: use QoS NDP for AP probing"),
+where we forgot to check for the QoS variant and so
+assumed the QoS nullfunc frame never went out
+
+Fix this by adding a helper ieee80211_is_any_nullfunc()
+which consolidates the check for non-QoS and QoS nullfunc
+frames. Replace existing compound conditionals and add a
+couple more missing checks for QoS variant.
+
+Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
+Link: https://lore.kernel.org/r/20200114055940.18502-3-thomas@adapt-ip.com
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/ieee80211.h |    9 +++++++++
+ net/mac80211/mlme.c       |    2 +-
+ net/mac80211/rx.c         |    8 +++-----
+ net/mac80211/status.c     |    5 ++---
+ net/mac80211/tx.c         |    2 +-
+ 5 files changed, 16 insertions(+), 10 deletions(-)
+
+--- a/include/linux/ieee80211.h
++++ b/include/linux/ieee80211.h
+@@ -620,6 +620,15 @@ static inline bool ieee80211_is_qos_null
+ }
+ /**
++ * ieee80211_is_any_nullfunc - check if frame is regular or QoS nullfunc frame
++ * @fc: frame control bytes in little-endian byteorder
++ */
++static inline bool ieee80211_is_any_nullfunc(__le16 fc)
++{
++      return (ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc));
++}
++
++/**
+  * ieee80211_is_bufferable_mmpdu - check if frame is bufferable MMPDU
+  * @fc: frame control field in little-endian byteorder
+  */
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -2460,7 +2460,7 @@ void ieee80211_sta_tx_notify(struct ieee
+       if (!ieee80211_is_data(hdr->frame_control))
+           return;
+-      if (ieee80211_is_nullfunc(hdr->frame_control) &&
++      if (ieee80211_is_any_nullfunc(hdr->frame_control) &&
+           sdata->u.mgd.probe_send_count > 0) {
+               if (ack)
+                       ieee80211_sta_reset_conn_monitor(sdata);
+--- a/net/mac80211/rx.c
++++ b/net/mac80211/rx.c
+@@ -1450,8 +1450,7 @@ ieee80211_rx_h_check_dup(struct ieee8021
+               return RX_CONTINUE;
+       if (ieee80211_is_ctl(hdr->frame_control) ||
+-          ieee80211_is_nullfunc(hdr->frame_control) ||
+-          ieee80211_is_qos_nullfunc(hdr->frame_control) ||
++          ieee80211_is_any_nullfunc(hdr->frame_control) ||
+           is_multicast_ether_addr(hdr->addr1))
+               return RX_CONTINUE;
+@@ -1838,8 +1837,7 @@ ieee80211_rx_h_sta_process(struct ieee80
+        * Drop (qos-)data::nullfunc frames silently, since they
+        * are used only to control station power saving mode.
+        */
+-      if (ieee80211_is_nullfunc(hdr->frame_control) ||
+-          ieee80211_is_qos_nullfunc(hdr->frame_control)) {
++      if (ieee80211_is_any_nullfunc(hdr->frame_control)) {
+               I802_DEBUG_INC(rx->local->rx_handlers_drop_nullfunc);
+               /*
+@@ -2319,7 +2317,7 @@ static int ieee80211_drop_unencrypted(st
+       /* Drop unencrypted frames if key is set. */
+       if (unlikely(!ieee80211_has_protected(fc) &&
+-                   !ieee80211_is_nullfunc(fc) &&
++                   !ieee80211_is_any_nullfunc(fc) &&
+                    ieee80211_is_data(fc) && rx->key))
+               return -EACCES;
+--- a/net/mac80211/status.c
++++ b/net/mac80211/status.c
+@@ -643,8 +643,7 @@ static void ieee80211_report_ack_skb(str
+               rcu_read_lock();
+               sdata = ieee80211_sdata_from_skb(local, skb);
+               if (sdata) {
+-                      if (ieee80211_is_nullfunc(hdr->frame_control) ||
+-                          ieee80211_is_qos_nullfunc(hdr->frame_control))
++                      if (ieee80211_is_any_nullfunc(hdr->frame_control))
+                               cfg80211_probe_status(sdata->dev, hdr->addr1,
+                                                     cookie, acked,
+                                                     info->status.ack_signal,
+@@ -1056,7 +1055,7 @@ static void __ieee80211_tx_status(struct
+                       I802_DEBUG_INC(local->dot11FailedCount);
+       }
+-      if ((ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc)) &&
++      if (ieee80211_is_any_nullfunc(fc) &&
+           ieee80211_has_pm(fc) &&
+           ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS) &&
+           !(info->flags & IEEE80211_TX_CTL_INJECTED) &&
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -297,7 +297,7 @@ ieee80211_tx_h_check_assoc(struct ieee80
+       if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) &&
+           test_bit(SDATA_STATE_OFFCHANNEL, &tx->sdata->state) &&
+           !ieee80211_is_probe_req(hdr->frame_control) &&
+-          !ieee80211_is_nullfunc(hdr->frame_control))
++          !ieee80211_is_any_nullfunc(hdr->frame_control))
+               /*
+                * When software scanning only nullfunc frames (to notify
+                * the sleep state to the AP) and probe requests (for the
diff --git a/queue-5.6/mm-mremap-add-comment-explaining-the-untagging-behaviour-of-mremap.patch b/queue-5.6/mm-mremap-add-comment-explaining-the-untagging-behaviour-of-mremap.patch
new file mode 100644 (file)
index 0000000..40bacfa
--- /dev/null
@@ -0,0 +1,47 @@
+From b2a84de2a2deb76a6a51609845341f508c518c03 Mon Sep 17 00:00:00 2001
+From: Will Deacon <will@kernel.org>
+Date: Wed, 25 Mar 2020 11:13:46 +0000
+Subject: mm/mremap: Add comment explaining the untagging behaviour of mremap()
+
+From: Will Deacon <will@kernel.org>
+
+commit b2a84de2a2deb76a6a51609845341f508c518c03 upstream.
+
+Commit dcde237319e6 ("mm: Avoid creating virtual address aliases in
+brk()/mmap()/mremap()") changed mremap() so that only the 'old' address
+is untagged, leaving the 'new' address in the form it was passed from
+userspace. This prevents the unexpected creation of aliasing virtual
+mappings in userspace, but looks a bit odd when you read the code.
+
+Add a comment justifying the untagging behaviour in mremap().
+
+Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
+Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
+Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Will Deacon <will@kernel.org>
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ mm/mremap.c |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/mm/mremap.c
++++ b/mm/mremap.c
+@@ -606,6 +606,16 @@ SYSCALL_DEFINE5(mremap, unsigned long, a
+       LIST_HEAD(uf_unmap_early);
+       LIST_HEAD(uf_unmap);
++      /*
++       * There is a deliberate asymmetry here: we strip the pointer tag
++       * from the old address but leave the new address alone. This is
++       * for consistency with mmap(), where we prevent the creation of
++       * aliasing mappings in userspace by leaving the tag bits of the
++       * mapping address intact. A non-zero tag will cause the subsequent
++       * range checks to reject the address as invalid.
++       *
++       * See Documentation/arm64/tagged-address-abi.rst for more information.
++       */
+       addr = untagged_addr(addr);
+       if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE))
diff --git a/queue-5.6/platform-x86-gpd-pocket-fan-fix-error-message-when-temp-limits-are-out-of-range.patch b/queue-5.6/platform-x86-gpd-pocket-fan-fix-error-message-when-temp-limits-are-out-of-range.patch
new file mode 100644 (file)
index 0000000..98465f8
--- /dev/null
@@ -0,0 +1,38 @@
+From 1d6f8c5bac93cceb2d4ac8e6331050652004d802 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 6 Mar 2020 10:17:24 +0100
+Subject: platform/x86: GPD pocket fan: Fix error message when temp-limits are out of range
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit 1d6f8c5bac93cceb2d4ac8e6331050652004d802 upstream.
+
+Commit 1f27dbd8265d ("platform/x86: GPD pocket fan: Allow somewhat
+lower/higher temperature limits") changed the module-param sanity check
+to accept temperature limits between 20 and 90 degrees celcius.
+
+But the error message printed when the module params are outside this
+range was not updated. This commit updates the error message to match
+the new min and max value for the temp-limits.
+
+Reported-by: Pavel Machek <pavel@denx.de>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Acked-by: Pavel Machek <pavel@denx.de>
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/platform/x86/gpd-pocket-fan.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/platform/x86/gpd-pocket-fan.c
++++ b/drivers/platform/x86/gpd-pocket-fan.c
+@@ -128,7 +128,7 @@ static int gpd_pocket_fan_probe(struct p
+       for (i = 0; i < ARRAY_SIZE(temp_limits); i++) {
+               if (temp_limits[i] < 20000 || temp_limits[i] > 90000) {
+-                      dev_err(&pdev->dev, "Invalid temp-limit %d (must be between 40000 and 70000)\n",
++                      dev_err(&pdev->dev, "Invalid temp-limit %d (must be between 20000 and 90000)\n",
+                               temp_limits[i]);
+                       temp_limits[0] = TEMP_LIMIT0_DEFAULT;
+                       temp_limits[1] = TEMP_LIMIT1_DEFAULT;
index c46b2fff823510ba635083f348fb302367d42db9..2745b8d19ab366d8f9f0e6e626859253d7331b4b 100644 (file)
@@ -42,3 +42,8 @@ sctp-fix-shutdown-ctsn-ack-in-the-peer-restart-case.patch
 drm-amdgpu-fix-oops-when-pp_funcs-is-unset-in-acpi-event.patch
 alsa-hda-match-both-pci-id-and-ssid-for-driver-blacklist.patch
 x86-kvm-fix-a-missing-prototypes-vmread_error.patch
+platform-x86-gpd-pocket-fan-fix-error-message-when-temp-limits-are-out-of-range.patch
+acpi-pm-s2idle-fix-comment-in-acpi_s2idle_prepare_late.patch
+mac80211-add-ieee80211_is_any_nullfunc.patch
+cgroup-netclassid-remove-double-cond_resched.patch
+mm-mremap-add-comment-explaining-the-untagging-behaviour-of-mremap.patch