On 2024-06-24 19:01, gregkh(a)linuxfoundation.org wrote:
> This is a note to let you know that I've just added the patch titled
>
> MIPS: pci: lantiq: restore reset gpio polarity
>
> to the 6.9-stable tree which can be found at:
>
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
>
> The filename of the patch is:
> mips-pci-lantiq-restore-reset-gpio-polarity.patch
> and it can be found in the queue-6.9 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable
> tree,
> please let <stable(a)vger.kernel.org> know about it.
This patch is buggy and should not go into the stable trees.
It has already been reverted upstream in the mips-fixes.
Thank you very much and sorry for the inconvenience,
Martin
>
>
> From 277a0363120276645ae598d8d5fea7265e076ae9 Mon Sep 17 00:00:00 2001
> From: Martin Schiller <ms(a)dev.tdt.de>
> Date: Fri, 7 Jun 2024 11:04:00 +0200
> Subject: MIPS: pci: lantiq: restore reset gpio polarity
>
> From: Martin Schiller <ms(a)dev.tdt.de>
>
> commit 277a0363120276645ae598d8d5fea7265e076ae9 upstream.
>
> Commit 90c2d2eb7ab5 ("MIPS: pci: lantiq: switch to using gpiod API")
> not
> only switched to the gpiod API, but also inverted / changed the
> polarity
> of the GPIO.
>
> According to the PCI specification, the RST# pin is an active-low
> signal. However, most of the device trees that have been widely used
> for
> a long time (mainly in the openWrt project) define this GPIO as
> active-high and the old driver code inverted the signal internally.
>
> Apparently there are actually boards where the reset gpio must be
> operated inverted. For this reason, we cannot use the
> GPIOD_OUT_LOW/HIGH
> flag for initialization. Instead, we must explicitly set the gpio to
> value 1 in order to take into account any "GPIO_ACTIVE_LOW" flag that
> may have been set.
>
> In order to remain compatible with all these existing device trees, we
> should therefore keep the logic as it was before the commit.
>
> Fixes: 90c2d2eb7ab5 ("MIPS: pci: lantiq: switch to using gpiod API")
> Cc: stable(a)vger.kernel.org
> Signed-off-by: Martin Schiller <ms(a)dev.tdt.de>
> Signed-off-by: Thomas Bogendoerfer <tsbogend(a)alpha.franken.de>
> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
> ---
> arch/mips/pci/pci-lantiq.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> --- a/arch/mips/pci/pci-lantiq.c
> +++ b/arch/mips/pci/pci-lantiq.c
> @@ -124,14 +124,14 @@ static int ltq_pci_startup(struct platfo
> clk_disable(clk_external);
>
> /* setup reset gpio used by pci */
> - reset_gpio = devm_gpiod_get_optional(&pdev->dev, "reset",
> - GPIOD_OUT_LOW);
> + reset_gpio = devm_gpiod_get_optional(&pdev->dev, "reset",
> GPIOD_ASIS);
> error = PTR_ERR_OR_ZERO(reset_gpio);
> if (error) {
> dev_err(&pdev->dev, "failed to request gpio: %d\n", error);
> return error;
> }
> gpiod_set_consumer_name(reset_gpio, "pci_reset");
> + gpiod_direction_output(reset_gpio, 1);
>
> /* enable auto-switching between PCI and EBU */
> ltq_pci_w32(0xa, PCI_CR_CLK_CTRL);
> @@ -194,10 +194,10 @@ static int ltq_pci_startup(struct platfo
>
> /* toggle reset pin */
> if (reset_gpio) {
> - gpiod_set_value_cansleep(reset_gpio, 1);
> + gpiod_set_value_cansleep(reset_gpio, 0);
> wmb();
> mdelay(1);
> - gpiod_set_value_cansleep(reset_gpio, 0);
> + gpiod_set_value_cansleep(reset_gpio, 1);
> }
> return 0;
> }
>
>
> Patches currently in stable-queue which might be from ms(a)dev.tdt.de are
>
> queue-6.9/mips-pci-lantiq-restore-reset-gpio-polarity.patch
On Mon, Jun 24, 2024 at 11:30:42PM -0400, Sasha Levin wrote:
> This is a note to let you know that I've just added the patch titled
>
> arm64: dts: qcom: qcs404: fix bluetooth device address
>
> to the 5.4-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
> commit a48b0e85558565dc3a10c8021b1514099cada102
> Author: Johan Hovold <johan+linaro(a)kernel.org>
> Date: Wed May 1 09:52:01 2024 +0200
>
> arm64: dts: qcom: qcs404: fix bluetooth device address
>
> [ Upstream commit f5f390a77f18eaeb2c93211a1b7c5e66b5acd423 ]
>
> The 'local-bd-address' property is used to pass a unique Bluetooth
> device address from the boot firmware to the kernel and should otherwise
> be left unset so that the OS can prevent the controller from being used
> until a valid address has been provided through some other means (e.g.
> using btmgmt).
>
> Fixes: 60f77ae7d1c1 ("arm64: dts: qcom: qcs404-evb: Enable uart3 and add Bluetooth")
> Cc: stable(a)vger.kernel.org # 5.10
This was supposed to say 5.2. Thanks for catching this.
Johan
From: Arnd Bergmann <arnd(a)arndb.de>
The unusual function calling conventions on SuperH ended up causing
sync_file_range to have the wrong argument order, with the 'flags'
argument getting sorted before 'nbytes' by the compiler.
In userspace, I found that musl, glibc, uclibc and strace all expect the
normal calling conventions with 'nbytes' last, so changing the kernel
to match them should make all of those work.
In order to be able to also fix libc implementations to work with existing
kernels, they need to be able to tell which ABI is used. An easy way
to do this is to add yet another system call using the sync_file_range2
ABI that works the same on all architectures.
Old user binaries can now work on new kernels, and new binaries can
try the new sync_file_range2() to work with new kernels or fall back
to the old sync_file_range() version if that doesn't exist.
Cc: stable(a)vger.kernel.org
Fixes: 75c92acdd5b1 ("sh: Wire up new syscalls.")
Signed-off-by: Arnd Bergmann <arnd(a)arndb.de>
---
arch/sh/kernel/sys_sh32.c | 11 +++++++++++
arch/sh/kernel/syscalls/syscall.tbl | 3 ++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/arch/sh/kernel/sys_sh32.c b/arch/sh/kernel/sys_sh32.c
index 9dca568509a5..d6f4afcb0e87 100644
--- a/arch/sh/kernel/sys_sh32.c
+++ b/arch/sh/kernel/sys_sh32.c
@@ -59,3 +59,14 @@ asmlinkage int sys_fadvise64_64_wrapper(int fd, u32 offset0, u32 offset1,
(u64)len0 << 32 | len1, advice);
#endif
}
+
+/*
+ * swap the arguments the way that libc wants them instead of
+ * moving flags ahead of the 64-bit nbytes argument
+ */
+SYSCALL_DEFINE6(sh_sync_file_range6, int, fd, SC_ARG64(offset),
+ SC_ARG64(nbytes), unsigned int, flags)
+{
+ return ksys_sync_file_range(fd, SC_VAL64(loff_t, offset),
+ SC_VAL64(loff_t, nbytes), flags);
+}
diff --git a/arch/sh/kernel/syscalls/syscall.tbl b/arch/sh/kernel/syscalls/syscall.tbl
index bbf83a2db986..c55fd7696d40 100644
--- a/arch/sh/kernel/syscalls/syscall.tbl
+++ b/arch/sh/kernel/syscalls/syscall.tbl
@@ -321,7 +321,7 @@
311 common set_robust_list sys_set_robust_list
312 common get_robust_list sys_get_robust_list
313 common splice sys_splice
-314 common sync_file_range sys_sync_file_range
+314 common sync_file_range sys_sh_sync_file_range6
315 common tee sys_tee
316 common vmsplice sys_vmsplice
317 common move_pages sys_move_pages
@@ -395,6 +395,7 @@
385 common pkey_alloc sys_pkey_alloc
386 common pkey_free sys_pkey_free
387 common rseq sys_rseq
+388 common sync_file_range2 sys_sync_file_range2
# room for arch specific syscalls
393 common semget sys_semget
394 common semctl sys_semctl
--
2.39.2
On Mon, 24 Jun 2024, stable(a)vger.kernel.org wrote:
> This is a note to let you know that I've just added the patch titled
>
> nfsd: fix oops when reading pool_stats before server is started
>
> to the 6.9-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
>
> The filename of the patch is:
> nfsd-fix-oops-when-reading-pool_stats-before-server-.patch
> and it can be found in the queue-6.9 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable(a)vger.kernel.org> know about it.
I feel this should not be added to the stable tree.
It moves at test on a field protected by a mutex outside of the
protection of that mutex, and so is obviously racey.
Depending on how the race goes, si->serv might be NULL when dereferenced
in svc_pool_stats_start(), or svc_pool_stats_stop() might unlock a mutex
that hadn't been locked.
I'll post a revert and a better fix for mainline.
Thanks,
NeilBrown
>
>
>
> commit 388a527c6cf55bde74bc0891d0b4c38f50d896be
> Author: Jeff Layton <jlayton(a)kernel.org>
> Date: Mon Jun 17 07:54:08 2024 -0400
>
> nfsd: fix oops when reading pool_stats before server is started
>
> [ Upstream commit 8e948c365d9c10b685d1deb946bd833d6a9b43e0 ]
>
> Sourbh reported an oops that is triggerable by trying to read the
> pool_stats procfile before nfsd had been started. Move the check for a
> NULL serv in svc_pool_stats_start above the mutex acquisition, and fix
> the stop routine not to unlock the mutex if there is no serv yet.
>
> Fixes: 7b207ccd9833 ("svc: don't hold reference for poolstats, only mutex.")
> Reported-by: Sourabh Jain <sourabhjain(a)linux.ibm.com>
> Signed-off-by: Jeff Layton <jlayton(a)kernel.org>
> Tested-by: Sourabh Jain <sourabhjain(a)linux.ibm.com>
> Signed-off-by: Chuck Lever <chuck.lever(a)oracle.com>
> Signed-off-by: Sasha Levin <sashal(a)kernel.org>
>
> diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
> index b4a85a227bd7d..1a2982051f986 100644
> --- a/net/sunrpc/svc_xprt.c
> +++ b/net/sunrpc/svc_xprt.c
> @@ -1371,12 +1371,13 @@ static void *svc_pool_stats_start(struct seq_file *m, loff_t *pos)
>
> dprintk("svc_pool_stats_start, *pidx=%u\n", pidx);
>
> + if (!si->serv)
> + return NULL;
> +
> mutex_lock(si->mutex);
>
> if (!pidx)
> return SEQ_START_TOKEN;
> - if (!si->serv)
> - return NULL;
> return pidx > si->serv->sv_nrpools ? NULL
> : &si->serv->sv_pools[pidx - 1];
> }
> @@ -1408,7 +1409,8 @@ static void svc_pool_stats_stop(struct seq_file *m, void *p)
> {
> struct svc_info *si = m->private;
>
> - mutex_unlock(si->mutex);
> + if (si->serv)
> + mutex_unlock(si->mutex);
> }
>
> static int svc_pool_stats_show(struct seq_file *m, void *p)
>
On Mon, Jun 24, 2024, Sasha Levin wrote:
> This is a note to let you know that I've just added the patch titled
>
> KVM: Use gfn instead of hva for mmu_notifier_retry
>
> to the 6.6-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
>
> The filename of the patch is:
> kvm-use-gfn-instead-of-hva-for-mmu_notifier_retry.patch
> and it can be found in the queue-6.6 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable(a)vger.kernel.org> know about it.
>
>
>
> commit 68a14ccc3fb35047cc4900c8ddd4b6f959e25b77
> Author: Chao Peng <chao.p.peng(a)linux.intel.com>
> Date: Fri Oct 27 11:21:45 2023 -0700
>
> KVM: Use gfn instead of hva for mmu_notifier_retry
>
> [ Upstream commit 8569992d64b8f750e34b7858eac5d7daaf0f80fd ]
>
> Currently in mmu_notifier invalidate path, hva range is recorded and then
> checked against by mmu_invalidate_retry_hva() in the page fault handling
> path. However, for the soon-to-be-introduced private memory, a page fault
> may not have a hva associated, checking gfn(gpa) makes more sense.
>
> For existing hva based shared memory, gfn is expected to also work. The
> only downside is when aliasing multiple gfns to a single hva, the
> current algorithm of checking multiple ranges could result in a much
> larger range being rejected. Such aliasing should be uncommon, so the
> impact is expected small.
>
> Suggested-by: Sean Christopherson <seanjc(a)google.com>
> Cc: Xu Yilun <yilun.xu(a)intel.com>
> Signed-off-by: Chao Peng <chao.p.peng(a)linux.intel.com>
> Reviewed-by: Fuad Tabba <tabba(a)google.com>
> Tested-by: Fuad Tabba <tabba(a)google.com>
> [sean: convert vmx_set_apic_access_page_addr() to gfn-based API]
> Signed-off-by: Sean Christopherson <seanjc(a)google.com>
> Reviewed-by: Paolo Bonzini <pbonzini(a)redhat.com>
> Reviewed-by: Xu Yilun <yilun.xu(a)linux.intel.com>
> Message-Id: <20231027182217.3615211-4-seanjc(a)google.com>
> Reviewed-by: Kai Huang <kai.huang(a)intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini(a)redhat.com>
> Stable-dep-of: c3f3edf73a8f ("KVM: Stop processing *all* memslots when "null" mmu_notifier handler is found")
Please drop this, and all other related patches. This is not at all appropriate
for stable trees.
I'm pretty sure your scripts are borked too, at least from KVM's perspective. I
specifically didn't tag c3f3edf73a8f for stable[*], and I thought we had agreed a
while back that only KVM (x86?) fixes with an explicit "Cc: stable@" would be
automatically included.
[*] https://lore.kernel.org/all/20240620230937.2214992-1-seanjc@google.com
As per Errata i2310[0], Erroneous timeout can be triggered,
if this Erroneous interrupt is not cleared then it may leads
to storm of interrupts, therefore apply Errata i2310 solution.
[0] https://www.ti.com/lit/pdf/sprz536 page 23
Fixes: b67e830d38fa ("serial: 8250: 8250_omap: Fix possible interrupt storm on K3 SoCs")
Cc: stable(a)vger.kernel.org
Signed-off-by: Udit Kumar <u-kumar1(a)ti.com>
---
Test logs:
https://gist.github.com/uditkumarti/48e239540db4e761861fbd1d7d31cfed
Change logs
Changes in v4:
- Reverted fifo empty check before applying errata
Link to v3:
https://lore.kernel.org/all/20240619105903.165434-1-u-kumar1@ti.com/
Changes in v3:
- CC stable in commit message
Link to v2:
https://lore.kernel.org/all/20240617052253.2188140-1-u-kumar1@ti.com/
Changes in v2:
- Added Fixes Tag and typo correction in commit message
- Corrected bit position to UART_OMAP_EFR2_TIMEOUT_BEHAVE
Link to v1
https://lore.kernel.org/all/20240614061314.290840-1-u-kumar1@ti.com/
drivers/tty/serial/8250/8250_omap.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 170639d12b2a..1af9aed99c65 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -115,6 +115,10 @@
/* RX FIFO occupancy indicator */
#define UART_OMAP_RX_LVL 0x19
+/* Timeout low and High */
+#define UART_OMAP_TO_L 0x26
+#define UART_OMAP_TO_H 0x27
+
/*
* Copy of the genpd flags for the console.
* Only used if console suspend is disabled
@@ -663,13 +667,25 @@ static irqreturn_t omap8250_irq(int irq, void *dev_id)
/*
* On K3 SoCs, it is observed that RX TIMEOUT is signalled after
- * FIFO has been drained, in which case a dummy read of RX FIFO
- * is required to clear RX TIMEOUT condition.
+ * FIFO has been drained or erroneously.
+ * So apply solution of Errata i2310 as mentioned in
+ * https://www.ti.com/lit/pdf/sprz536
*/
if (priv->habit & UART_RX_TIMEOUT_QUIRK &&
(iir & UART_IIR_RX_TIMEOUT) == UART_IIR_RX_TIMEOUT &&
serial_port_in(port, UART_OMAP_RX_LVL) == 0) {
- serial_port_in(port, UART_RX);
+ unsigned char efr2, timeout_h, timeout_l;
+
+ efr2 = serial_in(up, UART_OMAP_EFR2);
+ timeout_h = serial_in(up, UART_OMAP_TO_H);
+ timeout_l = serial_in(up, UART_OMAP_TO_L);
+ serial_out(up, UART_OMAP_TO_H, 0xFF);
+ serial_out(up, UART_OMAP_TO_L, 0xFF);
+ serial_out(up, UART_OMAP_EFR2, UART_OMAP_EFR2_TIMEOUT_BEHAVE);
+ serial_in(up, UART_IIR);
+ serial_out(up, UART_OMAP_EFR2, efr2);
+ serial_out(up, UART_OMAP_TO_H, timeout_h);
+ serial_out(up, UART_OMAP_TO_L, timeout_l);
}
/* Stop processing interrupts on input overrun */
--
2.34.1