commit 71f15c90e785d1de4bcd65a279e7256684c25c0d upstream
smb: client: retry compound request without reusing lease
requesting backport to 6.8.x, 6.6.x, 6.5.x and 6.1.x
This patch fixes a potential regression (eg. failure of xfstests generic 002
and 013) that is introduced by patch 1 of this patch series:
https://lore.kernel.org/stable/CAFTVevWEnEDAQbw59N-R03ppFgqa3qwTySfn61-+T4V…
commit 2c7d399e551ccfd87bcae4ef5573097f3313d779
(smb: client: reuse file lease key in compound operations)
As per MS-SMB2, lease keys are associated with the filename. The smb client
maintains lease keys with the inode. Consequently, if a file has hardlinks,
it is possible that the lease for a file be wrongly reused for an operation on
its hardlink or vice versa. In cases such as this, the rename, delete and
set_path_size compound operations that reuse the lease key (courtesy of patch 1)
fail with STATUS_INVALID_PARAMETER.
This behaviour (and the fact that lease keys are being associated with the inode
and not the filename) was being concealed by the lease breaks issued after
each of the mentioned compound operations (even on the same client) since the
lease was never being reused. Hence, the fix becomes important.
Thanks
Meetakshi
commit ffceb7640cbfe6ea60e7769e107451d63a2fe3d3 upstream
smb: client: do not defer close open handles to deleted files
requesting backport to 6.8.x, 6.6.x, 6.5.x and 6.1.x
This patch fixes an issue with deferred closes on the smb client exposed by
patch 1 of this patch series:
https://lore.kernel.org/stable/CAFTVevWEnEDAQbw59N-R03ppFgqa3qwTySfn61-+T4V…
commit 2c7d399e551ccfd87bcae4ef5573097f3313d779
(smb: client: reuse file lease key in compound operations)
Without this patch applied, when an application deletes a file before closing
all open handles to the said file, the smb client can defer close its handles.
Consequentially, creating another file with the same name fails until all
deferred handles close (specified by closetimeo value). When the rename, delete
and set_path_size compound operations did not reuse leases, the lease breaks
took care of degrading the file handle leases everytime one of these operations
happened (even when on the same client). Without these (redundant) lease
breaks on the same client, the handles still remain valid and this fix becomes
necessary. Eg: Patch 1 without this patch would regress xfstest generic 591.
Thanks
Meetakshi
commit 2c7d399e551ccfd87bcae4ef5573097f3313d779 upstream
smb: client: reuse file lease key in compound operations
requesting backport to 6.8.x, 6.6.x, 6.5.x and 6.1.x
This patch aims to fix a customer reported bug on the smb client received by
the Azure team. Without this patch, when a file has a lot of dirty pages to be
written to the server, any rename, delete or set_path_size operation on the
said file, on the same client itself would result in a lease break
since there is no
lease key sent with the request (even when it is valid).
Now, depending on the server's credit grant implementation, the server can stop
granting credits to this connection; which causes a deadlock.
This patch and the 3 patches that follow are meant to fix this issue
and need to be backported to the stable kernel releases to resolve the
reported bug.
Thanks,
Meetakshi
Arg0 for qxp lpcg should be indices. Many nodes use index as lpcg's arg0.
These patch fix this problem.
Signed-off-by: Frank Li <Frank.Li(a)nxp.com>
---
Frank Li (7):
arm64: dts: imx8-ss-lsio: fix pwm lpcg indices
arm64: dts: imx8-ss-conn: fix usb lpcg indices
arm64: dts: imx8-ss-dma: fix spi lpcg indices
arm64: dts: imx8-ss-dma: fix pwm lpcg indices
arm64: dts: imx8-ss-dma: fix adc lpcg indices
arm64: dts: imx8-ss-dma: fix can lpcg indices
arm64: dts: imx8qm-ss-dma: fix can lpcg indices
arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi | 4 +--
arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi | 40 ++++++++++++------------
arch/arm64/boot/dts/freescale/imx8-ss-lsio.dtsi | 16 +++++-----
arch/arm64/boot/dts/freescale/imx8qm-ss-dma.dtsi | 8 ++---
4 files changed, 34 insertions(+), 34 deletions(-)
---
base-commit: 8d04a7e2ee3fd6aabb8096b00c64db0d735bc874
change-id: 20240401-dts_fix-5b574f831918
Best regards,
---
Frank Li <Frank.Li(a)nxp.com>
The patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x c567f2948f57bdc03ed03403ae0234085f376b7d
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024040120-destiny-extenuate-257a@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
c567f2948f57 ("Revert "x86/mm/ident_map: Use gbpages only where full GB page should be mapped."")
0a845e0f6348 ("mm/treewide: replace pud_large() with pud_leaf()")
d794734c9bbf ("x86/mm/ident_map: Use gbpages only where full GB page should be mapped.")
27af67f35631 ("powerpc/book3s64/mm: enable transparent pud hugepage")
104c49d5b6dc ("powerpc/mm/trace: convert trace event to trace event class")
040ec6202bb8 ("powerpc/mm/book3s64: Use pmdp_ptep helper instead of typecasting.")
bb1520d581a3 ("s390/mm: start kernel with DAT enabled")
9c3205b2b062 ("s390/boot: cleanup decompressor header files")
47477c84b891 ("Merge tag 's390-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From c567f2948f57bdc03ed03403ae0234085f376b7d Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo(a)kernel.org>
Date: Mon, 25 Mar 2024 11:47:51 +0100
Subject: [PATCH] Revert "x86/mm/ident_map: Use gbpages only where full GB page
should be mapped."
This reverts commit d794734c9bbfe22f86686dc2909c25f5ffe1a572.
While the original change tries to fix a bug, it also unintentionally broke
existing systems, see the regressions reported at:
https://lore.kernel.org/all/3a1b9909-45ac-4f97-ad68-d16ef1ce99db@pavinjosep…
Since d794734c9bbf was also marked for -stable, let's back it out before
causing more damage.
Note that due to another upstream change the revert was not 100% automatic:
0a845e0f6348 mm/treewide: replace pud_large() with pud_leaf()
Signed-off-by: Ingo Molnar <mingo(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Cc: Russ Anderson <rja(a)hpe.com>
Cc: Steve Wahl <steve.wahl(a)hpe.com>
Cc: Dave Hansen <dave.hansen(a)linux.intel.com>
Link: https://lore.kernel.org/all/3a1b9909-45ac-4f97-ad68-d16ef1ce99db@pavinjosep…
Fixes: d794734c9bbf ("x86/mm/ident_map: Use gbpages only where full GB page should be mapped.")
diff --git a/arch/x86/mm/ident_map.c b/arch/x86/mm/ident_map.c
index a204a332c71f..968d7005f4a7 100644
--- a/arch/x86/mm/ident_map.c
+++ b/arch/x86/mm/ident_map.c
@@ -26,31 +26,18 @@ static int ident_pud_init(struct x86_mapping_info *info, pud_t *pud_page,
for (; addr < end; addr = next) {
pud_t *pud = pud_page + pud_index(addr);
pmd_t *pmd;
- bool use_gbpage;
next = (addr & PUD_MASK) + PUD_SIZE;
if (next > end)
next = end;
- /* if this is already a gbpage, this portion is already mapped */
- if (pud_leaf(*pud))
- continue;
-
- /* Is using a gbpage allowed? */
- use_gbpage = info->direct_gbpages;
-
- /* Don't use gbpage if it maps more than the requested region. */
- /* at the begining: */
- use_gbpage &= ((addr & ~PUD_MASK) == 0);
- /* ... or at the end: */
- use_gbpage &= ((next & ~PUD_MASK) == 0);
-
- /* Never overwrite existing mappings */
- use_gbpage &= !pud_present(*pud);
-
- if (use_gbpage) {
+ if (info->direct_gbpages) {
pud_t pudval;
+ if (pud_present(*pud))
+ continue;
+
+ addr &= PUD_MASK;
pudval = __pud((addr - info->offset) | info->page_flag);
set_pud(pud, pudval);
continue;
Dear Linux maintainers,
Since I upgraded my system (from NixOs release
2caf4ef5005ecc68141ecb4aac271079f7371c44, running linux 5.15.90, to
b8697e57f10292a6165a20f03d2f42920dfaf973, running linux 6.6.19), my
system started to experience a weird behavior : when closing the lid,
the system does not always go to a true sleep mode : when I restart it,
the battery is drained. Not sure what I can try here.
You can find more information on my tries here, with some journalctl logs :
- https://github.com/NixOS/nixpkgs/issues/299464
-
https://discourse.nixos.org/t/since-upgrade-my-laptop-does-not-go-to-sleep-…
Cheers,
Léo
Dear stable team,
Would you please cherry-pick the following patch into v5.15 stable:
locking/rwsem: Disable preemption while trying for rwsem lock
commit 48dfb5d2560d36fb16c7d430c229d1604ea7d185
Earlier discussion:
https://marc.info/?l=linux-kernel&m=170965048500766&w=2
Thank you,
A.