]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Jul 2024 11:04:08 +0000 (13:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Jul 2024 11:04:08 +0000 (13:04 +0200)
added patches:
jbd2-make-jbd2_journal_get_max_txn_bufs-internal.patch
kvm-vmx-split-out-the-non-virtualization-part-of-vmx_interrupt_blocked.patch
leds-ss4200-convert-pcibios_-return-codes-to-errnos.patch
wifi-mwifiex-fix-interface-type-change.patch

queue-5.10/jbd2-make-jbd2_journal_get_max_txn_bufs-internal.patch [new file with mode: 0644]
queue-5.10/kvm-vmx-split-out-the-non-virtualization-part-of-vmx_interrupt_blocked.patch [new file with mode: 0644]
queue-5.10/leds-ss4200-convert-pcibios_-return-codes-to-errnos.patch [new file with mode: 0644]
queue-5.10/series
queue-5.10/wifi-mwifiex-fix-interface-type-change.patch [new file with mode: 0644]

diff --git a/queue-5.10/jbd2-make-jbd2_journal_get_max_txn_bufs-internal.patch b/queue-5.10/jbd2-make-jbd2_journal_get_max_txn_bufs-internal.patch
new file mode 100644 (file)
index 0000000..7d1447c
--- /dev/null
@@ -0,0 +1,66 @@
+From 4aa99c71e42ad60178c1154ec24e3df9c684fb67 Mon Sep 17 00:00:00 2001
+From: Jan Kara <jack@suse.cz>
+Date: Mon, 24 Jun 2024 19:01:17 +0200
+Subject: jbd2: make jbd2_journal_get_max_txn_bufs() internal
+
+From: Jan Kara <jack@suse.cz>
+
+commit 4aa99c71e42ad60178c1154ec24e3df9c684fb67 upstream.
+
+There's no reason to have jbd2_journal_get_max_txn_bufs() public
+function. Currently all users are internal and can use
+journal->j_max_transaction_buffers instead. This saves some unnecessary
+recomputations of the limit as a bonus which becomes important as this
+function gets more complex in the following patch.
+
+CC: stable@vger.kernel.org
+Signed-off-by: Jan Kara <jack@suse.cz>
+Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
+Link: https://patch.msgid.link/20240624170127.3253-1-jack@suse.cz
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/jbd2/commit.c     |    2 +-
+ fs/jbd2/journal.c    |    5 +++++
+ include/linux/jbd2.h |    5 -----
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+--- a/fs/jbd2/commit.c
++++ b/fs/jbd2/commit.c
+@@ -813,7 +813,7 @@ start_journal_io:
+               if (first_block < journal->j_tail)
+                       freed += journal->j_last - journal->j_first;
+               /* Update tail only if we free significant amount of space */
+-              if (freed < jbd2_journal_get_max_txn_bufs(journal))
++              if (freed < journal->j_max_transaction_buffers)
+                       update_tail = 0;
+       }
+       J_ASSERT(commit_transaction->t_state == T_COMMIT);
+--- a/fs/jbd2/journal.c
++++ b/fs/jbd2/journal.c
+@@ -1481,6 +1481,11 @@ static void journal_fail_superblock(jour
+       journal->j_sb_buffer = NULL;
+ }
++static int jbd2_journal_get_max_txn_bufs(journal_t *journal)
++{
++      return (journal->j_total_len - journal->j_fc_wbufsize) / 4;
++}
++
+ /*
+  * Given a journal_t structure, initialise the various fields for
+  * startup of a new journaling session.  We use this both when creating
+--- a/include/linux/jbd2.h
++++ b/include/linux/jbd2.h
+@@ -1626,11 +1626,6 @@ int jbd2_wait_inode_data(journal_t *jour
+ int jbd2_fc_wait_bufs(journal_t *journal, int num_blks);
+ int jbd2_fc_release_bufs(journal_t *journal);
+-static inline int jbd2_journal_get_max_txn_bufs(journal_t *journal)
+-{
+-      return (journal->j_total_len - journal->j_fc_wbufsize) / 4;
+-}
+-
+ /*
+  * is_journal_abort
+  *
diff --git a/queue-5.10/kvm-vmx-split-out-the-non-virtualization-part-of-vmx_interrupt_blocked.patch b/queue-5.10/kvm-vmx-split-out-the-non-virtualization-part-of-vmx_interrupt_blocked.patch
new file mode 100644 (file)
index 0000000..acbe340
--- /dev/null
@@ -0,0 +1,60 @@
+From 322a569c4b4188a0da2812f9e952780ce09b74ba Mon Sep 17 00:00:00 2001
+From: Sean Christopherson <seanjc@google.com>
+Date: Fri, 7 Jun 2024 10:26:06 -0700
+Subject: KVM: VMX: Split out the non-virtualization part of vmx_interrupt_blocked()
+
+From: Sean Christopherson <seanjc@google.com>
+
+commit 322a569c4b4188a0da2812f9e952780ce09b74ba upstream.
+
+Move the non-VMX chunk of the "interrupt blocked" checks to a separate
+helper so that KVM can reuse the code to detect if interrupts are blocked
+for L2, e.g. to determine if a virtual interrupt _for L2_ is a valid wake
+event.  If L1 disables HLT-exiting for L2, nested APICv is enabled, and L2
+HLTs, then L2 virtual interrupts are valid wake events, but if and only if
+interrupts are unblocked for L2.
+
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/r/20240607172609.3205077-4-seanjc@google.com
+Signed-off-by: Sean Christopherson <seanjc@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/kvm/vmx/vmx.c |   11 ++++++++---
+ arch/x86/kvm/vmx/vmx.h |    1 +
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+--- a/arch/x86/kvm/vmx/vmx.c
++++ b/arch/x86/kvm/vmx/vmx.c
+@@ -4738,14 +4738,19 @@ static int vmx_nmi_allowed(struct kvm_vc
+       return !vmx_nmi_blocked(vcpu);
+ }
++bool __vmx_interrupt_blocked(struct kvm_vcpu *vcpu)
++{
++      return !(vmx_get_rflags(vcpu) & X86_EFLAGS_IF) ||
++             (vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) &
++              (GUEST_INTR_STATE_STI | GUEST_INTR_STATE_MOV_SS));
++}
++
+ bool vmx_interrupt_blocked(struct kvm_vcpu *vcpu)
+ {
+       if (is_guest_mode(vcpu) && nested_exit_on_intr(vcpu))
+               return false;
+-      return !(vmx_get_rflags(vcpu) & X86_EFLAGS_IF) ||
+-             (vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) &
+-              (GUEST_INTR_STATE_STI | GUEST_INTR_STATE_MOV_SS));
++      return __vmx_interrupt_blocked(vcpu);
+ }
+ static int vmx_interrupt_allowed(struct kvm_vcpu *vcpu, bool for_injection)
+--- a/arch/x86/kvm/vmx/vmx.h
++++ b/arch/x86/kvm/vmx/vmx.h
+@@ -359,6 +359,7 @@ bool vmx_guest_inject_ac(struct kvm_vcpu
+ void update_exception_bitmap(struct kvm_vcpu *vcpu);
+ void vmx_update_msr_bitmap(struct kvm_vcpu *vcpu);
+ bool vmx_nmi_blocked(struct kvm_vcpu *vcpu);
++bool __vmx_interrupt_blocked(struct kvm_vcpu *vcpu);
+ bool vmx_interrupt_blocked(struct kvm_vcpu *vcpu);
+ bool vmx_get_nmi_mask(struct kvm_vcpu *vcpu);
+ void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked);
diff --git a/queue-5.10/leds-ss4200-convert-pcibios_-return-codes-to-errnos.patch b/queue-5.10/leds-ss4200-convert-pcibios_-return-codes-to-errnos.patch
new file mode 100644 (file)
index 0000000..bb7ce7e
--- /dev/null
@@ -0,0 +1,55 @@
+From ce068e83976140badb19c7f1307926b4b562fac4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>
+Date: Mon, 27 May 2024 16:27:00 +0300
+Subject: leds: ss4200: Convert PCIBIOS_* return codes to errnos
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
+
+commit ce068e83976140badb19c7f1307926b4b562fac4 upstream.
+
+ich7_lpc_probe() uses pci_read_config_dword() that returns PCIBIOS_*
+codes. The error handling code assumes incorrectly it's a normal errno
+and checks for < 0. The return code is returned from the probe function
+as is but probe functions should return normal errnos.
+
+Remove < 0 from the check and convert PCIBIOS_* returns code using
+pcibios_err_to_errno() into normal errno before returning it.
+
+Fixes: a328e95b82c1 ("leds: LED driver for Intel NAS SS4200 series (v5)")
+Cc:  <stable@vger.kernel.org>
+Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
+Link: https://lore.kernel.org/r/20240527132700.14260-1-ilpo.jarvinen@linux.intel.com
+Signed-off-by: Lee Jones <lee@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/leds/leds-ss4200.c |    7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/leds/leds-ss4200.c
++++ b/drivers/leds/leds-ss4200.c
+@@ -356,8 +356,10 @@ static int ich7_lpc_probe(struct pci_dev
+       nas_gpio_pci_dev = dev;
+       status = pci_read_config_dword(dev, PMBASE, &g_pm_io_base);
+-      if (status)
++      if (status) {
++              status = pcibios_err_to_errno(status);
+               goto out;
++      }
+       g_pm_io_base &= 0x00000ff80;
+       status = pci_read_config_dword(dev, GPIO_CTRL, &gc);
+@@ -369,8 +371,9 @@ static int ich7_lpc_probe(struct pci_dev
+       }
+       status = pci_read_config_dword(dev, GPIO_BASE, &nas_gpio_io_base);
+-      if (0 > status) {
++      if (status) {
+               dev_info(&dev->dev, "Unable to read GPIOBASE.\n");
++              status = pcibios_err_to_errno(status);
+               goto out;
+       }
+       dev_dbg(&dev->dev, ": GPIOBASE = 0x%08x\n", nas_gpio_io_base);
index a1e912264066c895effabe4a3adcc6e84e5f5203..a4f16aeace2449daecaf5df93f71633aadc3c5a3 100644 (file)
@@ -144,3 +144,7 @@ udf-avoid-using-corrupted-block-bitmap-buffer.patch
 m68k-amiga-turn-off-warp1260-interrupts-during-boot.patch
 ext4-check-dot-and-dotdot-of-dx_root-before-making-dir-indexed.patch
 ext4-make-sure-the-first-directory-block-is-not-a-hole.patch
+wifi-mwifiex-fix-interface-type-change.patch
+leds-ss4200-convert-pcibios_-return-codes-to-errnos.patch
+jbd2-make-jbd2_journal_get_max_txn_bufs-internal.patch
+kvm-vmx-split-out-the-non-virtualization-part-of-vmx_interrupt_blocked.patch
diff --git a/queue-5.10/wifi-mwifiex-fix-interface-type-change.patch b/queue-5.10/wifi-mwifiex-fix-interface-type-change.patch
new file mode 100644 (file)
index 0000000..22c4482
--- /dev/null
@@ -0,0 +1,40 @@
+From a17b9f590f6ec2b9f1b12b1db3bf1d181de6b272 Mon Sep 17 00:00:00 2001
+From: Rafael Beims <rafael.beims@toradex.com>
+Date: Fri, 10 May 2024 13:04:58 +0200
+Subject: wifi: mwifiex: Fix interface type change
+
+From: Rafael Beims <rafael.beims@toradex.com>
+
+commit a17b9f590f6ec2b9f1b12b1db3bf1d181de6b272 upstream.
+
+When changing the interface type we also need to update the bss_num, the
+driver private data is searched based on a unique (bss_type, bss_num)
+tuple, therefore every time bss_type changes, bss_num must also change.
+
+This fixes for example an issue in which, after the mode changed, a
+wireless scan on the changed interface would not finish, leading to
+repeated -EBUSY messages to userspace when other scan requests were
+sent.
+
+Fixes: c606008b7062 ("mwifiex: Properly initialize private structure on interface type changes")
+Cc: stable@vger.kernel.org
+Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
+Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
+Signed-off-by: Kalle Valo <kvalo@kernel.org>
+Link: https://msgid.link/20240510110458.15475-1-francesco@dolcini.it
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/wireless/marvell/mwifiex/cfg80211.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+@@ -930,6 +930,8 @@ mwifiex_init_new_priv_params(struct mwif
+               return -EOPNOTSUPP;
+       }
++      priv->bss_num = mwifiex_get_unused_bss_num(adapter, priv->bss_type);
++
+       spin_lock_irqsave(&adapter->main_proc_lock, flags);
+       adapter->main_locked = false;
+       spin_unlock_irqrestore(&adapter->main_proc_lock, flags);