]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Jan 2023 15:10:24 +0000 (16:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Jan 2023 15:10:24 +0000 (16:10 +0100)
added patches:
cifs-fix-uninitialized-memory-read-for-smb311-posix-symlink-create.patch
drm-msm-adreno-make-adreno-quirks-not-overwrite-each-other.patch
drm-msm-dp-do-not-complete-dp_aux_cmd_fifo_tx-if-irq-is-not-for-aux-transfer.patch
ipv6-raw-deduct-extension-header-length-in-rawv6_push_pending_frames.patch
ixgbe-fix-pci-device-refcount-leak.patch
platform-x86-sony-laptop-don-t-turn-off-0x153-keyboard-backlight-during-probe.patch

queue-5.10/cifs-fix-uninitialized-memory-read-for-smb311-posix-symlink-create.patch [new file with mode: 0644]
queue-5.10/drm-msm-adreno-make-adreno-quirks-not-overwrite-each-other.patch [new file with mode: 0644]
queue-5.10/drm-msm-dp-do-not-complete-dp_aux_cmd_fifo_tx-if-irq-is-not-for-aux-transfer.patch [new file with mode: 0644]
queue-5.10/ipv6-raw-deduct-extension-header-length-in-rawv6_push_pending_frames.patch [new file with mode: 0644]
queue-5.10/ixgbe-fix-pci-device-refcount-leak.patch [new file with mode: 0644]
queue-5.10/platform-x86-sony-laptop-don-t-turn-off-0x153-keyboard-backlight-during-probe.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/cifs-fix-uninitialized-memory-read-for-smb311-posix-symlink-create.patch b/queue-5.10/cifs-fix-uninitialized-memory-read-for-smb311-posix-symlink-create.patch
new file mode 100644 (file)
index 0000000..0a0cfb4
--- /dev/null
@@ -0,0 +1,34 @@
+From a152d05ae4a71d802d50cf9177dba34e8bb09f68 Mon Sep 17 00:00:00 2001
+From: Volker Lendecke <vl@samba.org>
+Date: Wed, 11 Jan 2023 12:37:58 +0100
+Subject: cifs: Fix uninitialized memory read for smb311 posix symlink create
+
+From: Volker Lendecke <vl@samba.org>
+
+commit a152d05ae4a71d802d50cf9177dba34e8bb09f68 upstream.
+
+If smb311 posix is enabled, we send the intended mode for file
+creation in the posix create context. Instead of using what's there on
+the stack, create the mfsymlink file with 0644.
+
+Fixes: ce558b0e17f8a ("smb3: Add posix create context for smb3.11 posix mounts")
+Cc: stable@vger.kernel.org
+Signed-off-by: Volker Lendecke <vl@samba.org>
+Reviewed-by: Tom Talpey <tom@talpey.com>
+Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
+Signed-off-by: Steve French <stfrench@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/cifs/link.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/fs/cifs/link.c
++++ b/fs/cifs/link.c
+@@ -471,6 +471,7 @@ smb3_create_mf_symlink(unsigned int xid,
+       oparms.disposition = FILE_CREATE;
+       oparms.fid = &fid;
+       oparms.reconnect = false;
++      oparms.mode = 0644;
+       rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL,
+                      NULL, NULL);
diff --git a/queue-5.10/drm-msm-adreno-make-adreno-quirks-not-overwrite-each-other.patch b/queue-5.10/drm-msm-adreno-make-adreno-quirks-not-overwrite-each-other.patch
new file mode 100644 (file)
index 0000000..d141dc0
--- /dev/null
@@ -0,0 +1,56 @@
+From 13ef096e342b00e30b95a90c6c13eee1f0bec4c5 Mon Sep 17 00:00:00 2001
+From: Konrad Dybcio <konrad.dybcio@linaro.org>
+Date: Mon, 2 Jan 2023 11:02:00 +0100
+Subject: drm/msm/adreno: Make adreno quirks not overwrite each other
+
+From: Konrad Dybcio <konrad.dybcio@linaro.org>
+
+commit 13ef096e342b00e30b95a90c6c13eee1f0bec4c5 upstream.
+
+So far the adreno quirks have all been assigned with an OR operator,
+which is problematic, because they were assigned consecutive integer
+values, which makes checking them with an AND operator kind of no bueno..
+
+Switch to using BIT(n) so that only the quirks that the programmer chose
+are taken into account when evaluating info->quirks & ADRENO_QUIRK_...
+
+Fixes: 370063ee427a ("drm/msm/adreno: Add A540 support")
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
+Reviewed-by: Rob Clark <robdclark@gmail.com>
+Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
+Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
+Patchwork: https://patchwork.freedesktop.org/patch/516456/
+Link: https://lore.kernel.org/r/20230102100201.77286-1-konrad.dybcio@linaro.org
+Signed-off-by: Rob Clark <robdclark@chromium.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/msm/adreno/adreno_gpu.h |   10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h
++++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
+@@ -28,11 +28,9 @@ enum {
+       ADRENO_FW_MAX,
+ };
+-enum adreno_quirks {
+-      ADRENO_QUIRK_TWO_PASS_USE_WFI = 1,
+-      ADRENO_QUIRK_FAULT_DETECT_MASK = 2,
+-      ADRENO_QUIRK_LMLOADKILL_DISABLE = 3,
+-};
++#define ADRENO_QUIRK_TWO_PASS_USE_WFI         BIT(0)
++#define ADRENO_QUIRK_FAULT_DETECT_MASK                BIT(1)
++#define ADRENO_QUIRK_LMLOADKILL_DISABLE               BIT(2)
+ struct adreno_rev {
+       uint8_t  core;
+@@ -62,7 +60,7 @@ struct adreno_info {
+       const char *name;
+       const char *fw[ADRENO_FW_MAX];
+       uint32_t gmem;
+-      enum adreno_quirks quirks;
++      u64 quirks;
+       struct msm_gpu *(*init)(struct drm_device *dev);
+       const char *zapfw;
+       u32 inactive_period;
diff --git a/queue-5.10/drm-msm-dp-do-not-complete-dp_aux_cmd_fifo_tx-if-irq-is-not-for-aux-transfer.patch b/queue-5.10/drm-msm-dp-do-not-complete-dp_aux_cmd_fifo_tx-if-irq-is-not-for-aux-transfer.patch
new file mode 100644 (file)
index 0000000..97b136f
--- /dev/null
@@ -0,0 +1,77 @@
+From 1cba0d150fa102439114a91b3e215909efc9f169 Mon Sep 17 00:00:00 2001
+From: Kuogee Hsieh <quic_khsieh@quicinc.com>
+Date: Tue, 27 Dec 2022 18:16:24 -0800
+Subject: drm/msm/dp: do not complete dp_aux_cmd_fifo_tx() if irq is not for aux transfer
+
+From: Kuogee Hsieh <quic_khsieh@quicinc.com>
+
+commit 1cba0d150fa102439114a91b3e215909efc9f169 upstream.
+
+There are 3 possible interrupt sources are handled by DP controller,
+HPDstatus, Controller state changes and Aux read/write transaction.
+At every irq, DP controller have to check isr status of every interrupt
+sources and service the interrupt if its isr status bits shows interrupts
+are pending. There is potential race condition may happen at current aux
+isr handler implementation since it is always complete dp_aux_cmd_fifo_tx()
+even irq is not for aux read or write transaction. This may cause aux read
+transaction return premature if host aux data read is in the middle of
+waiting for sink to complete transferring data to host while irq happen.
+This will cause host's receiving buffer contains unexpected data. This
+patch fixes this problem by checking aux isr and return immediately at
+aux isr handler if there are no any isr status bits set.
+
+Current there is a bug report regrading eDP edid corruption happen during
+system booting up. After lengthy debugging to found that VIDEO_READY
+interrupt was continuously firing during system booting up which cause
+dp_aux_isr() to complete dp_aux_cmd_fifo_tx() prematurely to retrieve data
+from aux hardware buffer which is not yet contains complete data transfer
+from sink. This cause edid corruption.
+
+Follows are the signature at kernel logs when problem happen,
+EDID has corrupt header
+panel-simple-dp-aux aux-aea0000.edp: Couldn't identify panel via EDID
+
+Changes in v2:
+-- do complete if (ret == IRQ_HANDLED) ay dp-aux_isr()
+-- add more commit text
+
+Changes in v3:
+-- add Stephen suggested
+-- dp_aux_isr() return IRQ_XXX back to caller
+-- dp_ctrl_isr() return IRQ_XXX back to caller
+
+Changes in v4:
+-- split into two patches
+
+Changes in v5:
+-- delete empty line between tags
+
+Changes in v6:
+-- remove extra "that" and fixed line more than 75 char at commit text
+
+Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support")
+Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
+Tested-by: Douglas Anderson <dianders@chromium.org>
+Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Patchwork: https://patchwork.freedesktop.org/patch/516121/
+Link: https://lore.kernel.org/r/1672193785-11003-2-git-send-email-quic_khsieh@quicinc.com
+Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/msm/dp/dp_aux.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/gpu/drm/msm/dp/dp_aux.c
++++ b/drivers/gpu/drm/msm/dp/dp_aux.c
+@@ -423,6 +423,10 @@ void dp_aux_isr(struct drm_dp_aux *dp_au
+       aux->isr = dp_catalog_aux_get_irq(aux->catalog);
++      /* no interrupts pending, return immediately */
++      if (!isr)
++              return;
++
+       if (!aux->cmd_busy)
+               return;
diff --git a/queue-5.10/ipv6-raw-deduct-extension-header-length-in-rawv6_push_pending_frames.patch b/queue-5.10/ipv6-raw-deduct-extension-header-length-in-rawv6_push_pending_frames.patch
new file mode 100644 (file)
index 0000000..43dc059
--- /dev/null
@@ -0,0 +1,42 @@
+From cb3e9864cdbe35ff6378966660edbcbac955fe17 Mon Sep 17 00:00:00 2001
+From: Herbert Xu <herbert@gondor.apana.org.au>
+Date: Tue, 10 Jan 2023 08:59:06 +0800
+Subject: ipv6: raw: Deduct extension header length in rawv6_push_pending_frames
+
+From: Herbert Xu <herbert@gondor.apana.org.au>
+
+commit cb3e9864cdbe35ff6378966660edbcbac955fe17 upstream.
+
+The total cork length created by ip6_append_data includes extension
+headers, so we must exclude them when comparing them against the
+IPV6_CHECKSUM offset which does not include extension headers.
+
+Reported-by: Kyle Zeng <zengyhkyle@gmail.com>
+Fixes: 357b40a18b04 ("[IPV6]: IPV6_CHECKSUM socket option can corrupt kernel memory")
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ipv6/raw.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/net/ipv6/raw.c
++++ b/net/ipv6/raw.c
+@@ -539,6 +539,7 @@ csum_copy_err:
+ static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,
+                                    struct raw6_sock *rp)
+ {
++      struct ipv6_txoptions *opt;
+       struct sk_buff *skb;
+       int err = 0;
+       int offset;
+@@ -556,6 +557,9 @@ static int rawv6_push_pending_frames(str
+       offset = rp->offset;
+       total_len = inet_sk(sk)->cork.base.length;
++      opt = inet6_sk(sk)->cork.opt;
++      total_len -= opt ? opt->opt_flen : 0;
++
+       if (offset >= total_len - 1) {
+               err = -EINVAL;
+               ip6_flush_pending_frames(sk);
diff --git a/queue-5.10/ixgbe-fix-pci-device-refcount-leak.patch b/queue-5.10/ixgbe-fix-pci-device-refcount-leak.patch
new file mode 100644 (file)
index 0000000..f91e8e3
--- /dev/null
@@ -0,0 +1,70 @@
+From b93fb4405fcb5112c5739c5349afb52ec7f15c07 Mon Sep 17 00:00:00 2001
+From: Yang Yingliang <yangyingliang@huawei.com>
+Date: Tue, 29 Nov 2022 09:57:48 +0800
+Subject: ixgbe: fix pci device refcount leak
+
+From: Yang Yingliang <yangyingliang@huawei.com>
+
+commit b93fb4405fcb5112c5739c5349afb52ec7f15c07 upstream.
+
+As the comment of pci_get_domain_bus_and_slot() says, it
+returns a PCI device with refcount incremented, when finish
+using it, the caller must decrement the reference count by
+calling pci_dev_put().
+
+In ixgbe_get_first_secondary_devfn() and ixgbe_x550em_a_has_mii(),
+pci_dev_put() is called to avoid leak.
+
+Fixes: 8fa10ef01260 ("ixgbe: register a mdiobus")
+Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
+Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
+Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c |   14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
+@@ -851,9 +851,11 @@ static struct pci_dev *ixgbe_get_first_s
+       rp_pdev = pci_get_domain_bus_and_slot(0, 0, devfn);
+       if (rp_pdev && rp_pdev->subordinate) {
+               bus = rp_pdev->subordinate->number;
++              pci_dev_put(rp_pdev);
+               return pci_get_domain_bus_and_slot(0, bus, 0);
+       }
++      pci_dev_put(rp_pdev);
+       return NULL;
+ }
+@@ -870,6 +872,7 @@ static bool ixgbe_x550em_a_has_mii(struc
+       struct ixgbe_adapter *adapter = hw->back;
+       struct pci_dev *pdev = adapter->pdev;
+       struct pci_dev *func0_pdev;
++      bool has_mii = false;
+       /* For the C3000 family of SoCs (x550em_a) the internal ixgbe devices
+        * are always downstream of root ports @ 0000:00:16.0 & 0000:00:17.0
+@@ -880,15 +883,16 @@ static bool ixgbe_x550em_a_has_mii(struc
+       func0_pdev = ixgbe_get_first_secondary_devfn(PCI_DEVFN(0x16, 0));
+       if (func0_pdev) {
+               if (func0_pdev == pdev)
+-                      return true;
+-              else
+-                      return false;
++                      has_mii = true;
++              goto out;
+       }
+       func0_pdev = ixgbe_get_first_secondary_devfn(PCI_DEVFN(0x17, 0));
+       if (func0_pdev == pdev)
+-              return true;
++              has_mii = true;
+-      return false;
++out:
++      pci_dev_put(func0_pdev);
++      return has_mii;
+ }
+ /**
diff --git a/queue-5.10/platform-x86-sony-laptop-don-t-turn-off-0x153-keyboard-backlight-during-probe.patch b/queue-5.10/platform-x86-sony-laptop-don-t-turn-off-0x153-keyboard-backlight-during-probe.patch
new file mode 100644 (file)
index 0000000..eebc1ac
--- /dev/null
@@ -0,0 +1,58 @@
+From ad75bd85b1db69c97eefea07b375567821f6ef58 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Tue, 13 Dec 2022 13:29:43 +0100
+Subject: platform/x86: sony-laptop: Don't turn off 0x153 keyboard backlight during probe
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit ad75bd85b1db69c97eefea07b375567821f6ef58 upstream.
+
+The 0x153 version of the kbd backlight control SNC handle has no separate
+address to probe if the backlight is there.
+
+This turns the probe call into a set keyboard backlight call with a value
+of 0 turning off the keyboard backlight.
+
+Skip probing when there is no separate probe address to avoid this.
+
+Link: https://bugzilla.redhat.com/show_bug.cgi?id=1583752
+Fixes: 800f20170dcf ("Keyboard backlight control for some Vaio Fit models")
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Reviewed-by: Mattia Dongili <malattia@linux.it>
+Link: https://lore.kernel.org/r/20221213122943.11123-1-hdegoede@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/sony-laptop.c |   21 ++++++++++++++-------
+ 1 file changed, 14 insertions(+), 7 deletions(-)
+
+--- a/drivers/platform/x86/sony-laptop.c
++++ b/drivers/platform/x86/sony-laptop.c
+@@ -1892,14 +1892,21 @@ static int sony_nc_kbd_backlight_setup(s
+               break;
+       }
+-      ret = sony_call_snc_handle(handle, probe_base, &result);
+-      if (ret)
+-              return ret;
++      /*
++       * Only probe if there is a separate probe_base, otherwise the probe call
++       * is equivalent to __sony_nc_kbd_backlight_mode_set(0), resulting in
++       * the keyboard backlight being turned off.
++       */
++      if (probe_base) {
++              ret = sony_call_snc_handle(handle, probe_base, &result);
++              if (ret)
++                      return ret;
+-      if ((handle == 0x0137 && !(result & 0x02)) ||
+-                      !(result & 0x01)) {
+-              dprintk("no backlight keyboard found\n");
+-              return 0;
++              if ((handle == 0x0137 && !(result & 0x02)) ||
++                              !(result & 0x01)) {
++                      dprintk("no backlight keyboard found\n");
++                      return 0;
++              }
+       }
+       kbdbl_ctl = kzalloc(sizeof(*kbdbl_ctl), GFP_KERNEL);
index 5efc9eb02534642783d301297cc847488baa8d15..ee637f79b14f882c1c4b3cb45b0e119cf90f7a3a 100644 (file)
@@ -8,3 +8,9 @@ s390-kexec-fix-ipl-report-address-for-kdump.patch
 asoc-qcom-lpass-cpu-fix-fallback-sd-line-index-handling.patch
 s390-cpum_sf-add-read_once-semantics-to-compare-and-swap-loops.patch
 s390-percpu-add-read_once-to-arch_this_cpu_to_op_simple.patch
+cifs-fix-uninitialized-memory-read-for-smb311-posix-symlink-create.patch
+drm-msm-adreno-make-adreno-quirks-not-overwrite-each-other.patch
+drm-msm-dp-do-not-complete-dp_aux_cmd_fifo_tx-if-irq-is-not-for-aux-transfer.patch
+platform-x86-sony-laptop-don-t-turn-off-0x153-keyboard-backlight-during-probe.patch
+ixgbe-fix-pci-device-refcount-leak.patch
+ipv6-raw-deduct-extension-header-length-in-rawv6_push_pending_frames.patch