From: Chris Wulff <crwulff(a)gmail.com>
Make sure the descriptor has been set before looking at maxpacket.
This fixes a null pointer panic in this case.
This may happen if the gadget doesn't properly set up the endpoint
for the current speed, or the gadget descriptors are malformed and
the descriptor for the speed/endpoint are not found.
No current gadget driver is known to have this problem, but this
may cause a hard-to-find bug during development of new gadgets.
Fixes: 54f83b8c8ea9 ("USB: gadget: Reject endpoints with 0 maxpacket value")
Cc: stable(a)vger.kernel.org
Signed-off-by: Chris Wulff <crwulff(a)gmail.com>
---
v2: Added WARN_ONCE message & clarification on causes
v1: https://lore.kernel.org/all/20240721192048.3530097-2-crwulff@gmail.com/
---
drivers/usb/gadget/udc/core.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
index 2dfae7a17b3f..81f9140f3681 100644
--- a/drivers/usb/gadget/udc/core.c
+++ b/drivers/usb/gadget/udc/core.c
@@ -118,12 +118,10 @@ int usb_ep_enable(struct usb_ep *ep)
goto out;
/* UDC drivers can't handle endpoints with maxpacket size 0 */
- if (usb_endpoint_maxp(ep->desc) == 0) {
- /*
- * We should log an error message here, but we can't call
- * dev_err() because there's no way to find the gadget
- * given only ep.
- */
+ if (!ep->desc || usb_endpoint_maxp(ep->desc) == 0) {
+ WARN_ONCE(1, "%s: ep%d (%s) has %s\n", __func__, ep->address, ep->name,
+ (!ep->desc) ? "NULL descriptor" : "maxpacket 0");
+
ret = -EINVAL;
goto out;
}
--
2.43.0
From: Xiubo Li <xiubli(a)redhat.com>
If a client sends out a cap update dropping caps with the prior 'seq'
just before an incoming cap revoke request, then the client may drop
the revoke because it believes it's already released the requested
capabilities.
This causes the MDS to wait indefinitely for the client to respond
to the revoke. It's therefore always a good idea to ack the cap
revoke request with the bumped up 'seq'.
Currently if the cap->issued equals to the newcaps the check_caps()
will do nothing, we should force flush the caps.
Cc: stable(a)vger.kernel.org
Link: https://tracker.ceph.com/issues/61782
Signed-off-by: Xiubo Li <xiubli(a)redhat.com>
---
V3:
- Move the force check earlier
V2:
- Improved the patch to force send the cap update only when no caps
being used.
fs/ceph/caps.c | 35 ++++++++++++++++++++++++-----------
fs/ceph/super.h | 7 ++++---
2 files changed, 28 insertions(+), 14 deletions(-)
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 24c31f795938..672c6611d749 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -2024,6 +2024,8 @@ bool __ceph_should_report_size(struct ceph_inode_info *ci)
* CHECK_CAPS_AUTHONLY - we should only check the auth cap
* CHECK_CAPS_FLUSH - we should flush any dirty caps immediately, without
* further delay.
+ * CHECK_CAPS_FLUSH_FORCE - we should flush any caps immediately, without
+ * further delay.
*/
void ceph_check_caps(struct ceph_inode_info *ci, int flags)
{
@@ -2105,7 +2107,7 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags)
}
doutc(cl, "%p %llx.%llx file_want %s used %s dirty %s "
- "flushing %s issued %s revoking %s retain %s %s%s%s\n",
+ "flushing %s issued %s revoking %s retain %s %s%s%s%s\n",
inode, ceph_vinop(inode), ceph_cap_string(file_wanted),
ceph_cap_string(used), ceph_cap_string(ci->i_dirty_caps),
ceph_cap_string(ci->i_flushing_caps),
@@ -2113,7 +2115,8 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags)
ceph_cap_string(retain),
(flags & CHECK_CAPS_AUTHONLY) ? " AUTHONLY" : "",
(flags & CHECK_CAPS_FLUSH) ? " FLUSH" : "",
- (flags & CHECK_CAPS_NOINVAL) ? " NOINVAL" : "");
+ (flags & CHECK_CAPS_NOINVAL) ? " NOINVAL" : "",
+ (flags & CHECK_CAPS_FLUSH_FORCE) ? " FLUSH_FORCE" : "");
/*
* If we no longer need to hold onto old our caps, and we may
@@ -2188,6 +2191,11 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags)
queue_writeback = true;
}
+ if (flags & CHECK_CAPS_FLUSH_FORCE) {
+ doutc(cl, "force to flush caps\n");
+ goto ack;
+ }
+
if (cap == ci->i_auth_cap &&
(cap->issued & CEPH_CAP_FILE_WR)) {
/* request larger max_size from MDS? */
@@ -3518,6 +3526,8 @@ static void handle_cap_grant(struct inode *inode,
bool queue_invalidate = false;
bool deleted_inode = false;
bool fill_inline = false;
+ bool revoke_wait = false;
+ int flags = 0;
/*
* If there is at least one crypto block then we'll trust
@@ -3713,16 +3723,18 @@ static void handle_cap_grant(struct inode *inode,
ceph_cap_string(cap->issued), ceph_cap_string(newcaps),
ceph_cap_string(revoking));
if (S_ISREG(inode->i_mode) &&
- (revoking & used & CEPH_CAP_FILE_BUFFER))
+ (revoking & used & CEPH_CAP_FILE_BUFFER)) {
writeback = true; /* initiate writeback; will delay ack */
- else if (queue_invalidate &&
+ revoke_wait = true;
+ } else if (queue_invalidate &&
revoking == CEPH_CAP_FILE_CACHE &&
- (newcaps & CEPH_CAP_FILE_LAZYIO) == 0)
- ; /* do nothing yet, invalidation will be queued */
- else if (cap == ci->i_auth_cap)
+ (newcaps & CEPH_CAP_FILE_LAZYIO) == 0) {
+ revoke_wait = true; /* do nothing yet, invalidation will be queued */
+ } else if (cap == ci->i_auth_cap) {
check_caps = 1; /* check auth cap only */
- else
+ } else {
check_caps = 2; /* check all caps */
+ }
/* If there is new caps, try to wake up the waiters */
if (~cap->issued & newcaps)
wake = true;
@@ -3749,8 +3761,9 @@ static void handle_cap_grant(struct inode *inode,
BUG_ON(cap->issued & ~cap->implemented);
/* don't let check_caps skip sending a response to MDS for revoke msgs */
- if (le32_to_cpu(grant->op) == CEPH_CAP_OP_REVOKE) {
+ if (!revoke_wait && le32_to_cpu(grant->op) == CEPH_CAP_OP_REVOKE) {
cap->mds_wanted = 0;
+ flags |= CHECK_CAPS_FLUSH_FORCE;
if (cap == ci->i_auth_cap)
check_caps = 1; /* check auth cap only */
else
@@ -3806,9 +3819,9 @@ static void handle_cap_grant(struct inode *inode,
mutex_unlock(&session->s_mutex);
if (check_caps == 1)
- ceph_check_caps(ci, CHECK_CAPS_AUTHONLY | CHECK_CAPS_NOINVAL);
+ ceph_check_caps(ci, flags | CHECK_CAPS_AUTHONLY | CHECK_CAPS_NOINVAL);
else if (check_caps == 2)
- ceph_check_caps(ci, CHECK_CAPS_NOINVAL);
+ ceph_check_caps(ci, flags | CHECK_CAPS_NOINVAL);
}
/*
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index b0b368ed3018..831e8ec4d5da 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -200,9 +200,10 @@ struct ceph_cap {
struct list_head caps_item;
};
-#define CHECK_CAPS_AUTHONLY 1 /* only check auth cap */
-#define CHECK_CAPS_FLUSH 2 /* flush any dirty caps */
-#define CHECK_CAPS_NOINVAL 4 /* don't invalidate pagecache */
+#define CHECK_CAPS_AUTHONLY 1 /* only check auth cap */
+#define CHECK_CAPS_FLUSH 2 /* flush any dirty caps */
+#define CHECK_CAPS_NOINVAL 4 /* don't invalidate pagecache */
+#define CHECK_CAPS_FLUSH_FORCE 8 /* force flush any caps */
struct ceph_cap_flush {
u64 tid;
--
2.45.1
The patch titled
Subject: selftests: mm: add s390 to ARCH check
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
selftests-mm-add-s390-to-arch-check.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-hotfixes-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Nico Pache <npache(a)redhat.com>
Subject: selftests: mm: add s390 to ARCH check
Date: Wed, 24 Jul 2024 15:35:17 -0600
commit 0518dbe97fe6 ("selftests/mm: fix cross compilation with LLVM")
changed the env variable for the architecture from MACHINE to ARCH.
This is preventing 3 required TEST_GEN_FILES from being included when
cross compiling s390x and errors when trying to run the test suite. This
is due to the ARCH variable already being set and the arch folder name
being s390.
Add "s390" to the filtered list to cover this case and have the 3 files
included in the build.
Link: https://lkml.kernel.org/r/20240724213517.23918-1-npache@redhat.com
Fixes: 0518dbe97fe6 ("selftests/mm: fix cross compilation with LLVM")
Signed-off-by: Nico Pache <npache(a)redhat.com>
Cc: Mark Brown <broonie(a)kernel.org>
Cc: Albert Ou <aou(a)eecs.berkeley.edu>
Cc: Palmer Dabbelt <palmer(a)dabbelt.com>
Cc: Paul Walmsley <paul.walmsley(a)sifive.com>
Cc: Shuah Khan <shuah(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
tools/testing/selftests/mm/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/tools/testing/selftests/mm/Makefile~selftests-mm-add-s390-to-arch-check
+++ a/tools/testing/selftests/mm/Makefile
@@ -110,7 +110,7 @@ endif
endif
-ifneq (,$(filter $(ARCH),arm64 ia64 mips64 parisc64 powerpc riscv64 s390x sparc64 x86_64))
+ifneq (,$(filter $(ARCH),arm64 ia64 mips64 parisc64 powerpc riscv64 s390x sparc64 x86_64 s390))
TEST_GEN_FILES += va_high_addr_switch
TEST_GEN_FILES += virtual_address_range
TEST_GEN_FILES += write_to_hugetlbfs
_
Patches currently in -mm which might be from npache(a)redhat.com are
selftests-mm-add-s390-to-arch-check.patch
The patch titled
Subject: crash: fix x86_32 crash memory reserve dead loop bug
has been added to the -mm mm-nonmm-unstable branch. Its filename is
crash-fix-x86_32-crash-memory-reserve-dead-loop-bug.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Jinjie Ruan <ruanjinjie(a)huawei.com>
Subject: crash: fix x86_32 crash memory reserve dead loop bug
Date: Thu, 18 Jul 2024 11:54:42 +0800
Patch series "crash: Fix x86_32 memory reserve dead loop bug", v3.
Fix two bugs for x86_32 crash memory reserve, and prepare to apply generic
crashkernel reservation to 32bit system. Then use generic interface to
simplify crashkernel reservation for ARM32.
This patch (of 3):
On x86_32 Qemu machine with 1GB memory, the cmdline "crashkernel=1G,high"
will cause system stall as below:
ACPI: Reserving FACP table memory at [mem 0x3ffe18b8-0x3ffe192b]
ACPI: Reserving DSDT table memory at [mem 0x3ffe0040-0x3ffe18b7]
ACPI: Reserving FACS table memory at [mem 0x3ffe0000-0x3ffe003f]
ACPI: Reserving APIC table memory at [mem 0x3ffe192c-0x3ffe19bb]
ACPI: Reserving HPET table memory at [mem 0x3ffe19bc-0x3ffe19f3]
ACPI: Reserving WAET table memory at [mem 0x3ffe19f4-0x3ffe1a1b]
143MB HIGHMEM available.
879MB LOWMEM available.
mapped low ram: 0 - 36ffe000
low ram: 0 - 36ffe000
(stall here)
The reason is that the CRASH_ADDR_LOW_MAX is equal to CRASH_ADDR_HIGH_MAX
on x86_32, the first high crash kernel memory reservation will fail, then
go into the "retry" loop and never came out as below.
-> reserve_crashkernel_generic() and high is true
-> alloc at [CRASH_ADDR_LOW_MAX, CRASH_ADDR_HIGH_MAX] fail
-> alloc at [0, CRASH_ADDR_LOW_MAX] fail and repeatedly
(because CRASH_ADDR_LOW_MAX = CRASH_ADDR_HIGH_MAX).
Fix it by prevent crashkernel=,high from being parsed successfully on 32bit
system with a architecture-defined macro.
After this patch, the 'crashkernel=,high' for 32bit system can't succeed,
and it has no chance to call reserve_crashkernel_generic(), therefore this
issue on x86_32 is solved.
Link: https://lkml.kernel.org/r/20240718035444.2977105-1-ruanjinjie@huawei.com
Link: https://lkml.kernel.org/r/20240718035444.2977105-2-ruanjinjie@huawei.com
Fixes: 9c08a2a139fe ("x86: kdump: use generic interface to simplify crashkernel reservation code")
Signed-off-by: Jinjie Ruan <ruanjinjie(a)huawei.com>
Signed-off-by: Baoquan He <bhe(a)redhat.com>
Tested-by: Jinjie Ruan <ruanjinjie(a)huawei.com>
Cc: Albert Ou <aou(a)eecs.berkeley.edu>
Cc: Andrew Davis <afd(a)ti.com>
Cc: Arnd Bergmann <arnd(a)arndb.de>
Cc: Borislav Petkov <bp(a)alien8.de>
Cc: Catalin Marinas <catalin.marinas(a)arm.com>
Cc: Chen Jiahao <chenjiahao16(a)huawei.com>
Cc: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: Dave Young <dyoung(a)redhat.com>
Cc: Eric DeVolder <eric.devolder(a)oracle.com>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Hari Bathini <hbathini(a)linux.ibm.com>
Cc: Helge Deller <deller(a)gmx.de>
Cc: "H. Peter Anvin" <hpa(a)zytor.com>
Cc: Ingo Molnar <mingo(a)redhat.com>
Cc: Javier Martinez Canillas <javierm(a)redhat.com>
Cc: Linus Walleij <linus.walleij(a)linaro.org>
Cc: Palmer Dabbelt <palmer(a)dabbelt.com>
Cc: Paul Walmsley <paul.walmsley(a)sifive.com>
Cc: Rob Herring <robh(a)kernel.org>
Cc: Russell King <linux(a)armlinux.org.uk>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Vivek Goyal <vgoyal(a)redhat.com>
Cc: Will Deacon <will(a)kernel.org>
Cc: Zhen Lei <thunder.leizhen(a)huawei.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
arch/arm64/include/asm/crash_reserve.h | 2 ++
arch/riscv/include/asm/crash_reserve.h | 2 ++
arch/x86/include/asm/crash_reserve.h | 1 +
kernel/crash_reserve.c | 2 +-
4 files changed, 6 insertions(+), 1 deletion(-)
--- a/arch/arm64/include/asm/crash_reserve.h~crash-fix-x86_32-crash-memory-reserve-dead-loop-bug
+++ a/arch/arm64/include/asm/crash_reserve.h
@@ -7,4 +7,6 @@
#define CRASH_ADDR_LOW_MAX arm64_dma_phys_limit
#define CRASH_ADDR_HIGH_MAX (PHYS_MASK + 1)
+
+#define HAVE_ARCH_CRASHKERNEL_RESERVATION_HIGH
#endif
--- a/arch/riscv/include/asm/crash_reserve.h~crash-fix-x86_32-crash-memory-reserve-dead-loop-bug
+++ a/arch/riscv/include/asm/crash_reserve.h
@@ -7,5 +7,7 @@
#define CRASH_ADDR_LOW_MAX dma32_phys_limit
#define CRASH_ADDR_HIGH_MAX memblock_end_of_DRAM()
+#define HAVE_ARCH_CRASHKERNEL_RESERVATION_HIGH
+
extern phys_addr_t memblock_end_of_DRAM(void);
#endif
--- a/arch/x86/include/asm/crash_reserve.h~crash-fix-x86_32-crash-memory-reserve-dead-loop-bug
+++ a/arch/x86/include/asm/crash_reserve.h
@@ -26,6 +26,7 @@ extern unsigned long swiotlb_size_or_def
#else
# define CRASH_ADDR_LOW_MAX SZ_4G
# define CRASH_ADDR_HIGH_MAX SZ_64T
+#define HAVE_ARCH_CRASHKERNEL_RESERVATION_HIGH
#endif
# define DEFAULT_CRASH_KERNEL_LOW_SIZE crash_low_size_default()
--- a/kernel/crash_reserve.c~crash-fix-x86_32-crash-memory-reserve-dead-loop-bug
+++ a/kernel/crash_reserve.c
@@ -305,7 +305,7 @@ int __init parse_crashkernel(char *cmdli
/* crashkernel=X[@offset] */
ret = __parse_crashkernel(cmdline, system_ram, crash_size,
crash_base, NULL);
-#ifdef CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
+#ifdef HAVE_ARCH_CRASHKERNEL_RESERVATION_HIGH
/*
* If non-NULL 'high' passed in and no normal crashkernel
* setting detected, try parsing crashkernel=,high|low.
_
Patches currently in -mm which might be from ruanjinjie(a)huawei.com are
crash-fix-x86_32-crash-memory-reserve-dead-loop-bug.patch
crash-fix-x86_32-crash-memory-reserve-dead-loop-bug-at-high.patch
arm-use-generic-interface-to-simplify-crashkernel-reservation.patch
The patch titled
Subject: mm: let pte_lockptr() consume a pte_t pointer
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
mm-let-pte_lockptr-consume-a-pte_t-pointer.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-hotfixes-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: David Hildenbrand <david(a)redhat.com>
Subject: mm: let pte_lockptr() consume a pte_t pointer
Date: Thu, 25 Jul 2024 20:39:54 +0200
Patch series "mm/hugetlb: fix hugetlb vs. core-mm PT locking".
Working on another generic page table walker that tries to avoid
special-casing hugetlb, I found a page table locking issue with hugetlb
folios that are not mapped using a single PMD/PUD.
For some hugetlb folio sizes, GUP will take different page table locks
when walking the page tables than hugetlb when modifying the page tables.
I did not actually try reproducing an issue, but looking at
follow_pmd_mask() where we might be rereading a PMD value multiple times
it's rather clear that concurrent modifications are rather unpleasant.
In follow_page_pte() we might be better in that regard -- ptep_get() does
a READ_ONCE() -- but who knows what else could happen concurrently in some
weird corner cases (e.g., hugetlb folio getting unmapped and freed).
This patch (of 2):
pte_lockptr() is the only *_lockptr() function that doesn't consume what
would be expected: it consumes a pmd_t pointer instead of a pte_t pointer.
Let's change that. The two callers in pgtable-generic.c are easily
adjusted. Adjust khugepaged.c:retract_page_tables() to simply do a
pte_offset_map_nolock() to obtain the lock, even though we won't actually
be traversing the page table.
This makes the code more similar to the other variants and avoids other
hacks to make the new pte_lockptr() version happy. pte_lockptr() users
reside now only in pgtable-generic.c.
Maybe, using pte_offset_map_nolock() is the right thing to do because the
PTE table could have been removed in the meantime? At least it sounds
more future proof if we ever have other means of page table reclaim.
It's not quite clear if holding the PTE table lock is really required:
what if someone else obtains the lock just after we unlock it? But we'll
leave that as is for now, maybe there are good reasons.
This is a preparation for adapting hugetlb page table locking logic to
take the same locks as core-mm page table walkers would.
Link: https://lkml.kernel.org/r/20240725183955.2268884-1-david@redhat.com
Link: https://lkml.kernel.org/r/20240725183955.2268884-2-david@redhat.com
Fixes: 9cb28da54643 ("mm/gup: handle hugetlb in the generic follow_page_mask code")
Signed-off-by: David Hildenbrand <david(a)redhat.com>
Cc: Muchun Song <muchun.song(a)linux.dev>
Cc: Oscar Salvador <osalvador(a)suse.de>
Cc: Peter Xu <peterx(a)redhat.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/mm.h | 7 ++++---
mm/khugepaged.c | 21 +++++++++++++++------
mm/pgtable-generic.c | 4 ++--
3 files changed, 21 insertions(+), 11 deletions(-)
--- a/include/linux/mm.h~mm-let-pte_lockptr-consume-a-pte_t-pointer
+++ a/include/linux/mm.h
@@ -2915,9 +2915,10 @@ static inline spinlock_t *ptlock_ptr(str
}
#endif /* ALLOC_SPLIT_PTLOCKS */
-static inline spinlock_t *pte_lockptr(struct mm_struct *mm, pmd_t *pmd)
+static inline spinlock_t *pte_lockptr(struct mm_struct *mm, pte_t *pte)
{
- return ptlock_ptr(page_ptdesc(pmd_page(*pmd)));
+ /* PTE page tables don't currently exceed a single page. */
+ return ptlock_ptr(virt_to_ptdesc(pte));
}
static inline bool ptlock_init(struct ptdesc *ptdesc)
@@ -2940,7 +2941,7 @@ static inline bool ptlock_init(struct pt
/*
* We use mm->page_table_lock to guard all pagetable pages of the mm.
*/
-static inline spinlock_t *pte_lockptr(struct mm_struct *mm, pmd_t *pmd)
+static inline spinlock_t *pte_lockptr(struct mm_struct *mm, pte_t *pte)
{
return &mm->page_table_lock;
}
--- a/mm/khugepaged.c~mm-let-pte_lockptr-consume-a-pte_t-pointer
+++ a/mm/khugepaged.c
@@ -1697,12 +1697,13 @@ static void retract_page_tables(struct a
i_mmap_lock_read(mapping);
vma_interval_tree_foreach(vma, &mapping->i_mmap, pgoff, pgoff) {
struct mmu_notifier_range range;
+ bool retracted = false;
struct mm_struct *mm;
unsigned long addr;
pmd_t *pmd, pgt_pmd;
spinlock_t *pml;
spinlock_t *ptl;
- bool skipped_uffd = false;
+ pte_t *pte;
/*
* Check vma->anon_vma to exclude MAP_PRIVATE mappings that
@@ -1739,9 +1740,17 @@ static void retract_page_tables(struct a
mmu_notifier_invalidate_range_start(&range);
pml = pmd_lock(mm, pmd);
- ptl = pte_lockptr(mm, pmd);
+
+ /*
+ * No need to check the PTE table content, but we'll grab the
+ * PTE table lock while we zap it.
+ */
+ pte = pte_offset_map_nolock(mm, pmd, addr, &ptl);
+ if (!pte)
+ goto unlock_pmd;
if (ptl != pml)
spin_lock_nested(ptl, SINGLE_DEPTH_NESTING);
+ pte_unmap(pte);
/*
* Huge page lock is still held, so normally the page table
@@ -1752,20 +1761,20 @@ static void retract_page_tables(struct a
* repeating the anon_vma check protects from one category,
* and repeating the userfaultfd_wp() check from another.
*/
- if (unlikely(vma->anon_vma || userfaultfd_wp(vma))) {
- skipped_uffd = true;
- } else {
+ if (likely(!vma->anon_vma && !userfaultfd_wp(vma))) {
pgt_pmd = pmdp_collapse_flush(vma, addr, pmd);
pmdp_get_lockless_sync();
+ retracted = true;
}
if (ptl != pml)
spin_unlock(ptl);
+unlock_pmd:
spin_unlock(pml);
mmu_notifier_invalidate_range_end(&range);
- if (!skipped_uffd) {
+ if (retracted) {
mm_dec_nr_ptes(mm);
page_table_check_pte_clear_range(mm, addr, pgt_pmd);
pte_free_defer(mm, pmd_pgtable(pgt_pmd));
--- a/mm/pgtable-generic.c~mm-let-pte_lockptr-consume-a-pte_t-pointer
+++ a/mm/pgtable-generic.c
@@ -313,7 +313,7 @@ pte_t *pte_offset_map_nolock(struct mm_s
pte = __pte_offset_map(pmd, addr, &pmdval);
if (likely(pte))
- *ptlp = pte_lockptr(mm, &pmdval);
+ *ptlp = pte_lockptr(mm, pte);
return pte;
}
@@ -371,7 +371,7 @@ again:
pte = __pte_offset_map(pmd, addr, &pmdval);
if (unlikely(!pte))
return pte;
- ptl = pte_lockptr(mm, &pmdval);
+ ptl = pte_lockptr(mm, pte);
spin_lock(ptl);
if (likely(pmd_same(pmdval, pmdp_get_lockless(pmd)))) {
*ptlp = ptl;
_
Patches currently in -mm which might be from david(a)redhat.com are
mm-let-pte_lockptr-consume-a-pte_t-pointer.patch
mm-hugetlb-fix-hugetlb-vs-core-mm-pt-locking.patch
The check_unaligned_access_emulated() function should have been called
during CPU hotplug to ensure that if all CPUs had emulated unaligned
accesses, the new CPU also does.
This patch adds the call to check_unaligned_access_emulated() in
the hotplug path.
Fixes: 55e0bf49a0d0 ("RISC-V: Probe misaligned access speed in parallel")
Signed-off-by: Jesse Taube <jesse(a)rivosinc.com>
Cc: stable(a)vger.kernel.org
---
V5 -> V6:
- New patch
---
arch/riscv/kernel/unaligned_access_speed.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/kernel/unaligned_access_speed.c b/arch/riscv/kernel/unaligned_access_speed.c
index a9a6bcb02acf..b67db1fc3740 100644
--- a/arch/riscv/kernel/unaligned_access_speed.c
+++ b/arch/riscv/kernel/unaligned_access_speed.c
@@ -191,6 +191,7 @@ static int riscv_online_cpu(unsigned int cpu)
if (per_cpu(misaligned_access_speed, cpu) != RISCV_HWPROBE_MISALIGNED_UNKNOWN)
goto exit;
+ check_unaligned_access_emulated(NULL);
buf = alloc_pages(GFP_KERNEL, MISALIGNED_BUFFER_ORDER);
if (!buf) {
pr_warn("Allocation failure, not measuring misaligned performance\n");
--
2.45.2
From: Johannes Berg <johannes.berg(a)intel.com>
In commit 0d9c2beed116 ("wifi: mac80211: fix monitor channel
with chanctx emulation") I changed mac80211 to always have an
internal monitor_sdata to have something to have the chanctx
bound to.
However, if the driver didn't also have the WANT_MONITOR flag
this would cause mac80211 to allocate it without telling the
driver (which was intentional) but also use it for later APIs
to the driver without it ever having known about it which was
_not_ intentional.
Check through the code and only use the monitor_sdata in the
relevant places (TX, MU-MIMO follow settings, TX power, and
interface iteration) when the WANT_MONITOR flag is set.
Cc: stable(a)vger.kernel.org
Fixes: 0d9c2beed116 ("wifi: mac80211: fix monitor channel with chanctx emulation")
Reported-by: ZeroBeat <ZeroBeat(a)gmx.de>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219086
Tested-by: Lorenzo Bianconi <lorenzo(a)kernel.org>
Signed-off-by: Johannes Berg <johannes.berg(a)intel.com>
---
net/mac80211/cfg.c | 7 +++++--
net/mac80211/tx.c | 5 +++--
net/mac80211/util.c | 2 +-
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 85cb71de370f..b02b84ce2130 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -114,7 +114,7 @@ static int ieee80211_set_mon_options(struct ieee80211_sub_if_data *sdata,
/* apply all changes now - no failures allowed */
- if (monitor_sdata)
+ if (monitor_sdata && ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF))
ieee80211_set_mu_mimo_follow(monitor_sdata, params);
if (params->flags) {
@@ -3053,6 +3053,9 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy,
sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
if (sdata->vif.type == NL80211_IFTYPE_MONITOR) {
+ if (!ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF))
+ return -EOPNOTSUPP;
+
sdata = wiphy_dereference(local->hw.wiphy,
local->monitor_sdata);
if (!sdata)
@@ -3115,7 +3118,7 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy,
if (has_monitor) {
sdata = wiphy_dereference(local->hw.wiphy,
local->monitor_sdata);
- if (sdata) {
+ if (sdata && ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF)) {
sdata->deflink.user_power_level = local->user_power_level;
if (txp_type != sdata->vif.bss_conf.txpower_type)
update_txp_type = true;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 72a9ba8bc5fd..edba4a31844f 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1768,7 +1768,7 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
break;
}
sdata = rcu_dereference(local->monitor_sdata);
- if (sdata) {
+ if (sdata && ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF)) {
vif = &sdata->vif;
info->hw_queue =
vif->hw_queue[skb_get_queue_mapping(skb)];
@@ -3957,7 +3957,8 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
break;
}
tx.sdata = rcu_dereference(local->monitor_sdata);
- if (tx.sdata) {
+ if (tx.sdata &&
+ ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF)) {
vif = &tx.sdata->vif;
info->hw_queue =
vif->hw_queue[skb_get_queue_mapping(skb)];
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index ced19ce7c51a..c7ad9bc5973a 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -776,7 +776,7 @@ static void __iterate_interfaces(struct ieee80211_local *local,
sdata = rcu_dereference_check(local->monitor_sdata,
lockdep_is_held(&local->iflist_mtx) ||
lockdep_is_held(&local->hw.wiphy->mtx));
- if (sdata &&
+ if (sdata && ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF) &&
(iter_flags & IEEE80211_IFACE_ITER_RESUME_ALL || !active_only ||
sdata->flags & IEEE80211_SDATA_IN_DRIVER))
iterator(data, sdata->vif.addr, &sdata->vif);
--
2.45.2
string.h tests for the macros NOLIBC_ARCH_HAS_$FUNC to use the
architecture-optimized function variants.
However if string.h is included before arch.h header than that check
does not work, leading to duplicate function definitions.
Fixes: 553845eebd60 ("tools/nolibc: x86-64: Use `rep movsb` for `memcpy()` and `memmove()`")
Fixes: 12108aa8c1a1 ("tools/nolibc: x86-64: Use `rep stosb` for `memset()`")
Cc: stable(a)vger.kernel.org
Signed-off-by: Thomas Weißschuh <linux(a)weissschuh.net>
---
If nobody complains I'll apply this after v6.11-rc1 is released.
---
tools/include/nolibc/string.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/include/nolibc/string.h b/tools/include/nolibc/string.h
index f9ab28421e6d..9ec9c24f38c0 100644
--- a/tools/include/nolibc/string.h
+++ b/tools/include/nolibc/string.h
@@ -7,6 +7,7 @@
#ifndef _NOLIBC_STRING_H
#define _NOLIBC_STRING_H
+#include "arch.h"
#include "std.h"
static void *malloc(size_t len);
---
base-commit: 6ca8f2e20bd1ced8a7cd12b3ae4b1ceca85cfc2b
change-id: 20240725-arch-has-func-59b6c92ce935
Best regards,
--
Thomas Weißschuh <linux(a)weissschuh.net>
From: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Currently, irqchips for all of the subnodes (which represent a given
bus master) point to the parent wrapper node. This is no bueno, as
no interrupts arrive, ever (because nothing references that node).
Fix that by passing a reference to the respective master's of_node.
Worth noting, this is a NOP for devices with only a single master
described.
Signed-off-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240522-topic-spmi_multi_master_irqfix-v2-1-7ec9…
Reviewed-by: Abel Vesa <abel.vesa(a)linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
Fixes: 02922ccbb330 ("spmi: pmic-arb: Register controller for bus instead of arbiter")
Cc: stable(a)vger.kernel.org
Signed-off-by: Stephen Boyd <sboyd(a)kernel.org>
---
drivers/spmi/spmi-pmic-arb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index f240fcc5a4e1..b6880c13163c 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -1737,8 +1737,7 @@ static int spmi_pmic_arb_bus_init(struct platform_device *pdev,
dev_dbg(&pdev->dev, "adding irq domain for bus %d\n", bus_index);
- bus->domain = irq_domain_add_tree(dev->of_node,
- &pmic_arb_irq_domain_ops, bus);
+ bus->domain = irq_domain_add_tree(node, &pmic_arb_irq_domain_ops, bus);
if (!bus->domain) {
dev_err(&pdev->dev, "unable to create irq_domain\n");
return -ENOMEM;
--
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
Bisection revealed that the bitcrushing distortion with RME FireFace 800
was caused by 1d717123bb1a7555
("ALSA: firewire-lib: Avoid -Wflex-array-member-not-at-end warning").
Reverting this commit yields restoration of clear audio output.
I will send in a patch reverting this commit for now, soonTM.
#regzbot introduced: 1d717123bb1a7555
The patch below does not apply to the 6.6-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-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x df39038cd89525d465c2c8827eb64116873f141a
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072535-synergy-struggle-8ecc@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
df39038cd895 ("s390/mm: Fix VM_FAULT_HWPOISON handling in do_exception()")
b20c8216c1e0 ("s390/mm,fault: move VM_FAULT_ERROR handling to do_exception()")
7c194d84a9ce ("s390/mm,fault: remove VM_FAULT_BADMAP and VM_FAULT_BADACCESS")
b61a0922b6dc ("s390/mm,fault: remove VM_FAULT_SIGNAL")
0f86ac4ba713 ("s390/mm,fault: remove VM_FAULT_BADCONTEXT")
0f1a14e0348e ("s390/mm,fault: simplify kfence fault handling")
64ea33fb09f8 ("s390/mm,fault: call do_fault_error() only from do_exception()")
5db06565cad6 ("s390/mm,fault: get rid of do_low_address()")
cca12b427d43 ("s390/mm,fault: remove VM_FAULT_PFAULT")
5be05c35e72f ("s390/mm,fault: improve readability by using teid union")
4416d2ed8166 ("s390/mm,fault: use static key for store indication")
9641613f48bb ("s390/mm,fault: use get_fault_address() everywhere")
5c845de331d9 ("s390/mm,fault: remove noinline attribute from all functions")
8dbc33dc8163 ("s390/mm,fault: have balanced braces, remove unnecessary blanks")
7c915a84e5e2 ("s390/mm,fault: reverse x-mas tree coding style")
3aad8c044297 ("s390/mm,fault: remove and improve comments, adjust whitespace")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From df39038cd89525d465c2c8827eb64116873f141a Mon Sep 17 00:00:00 2001
From: Gerald Schaefer <gerald.schaefer(a)linux.ibm.com>
Date: Mon, 15 Jul 2024 20:04:16 +0200
Subject: [PATCH] s390/mm: Fix VM_FAULT_HWPOISON handling in do_exception()
There is no support for HWPOISON, MEMORY_FAILURE, or ARCH_HAS_COPY_MC on
s390. Therefore we do not expect to see VM_FAULT_HWPOISON in
do_exception().
However, since commit af19487f00f3 ("mm: make PTE_MARKER_SWAPIN_ERROR more
general"), it is possible to see VM_FAULT_HWPOISON in combination with
PTE_MARKER_POISONED, even on architectures that do not support HWPOISON
otherwise. In this case, we will end up on the BUG() in do_exception().
Fix this by treating VM_FAULT_HWPOISON the same as VM_FAULT_SIGBUS, similar
to x86 when MEMORY_FAILURE is not configured. Also print unexpected fault
flags, for easier debugging.
Note that VM_FAULT_HWPOISON_LARGE is not expected, because s390 cannot
support swap entries on other levels than PTE level.
Cc: stable(a)vger.kernel.org # 6.6+
Fixes: af19487f00f3 ("mm: make PTE_MARKER_SWAPIN_ERROR more general")
Reported-by: Yunseong Kim <yskelg(a)gmail.com>
Tested-by: Yunseong Kim <yskelg(a)gmail.com>
Acked-by: Alexander Gordeev <agordeev(a)linux.ibm.com>
Signed-off-by: Gerald Schaefer <gerald.schaefer(a)linux.ibm.com>
Message-ID: <20240715180416.3632453-1-gerald.schaefer(a)linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor(a)linux.ibm.com>
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 6b19a33c49c2..8e149ef5e89b 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -433,12 +433,13 @@ static void do_exception(struct pt_regs *regs, int access)
handle_fault_error_nolock(regs, 0);
else
do_sigsegv(regs, SEGV_MAPERR);
- } else if (fault & VM_FAULT_SIGBUS) {
+ } else if (fault & (VM_FAULT_SIGBUS | VM_FAULT_HWPOISON)) {
if (!user_mode(regs))
handle_fault_error_nolock(regs, 0);
else
do_sigbus(regs);
} else {
+ pr_emerg("Unexpected fault flags: %08x\n", fault);
BUG();
}
}
From: Bailey Forrest <bcf(a)google.com>
The NIC requires each TSO segment to not span more than 10
descriptors. NIC further requires each descriptor to not exceed
16KB - 1 (GVE_TX_MAX_BUF_SIZE_DQO).
The descriptors for an skb are generated by
gve_tx_add_skb_no_copy_dqo() for DQO RDA queue format.
gve_tx_add_skb_no_copy_dqo() loops through each skb frag and
generates a descriptor for the entire frag if the frag size is
not greater than GVE_TX_MAX_BUF_SIZE_DQO. If the frag size is
greater than GVE_TX_MAX_BUF_SIZE_DQO, it is split into descriptor(s)
of size GVE_TX_MAX_BUF_SIZE_DQO and a descriptor is generated for
the remainder (frag size % GVE_TX_MAX_BUF_SIZE_DQO).
gve_can_send_tso() checks if the descriptors thus generated for an
skb would meet the requirement that each TSO-segment not span more
than 10 descriptors. However, the current code misses an edge case
when a TSO segment spans multiple descriptors within a large frag.
This change fixes the edge case.
gve_can_send_tso() relies on the assumption that max gso size (9728)
is less than GVE_TX_MAX_BUF_SIZE_DQO and therefore within an skb
fragment a TSO segment can never span more than 2 descriptors.
Fixes: a57e5de476be ("gve: DQO: Add TX path")
Signed-off-by: Praveen Kaligineedi <pkaligineedi(a)google.com>
Signed-off-by: Bailey Forrest <bcf(a)google.com>
Reviewed-by: Jeroen de Borst <jeroendb(a)google.com>
Cc: stable(a)vger.kernel.org
---
Changes from v1:
- Added 'stable tag'
- Added more explanation in the commit message
- Modified comments to clarify the changes made
- Changed variable names 'last_frag_size' to 'prev_frag_size' and
'last_frag_remain' to 'prev_frag_remain'
- Removed parentheses around single line statement
drivers/net/ethernet/google/gve/gve_tx_dqo.c | 22 +++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/google/gve/gve_tx_dqo.c b/drivers/net/ethernet/google/gve/gve_tx_dqo.c
index 0b3cca3fc792..f879426cb552 100644
--- a/drivers/net/ethernet/google/gve/gve_tx_dqo.c
+++ b/drivers/net/ethernet/google/gve/gve_tx_dqo.c
@@ -866,22 +866,42 @@ static bool gve_can_send_tso(const struct sk_buff *skb)
const int header_len = skb_tcp_all_headers(skb);
const int gso_size = shinfo->gso_size;
int cur_seg_num_bufs;
+ int prev_frag_size;
int cur_seg_size;
int i;
cur_seg_size = skb_headlen(skb) - header_len;
+ prev_frag_size = skb_headlen(skb);
cur_seg_num_bufs = cur_seg_size > 0;
for (i = 0; i < shinfo->nr_frags; i++) {
if (cur_seg_size >= gso_size) {
cur_seg_size %= gso_size;
cur_seg_num_bufs = cur_seg_size > 0;
+
+ if (prev_frag_size > GVE_TX_MAX_BUF_SIZE_DQO) {
+ int prev_frag_remain = prev_frag_size %
+ GVE_TX_MAX_BUF_SIZE_DQO;
+
+ /* If the last descriptor of the previous frag
+ * is less than cur_seg_size, the segment will
+ * span two descriptors in the previous frag.
+ * Since max gso size (9728) is less than
+ * GVE_TX_MAX_BUF_SIZE_DQO, it is impossible
+ * for the segment to span more than two
+ * descriptors.
+ */
+ if (prev_frag_remain &&
+ cur_seg_size > prev_frag_remain)
+ cur_seg_num_bufs++;
+ }
}
if (unlikely(++cur_seg_num_bufs > max_bufs_per_seg))
return false;
- cur_seg_size += skb_frag_size(&shinfo->frags[i]);
+ prev_frag_size = skb_frag_size(&shinfo->frags[i]);
+ cur_seg_size += prev_frag_size;
}
return true;
--
2.45.2.1089.g2a221341d9-goog
From: Jiri Olsa <jolsa(a)kernel.org>
[ Upstream commit 4121d4481b72501aa4d22680be4ea1096d69d133 ]
Hao Sun reported crash in dispatcher image [1].
Currently we don't have any sync between bpf_dispatcher_update and
bpf_dispatcher_xdp_func, so following race is possible:
cpu 0: cpu 1:
bpf_prog_run_xdp
...
bpf_dispatcher_xdp_func
in image at offset 0x0
bpf_dispatcher_update
update image at offset 0x800
bpf_dispatcher_update
update image at offset 0x0
in image at offset 0x0 -> crash
Fixing this by synchronizing dispatcher image update (which is done
in bpf_dispatcher_update function) with bpf_dispatcher_xdp_func that
reads and execute the dispatcher image.
Calling synchronize_rcu after updating and installing new image ensures
that readers leave old image before it's changed in the next dispatcher
update. The update itself is locked with dispatcher's mutex.
The bpf_prog_run_xdp is called under local_bh_disable and synchronize_rcu
will wait for it to leave [2].
[1] https://lore.kernel.org/bpf/Y5SFho7ZYXr9ifRn@krava/T/#m00c29ece654bc9f332a1…
[2] https://lore.kernel.org/bpf/0B62D35A-E695-4B7A-A0D4-774767544C1A@gmail.com/…
Reported-by: Hao Sun <sunhao.th(a)gmail.com>
Signed-off-by: Jiri Olsa <jolsa(a)kernel.org>
Acked-by: Yonghong Song <yhs(a)fb.com>
Acked-by: Paul E. McKenney <paulmck(a)kernel.org>
Link: https://lore.kernel.org/r/20221214123542.1389719-1-jolsa@kernel.org
Signed-off-by: Martin KaFai Lau <martin.lau(a)kernel.org>
(cherry picked from commit 4121d4481b72501aa4d22680be4ea1096d69d133)
Signed-off-by: Sergio González Collado <sergio.collado(a)gmail.com>
Reported-by: syzbot+08ba1e474d350b613604(a)syzkaller.appspotmail.com
---
kernel/bpf/dispatcher.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/bpf/dispatcher.c b/kernel/bpf/dispatcher.c
index c19719f48ce0..fa3e9225aedc 100644
--- a/kernel/bpf/dispatcher.c
+++ b/kernel/bpf/dispatcher.c
@@ -125,6 +125,11 @@ static void bpf_dispatcher_update(struct bpf_dispatcher *d, int prev_num_progs)
__BPF_DISPATCHER_UPDATE(d, new ?: (void *)&bpf_dispatcher_nop_func);
+ /* Make sure all the callers executing the previous/old half of the
+ * image leave it, so following update call can modify it safely.
+ */
+ synchronize_rcu();
+
if (new)
d->image_off = noff;
}
--
2.39.2
From: Filipe Manana <fdmanana(a)suse.com>
[ Upstream commit df9f278239046719c91aeb59ec0afb1a99ee8b2b ]
During the transaction commit path, at create_pending_snapshot(), there
is no need to BUG_ON() in case we fail to get a dir index for the snapshot
in the parent directory. This should fail very rarely because the parent
inode should be loaded in memory already, with the respective delayed
inode created and the parent inode's index_cnt field already initialized.
However if it fails, it may be -ENOMEM like the comment at
create_pending_snapshot() says or any error returned by
btrfs_search_slot() through btrfs_set_inode_index_count(), which can be
pretty much anything such as -EIO or -EUCLEAN for example. So the comment
is not correct when it says it can only be -ENOMEM.
However doing a BUG_ON() here is overkill, since we can instead abort
the transaction and return the error. Note that any error returned by
create_pending_snapshot() will eventually result in a transaction
abort at cleanup_transaction(), called from btrfs_commit_transaction(),
but we can explicitly abort the transaction at this point instead so that
we get a stack trace to tell us that the call to btrfs_set_inode_index()
failed.
So just abort the transaction and return in case btrfs_set_inode_index()
returned an error at create_pending_snapshot().
Reviewed-by: Johannes Thumshirn <johannes.thumshirn(a)wdc.com>
Signed-off-by: Filipe Manana <fdmanana(a)suse.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
(cherry picked from commit df9f278239046719c91aeb59ec0afb1a99ee8b2b)
Signed-off-by: Sergio González Collado <sergio.collado(a)gmail.com>
Reported-by: syzbot+c56033c8c15c08286062(a)syzkaller.appspotmail.com
---
fs/btrfs/transaction.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index a7853a3a5719..604241e6e2c1 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1701,7 +1701,10 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
* insert the directory item
*/
ret = btrfs_set_inode_index(BTRFS_I(parent_inode), &index);
- BUG_ON(ret); /* -ENOMEM */
+ if (ret) {
+ btrfs_abort_transaction(trans, ret);
+ goto fail;
+ }
/* check if there is a file/dir which has the same name. */
dir_item = btrfs_lookup_dir_item(NULL, parent_root, path,
--
2.39.2
The patch below does not apply to the 6.6-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-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 074992a1163295d717faa21d1818c4c19ef6e676
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072522-properly-jackpot-9fed@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
074992a11632 ("arm64: dts: qcom: sm6115: Disable SS instance in Parkmode for USB")
a06a2f12f9e2 ("arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling")
7e3a1f6470f7 ("arm64: dts: qcom: sm6115: drop pipe clock selection")
b3eaa47395b9 ("arm64: dts: qcom: sm6115: Hook up interconnects")
f6874706e311 ("arm64: dts: qcom: sm6115: switch UFS QMP PHY to new style of bindings")
ff753723bf39 ("arm64: dts: qcom: qrb4210-rb2: Enable MPSS and Wi-Fi")
cab60b166575 ("arm64: dts: qcom: qrb4210-rb2: Enable bluetooth")
ba5f5610841f ("arm64: dts: qcom: sm6115: Add UART3")
27c2ca90e2f3 ("arm64: dts: qcom: qrb4210-rb2: don't force usb peripheral mode")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 074992a1163295d717faa21d1818c4c19ef6e676 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:45 +0530
Subject: [PATCH] arm64: dts: qcom: sm6115: Disable SS instance in Parkmode for
USB
For Gen-1 targets like SM6115, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for SM6115 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 97e563bf5ba1 ("arm64: dts: qcom: sm6115: Add basic soc dtsi")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-6-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
index ac5f071a8db3..aec6ca5941c2 100644
--- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
@@ -1659,6 +1659,7 @@ usb_dwc3: usb@4e00000 {
snps,has-lpm-erratum;
snps,hird-threshold = /bits/ 8 <0x10>;
snps,usb3_lpm_capable;
+ snps,parkmode-disable-ss-quirk;
usb-role-switch;
The patch below does not apply to the 6.6-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-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x cf4d6d54eadb60d2ee4d31c9d92299f5e8dcb55c
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072509-chive-tabby-a6f1@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
cf4d6d54eadb ("arm64: dts: qcom: sdm845: Disable SS instance in Parkmode for USB")
ca5ca568d738 ("arm64: dts: qcom: sdm845: switch USB QMP PHY to new style of bindings")
a9ecdec45a3a ("arm64: dts: qcom: sdm845: switch USB+DP QMP PHY to new style of bindings")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From cf4d6d54eadb60d2ee4d31c9d92299f5e8dcb55c Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:48 +0530
Subject: [PATCH] arm64: dts: qcom: sdm845: Disable SS instance in Parkmode for
USB
For Gen-1 targets like SDM845, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for SDM845 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: ca4db2b538a1 ("arm64: dts: qcom: sdm845: Add USB-related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-9-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 23b101bb3842..54077549b9da 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -4138,6 +4138,7 @@ usb_1_dwc3: usb@a600000 {
iommus = <&apps_smmu 0x740 0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
@@ -4213,6 +4214,7 @@ usb_2_dwc3: usb@a800000 {
iommus = <&apps_smmu 0x760 0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_2_hsphy>, <&usb_2_qmpphy>;
phy-names = "usb2-phy", "usb3-phy";
};
The patch below does not apply to the 5.10-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.10.y
git checkout FETCH_HEAD
git cherry-pick -x dc6ba95c6c4400a84cca5b419b34ae852a08cfb5
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072552-victory-unpaid-afda@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
dc6ba95c6c44 ("arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode for USB")
d412786ab86b ("arm64: dts: qcom: ipq8074: remove USB tx-fifo-resize property")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From dc6ba95c6c4400a84cca5b419b34ae852a08cfb5 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:42 +0530
Subject: [PATCH] arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode
for USB
For Gen-1 targets like IPQ8074, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for IPQ8074 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 5e09bc51d07b ("arm64: dts: ipq8074: enable USB support")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-3-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
index 92682d3c9478..284a4553070f 100644
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -666,6 +666,7 @@ dwc_0: usb@8a00000 {
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_0>, <&ssphy_0>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
@@ -715,6 +716,7 @@ dwc_1: usb@8c00000 {
interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_1>, <&ssphy_1>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
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 dc6ba95c6c4400a84cca5b419b34ae852a08cfb5
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072552-twisty-harvest-26cd@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
dc6ba95c6c44 ("arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode for USB")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From dc6ba95c6c4400a84cca5b419b34ae852a08cfb5 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:42 +0530
Subject: [PATCH] arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode
for USB
For Gen-1 targets like IPQ8074, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for IPQ8074 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 5e09bc51d07b ("arm64: dts: ipq8074: enable USB support")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-3-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
index 92682d3c9478..284a4553070f 100644
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -666,6 +666,7 @@ dwc_0: usb@8a00000 {
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_0>, <&ssphy_0>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
@@ -715,6 +716,7 @@ dwc_1: usb@8c00000 {
interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_1>, <&ssphy_1>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
The patch below does not apply to the 6.1-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-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x dc6ba95c6c4400a84cca5b419b34ae852a08cfb5
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072551-chain-finalist-0cb0@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
dc6ba95c6c44 ("arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode for USB")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From dc6ba95c6c4400a84cca5b419b34ae852a08cfb5 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:42 +0530
Subject: [PATCH] arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode
for USB
For Gen-1 targets like IPQ8074, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for IPQ8074 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 5e09bc51d07b ("arm64: dts: ipq8074: enable USB support")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-3-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
index 92682d3c9478..284a4553070f 100644
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -666,6 +666,7 @@ dwc_0: usb@8a00000 {
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_0>, <&ssphy_0>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
@@ -715,6 +716,7 @@ dwc_1: usb@8c00000 {
interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_1>, <&ssphy_1>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
The patch below does not apply to the 6.6-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-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x dc6ba95c6c4400a84cca5b419b34ae852a08cfb5
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072550-editor-edging-bfb4@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
dc6ba95c6c44 ("arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode for USB")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From dc6ba95c6c4400a84cca5b419b34ae852a08cfb5 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:42 +0530
Subject: [PATCH] arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode
for USB
For Gen-1 targets like IPQ8074, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for IPQ8074 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 5e09bc51d07b ("arm64: dts: ipq8074: enable USB support")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-3-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
index 92682d3c9478..284a4553070f 100644
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -666,6 +666,7 @@ dwc_0: usb@8a00000 {
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_0>, <&ssphy_0>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
@@ -715,6 +716,7 @@ dwc_1: usb@8c00000 {
interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_1>, <&ssphy_1>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
The patch below does not apply to the 5.10-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.10.y
git checkout FETCH_HEAD
git cherry-pick -x 0046325ae52079b46da13a7f84dd7b2a6f7c38f8
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072510-blade-spousal-6659@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
0046325ae520 ("arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB")
b7efebfeb2e8 ("arm64: dts: qcom: msm8998: switch USB QMP PHY to new style of bindings")
ed9cbbcb8c6a ("arm64: dts: qcom: msm8998: drop USB PHY clock index")
1351512f29b4 ("arm64: dts: qcom: Correct QMP PHY child node name")
82d61e19fccb ("arm64: dts: qcom: msm8996: Move '#clock-cells' to QMP PHY child node")
095bbdd9a5c3 ("arm64: dts: qcom: ipq6018: Add pcie support")
63fa43224696 ("arm64: dts: qcom: sm8250: fix usb2 qmp phy node")
dc2f86369b15 ("arm64: dts: qcom: sm8250: Fix pcie2_lane unit address")
59c7cf814783 ("arm64: dts: qcom: sm8350: Add UFS nodes")
e780fb318fe5 ("arm64: dts: qcom: sm8350: add USB and PHY device nodes")
e53bdfc00977 ("arm64: dts: qcom: sm8250: Add PCIe support")
b7e8f433a673 ("arm64: dts: qcom: Add basic devicetree support for SM8350 SoC")
46a6f297d7dd ("arm64: dts: qcom: sm8250: Add USB and PHY device nodes")
0c9dde0d2015 ("arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 0046325ae52079b46da13a7f84dd7b2a6f7c38f8 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:43 +0530
Subject: [PATCH] arm64: dts: qcom: msm8998: Disable SS instance in Parkmode
for USB
For Gen-1 targets like MSM8998, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for MSM8998 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 026dad8f5873 ("arm64: dts: qcom: msm8998: Add USB-related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-4-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index 99f811a57ac5..7f44807b1b97 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -2144,6 +2144,7 @@ usb3_dwc3: usb@a800000 {
interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&qusb2phy>, <&usb3phy>;
phy-names = "usb2-phy", "usb3-phy";
snps,has-lpm-erratum;
The patch below does not apply to the 6.1-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-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 0046325ae52079b46da13a7f84dd7b2a6f7c38f8
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072508-musty-divisive-4413@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
0046325ae520 ("arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB")
b7efebfeb2e8 ("arm64: dts: qcom: msm8998: switch USB QMP PHY to new style of bindings")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 0046325ae52079b46da13a7f84dd7b2a6f7c38f8 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:43 +0530
Subject: [PATCH] arm64: dts: qcom: msm8998: Disable SS instance in Parkmode
for USB
For Gen-1 targets like MSM8998, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for MSM8998 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 026dad8f5873 ("arm64: dts: qcom: msm8998: Add USB-related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-4-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index 99f811a57ac5..7f44807b1b97 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -2144,6 +2144,7 @@ usb3_dwc3: usb@a800000 {
interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&qusb2phy>, <&usb3phy>;
phy-names = "usb2-phy", "usb3-phy";
snps,has-lpm-erratum;
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 0046325ae52079b46da13a7f84dd7b2a6f7c38f8
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072509-coach-bronzing-2797@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
0046325ae520 ("arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB")
b7efebfeb2e8 ("arm64: dts: qcom: msm8998: switch USB QMP PHY to new style of bindings")
ed9cbbcb8c6a ("arm64: dts: qcom: msm8998: drop USB PHY clock index")
1351512f29b4 ("arm64: dts: qcom: Correct QMP PHY child node name")
82d61e19fccb ("arm64: dts: qcom: msm8996: Move '#clock-cells' to QMP PHY child node")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 0046325ae52079b46da13a7f84dd7b2a6f7c38f8 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:43 +0530
Subject: [PATCH] arm64: dts: qcom: msm8998: Disable SS instance in Parkmode
for USB
For Gen-1 targets like MSM8998, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for MSM8998 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 026dad8f5873 ("arm64: dts: qcom: msm8998: Add USB-related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-4-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index 99f811a57ac5..7f44807b1b97 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -2144,6 +2144,7 @@ usb3_dwc3: usb@a800000 {
interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&qusb2phy>, <&usb3phy>;
phy-names = "usb2-phy", "usb3-phy";
snps,has-lpm-erratum;
The patch below does not apply to the 6.6-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-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 0046325ae52079b46da13a7f84dd7b2a6f7c38f8
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072508-equipment-maturely-32e1@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
0046325ae520 ("arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB")
b7efebfeb2e8 ("arm64: dts: qcom: msm8998: switch USB QMP PHY to new style of bindings")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 0046325ae52079b46da13a7f84dd7b2a6f7c38f8 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:43 +0530
Subject: [PATCH] arm64: dts: qcom: msm8998: Disable SS instance in Parkmode
for USB
For Gen-1 targets like MSM8998, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for MSM8998 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 026dad8f5873 ("arm64: dts: qcom: msm8998: Add USB-related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-4-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index 99f811a57ac5..7f44807b1b97 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -2144,6 +2144,7 @@ usb3_dwc3: usb@a800000 {
interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&qusb2phy>, <&usb3phy>;
phy-names = "usb2-phy", "usb3-phy";
snps,has-lpm-erratum;
The patch below does not apply to the 6.1-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-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x c5d57eb7d06df16c07037cea5dacfd74d49d1833
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072552-smock-demeanor-6259@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
c5d57eb7d06d ("arm64: dts: qcom: sm6350: Disable SS instance in Parkmode for USB")
5ed2b6388b31 ("arm64: dts: qcom: sm6350: Use specific qmpphy compatible")
347b9491c595 ("arm64: dts: qcom: sm6350: fix USB-DP PHY registers")
95fade4016cb ("arm64: dts: qcom: sm6350: drop bogus DP PHY clock")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From c5d57eb7d06df16c07037cea5dacfd74d49d1833 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:46 +0530
Subject: [PATCH] arm64: dts: qcom: sm6350: Disable SS instance in Parkmode for
USB
For Gen-1 targets like SM6350, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for SM6350 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 23737b9557fe ("arm64: dts: qcom: sm6350: Add USB1 nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-7-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index 46e122c4421c..84009b74aee7 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -1921,6 +1921,7 @@ usb_1_dwc3: usb@a600000 {
snps,dis_enblslpm_quirk;
snps,has-lpm-erratum;
snps,hird-threshold = /bits/ 8 <0x10>;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
usb-role-switch;
The patch below does not apply to the 5.4-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.4.y
git checkout FETCH_HEAD
git cherry-pick -x 44ea1ae3cf95db97e10d6ce17527948121f1dd4b
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072533-splurge-kung-54fa@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^..
Possible dependencies:
44ea1ae3cf95 ("arm64: dts: qcom: msm8996: Disable SS instance in Parkmode for USB")
d0af0537e28f ("arm64: dts: qcom: msm8996: Add missing DWC3 quirks")
50aa72ccb30b ("arm64: dts: qcom: msm8996: Sort all nodes in msm8996.dtsi")
86f6d6225e5e ("arm64: dts: qcom: msm8996: Pad addresses")
808844314309 ("arm64: dts: qcom: msm8996: Move regulator consumers to db820c")
75b77d6492eb ("arm64: dts: qcom: msm8996: Use node references in db820c")
f978d45b4aab ("arm64: dts: qcom: db820c: Move non-soc entries out of /soc")
d026c96b25b7 ("arm64: dts: qcom: msm8996: Disable USB2 PHY suspend by core")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 44ea1ae3cf95db97e10d6ce17527948121f1dd4b Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:47 +0530
Subject: [PATCH] arm64: dts: qcom: msm8996: Disable SS instance in Parkmode
for USB
For Gen-1 targets like MSM8996, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for MSM8996 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 1e39255ed29d ("arm64: dts: msm8996: Add device node for qcom,dwc3")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-8-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 2b20cedfe26c..0fd2b1b944a5 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -3101,6 +3101,7 @@ usb3_dwc3: usb@6a00000 {
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
snps,is-utmi-l1-suspend;
+ snps,parkmode-disable-ss-quirk;
tx-fifo-resize;
};
};
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 3d930f1750ce30a6c36dbc71f8ff7e20322b94d7
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072515-shifting-impulse-0512@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
3d930f1750ce ("arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode")
36888ed83f99 ("arm64: dts: qcom: sc7280: switch USB+DP QMP PHY to new style of bindings")
70c4a1ca13b3 ("arm64: dts: qcom: sc7280: link usb3_phy_wrapper_gcc_usb30_pipe_clk")
531c738fb360 ("arm64: dts: qcom: sc7280: drop PCIe PHY clock index")
fc6b1225d20d ("arm64: dts: qcom: sc7280: Add Display Port node")
25940788d170 ("arm64: dts: qcom: sc7280: add edp display dt nodes")
43137272f0bc ("arm64: dts: qcom: sc7280: Add DSI display nodes")
fcb68dfda5cb ("arm64: dts: qcom: sc7280: add display dt nodes")
bd7d507935ca ("arm64: dts: qcom: sc7280: Add pcie clock support")
92e0ee9f83b3 ("arm64: dts: qcom: sc7280: Add PCIe and PHY related nodes")
6b3207dfebdf ("arm64: dts: qcom: sc7280: Use QMP property to control load state")
7720ea001b52 ("arm64: dts: qcom: sc7280: Add QSPI node")
425f30cc843c ("arm64: dts: qcom: sc7280: fix display port phy reg property")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 3d930f1750ce30a6c36dbc71f8ff7e20322b94d7 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Tue, 4 Jun 2024 11:36:59 +0530
Subject: [PATCH] arm64: dts: qcom: sc7280: Disable SuperSpeed instances in
park mode
On SC7280, in host mode, it is observed that stressing out controller
results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instances in park mode for SC7280 to mitigate this issue.
Reported-by: Doug Anderson <dianders(a)google.com>
Cc: stable(a)vger.kernel.org
Fixes: bb9efa59c665 ("arm64: dts: qcom: sc7280: Add USB related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240604060659.1449278-3-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index c3aaa09b8187..ba43fba2c551 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -4232,6 +4232,7 @@ usb_1_dwc3: usb@a600000 {
iommus = <&apps_smmu 0xe0 0x0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
maximum-speed = "super-speed";
The patch below does not apply to the 6.1-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-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 3d930f1750ce30a6c36dbc71f8ff7e20322b94d7
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072514-hunter-transpose-6f5e@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
3d930f1750ce ("arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode")
36888ed83f99 ("arm64: dts: qcom: sc7280: switch USB+DP QMP PHY to new style of bindings")
70c4a1ca13b3 ("arm64: dts: qcom: sc7280: link usb3_phy_wrapper_gcc_usb30_pipe_clk")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 3d930f1750ce30a6c36dbc71f8ff7e20322b94d7 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Tue, 4 Jun 2024 11:36:59 +0530
Subject: [PATCH] arm64: dts: qcom: sc7280: Disable SuperSpeed instances in
park mode
On SC7280, in host mode, it is observed that stressing out controller
results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instances in park mode for SC7280 to mitigate this issue.
Reported-by: Doug Anderson <dianders(a)google.com>
Cc: stable(a)vger.kernel.org
Fixes: bb9efa59c665 ("arm64: dts: qcom: sc7280: Add USB related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240604060659.1449278-3-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index c3aaa09b8187..ba43fba2c551 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -4232,6 +4232,7 @@ usb_1_dwc3: usb@a600000 {
iommus = <&apps_smmu 0xe0 0x0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
maximum-speed = "super-speed";
The patch below does not apply to the 6.6-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-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 3d930f1750ce30a6c36dbc71f8ff7e20322b94d7
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072513-magnify-deputize-f818@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
3d930f1750ce ("arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode")
36888ed83f99 ("arm64: dts: qcom: sc7280: switch USB+DP QMP PHY to new style of bindings")
70c4a1ca13b3 ("arm64: dts: qcom: sc7280: link usb3_phy_wrapper_gcc_usb30_pipe_clk")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 3d930f1750ce30a6c36dbc71f8ff7e20322b94d7 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Tue, 4 Jun 2024 11:36:59 +0530
Subject: [PATCH] arm64: dts: qcom: sc7280: Disable SuperSpeed instances in
park mode
On SC7280, in host mode, it is observed that stressing out controller
results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instances in park mode for SC7280 to mitigate this issue.
Reported-by: Doug Anderson <dianders(a)google.com>
Cc: stable(a)vger.kernel.org
Fixes: bb9efa59c665 ("arm64: dts: qcom: sc7280: Add USB related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240604060659.1449278-3-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index c3aaa09b8187..ba43fba2c551 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -4232,6 +4232,7 @@ usb_1_dwc3: usb@a600000 {
iommus = <&apps_smmu 0xe0 0x0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
maximum-speed = "super-speed";
The patch below does not apply to the 5.10-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.10.y
git checkout FETCH_HEAD
git cherry-pick -x 5b8baed4b88132c12010ce6ca1b56f00d122e376
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072546-saddled-unselect-6d9b@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
5b8baed4b881 ("arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode")
ebb840b00b7f ("arm64: dts: qcom: sc7180: switch USB+DP QMP PHY to new style of bindings")
2b616f86d51b ("arm64: dts: qcom: sc7180: rename labels for DSI nodes")
4a9f8f8f2ada ("arm64: dts: qcom: Add Acer Aspire 1")
39238382c499 ("arm64: dts: qcom: sc7180: Drop redundant disable in mdp")
43926a3cb191 ("arm64: dts: qcom: sc7180: Don't enable lpass clocks by default")
c28d9029f3b6 ("arm64: dts: qcom: sc7180-trogdor-wormdingler: use just "port" in panel")
88904a12fbcb ("arm64: dts: qcom: sc7180-trogdor-quackingstick: use just "port" in panel")
746bda7d9dd9 ("arm64: dts: qcom: sc7180-idp: use just "port" in panel")
603f96d4c9d0 ("arm64: dts: qcom: add initial support for qcom sa8775p-ride")
a45d0641d110 ("arm64: dts: qcom: sc7180: Add compat qcom,sc7180-dsi-ctrl")
f5b4811e8758 ("arm64: dts: qcom: sc7180: Add trogdor eDP/touchscreen regulator off-on-time")
6be310347c9c ("arm64: dts: qcom: add SA8540P ride(Qdrive-3)")
2372bd2d5be6 ("arm64: dts: qcom: sc7180: change DSI PHY node name to generic one")
95dc5fd99972 ("arm64: dts: qcom: sc7180: Drop redundant phy-names from DSI controller")
a10b760b7402 ("arm64: dts: qcom: sc7180-trogdor: Split out keyboard node and describe detachables")
6afcee78b4a4 ("arm64: dts: qcom: sc7180: Add kingoftown dts files")
fb69f6adaf88 ("arm64: dts: qcom: sc7180: Add pazquel dts files")
9520fef90049 ("arm64: dts: qcom: sc7180: Add mrbland dts files")
c77a3d4a2bfa ("arm64: dts: qcom: sc7180: Add quackingstick dts files")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 5b8baed4b88132c12010ce6ca1b56f00d122e376 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Tue, 4 Jun 2024 11:36:58 +0530
Subject: [PATCH] arm64: dts: qcom: sc7180: Disable SuperSpeed instances in
park mode
On SC7180, in host mode, it is observed that stressing out controller
results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instances in park mode for SC7180 to mitigate this issue.
Reported-by: Doug Anderson <dianders(a)google.com>
Cc: stable(a)vger.kernel.org
Fixes: 0b766e7fe5a2 ("arm64: dts: qcom: sc7180: Add USB related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240604060659.1449278-2-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 52d074a4fbf3..9ab0c98cac05 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -3066,6 +3066,7 @@ usb_1_dwc3: usb@a600000 {
iommus = <&apps_smmu 0x540 0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
maximum-speed = "super-speed";
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 5b8baed4b88132c12010ce6ca1b56f00d122e376
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072545-supermom-stinky-b4f9@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
5b8baed4b881 ("arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode")
ebb840b00b7f ("arm64: dts: qcom: sc7180: switch USB+DP QMP PHY to new style of bindings")
2b616f86d51b ("arm64: dts: qcom: sc7180: rename labels for DSI nodes")
4a9f8f8f2ada ("arm64: dts: qcom: Add Acer Aspire 1")
39238382c499 ("arm64: dts: qcom: sc7180: Drop redundant disable in mdp")
43926a3cb191 ("arm64: dts: qcom: sc7180: Don't enable lpass clocks by default")
c28d9029f3b6 ("arm64: dts: qcom: sc7180-trogdor-wormdingler: use just "port" in panel")
88904a12fbcb ("arm64: dts: qcom: sc7180-trogdor-quackingstick: use just "port" in panel")
746bda7d9dd9 ("arm64: dts: qcom: sc7180-idp: use just "port" in panel")
603f96d4c9d0 ("arm64: dts: qcom: add initial support for qcom sa8775p-ride")
a45d0641d110 ("arm64: dts: qcom: sc7180: Add compat qcom,sc7180-dsi-ctrl")
f5b4811e8758 ("arm64: dts: qcom: sc7180: Add trogdor eDP/touchscreen regulator off-on-time")
6be310347c9c ("arm64: dts: qcom: add SA8540P ride(Qdrive-3)")
2372bd2d5be6 ("arm64: dts: qcom: sc7180: change DSI PHY node name to generic one")
95dc5fd99972 ("arm64: dts: qcom: sc7180: Drop redundant phy-names from DSI controller")
a10b760b7402 ("arm64: dts: qcom: sc7180-trogdor: Split out keyboard node and describe detachables")
6afcee78b4a4 ("arm64: dts: qcom: sc7180: Add kingoftown dts files")
fb69f6adaf88 ("arm64: dts: qcom: sc7180: Add pazquel dts files")
9520fef90049 ("arm64: dts: qcom: sc7180: Add mrbland dts files")
c77a3d4a2bfa ("arm64: dts: qcom: sc7180: Add quackingstick dts files")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 5b8baed4b88132c12010ce6ca1b56f00d122e376 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Tue, 4 Jun 2024 11:36:58 +0530
Subject: [PATCH] arm64: dts: qcom: sc7180: Disable SuperSpeed instances in
park mode
On SC7180, in host mode, it is observed that stressing out controller
results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instances in park mode for SC7180 to mitigate this issue.
Reported-by: Doug Anderson <dianders(a)google.com>
Cc: stable(a)vger.kernel.org
Fixes: 0b766e7fe5a2 ("arm64: dts: qcom: sc7180: Add USB related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240604060659.1449278-2-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 52d074a4fbf3..9ab0c98cac05 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -3066,6 +3066,7 @@ usb_1_dwc3: usb@a600000 {
iommus = <&apps_smmu 0x540 0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
maximum-speed = "super-speed";
The patch below does not apply to the 4.19-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-4.19.y
git checkout FETCH_HEAD
git cherry-pick -x af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072558-waving-discharge-31eb@gregkh' --subject-prefix 'PATCH 4.19.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
The patch below does not apply to the 5.4-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.4.y
git checkout FETCH_HEAD
git cherry-pick -x af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072557-handlebar-underpass-54f1@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
The patch below does not apply to the 5.10-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.10.y
git checkout FETCH_HEAD
git cherry-pick -x af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072556-gumminess-desecrate-6e7c@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
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 af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072555-hubcap-monetary-01bc@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
The patch below does not apply to the 6.1-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-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072554-renovate-snippet-1b35@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
The patch below does not apply to the 6.6-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-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072553-viewing-trapped-d0a4@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
The patch below does not apply to the 6.9-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-6.9.y
git checkout FETCH_HEAD
git cherry-pick -x af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072553-arena-chute-8609@gregkh' --subject-prefix 'PATCH 6.9.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
The patch below does not apply to the 6.10-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-6.10.y
git checkout FETCH_HEAD
git cherry-pick -x af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072552-willed-overturn-c270@gregkh' --subject-prefix 'PATCH 6.10.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
Lina reports random oopsen originating from the fast GUP code when
16K pages are used with 4-level page-tables, the fourth level being
folded at runtime due to lack of LPA2.
In this configuration, the generic implementation of
p4d_offset_lockless() will return a 'p4d_t *' corresponding to the
'pgd_t' allocated on the stack of the caller, gup_fast_pgd_range().
This is normally fine, but when the fourth level of page-table is folded
at runtime, pud_offset_lockless() will offset from the address of the
'p4d_t' to calculate the address of the PUD in the same page-table page.
This results in a stray stack read when the 'p4d_t' has been allocated
on the stack and can send the walker into the weeds.
Fix the problem by providing our own definition of p4d_offset_lockless()
when CONFIG_PGTABLE_LEVELS <= 4 which returns the real page-table
pointer rather than the address of the local stack variable.
Cc: Catalin Marinas <catalin.marinas(a)arm.com>
Cc: Ard Biesheuvel <ardb(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/50360968-13fb-4e6f-8f52-1725b3177215@asahilina.net
Fixes: 0dd4f60a2c76 ("arm64: mm: Add support for folding PUDs at runtime")
Reported-by: Asahi Lina <lina(a)asahilina.net>
Signed-off-by: Will Deacon <will(a)kernel.org>
---
arch/arm64/include/asm/pgtable.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index f8efbc128446..7a4f5604be3f 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -1065,6 +1065,28 @@ static inline bool pgtable_l5_enabled(void) { return false; }
#define p4d_offset_kimg(dir,addr) ((p4d_t *)dir)
+static inline
+p4d_t *p4d_offset_lockless_folded(pgd_t *pgdp, pgd_t pgd, unsigned long addr)
+{
+ /*
+ * With runtime folding of the pud, pud_offset_lockless() passes
+ * the 'pgd_t *' we return here to p4d_to_folded_pud(), which
+ * will offset the pointer assuming that it points into
+ * a page-table page. However, the fast GUP path passes us a
+ * pgd_t allocated on the stack and so we must use the original
+ * pointer in 'pgdp' to construct the p4d pointer instead of
+ * using the generic p4d_offset_lockless() implementation.
+ *
+ * Note: reusing the original pointer means that we may
+ * dereference the same (live) page-table entry multiple times.
+ * This is safe because it is still only loaded once in the
+ * context of each level and the CPU guarantees same-address
+ * read-after-read ordering.
+ */
+ return p4d_offset(pgdp, addr);
+}
+#define p4d_offset_lockless p4d_offset_lockless_folded
+
#endif /* CONFIG_PGTABLE_LEVELS > 4 */
#define pgd_ERROR(e) \
--
2.45.2.1089.g2a221341d9-goog
Panfrost DRM driver uses devfreq to perform DVFS, while using simple_ondemand
devfreq governor by default. This causes driver initialization to fail on
boot when simple_ondemand governor isn't built into the kernel statically,
as a result of the missing module dependency and, consequently, the required
governor module not being included in the initial ramdisk. Thus, let's mark
simple_ondemand governor as a softdep for Panfrost, to have its kernel module
included in the initial ramdisk.
This is a rather longstanding issue that has forced distributions to build
devfreq governors statically into their kernels, [1][2] or has forced users
to introduce some unnecessary workarounds. [3]
For future reference, not having support for the simple_ondemand governor in
the initial ramdisk produces errors in the kernel log similar to these below,
which were taken from a Pine64 RockPro64:
panfrost ff9a0000.gpu: [drm:panfrost_devfreq_init [panfrost]] *ERROR* Couldn't initialize GPU devfreq
panfrost ff9a0000.gpu: Fatal error during GPU init
panfrost: probe of ff9a0000.gpu failed with error -22
Having simple_ondemand marked as a softdep for Panfrost may not resolve this
issue for all Linux distributions. In particular, it will remain unresolved
for the distributions whose utilities for the initial ramdisk generation do
not handle the available softdep information [4] properly yet. However, some
Linux distributions already handle softdeps properly while generating their
initial ramdisks, [5] and this is a prerequisite step in the right direction
for the distributions that don't handle them properly yet.
[1] https://gitlab.manjaro.org/manjaro-arm/packages/core/linux/-/blob/linux61/c…
[2] https://salsa.debian.org/kernel-team/linux/-/merge_requests/1066
[3] https://forum.pine64.org/showthread.php?tid=15458
[4] https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=49d8e0…
[5] https://github.com/archlinux/mkinitcpio/commit/97ac4d37aae084a050be512f6d8f…
Cc: Diederik de Haas <didi.debian(a)cknow.org>
Cc: Furkan Kardame <f.kardame(a)manjaro.org>
Cc: stable(a)vger.kernel.org
Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
Signed-off-by: Dragan Simic <dsimic(a)manjaro.org>
---
drivers/gpu/drm/panfrost/panfrost_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index ef9f6c0716d5..149737d7a07e 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -828,3 +828,4 @@ module_platform_driver(panfrost_driver);
MODULE_AUTHOR("Panfrost Project Developers");
MODULE_DESCRIPTION("Panfrost DRM Driver");
MODULE_LICENSE("GPL v2");
+MODULE_SOFTDEP("pre: governor_simpleondemand");
The patch titled
Subject: nilfs2: handle inconsistent state in nilfs_btnode_create_block()
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
nilfs2-handle-inconsistent-state-in-nilfs_btnode_create_block.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-hotfixes-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
Subject: nilfs2: handle inconsistent state in nilfs_btnode_create_block()
Date: Thu, 25 Jul 2024 14:20:07 +0900
Syzbot reported that a buffer state inconsistency was detected in
nilfs_btnode_create_block(), triggering a kernel bug.
It is not appropriate to treat this inconsistency as a bug; it can occur
if the argument block address (the buffer index of the newly created
block) is a virtual block number and has been reallocated due to
corruption of the bitmap used to manage its allocation state.
So, modify nilfs_btnode_create_block() and its callers to treat it as a
possible filesystem error, rather than triggering a kernel bug.
Link: https://lkml.kernel.org/r/20240725052007.4562-1-konishi.ryusuke@gmail.com
Fixes: a60be987d45d ("nilfs2: B-tree node cache")
Signed-off-by: Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
Reported-by: syzbot+89cc4f2324ed37988b60(a)syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=89cc4f2324ed37988b60
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/nilfs2/btnode.c | 25 ++++++++++++++++++++-----
fs/nilfs2/btree.c | 4 ++--
2 files changed, 22 insertions(+), 7 deletions(-)
--- a/fs/nilfs2/btnode.c~nilfs2-handle-inconsistent-state-in-nilfs_btnode_create_block
+++ a/fs/nilfs2/btnode.c
@@ -51,12 +51,21 @@ nilfs_btnode_create_block(struct address
bh = nilfs_grab_buffer(inode, btnc, blocknr, BIT(BH_NILFS_Node));
if (unlikely(!bh))
- return NULL;
+ return ERR_PTR(-ENOMEM);
if (unlikely(buffer_mapped(bh) || buffer_uptodate(bh) ||
buffer_dirty(bh))) {
- brelse(bh);
- BUG();
+ /*
+ * The block buffer at the specified new address was already
+ * in use. This can happen if it is a virtual block number
+ * and has been reallocated due to corruption of the bitmap
+ * used to manage its allocation state (if not, the buffer
+ * clearing of an abandoned b-tree node is missing somewhere).
+ */
+ nilfs_error(inode->i_sb,
+ "state inconsistency probably due to duplicate use of b-tree node block address %llu (ino=%lu)",
+ (unsigned long long)blocknr, inode->i_ino);
+ goto failed;
}
memset(bh->b_data, 0, i_blocksize(inode));
bh->b_bdev = inode->i_sb->s_bdev;
@@ -67,6 +76,12 @@ nilfs_btnode_create_block(struct address
folio_unlock(bh->b_folio);
folio_put(bh->b_folio);
return bh;
+
+failed:
+ folio_unlock(bh->b_folio);
+ folio_put(bh->b_folio);
+ brelse(bh);
+ return ERR_PTR(-EIO);
}
int nilfs_btnode_submit_block(struct address_space *btnc, __u64 blocknr,
@@ -217,8 +232,8 @@ retry:
}
nbh = nilfs_btnode_create_block(btnc, newkey);
- if (!nbh)
- return -ENOMEM;
+ if (IS_ERR(nbh))
+ return PTR_ERR(nbh);
BUG_ON(nbh == obh);
ctxt->newbh = nbh;
--- a/fs/nilfs2/btree.c~nilfs2-handle-inconsistent-state-in-nilfs_btnode_create_block
+++ a/fs/nilfs2/btree.c
@@ -63,8 +63,8 @@ static int nilfs_btree_get_new_block(con
struct buffer_head *bh;
bh = nilfs_btnode_create_block(btnc, ptr);
- if (!bh)
- return -ENOMEM;
+ if (IS_ERR(bh))
+ return PTR_ERR(bh);
set_buffer_nilfs_volatile(bh);
*bhp = bh;
_
Patches currently in -mm which might be from konishi.ryusuke(a)gmail.com are
nilfs2-handle-inconsistent-state-in-nilfs_btnode_create_block.patch
In drm_client_modeset_probe(), the return value of drm_mode_duplicate() is
assigned to modeset->mode, which will lead to a possible NULL pointer
dereference on failure of drm_mode_duplicate(). Add a check to avoid npd.
Cc: stable(a)vger.kernel.org
Fixes: cf13909aee05 ("drm/fb-helper: Move out modeset config code")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v4:
- modified patch, set ret and break to handle error rightly.
Changes in v3:
- modified patch as suggestions, returned error directly when failing to
get modeset->mode.
Changes in v2:
- added the recipient's email address, due to the prolonged absence of a
response from the recipients.
- added Cc stable.
---
drivers/gpu/drm/drm_client_modeset.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
index 31af5cf37a09..cee5eafbfb81 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -880,6 +880,11 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
kfree(modeset->mode);
modeset->mode = drm_mode_duplicate(dev, mode);
+ if (!modeset->mode) {
+ ret = -ENOMEM;
+ break;
+ }
+
drm_connector_get(connector);
modeset->connectors[modeset->num_connectors++] = connector;
modeset->x = offset->x;
--
2.25.1
In drm_client_modeset_probe(), the return value of drm_mode_duplicate() is
assigned to modeset->mode, which will lead to a possible NULL pointer
dereference on failure of drm_mode_duplicate(). Add a check to avoid npd.
Cc: stable(a)vger.kernel.org
Fixes: cf13909aee05 ("drm/fb-helper: Move out modeset config code")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v3:
- modified patch as suggestions, returned error directly when failing to
get modeset->mode.
Changes in v2:
- added the recipient's email address, due to the prolonged absence of a
response from the recipients.
- added Cc stable.
---
drivers/gpu/drm/drm_client_modeset.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
index 31af5cf37a09..750b8dce0f90 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -880,6 +880,9 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
kfree(modeset->mode);
modeset->mode = drm_mode_duplicate(dev, mode);
+ if (!modeset->mode)
+ return 0;
+
drm_connector_get(connector);
modeset->connectors[modeset->num_connectors++] = connector;
modeset->x = offset->x;
--
2.25.1
On Wed 2024-07-24 18:48:20, DAVIETTE wrote:
> Afternoon:
>
> Has any test on incorporation of muti platform data been seen using the PATCH file ?
>
> Will the install cause support default models to reset.
>
> Any other information is welcomed and appreciated, Thanks.
>
> D.Lauricella
Has spam gotten smart with use of AI, or is this real?
Can you fix your mailer to to generate in-reply-to headers and try
again stating your question?
BR,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Commit 3b52093dc917 ("rtc: ds1343: Do not hardcode SPI mode flags")
bit-flips (^=) the existing SPI_CS_HIGH setting in the SPI mode during
device probe. This will set it to the wrong value if the spi-cs-high
property has been set in the devicetree node. Just force it to be set
active high and get rid of some commentary that attempted to explain why
flipping the bit was the correct choice.
Fixes: 3b52093dc917 ("rtc: ds1343: Do not hardcode SPI mode flags")
Cc: <stable(a)vger.kernel.org> # 5.6+
Cc: Linus Walleij <linus.walleij(a)linaro.org>
Cc: Mark Brown <broonie(a)kernel.org>
Signed-off-by: Ian Abbott <abbotti(a)mev.co.uk>
---
drivers/rtc/rtc-ds1343.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/rtc/rtc-ds1343.c b/drivers/rtc/rtc-ds1343.c
index ed5a6ba89a3e..484b5756b55c 100644
--- a/drivers/rtc/rtc-ds1343.c
+++ b/drivers/rtc/rtc-ds1343.c
@@ -361,13 +361,10 @@ static int ds1343_probe(struct spi_device *spi)
if (!priv)
return -ENOMEM;
- /* RTC DS1347 works in spi mode 3 and
- * its chip select is active high. Active high should be defined as
- * "inverse polarity" as GPIO-based chip selects can be logically
- * active high but inverted by the GPIO library.
+ /*
+ * RTC DS1347 works in spi mode 3 and its chip select is active high.
*/
- spi->mode |= SPI_MODE_3;
- spi->mode ^= SPI_CS_HIGH;
+ spi->mode |= SPI_MODE_3 | SPI_CS_HIGH;
spi->bits_per_word = 8;
res = spi_setup(spi);
if (res)
--
2.43.0
This is the start of the stable review cycle for the 6.10.1 release.
There are 11 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Thu, 25 Jul 2024 12:28:30 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.10.1-rc2…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.10.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.10.1-rc2
Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
thermal: core: Allow thermal zones to tell the core to ignore them
Pavel Begunkov <asml.silence(a)gmail.com>
io_uring: fix error pbuf checking
Richard Fitzgerald <rf(a)opensource.cirrus.com>
ASoC: cs35l56: Limit Speaker Volume to +12dB maximum
Richard Fitzgerald <rf(a)opensource.cirrus.com>
ASoC: cs35l56: Use header defines for Speaker Volume control definition
Hao Ge <gehao(a)kylinos.cn>
tpm: Use auth only after NULL check in tpm_buf_check_hmac_response()
David Howells <dhowells(a)redhat.com>
cifs: Fix setting of zero_point after DIO write
David Howells <dhowells(a)redhat.com>
cifs: Fix server re-repick on subrequest retry
Steve French <stfrench(a)microsoft.com>
cifs: fix noisy message on copy_file_range
David Howells <dhowells(a)redhat.com>
cifs: Fix missing fscache invalidation
David Howells <dhowells(a)redhat.com>
cifs: Fix missing error code set
Kees Cook <kees(a)kernel.org>
ext4: use memtostr_pad() for s_volume_name
-------------
Diffstat:
Makefile | 4 +--
drivers/char/tpm/tpm2-sessions.c | 5 +--
drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 7 +++-
drivers/thermal/thermal_core.c | 51 ++++++++++++++---------------
drivers/thermal/thermal_core.h | 3 ++
drivers/thermal/thermal_helpers.c | 2 ++
fs/ext4/ext4.h | 2 +-
fs/ext4/ioctl.c | 2 +-
fs/smb/client/cifsfs.c | 2 +-
fs/smb/client/file.c | 21 +++++++++---
fs/smb/client/smb2pdu.c | 3 --
include/sound/cs35l56.h | 2 +-
io_uring/kbuf.c | 4 ++-
sound/soc/codecs/cs35l56.c | 6 +++-
14 files changed, 69 insertions(+), 45 deletions(-)
I'm announcing the release of the 6.10.1 kernel.
All users of the 6.10 kernel series must upgrade.
The updated 6.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 -
drivers/char/tpm/tpm2-sessions.c | 5 +-
drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 7 +++
drivers/thermal/thermal_core.c | 51 +++++++++++++---------------
drivers/thermal/thermal_core.h | 3 +
drivers/thermal/thermal_helpers.c | 2 +
fs/ext4/ext4.h | 2 -
fs/ext4/ioctl.c | 2 -
fs/smb/client/cifsfs.c | 2 -
fs/smb/client/file.c | 21 +++++++++--
fs/smb/client/smb2pdu.c | 3 -
include/sound/cs35l56.h | 2 -
io_uring/kbuf.c | 4 +-
sound/soc/codecs/cs35l56.c | 6 ++-
14 files changed, 68 insertions(+), 44 deletions(-)
David Howells (4):
cifs: Fix missing error code set
cifs: Fix missing fscache invalidation
cifs: Fix server re-repick on subrequest retry
cifs: Fix setting of zero_point after DIO write
Greg Kroah-Hartman (1):
Linux 6.10.1
Hao Ge (1):
tpm: Use auth only after NULL check in tpm_buf_check_hmac_response()
Kees Cook (1):
ext4: use memtostr_pad() for s_volume_name
Pavel Begunkov (1):
io_uring: fix error pbuf checking
Rafael J. Wysocki (1):
thermal: core: Allow thermal zones to tell the core to ignore them
Richard Fitzgerald (2):
ASoC: cs35l56: Use header defines for Speaker Volume control definition
ASoC: cs35l56: Limit Speaker Volume to +12dB maximum
Steve French (1):
cifs: fix noisy message on copy_file_range
I'm announcing the release of the 6.10.1 kernel.
All users of the 6.10 kernel series must upgrade.
The updated 6.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 -
drivers/char/tpm/tpm2-sessions.c | 5 +-
drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 7 +++
drivers/thermal/thermal_core.c | 51 +++++++++++++---------------
drivers/thermal/thermal_core.h | 3 +
drivers/thermal/thermal_helpers.c | 2 +
fs/ext4/ext4.h | 2 -
fs/ext4/ioctl.c | 2 -
fs/smb/client/cifsfs.c | 2 -
fs/smb/client/file.c | 21 +++++++++--
fs/smb/client/smb2pdu.c | 3 -
include/sound/cs35l56.h | 2 -
io_uring/kbuf.c | 4 +-
sound/soc/codecs/cs35l56.c | 6 ++-
14 files changed, 68 insertions(+), 44 deletions(-)
David Howells (4):
cifs: Fix missing error code set
cifs: Fix missing fscache invalidation
cifs: Fix server re-repick on subrequest retry
cifs: Fix setting of zero_point after DIO write
Greg Kroah-Hartman (1):
Linux 6.10.1
Hao Ge (1):
tpm: Use auth only after NULL check in tpm_buf_check_hmac_response()
Kees Cook (1):
ext4: use memtostr_pad() for s_volume_name
Pavel Begunkov (1):
io_uring: fix error pbuf checking
Rafael J. Wysocki (1):
thermal: core: Allow thermal zones to tell the core to ignore them
Richard Fitzgerald (2):
ASoC: cs35l56: Use header defines for Speaker Volume control definition
ASoC: cs35l56: Limit Speaker Volume to +12dB maximum
Steve French (1):
cifs: fix noisy message on copy_file_range
Hi,
A recent patch available in 6.10 [1] uncovered two issues on how the DMA Link ID
is tracked with ChainDMA and can cause under specific conditions [2] to cause a DSP
panic.
The issue is not academic as we have one user report of it:
https://github.com/thesofproject/linux/issues/5116
The patches have been marked for stable backport to made there way to 6.10.
The first patch is fixing a code move patch, for older than 6.9 we would need
different patch to fix the original code, but since the issue is only valid for
6.10, I will do that at a later time.
Mark, can you please schedule these as fixes for 6.11 to get them fast to 6.10?
Thank you.
[1] ebd3b3014eeb ("ASoC: SOF: pcm: reset all PCM sources in case of xruns")
[2] https://github.com/thesofproject/linux/pull/5119#issuecomment-2244770449
Regards,
Peter
---
Peter Ujfalusi (2):
ASoC: SOF: ipc4-topology: Only handle dai_config with HW_PARAMS for
ChainDMA
ASoC: SOF: ipc4-topology: Preserve the DMA Link ID for ChainDMA on
unprepare
sound/soc/sof/ipc4-topology.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
--
2.45.2
(Mail V2: Send to correct mailing list and CCing relevant people.)
On Tue, 25 Jun 2024 16:29:04 +0200, Greg Kroah-Hartman wrote:
> In the Linux kernel, the following vulnerability has been resolved:
>
> drm/amdgpu: add error handle to avoid out-of-bounds
>
> if the sdma_v4_0_irq_id_to_seq return -EINVAL, the process should
> be stop to avoid out-of-bounds read, so directly return -EINVAL.
>
> The Linux kernel CVE team has assigned CVE-2024-39471 to this issue.
This commit has a bug which was fixed by 6769a23697f1. It should be
immediately backported, otherwise this "fix" doesn't do anything since
gcc will optimise out the check.
Thanks,
Siddh
In drm_client_modeset_probe(), the return value of drm_mode_duplicate() is
assigned to modeset->mode, which will lead to a possible NULL pointer
dereference on failure of drm_mode_duplicate(). Add a check to avoid npd.
Cc: stable(a)vger.kernel.org
Fixes: cf13909aee05 ("drm/fb-helper: Move out modeset config code")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v2:
- added the recipient's email address, due to the prolonged absence of a
response from the recipients.
- added Cc stable.
---
drivers/gpu/drm/drm_client_modeset.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
index 31af5cf37a09..cca37b225385 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -880,6 +880,9 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
kfree(modeset->mode);
modeset->mode = drm_mode_duplicate(dev, mode);
+ if (!modeset->mode)
+ continue;
+
drm_connector_get(connector);
modeset->connectors[modeset->num_connectors++] = connector;
modeset->x = offset->x;
--
2.25.1
Zero and negative number is not a valid IRQ for in-kernel code and the
irq_of_parse_and_map() function returns zero on error. So this check for
valid IRQs should only accept values > 0.
Cc: stable(a)vger.kernel.org
Fixes: 44dab88e7cc9 ("spi: add spi_ppc4xx driver")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v2:
- added Cc stable line;
- added Fixes line.
---
drivers/spi/spi-ppc4xx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/spi/spi-ppc4xx.c b/drivers/spi/spi-ppc4xx.c
index 942c3117ab3a..01fdecbf132d 100644
--- a/drivers/spi/spi-ppc4xx.c
+++ b/drivers/spi/spi-ppc4xx.c
@@ -413,6 +413,9 @@ static int spi_ppc4xx_of_probe(struct platform_device *op)
/* Request IRQ */
hw->irqnum = irq_of_parse_and_map(np, 0);
+ if (hw->irqnum <= 0)
+ goto free_host;
+
ret = request_irq(hw->irqnum, spi_ppc4xx_int,
0, "spi_ppc4xx_of", (void *)hw);
if (ret) {
--
2.25.1
This is the start of the stable review cycle for the 5.10.220 release.
There are 770 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Thu, 20 Jun 2024 12:32:00 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.220-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.10.220-rc1
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Fix a regression in nfsd_setattr()
NeilBrown <neilb(a)suse.de>
nfsd: don't call locks_release_private() twice concurrently
NeilBrown <neilb(a)suse.de>
nfsd: don't take fi_lock in nfsd_break_deleg_cb()
NeilBrown <neilb(a)suse.de>
nfsd: fix RELEASE_LOCKOWNER
Jeff Layton <jlayton(a)kernel.org>
nfsd: drop the nfsd_put helper
NeilBrown <neilb(a)suse.de>
nfsd: call nfsd_last_thread() before final nfsd_put()
NeilBrown <neilb(a)suse.de>
NFSD: fix possible oops when nfsd/pool_stats is closed.
Chuck Lever <chuck.lever(a)oracle.com>
Documentation: Add missing documentation for EXPORT_OP flags
NeilBrown <neilb(a)suse.de>
nfsd: separate nfsd_last_thread() from nfsd_put()
NeilBrown <neilb(a)suse.de>
nfsd: Simplify code around svc_exit_thread() call in nfsd()
Chuck Lever <chuck.lever(a)oracle.com>
nfsd: don't allow nfsd threads to be signalled.
Tavian Barnes <tavianator(a)tavianator.com>
nfsd: Fix creation time serialization order
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an nfsd4_encode_nfstime4() helper
NeilBrown <neilb(a)suse.de>
lockd: drop inappropriate svc_get() from locked_get()
Dan Carpenter <dan.carpenter(a)linaro.org>
nfsd: fix double fget() bug in __write_ports_addfd()
Jeff Layton <jlayton(a)kernel.org>
nfsd: make a copy of struct iattr before calling notify_change
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: Fix problem of COMMIT and NFS4ERR_DELAY in infinite loop
Jeff Layton <jlayton(a)kernel.org>
nfsd: simplify the delayed disposal list code
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Convert filecache to rhltable
Jeff Layton <jlayton(a)kernel.org>
nfsd: allow reaping files still under writeback
Jeff Layton <jlayton(a)kernel.org>
nfsd: update comment over __nfsd_file_cache_purge
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't take/put an extra reference when putting a file
Jeff Layton <jlayton(a)kernel.org>
nfsd: add some comments to nfsd_file_do_acquire
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't kill nfsd_files because of lease break error
Jeff Layton <jlayton(a)kernel.org>
nfsd: simplify test_bit return in NFSD_FILE_KEY_FULL comparator
Jeff Layton <jlayton(a)kernel.org>
nfsd: NFSD_FILE_KEY_INODE only needs to find GC'ed entries
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't open-code clear_and_wake_up_bit
Jeff Layton <jlayton(a)kernel.org>
nfsd: call op_release, even when op_func returns an error
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Avoid calling OPDESC() with ops->opnum == OP_ILLEGAL
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't replace page in rq_pages if it's a continuation of last page
Jeff Layton <jlayton(a)kernel.org>
lockd: set file_lock start and end when decoding nlm4 testargs
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Protect against filesystem freezing
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: copy the whole verifier in nfsd_copy_write_verifier
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't fsync nfsd_files on last close
Jeff Layton <jlayton(a)kernel.org>
nfsd: fix courtesy client with deny mode handling in nfs4_upgrade_open
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: fix problems with cleanup on errors in nfsd4_copy
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't hand out delegation on setuid files being opened for write
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: fix leaked reference count of nfsd4_ssc_umount_item
Jeff Layton <jlayton(a)kernel.org>
nfsd: clean up potential nfsd_file refcount leaks in COPY codepath
Jeff Layton <jlayton(a)kernel.org>
nfsd: allow nfsd_file_get to sanely handle a NULL pointer
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: enhance inter-server copy cleanup
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't destroy global nfs4_file table in per-net shutdown
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't free files unconditionally in __nfsd_file_cache_purge
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: replace delayed_work with work_struct for nfsd_client_shrinker
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: register/unregister of nfsd-client shrinker at nfsd startup/shutdown time
Xingyuan Mo <hdthky0(a)gmail.com>
NFSD: fix use-after-free in nfsd4_ssc_setup_dul()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Use set_bit(RQ_DROPME)
Chuck Lever <chuck.lever(a)oracle.com>
Revert "SUNRPC: Use RMW bitops in single-threaded hot paths"
Jeff Layton <jlayton(a)kernel.org>
nfsd: fix handling of cached open files in nfsd4_open codepath
Jeff Layton <jlayton(a)kernel.org>
nfsd: rework refcounting in filecache
Kees Cook <keescook(a)chromium.org>
NFSD: Avoid clashing function prototypes
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Use only RQ_DROPME to signal the need to drop a reply
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: add delegation reaper to react to low memory condition
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: add support for sending CB_RECALL_ANY
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: refactoring courtesy_client_reaper to a generic low memory shrinker
Brian Foster <bfoster(a)redhat.com>
NFSD: pass range end to vfs_fsync_range() instead of count
Jeff Layton <jlayton(a)kernel.org>
lockd: fix file selection in nlmsvc_cancel_blocked
Jeff Layton <jlayton(a)kernel.org>
lockd: ensure we use the correct file descriptor when unlocking
Jeff Layton <jlayton(a)kernel.org>
lockd: set missing fl_flags field when retrieving args
Xiu Jianfeng <xiujianfeng(a)huawei.com>
NFSD: Use struct_size() helper in alloc_session()
Jeff Layton <jlayton(a)kernel.org>
nfsd: return error if nfs4_setacl fails
Trond Myklebust <trond.myklebust(a)hammerspace.com>
lockd: set other missing fields when unlocking files
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an nfsd_file_fsync tracepoint
Jeff Layton <jlayton(a)kernel.org>
nfsd: fix up the filecache laundrette scheduling
Jeff Layton <jlayton(a)kernel.org>
nfsd: reorganize filecache.c
Jeff Layton <jlayton(a)kernel.org>
nfsd: remove the pages_flushed statistic from filecache
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix licensing header in filecache.c
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Use rhashtable for managing nfs4_file objects
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor find_file()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up find_or_add_file()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a nfsd4_file_hash_remove() helper
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfsd4_init_file()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update file_hashtbl() helpers
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Use const pointers as parameters to fh_ helpers
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Trace delegation revocations
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Trace stateids returned via DELEGRETURN
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfs4_preprocess_stateid_op() call sites
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Flesh out a documenting comment for filecache.c
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an NFSD_FILE_GC flag to enable nfsd_file garbage collection
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Revert "NFSD: NFSv4 CLOSE should release an nfsd_file immediately"
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Pass the target nfsd_file to nfsd_commit()
David Disseldorp <ddiss(a)suse.de>
exportfs: use pr_debug for unreachable debug statements
Jeff Layton <jlayton(a)kernel.org>
nfsd: allow disabling NFSv2 at compile time
Jeff Layton <jlayton(a)kernel.org>
nfsd: move nfserrno() to vfs.c
Jeff Layton <jlayton(a)kernel.org>
nfsd: ignore requests to disable unsupported versions
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Finish converting the NFSv3 GETACL result encoder
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Finish converting the NFSv2 GETACL result encoder
Colin Ian King <colin.i.king(a)gmail.com>
NFSD: Remove redundant assignment to variable host_err
Anna Schumaker <Anna.Schumaker(a)Netapp.com>
NFSD: Simplify READ_PLUS
Jeff Layton <jlayton(a)kernel.org>
nfsd: use locks_inode_context helper
Jeff Layton <jlayton(a)kernel.org>
lockd: use locks_inode_context helper
Jeff Layton <jlayton(a)kernel.org>
filelock: add a new locks_inode_context accessor function
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix reads with a non-zero offset that don't end on a page boundary
Jeff Layton <jlayton(a)kernel.org>
nfsd: put the export reference in nfsd4_verify_deleg_dentry
Jeff Layton <jlayton(a)kernel.org>
nfsd: fix use-after-free in nfsd_file_do_acquire tracepoint
Jeff Layton <jlayton(a)kernel.org>
nfsd: fix net-namespace logic in __nfsd_file_cache_purge
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
NFSD: unregister shrinker when nfsd_init_net() fails
Jeff Layton <jlayton(a)kernel.org>
nfsd: rework hashtable handling in nfsd_do_file_acquire
Jeff Layton <jlayton(a)kernel.org>
nfsd: fix nfsd_file_unhash_and_dispose
Gaosheng Cui <cuigaosheng1(a)huawei.com>
fanotify: Remove obsoleted fanotify_event_has_path()
Gaosheng Cui <cuigaosheng1(a)huawei.com>
fsnotify: remove unused declaration
Al Viro <viro(a)zeniv.linux.org.uk>
fs/notify: constify path
Jeff Layton <jlayton(a)kernel.org>
nfsd: extra checks when freeing delegation stateids
Jeff Layton <jlayton(a)kernel.org>
nfsd: make nfsd4_run_cb a bool return function
Jeff Layton <jlayton(a)kernel.org>
nfsd: fix comments about spinlock handling with delegations
Jeff Layton <jlayton(a)kernel.org>
nfsd: only fill out return pointer on success in nfsd4_lookup_stateid
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Cap rsize_bop result based on send buffer size
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Rename the fields in copy_stateid_t
ChenXiaoSong <chenxiaosong2(a)huawei.com>
nfsd: use DEFINE_SHOW_ATTRIBUTE to define nfsd_file_cache_stats_fops
ChenXiaoSong <chenxiaosong2(a)huawei.com>
nfsd: use DEFINE_SHOW_ATTRIBUTE to define nfsd_reply_cache_stats_fops
ChenXiaoSong <chenxiaosong2(a)huawei.com>
nfsd: use DEFINE_SHOW_ATTRIBUTE to define client_info_fops
ChenXiaoSong <chenxiaosong2(a)huawei.com>
nfsd: use DEFINE_SHOW_ATTRIBUTE to define export_features_fops and supported_enctypes_fops
ChenXiaoSong <chenxiaosong2(a)huawei.com>
nfsd: use DEFINE_PROC_SHOW_ATTRIBUTE to define nfsd_proc_ops
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Pack struct nfsd4_compoundres
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove unused nfsd4_compoundargs::cachetype field
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove "inline" directives on op_rsize_bop helpers
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfs4svc_encode_compoundres()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up WRITE arg decoders
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Use xdr_inline_decode() to decode NFSv3 symlinks
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor common code out of dirlist helpers
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Reduce amount of struct nfsd4_compoundargs that needs clearing
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Parametrize how much of argsize should be zeroed
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: add shrinker to reap courtesy clients on low memory condition
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: keep track of the number of courtesy clients in the system
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Make nfsd4_remove() wait before returning NFS4ERR_DELAY
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Make nfsd4_rename() wait before returning NFS4ERR_DELAY
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Make nfsd4_setattr() wait before returning NFS4ERR_DELAY
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor nfsd_setattr()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a mechanism to wait for a DELEGRETURN
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add tracepoints to report NFSv4 callback completions
Gaosheng Cui <cuigaosheng1(a)huawei.com>
nfsd: remove nfsd4_prepare_cb_recall() declaration
Jeff Layton <jlayton(a)kernel.org>
nfsd: clean up mounted_on_fileid handling
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix handling of oversized NFSv4 COMPOUND requests
NeilBrown <neilb(a)suse.de>
NFSD: drop fname and flen args from nfsd_create_locked()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Protect against send buffer overflow in NFSv3 READ
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Protect against send buffer overflow in NFSv2 READ
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Protect against send buffer overflow in NFSv3 READDIR
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Protect against send buffer overflow in NFSv2 READDIR
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Increase NFSD_MAX_OPS_PER_COMPOUND
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
nfsd: Propagate some error code returned by memdup_user()
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
nfsd: Avoid some useless tests
Jinpeng Cui <cui.jinpeng2(a)zte.com.cn>
NFSD: remove redundant variable status
Olga Kornievskaia <kolga(a)netapp.com>
NFSD enforce filehandle check for source file in COPY
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
lockd: move from strlcpy with unused retval to strscpy
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
NFSD: move from strlcpy with unused retval to strscpy
Al Viro <viro(a)zeniv.linux.org.uk>
nfsd_splice_actor(): handle compound pages
NeilBrown <neilb(a)suse.de>
NFSD: fix regression with setting ACLs.
Jeff Layton <jlayton(a)kernel.org>
lockd: detect and reject lock arguments that overflow
NeilBrown <neilb(a)suse.de>
NFSD: discard fh_locked flag and fh_lock/fh_unlock
NeilBrown <neilb(a)suse.de>
NFSD: use (un)lock_inode instead of fh_(un)lock for file operations
NeilBrown <neilb(a)suse.de>
NFSD: use explicit lock/unlock for directory ops
NeilBrown <neilb(a)suse.de>
NFSD: reduce locking in nfsd_lookup()
NeilBrown <neilb(a)suse.de>
NFSD: only call fh_unlock() once in nfsd_link()
NeilBrown <neilb(a)suse.de>
NFSD: always drop directory lock in nfsd_unlink()
NeilBrown <neilb(a)suse.de>
NFSD: change nfsd_create()/nfsd_symlink() to unlock directory before returning.
NeilBrown <neilb(a)suse.de>
NFSD: add posix ACLs to struct nfsd_attrs
NeilBrown <neilb(a)suse.de>
NFSD: add security label to struct nfsd_attrs
NeilBrown <neilb(a)suse.de>
NFSD: set attributes when creating symlinks
NeilBrown <neilb(a)suse.de>
NFSD: introduce struct nfsd_attrs
Jeff Layton <jlayton(a)kernel.org>
NFSD: verify the opened dentry after setting a delegation
Jeff Layton <jlayton(a)kernel.org>
NFSD: drop fh argument from alloc_init_deleg
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Move copy offload callback arguments into a separate structure
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add nfsd4_send_cb_offload()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove kmalloc from nfsd4_do_async_copy()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor nfsd4_do_copy()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor nfsd4_cleanup_inter_ssc() (2/2)
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor nfsd4_cleanup_inter_ssc() (1/2)
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace boolean fields in struct nfsd4_copy
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Make nfs4_put_copy() static
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Reorder the fields in struct nfsd4_op
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Shrink size of struct nfsd4_copy
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Shrink size of struct nfsd4_copy_notify
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: nfserrno(-ENOMEM) is nfserr_jukebox
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix strncpy() fortify warning
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfsd4_encode_readlink()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Use xdr_pad_size()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Simplify starting_len
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Optimize nfsd4_encode_readv()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an nfsd4_read::rd_eof field
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up SPLICE_OK in nfsd4_encode_read()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Optimize nfsd4_encode_fattr()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Optimize nfsd4_encode_operation()
Jeff Layton <jlayton(a)kernel.org>
nfsd: silence extraneous printk on nfsd.ko insertion
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: limit the number of v4 clients to 1024 per 1GB of system memory
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: keep track of the number of v4 clients in the system
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: refactoring v4 specific code to a helper in nfs4state.c
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Ensure nf_inode is never dereferenced
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: NFSv4 CLOSE should release an nfsd_file immediately
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Move nfsd_file_trace_alloc() tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Separate tracepoints for acquire and create
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up unused code after rhashtable conversion
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Convert the filecache to use rhashtable
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Set up an rhashtable for the filecache
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace the "init once" mechanism
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove nfsd_file::nf_hashval
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: nfsd_file_hash_remove can compute hashval
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor __nfsd_file_close_inode()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: nfsd_file_unhash can compute hashval from nf->nf_inode
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove lockdep assertion from unhash_and_release_locked()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: No longer record nf_hashval in the trace log
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Never call nfsd_file_gc() in foreground paths
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix the filecache LRU shrinker
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Leave open files out of the filecache LRU
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Trace filecache LRU activity
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: WARN when freeing an item still linked via nf_lru
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Hook up the filecache stat file
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Zero counters when the filecache is re-initialized
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Record number of flush calls
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Report the number of items evicted by the LRU walk
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor nfsd_file_lru_scan()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor nfsd_file_gc()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add nfsd_file_lru_dispose_list() helper
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Report average age of filecache items
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Report count of freed filecache items
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Report count of calls to nfsd_file_acquire()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Report filecache LRU size
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Demote a WARN to a pr_warn()
Colin Ian King <colin.i.king(a)gmail.com>
nfsd: remove redundant assignment to variable len
Zhang Jiaming <jiaming(a)nfschina.com>
NFSD: Fix space and spelling mistake
Benjamin Coddington <bcodding(a)redhat.com>
NLM: Defend against file_lock changes after vfs_test_lock()
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Fix xdr_encode_bool()
Jeff Layton <jlayton(a)kernel.org>
nfsd: eliminate the NFSD_FILE_BREAK_* flags
Xin Gao <gaoxin(a)cdjrlc.com>
fsnotify: Fix comment typo
Amir Goldstein <amir73il(a)gmail.com>
fanotify: introduce FAN_MARK_IGNORE
Amir Goldstein <amir73il(a)gmail.com>
fanotify: cleanups for fanotify_mark() input validations
Amir Goldstein <amir73il(a)gmail.com>
fanotify: prepare for setting event flags in ignore mask
Oliver Ford <ojford(a)gmail.com>
fs: inotify: Fix typo in inotify comment
Jeff Layton <jlayton(a)kernel.org>
lockd: fix nlm_close_files
Jeff Layton <jlayton(a)kernel.org>
lockd: set fl_owner when unlocking files
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Decode NFSv4 birth time attribute
NeilBrown <neilb(a)suse.de>
NFS: restore module put when manager exits.
Amir Goldstein <amir73il(a)gmail.com>
fanotify: refine the validation checks on non-dir inode mask
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Optimize xdr_reserve_space()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix potential use-after-free in nfsd_file_put()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: nfsd_file_put() can sleep
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add documenting comment for nfsd4_release_lockowner()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Modernize nfsd4_release_lockowner()
Julian Schroeder <jumaco(a)amazon.com>
nfsd: destroy percpu stats counters after reply cache shutdown
Zhang Xiaoxu <zhangxiaoxu5(a)huawei.com>
nfsd: Fix null-ptr-deref in nfsd_fill_super()
Zhang Xiaoxu <zhangxiaoxu5(a)huawei.com>
nfsd: Unregister the cld notifier when laundry_wq create failed
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Use RMW bitops in single-threaded hot paths
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up the show_nf_flags() macro
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Trace filecache opens
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Move documenting comment for nfsd4_process_open2()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix whitespace
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove dprintk call sites from tail of nfsd4_open()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Instantiate a struct file when creating a regular NFSv4 file
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfsd_open_verified()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove do_nfsd_create()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor NFSv4 OPEN(CREATE)
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor NFSv3 CREATE
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor nfsd_create_setattr()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Avoid calling fh_drop_write() twice in do_nfsd_create()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfsd3_proc_create()
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: Show state of courtesy client in client info
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: add support for lock conflict to courteous server
Dai Ngo <dai.ngo(a)oracle.com>
fs/lock: add 2 callbacks to lock_manager_operations to resolve conflict
Dai Ngo <dai.ngo(a)oracle.com>
fs/lock: add helper locks_owner_has_blockers to check for blockers
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: move create/destroy of laundry_wq to init_nfsd and exit_nfsd
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: add support for share reservation conflict to courteous server
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: add courteous server support for thread with only delegation
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfsd_splice_actor()
Vasily Averin <vvs(a)openvz.org>
fanotify: fix incorrect fmode_t casts
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: consistent behavior for parent not watching children
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: introduce mark type iterator
Amir Goldstein <amir73il(a)gmail.com>
fanotify: enable "evictable" inode marks
Amir Goldstein <amir73il(a)gmail.com>
fanotify: use fsnotify group lock helpers
Amir Goldstein <amir73il(a)gmail.com>
fanotify: implement "evictable" inode marks
Amir Goldstein <amir73il(a)gmail.com>
fanotify: factor out helper fanotify_mark_update_flags()
Amir Goldstein <amir73il(a)gmail.com>
fanotify: create helper fanotify_mark_user_flags()
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: allow adding an inode mark without pinning inode
Amir Goldstein <amir73il(a)gmail.com>
dnotify: use fsnotify group lock helpers
Amir Goldstein <amir73il(a)gmail.com>
nfsd: use fsnotify group lock helpers
Amir Goldstein <amir73il(a)gmail.com>
inotify: use fsnotify group lock helpers
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: create helpers for group mark_mutex lock
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: make allow_dups a property of the group
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: pass flags argument to fsnotify_alloc_group()
Amir Goldstein <amir73il(a)gmail.com>
inotify: move control flags from mask to mark flags
Dai Ngo <dai.ngo(a)oracle.com>
fs/lock: documentation cleanup. Replace inode->i_lock with flc_lock.
Amir Goldstein <amir73il(a)gmail.com>
fanotify: do not allow setting dirent events in mask of non-dir
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Clean up nfsd_file_put()
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Fix a write performance regression
Haowen Bai <baihaowen(a)meizu.com>
SUNRPC: Return true/false (not 1/0) from bool functions
Bang Li <libang.linuxer(a)gmail.com>
fsnotify: remove redundant parameter judgment
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: optimize FS_MODIFY events with no ignored masks
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: fix merge with parent's ignored mask
Jakob Koschel <jakobkoschel(a)gmail.com>
nfsd: fix using the correct variable for sizeof()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up _lm_ operation names
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove CONFIG_NFSD_V3
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Move svc_serv_ops::svo_function into struct svc_serv
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove svc_serv_ops::svo_module
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Remove svc_shutdown_net()
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Rename svc_close_xprt()
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Rename svc_create_xprt()
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Remove svo_shutdown method
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Merge svc_do_enqueue_xprt() into svc_enqueue_xprt()
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Remove the .svo_enqueue_xprt method
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Streamline the rare "found" case
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Skip extra computation for RC_NOCACHE case
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: De-duplicate hash bucket indexing
Ondrej Valousek <ondrej.valousek.xm(a)renesas.com>
nfsd: Add support for the birth time attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Deprecate NFS_OFFSET_MAX
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: COMMIT operations must not return NFS?ERR_INVAL
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix NFSv3 SETATTR/CREATE's handling of large file sizes
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix ia_size underflow
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix the behavior of READ near OFFSET_MAX
J. Bruce Fields <bfields(a)redhat.com>
lockd: fix failure to cleanup client locks
J. Bruce Fields <bfields(a)redhat.com>
lockd: fix server crash on reboot of client holding lock
Yang Li <yang.lee(a)linux.alibaba.com>
fanotify: remove variable set but not used
J. Bruce Fields <bfields(a)redhat.com>
nfsd: fix crash on COPY_NOTIFY with special stateid
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Move fill_pre_wcc() and fill_post_wcc()
Chuck Lever <chuck.lever(a)oracle.com>
Revert "nfsd: skip some unnecessary stats in the v4 case"
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Trace boot verifier resets
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Rename boot verifier functions
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up the nfsd_net::nfssvc_boot field
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Write verifier might go backwards
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Add a tracepoint for errors in nfsd4_clone_file_range()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: De-duplicate net_generic(nf->nf_net, nfsd_net_id)
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: De-duplicate net_generic(SVC_NET(rqstp), nfsd_net_id)
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfsd_vfs_write()
Jeff Layton <jeff.layton(a)primarydata.com>
nfsd: Retry once in nfsd_open on an -EOPENSTALE return
Jeff Layton <jeff.layton(a)primarydata.com>
nfsd: Add errno mapping for EREMOTEIO
Peng Tao <tao.peng(a)primarydata.com>
nfsd: map EBADF
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix zero-length NFSv3 WRITEs
Vasily Averin <vvs(a)virtuozzo.com>
nfsd4: add refcount for nfsd4_blocked_lock
J. Bruce Fields <bfields(a)redhat.com>
nfs: block notification on fs with its own ->lock
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: De-duplicate nfsd4_decode_bitmap4()
J. Bruce Fields <bfields(a)redhat.com>
nfsd: improve stateid access bitmask documentation
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Combine XDR error tracepoints
NeilBrown <neilb(a)suse.de>
NFSD: simplify per-net file cache management
Jiapeng Chong <jiapeng.chong(a)linux.alibaba.com>
NFSD: Fix inconsistent indenting
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove be32_to_cpu() from DRC hash function
NeilBrown <neilb(a)suse.de>
NFS: switch the callback service back to non-pooled.
NeilBrown <neilb(a)suse.de>
lockd: use svc_set_num_threads() for thread start and stop
NeilBrown <neilb(a)suse.de>
SUNRPC: always treat sv_nrpools==1 as "not pooled"
NeilBrown <neilb(a)suse.de>
SUNRPC: move the pool_map definitions (back) into svc.c
NeilBrown <neilb(a)suse.de>
lockd: rename lockd_create_svc() to lockd_get()
NeilBrown <neilb(a)suse.de>
lockd: introduce lockd_put()
NeilBrown <neilb(a)suse.de>
lockd: move svc_exit_thread() into the thread
NeilBrown <neilb(a)suse.de>
lockd: move lockd_start_svc() call into lockd_create_svc()
NeilBrown <neilb(a)suse.de>
lockd: simplify management of network status notifiers
NeilBrown <neilb(a)suse.de>
lockd: introduce nlmsvc_serv
NeilBrown <neilb(a)suse.de>
NFSD: simplify locking for network notifier.
NeilBrown <neilb(a)suse.de>
SUNRPC: discard svo_setup and rename svc_set_num_threads_sync()
NeilBrown <neilb(a)suse.de>
NFSD: Make it possible to use svc_set_num_threads_sync
NeilBrown <neilb(a)suse.de>
NFSD: narrow nfsd_mutex protection in nfsd thread
NeilBrown <neilb(a)suse.de>
SUNRPC: use sv_lock to protect updates to sv_nrthreads.
NeilBrown <neilb(a)suse.de>
nfsd: make nfsd_stats.th_cnt atomic_t
NeilBrown <neilb(a)suse.de>
SUNRPC: stop using ->sv_nrthreads as a refcount
NeilBrown <neilb(a)suse.de>
SUNRPC/NFSD: clean up get/put functions.
NeilBrown <neilb(a)suse.de>
SUNRPC: change svc_get() to return the svc.
NeilBrown <neilb(a)suse.de>
NFSD: handle errors better in write_ports_addfd()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix sparse warning
Eric W. Biederman <ebiederm(a)xmission.com>
exit: Rename module_put_and_exit to module_put_and_kthread_exit
Eric W. Biederman <ebiederm(a)xmission.com>
exit: Implement kthread_exit
Amir Goldstein <amir73il(a)gmail.com>
fanotify: wire up FAN_RENAME event
Amir Goldstein <amir73il(a)gmail.com>
fanotify: report old and/or new parent+name in FAN_RENAME event
Amir Goldstein <amir73il(a)gmail.com>
fanotify: record either old name new name or both for FAN_RENAME
Amir Goldstein <amir73il(a)gmail.com>
fanotify: record old and new parent and name in FAN_RENAME event
Amir Goldstein <amir73il(a)gmail.com>
fanotify: support secondary dir fh and name in fanotify_info
Amir Goldstein <amir73il(a)gmail.com>
fanotify: use helpers to parcel fanotify_info buffer
Amir Goldstein <amir73il(a)gmail.com>
fanotify: use macros to get the offset to fanotify_info buffer
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: generate FS_RENAME event with rich information
Amir Goldstein <amir73il(a)gmail.com>
fanotify: introduce group flag FAN_REPORT_TARGET_FID
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: separate mark iterator type from object type enum
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: clarify object type argument
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix READDIR buffer overflow
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix exposure in nfsd4_decode_bitmap()
J. Bruce Fields <bfields(a)redhat.com>
nfsd4: remove obselete comment
Changcheng Deng <deng.changcheng(a)zte.com.cn>
NFSD:fix boolreturn.cocci warning
J. Bruce Fields <bfields(a)redhat.com>
nfsd: update create verifier comment
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Change return value type of .pc_encode
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Replace the "__be32 *p" parameter to .pc_encode
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Save location of NFSv4 COMPOUND status
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Change return value type of .pc_decode
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Replace the "__be32 *p" parameter to .pc_decode
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Have legacy NFSD WRITE decoders use xdr_stream_subsegment()
Colin Ian King <colin.king(a)canonical.com>
NFSD: Initialize pointer ni with NULL and not plain integer 0
NeilBrown <neilb(a)suse.de>
NFSD: simplify struct nfsfh
NeilBrown <neilb(a)suse.de>
NFSD: drop support for ancient filehandles
NeilBrown <neilb(a)suse.de>
NFSD: move filehandle format declarations out of "uapi".
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Optimize DRC bucket pruning
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Trace calls to .rpc_call_done
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Allow users to request FAN_FS_ERROR events
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Emit generic error info for error event
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Report fid info for file related file system errors
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: WARN_ON against too large file handles
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Add helpers to decide whether to report FID/DFID
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Wrap object_fh inline space in a creator macro
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Support merging of error events
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Support enqueueing of error events
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Pre-allocate pool of error events
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Reserve UAPI bits for FAN_FS_ERROR
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fsnotify: Support FS_ERROR event type
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Require fid_mode for any non-fd event
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Encode empty file handle when no inode is provided
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Allow file handle encoding for unhashed events
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Support null inode event in fanotify_dfid_inode
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fsnotify: Pass group argument to free_event
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fsnotify: Protect fsnotify_handle_inode_event from no-inode events
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fsnotify: Retrieve super block from the data field
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fsnotify: Add wrapper around fsnotify_add_event
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fsnotify: Add helper to detect overflow_event
Gabriel Krisman Bertazi <krisman(a)collabora.com>
inotify: Don't force FS_IN_IGNORED
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Split fsid check from other fid mode checks
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Fold event size calculation to its own function
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fsnotify: Don't insert unmergeable events in hashtable
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: clarify contract for create event hooks
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: pass dentry instead of inode data
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: pass data_type to fsnotify_name()
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Fix a warning for nfsd_file_close_inode
Chuck Lever <chuck.lever(a)oracle.com>
NLM: Fix svcxdr_encode_owner()
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: fix sb_connectors leak
Chuck Lever <chuck.lever(a)oracle.com>
NFS: Remove unused callback void decoder
Chuck Lever <chuck.lever(a)oracle.com>
NFS: Add a private local dispatcher for NFSv4 callback operations
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Eliminate the RQ_AUTHERR flag
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Set rq_auth_stat in the pg_authenticate() callout
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Add svc_rqst::rq_auth_stat
J. Bruce Fields <bfields(a)redhat.com>
nfs: don't allow reexport reclaims
J. Bruce Fields <bfields(a)redhat.com>
lockd: don't attempt blocking locks on nfs reexports
J. Bruce Fields <bfields(a)redhat.com>
nfs: don't atempt blocking locks on nfs reexports
J. Bruce Fields <bfields(a)redhat.com>
Keep read and write fds with each nlm_file
J. Bruce Fields <bfields(a)redhat.com>
lockd: update nlm_lookup_file reexport comment
J. Bruce Fields <bfields(a)redhat.com>
nlm: minor refactoring
J. Bruce Fields <bfields(a)redhat.com>
nlm: minor nlm_lookup_file argument change
Jia He <hejianet(a)gmail.com>
lockd: change the proc_handler for nsm_use_hostnames
Jia He <hejianet(a)gmail.com>
sysctl: introduce new proc handler proc_dobool
NeilBrown <neilb(a)suse.de>
NFSD: remove vanity comments
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Batch release pages during splice read
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Add svc_rqst_replace_page() API
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up splice actor
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: optimize the case of no marks of any type
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: count all objects with attached connectors
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: count s_fsnotify_inode_refs for attached connectors
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: replace igrab() with ihold() on attach connector
Matthew Bobrowski <repnop(a)google.com>
fanotify: add pidfd support to the fanotify API
Matthew Bobrowski <repnop(a)google.com>
fanotify: introduce a generic info record copying helper
Matthew Bobrowski <repnop(a)google.com>
fanotify: minor cosmetic adjustments to fid labels
Matthew Bobrowski <repnop(a)google.com>
kernel/pid.c: implement additional checks upon pidfd_create() parameters
Matthew Bobrowski <repnop(a)google.com>
kernel/pid.c: remove static qualifier from pidfd_create()
J. Bruce Fields <bfields(a)redhat.com>
nfsd: fix NULL dereference in nfs3svc_encode_getaclres
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Prevent a possible oops in the nfs_dirent() tracepoint
Colin Ian King <colin.king(a)canonical.com>
nfsd: remove redundant assignment to pointer 'this'
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 SHARE results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 nlm_res results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 TEST results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 void results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 FREE_ALL arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 SHARE arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 SM_NOTIFY arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 nlm_res arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 UNLOCK arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 CANCEL arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 LOCK arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 TEST arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 void arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 SHARE results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 nlm_res results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 TEST results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 void results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 FREE_ALL arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 SHARE arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 SM_NOTIFY arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 nlm_res arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 UNLOCK arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 CANCEL arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 LOCK arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 TEST arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 void argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Common NLM XDR helpers
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Create a simplified .vs_dispatch method for NLM requests
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Remove stale comments
J. Bruce Fields <bfields(a)redhat.com>
nfsd: rpc_peeraddr2str needs rcu lock
Wei Yongjun <weiyongjun1(a)huawei.com>
NFSD: Fix error return code in nfsd4_interssc_connect()
Dai Ngo <dai.ngo(a)oracle.com>
nfsd: fix kernel test robot warning in SSC code
Dave Wysochanski <dwysocha(a)redhat.com>
nfsd4: Expose the callback address and state of each NFS4 client
J. Bruce Fields <bfields(a)redhat.com>
nfsd: move fsnotify on client creation outside spinlock
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: delay unmount source's export after inter-server copy completed.
Olga Kornievskaia <kolga(a)netapp.com>
NFSD add vfs_fsync after async copy is done
J. Bruce Fields <bfields(a)redhat.com>
nfsd: move some commit_metadata()s outside the inode lock
Yu Hsiang Huang <nickhuang(a)synology.com>
nfsd: Prevent truncation of an unlinked inode from blocking access to its directory
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update nfsd_cb_args tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove the nfsd_cb_work and nfsd_cb_done tracepoints
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an nfsd_cb_probe tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace the nfsd_deleg_break tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an nfsd_cb_offload tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an nfsd_cb_lm_notify tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Enhance the nfsd_cb_setup tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Adjust cb_shutdown tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add cb_lost tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Drop TRACE_DEFINE_ENUM for NFSD4_CB_<state> macros
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Capture every CB state transition
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Constify @fh argument of knfsd_fh_hash()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add tracepoints for EXCHANGEID edge cases
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add tracepoints for SETCLIENTID edge cases
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a couple more nfsd_clid_expired call sites
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add nfsd_clid_destroyed tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add nfsd_clid_reclaim_complete tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add nfsd_clid_confirmed tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove trace_nfsd_clid_inuse_err
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add nfsd_clid_verf_mismatch tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add nfsd_clid_cred_mismatch tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an RPC authflavor tracepoint display helper
Amir Goldstein <amir73il(a)gmail.com>
fanotify: fix permission model of unprivileged group
Trond Myklebust <trond.myklebust(a)hammerspace.com>
NFS: fix nfs_fetch_iversion()
Dai Ngo <dai.ngo(a)oracle.com>
NFSv4.2: Remove ifdef CONFIG_NFSD from NFSv4.2 client SSC code.
Gustavo A. R. Silva <gustavoars(a)kernel.org>
nfsd: Fix fall-through warnings for Clang
J. Bruce Fields <bfields(a)redhat.com>
nfsd: grant read delegations to clients holding writes
J. Bruce Fields <bfields(a)redhat.com>
nfsd: reshuffle some code
J. Bruce Fields <bfields(a)redhat.com>
nfsd: track filehandle aliasing in nfs4_files
J. Bruce Fields <bfields(a)redhat.com>
nfsd: hash nfs4_files by inode number
Vasily Averin <vvs(a)virtuozzo.com>
nfsd: removed unused argument in nfsd_startup_generic()
Jiapeng Chong <jiapeng.chong(a)linux.alibaba.com>
nfsd: remove unused function
Christian Brauner <christian.brauner(a)ubuntu.com>
fanotify_user: use upper_32_bits() to verify mask
Amir Goldstein <amir73il(a)gmail.com>
fanotify: support limited functionality for unprivileged users
Amir Goldstein <amir73il(a)gmail.com>
fanotify: configurable limits via sysfs
Amir Goldstein <amir73il(a)gmail.com>
fanotify: limit number of event merge attempts
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: use hash table for faster events merge
Amir Goldstein <amir73il(a)gmail.com>
fanotify: mix event info and pid into merge key hash
Amir Goldstein <amir73il(a)gmail.com>
fanotify: reduce event objectid to 29-bit hash
Chuck Lever <chuck.lever(a)oracle.com>
Revert "fanotify: limit number of event merge attempts"
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: allow fsnotify_{peek,remove}_first_event with empty queue
Guobin Huang <huangguobin4(a)huawei.com>
NFSD: Use DEFINE_SPINLOCK() for spinlock
Gustavo A. R. Silva <gustavoars(a)kernel.org>
UAPI: nfsfh.h: Replace one-element array with flexible-array member
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Export svc_xprt_received()
NeilBrown <neilb(a)suse.de>
nfsd: report client confirmation status in "info" file
J. Bruce Fields <bfields(a)redhat.com>
nfsd: don't ignore high bits of copy count
J. Bruce Fields <bfields(a)redhat.com>
nfsd: COPY with length 0 should copy to end of file
Ricardo Ribalda <ribalda(a)chromium.org>
nfsd: Fix typo "accesible"
Paul Menzel <pmenzel(a)molgen.mpg.de>
nfsd: Log client tracking type log message as info instead of warning
J. Bruce Fields <bfields(a)redhat.com>
nfsd: helper for laundromat expiry calculations
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up NFSDDBG_FACILITY macro
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a tracepoint to record directory entry encoding
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up after updating NFSv3 ACL encoders
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 SETACL result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 GETACL result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up after updating NFSv2 ACL encoders
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 ACL ACCESS result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 ACL GETATTR result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 SETACL result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 GETACL result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an xdr_stream-based encoder for NFSv2/3 ACLs
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove unused NFSv2 directory entry encoders
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 READDIR entry encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 READDIR result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Count bytes instead of pages in the NFSv2 READDIR encoder
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a helper that encodes NFSv3 directory offset cookies, again
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 STATFS result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 READ result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 READLINK result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 diropres encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 attrstat encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 stat encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Reduce svc_rqst::rq_pages churn during READDIR operations
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove unused NFSv3 directory entry encoders
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update NFSv3 READDIR entry encoders to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 READDIR3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Count bytes instead of pages in the NFSv3 READDIR encoder
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a helper that encodes NFSv3 directory offset cookies
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 COMMIT3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 PATHCONF3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 FSINFO3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 FSSTAT3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 LINK3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 RENAMEv3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 CREATE family of encoders to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 WRITE3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 READ3res encode to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 READLINK3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 wccstat result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 LOOKUP3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 ACCESS3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the GETATTR3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Extract the svcxdr_init_encode() helper
Christian Brauner <christian.brauner(a)ubuntu.com>
namei: introduce struct renamedata
Christian Brauner <christian.brauner(a)ubuntu.com>
fs: add file and path permissions helpers
Christoph Hellwig <hch(a)lst.de>
kallsyms: only build {,module_}kallsyms_on_each_symbol when required
Christoph Hellwig <hch(a)lst.de>
kallsyms: refactor {,module_}kallsyms_on_each_symbol
Christoph Hellwig <hch(a)lst.de>
module: use RCU to synchronize find_module
Christoph Hellwig <hch(a)lst.de>
module: unexport find_module and module_mutex
Shakeel Butt <shakeelb(a)google.com>
inotify, memcg: account inotify instances to kmemcg
J. Bruce Fields <bfields(a)redhat.com>
nfsd: skip some unnecessary stats in the v4 case
J. Bruce Fields <bfields(a)redhat.com>
nfs: use change attribute for NFS re-exports
Dai Ngo <dai.ngo(a)oracle.com>
NFSv4_2: SSC helper should use its own config.
J. Bruce Fields <bfields(a)redhat.com>
nfsd: cstate->session->se_client -> cstate->clp
J. Bruce Fields <bfields(a)redhat.com>
nfsd: simplify nfsd4_check_open_reclaim
J. Bruce Fields <bfields(a)redhat.com>
nfsd: remove unused set_client argument
J. Bruce Fields <bfields(a)redhat.com>
nfsd: find_cpntf_state cleanup
J. Bruce Fields <bfields(a)redhat.com>
nfsd: refactor set_client
J. Bruce Fields <bfields(a)redhat.com>
nfsd: rename lookup_clientid->set_client
J. Bruce Fields <bfields(a)redhat.com>
nfsd: simplify nfsd_renew
J. Bruce Fields <bfields(a)redhat.com>
nfsd: simplify process_lock
J. Bruce Fields <bfields(a)redhat.com>
nfsd4: simplify process_lookup1
Amir Goldstein <amir73il(a)gmail.com>
nfsd: report per-export stats
Amir Goldstein <amir73il(a)gmail.com>
nfsd: protect concurrent access to nfsd stats counters
Amir Goldstein <amir73il(a)gmail.com>
nfsd: remove unused stats counters
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up after updating NFSv3 ACL decoders
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 SETACL argument decoder to use struct xdr_stream, again
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 GETACL argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up after updating NFSv2 ACL decoders
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 ACL ACCESS argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 ACL GETATTR argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 SETACL argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an xdr_stream-based decoder for NFSv2/3 ACLs
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 GETACL argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove argument length checking in nfsd_dispatch()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 SYMLINK argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 CREATE argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 SETATTR argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 LINK argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 RENAME argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update NFSv2 diropargs decoding to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 READDIR argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helper to set up the pages where the dirlist is encoded, again
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 READLINK argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 WRITE argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 READ argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 GETATTR argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the MKNOD3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the SYMLINK3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the MKDIR3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the CREATE3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the SETATTR3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the LINK3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the RENAME3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 DIROPargs decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update COMMIT3arg decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update READDIR3args decoders to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helper to set up the pages where the dirlist is encoded
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix returned READDIR offset cookie
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update READLINK3arg decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update WRITE3arg decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update READ3arg decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update ACCESS3arg decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update GETATTR3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Move definition of XDR_UNIT
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Display RPC procedure names instead of proc numbers
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Make trace_svc_process() display the RPC procedure symbolically
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Restore NFSv4 decoding's SAVEMEM functionality
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix sparse warning in nfssvc.c
Zheng Yongjun <zhengyongjun3(a)huawei.com>
fs/lockd: convert comma to semicolon
Waiman Long <longman(a)redhat.com>
inotify: Increase default inotify.max_user_watches limit to 1048576
Eric W. Biederman <ebiederm(a)xmission.com>
file: Replace ksys_close with close_fd
Eric W. Biederman <ebiederm(a)xmission.com>
file: Rename __close_fd to close_fd and remove the files parameter
Eric W. Biederman <ebiederm(a)xmission.com>
file: Merge __alloc_fd into alloc_fd
Eric W. Biederman <ebiederm(a)xmission.com>
file: In f_dupfd read RLIMIT_NOFILE once.
Eric W. Biederman <ebiederm(a)xmission.com>
file: Merge __fd_install into fd_install
Eric W. Biederman <ebiederm(a)xmission.com>
proc/fd: In fdinfo seq_show don't use get_files_struct
Eric W. Biederman <ebiederm(a)xmission.com>
proc/fd: In proc_readfd_common use task_lookup_next_fd_rcu
Eric W. Biederman <ebiederm(a)xmission.com>
file: Implement task_lookup_next_fd_rcu
Eric W. Biederman <ebiederm(a)xmission.com>
kcmp: In get_file_raw_ptr use task_lookup_fd_rcu
Eric W. Biederman <ebiederm(a)xmission.com>
proc/fd: In tid_fd_mode use task_lookup_fd_rcu
Eric W. Biederman <ebiederm(a)xmission.com>
file: Implement task_lookup_fd_rcu
Eric W. Biederman <ebiederm(a)xmission.com>
file: Rename fcheck lookup_fd_rcu
Eric W. Biederman <ebiederm(a)xmission.com>
file: Replace fcheck_files with files_lookup_fd_rcu
Eric W. Biederman <ebiederm(a)xmission.com>
file: Factor files_lookup_fd_locked out of fcheck_files
Eric W. Biederman <ebiederm(a)xmission.com>
file: Rename __fcheck_files to files_lookup_fd_raw
Chuck Lever <chuck.lever(a)oracle.com>
Revert "fget: clarify and improve __fget_files() implementation"
Eric W. Biederman <ebiederm(a)xmission.com>
proc/fd: In proc_fd_link use fget_task
Eric W. Biederman <ebiederm(a)xmission.com>
bpf: In bpf_task_fd_query use fget_task
Eric W. Biederman <ebiederm(a)xmission.com>
kcmp: In kcmp_epoll_target use fget_task
Eric W. Biederman <ebiederm(a)xmission.com>
exec: Remove reset_files_struct
Eric W. Biederman <ebiederm(a)xmission.com>
exec: Simplify unshare_files
Eric W. Biederman <ebiederm(a)xmission.com>
exec: Move unshare_files to fix posix file locking during exec
Eric W. Biederman <ebiederm(a)xmission.com>
exec: Don't open code get_close_on_exec
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Record NFSv4 pre/post-op attributes as non-atomic
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Set PF_LOCAL_THROTTLE on local filesystems only
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Fix up nfsd to ensure that timeout errors don't result in ESTALE
Trond Myklebust <trond.myklebust(a)hammerspace.com>
exportfs: Add a function to return the raw output from fh_to_dentry()
Jeff Layton <jeff.layton(a)primarydata.com>
nfsd: close cached files prior to a REMOVE or RENAME that would replace target
Jeff Layton <jeff.layton(a)primarydata.com>
nfsd: allow filesystems to opt out of subtree checking
Jeff Layton <jeff.layton(a)primarydata.com>
nfsd: add a new EXPORT_OP_NOWCC flag to struct export_operations
J. Bruce Fields <bfields(a)redhat.com>
Revert "nfsd4: support change_attr_type attribute"
J. Bruce Fields <bfields(a)redhat.com>
nfsd4: don't query change attribute in v2/v3 case
J. Bruce Fields <bfields(a)redhat.com>
nfsd: minor nfsd4_change_attribute cleanup
J. Bruce Fields <bfields(a)redhat.com>
nfsd: simplify nfsd4_change_info
J. Bruce Fields <bfields(a)redhat.com>
nfsd: only call inode_query_iversion in the I_VERSION case
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove macros that are no longer used
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_compound()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Make nfsd4_ops::opnum a u32
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_listxattrs()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_setxattr()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_xattr_name()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_clone()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_seek()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_offload_status()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_copy_notify()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_copy()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_nl4_server()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_fallocate()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_reclaim_complete()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_destroy_clientid()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_test_stateid()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_sequence()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_secinfo_no_name()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_layoutreturn()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_layoutget()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_layoutcommit()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_getdeviceinfo()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_free_stateid()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_destroy_session()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_create_session()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a helper to decode channel_attrs4
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a helper to decode nfs_impl_id4
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a helper to decode state_protect4_a
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a separate decoder for ssv_sp_parms
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a separate decoder to handle state_protect_ops
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_bind_conn_to_session()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_backchannel_ctl()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_cb_sec()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_release_lockowner()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_write()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_verify()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_setclientid_confirm()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_setclientid()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_setattr()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_secinfo()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_renew()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_rename()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_remove()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_readdir()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_read()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_putfh()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_open_downgrade()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_open_confirm()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_open()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helper to decode OPEN's open_claim4 argument
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_share_deny()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_share_access()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helper to decode OPEN's openflag4 argument
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helper to decode OPEN's createhow4 argument
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helper to decode NFSv4 verifiers
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_lookup()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_locku()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_lockt()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_lock()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helper for decoding locker4
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helpers to decode a clientid4 and an NFSv4 state owner
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Relocate nfsd4_decode_opaque()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_link()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_getattr()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_delegreturn()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_create()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_fattr()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 umask attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 security label attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 time_set attributes
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 owner_group attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 owner attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 mode attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 acl attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 size attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Change the way the expected length of a fattr4 is checked
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_commit()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_close()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_access()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace the internals of the READ_BUF() macro
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add tracepoints in nfsd4_decode/encode_compound()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add tracepoints in nfsd_dispatch()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add common helpers to decode void args and encode void results
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Prepare for xdr_stream-style decoding on the server-side
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Add xdr_set_scratch_page() and xdr_reset_scratch_buffer()
Huang Guobin <huangguobin4(a)huawei.com>
nfsd: Fix error return code in nfsd_file_cache_init()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add SPDX header for fs/nfsd/trace.c
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove extra "0x" in tracepoint format specifier
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up the show_nf_may macro
Alex Shi <alex.shi(a)linux.alibaba.com>
nfsd/nfs3: remove unused macro nfsd3_fhandleres
Tom Rix <trix(a)redhat.com>
NFSD: A semicolon is not needed after a switch statement.
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Invoke svc_encode_result_payload() in "read" NFSD encoders
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Rename svc_encode_read_payload()
-------------
Diffstat:
Documentation/filesystems/files.rst | 8 +-
Documentation/filesystems/locking.rst | 10 +-
Documentation/filesystems/nfs/exporting.rst | 78 +
Makefile | 4 +-
arch/powerpc/platforms/cell/spufs/coredump.c | 2 +-
crypto/algboss.c | 4 +-
fs/Kconfig | 6 +-
fs/autofs/dev-ioctl.c | 5 +-
fs/cachefiles/namei.c | 9 +-
fs/cifs/connect.c | 2 +-
fs/coredump.c | 5 +-
fs/ecryptfs/inode.c | 10 +-
fs/exec.c | 29 +-
fs/exportfs/expfs.c | 40 +-
fs/file.c | 177 +-
fs/init.c | 6 +-
fs/lockd/clnt4xdr.c | 9 +-
fs/lockd/clntproc.c | 3 -
fs/lockd/host.c | 4 +-
fs/lockd/svc.c | 262 +-
fs/lockd/svc4proc.c | 70 +-
fs/lockd/svclock.c | 67 +-
fs/lockd/svcproc.c | 62 +-
fs/lockd/svcsubs.c | 123 +-
fs/lockd/svcxdr.h | 142 +
fs/lockd/xdr.c | 448 +--
fs/lockd/xdr4.c | 472 ++--
fs/locks.c | 102 +-
fs/namei.c | 21 +-
fs/nfs/blocklayout/blocklayout.c | 2 +-
fs/nfs/blocklayout/dev.c | 2 +-
fs/nfs/callback.c | 111 +-
fs/nfs/callback_xdr.c | 33 +-
fs/nfs/dir.c | 2 +-
fs/nfs/export.c | 17 +
fs/nfs/file.c | 3 +
fs/nfs/filelayout/filelayout.c | 4 +-
fs/nfs/filelayout/filelayoutdev.c | 2 +-
fs/nfs/flexfilelayout/flexfilelayout.c | 4 +-
fs/nfs/flexfilelayout/flexfilelayoutdev.c | 2 +-
fs/nfs/nfs42xdr.c | 2 +-
fs/nfs/nfs4state.c | 2 +-
fs/nfs/nfs4xdr.c | 6 +-
fs/nfs/pagelist.c | 3 -
fs/nfs/super.c | 8 +
fs/nfs/write.c | 3 -
fs/nfs_common/Makefile | 2 +-
fs/nfs_common/nfs_ssc.c | 2 -
fs/nfs_common/nfsacl.c | 123 +
fs/nfsd/Kconfig | 36 +-
fs/nfsd/Makefile | 8 +-
fs/nfsd/acl.h | 6 +-
fs/nfsd/blocklayout.c | 1 +
fs/nfsd/blocklayoutxdr.c | 1 +
fs/nfsd/cache.h | 2 +-
fs/nfsd/export.c | 74 +-
fs/nfsd/export.h | 16 +-
fs/nfsd/filecache.c | 1229 +++++----
fs/nfsd/filecache.h | 23 +-
fs/nfsd/flexfilelayout.c | 3 +-
fs/nfsd/lockd.c | 10 +-
fs/nfsd/netns.h | 63 +-
fs/nfsd/nfs2acl.c | 214 +-
fs/nfsd/nfs3acl.c | 140 +-
fs/nfsd/nfs3proc.c | 396 ++-
fs/nfsd/nfs3xdr.c | 1763 ++++++------
fs/nfsd/nfs4acl.c | 45 +-
fs/nfsd/nfs4callback.c | 168 +-
fs/nfsd/nfs4idmap.c | 9 +-
fs/nfsd/nfs4layouts.c | 4 +-
fs/nfsd/nfs4proc.c | 1111 +++++---
fs/nfsd/nfs4recover.c | 20 +-
fs/nfsd/nfs4state.c | 1725 ++++++++----
fs/nfsd/nfs4xdr.c | 3763 ++++++++++++++------------
fs/nfsd/nfscache.c | 115 +-
fs/nfsd/nfsctl.c | 169 +-
fs/nfsd/nfsd.h | 50 +-
fs/nfsd/nfsfh.c | 291 +-
fs/nfsd/nfsfh.h | 179 +-
fs/nfsd/nfsproc.c | 262 +-
fs/nfsd/nfssvc.c | 356 ++-
fs/nfsd/nfsxdr.c | 834 +++---
fs/nfsd/state.h | 69 +-
fs/nfsd/stats.c | 126 +-
fs/nfsd/stats.h | 96 +-
fs/nfsd/trace.c | 1 +
fs/nfsd/trace.h | 894 +++++-
fs/nfsd/vfs.c | 931 +++----
fs/nfsd/vfs.h | 60 +-
fs/nfsd/xdr.h | 68 +-
fs/nfsd/xdr3.h | 116 +-
fs/nfsd/xdr4.h | 127 +-
fs/nfsd/xdr4cb.h | 6 +
fs/notify/dnotify/dnotify.c | 17 +-
fs/notify/fanotify/fanotify.c | 487 +++-
fs/notify/fanotify/fanotify.h | 252 +-
fs/notify/fanotify/fanotify_user.c | 882 ++++--
fs/notify/fdinfo.c | 19 +-
fs/notify/fsnotify.c | 183 +-
fs/notify/fsnotify.h | 19 +-
fs/notify/group.c | 38 +-
fs/notify/inotify/inotify.h | 11 +-
fs/notify/inotify/inotify_fsnotify.c | 12 +-
fs/notify/inotify/inotify_user.c | 87 +-
fs/notify/mark.c | 172 +-
fs/notify/notification.c | 78 +-
fs/open.c | 49 +-
fs/overlayfs/overlayfs.h | 9 +-
fs/proc/fd.c | 48 +-
fs/udf/file.c | 2 +-
fs/verity/enable.c | 2 +-
include/linux/dnotify.h | 2 +-
include/linux/errno.h | 1 +
include/linux/exportfs.h | 15 +
include/linux/fanotify.h | 74 +-
include/linux/fdtable.h | 37 +-
include/linux/fs.h | 54 +-
include/linux/fsnotify.h | 77 +-
include/linux/fsnotify_backend.h | 372 ++-
include/linux/iversion.h | 13 +
include/linux/kallsyms.h | 17 +-
include/linux/kthread.h | 1 +
include/linux/lockd/bind.h | 3 +-
include/linux/lockd/lockd.h | 17 +-
include/linux/lockd/xdr.h | 35 +-
include/linux/lockd/xdr4.h | 33 +-
include/linux/module.h | 24 +-
include/linux/nfs.h | 8 -
include/linux/nfs4.h | 21 +-
include/linux/nfs_ssc.h | 14 +
include/linux/nfsacl.h | 6 +
include/linux/pid.h | 1 +
include/linux/sched/user.h | 3 -
include/linux/sunrpc/msg_prot.h | 3 -
include/linux/sunrpc/svc.h | 151 +-
include/linux/sunrpc/svc_rdma.h | 4 +-
include/linux/sunrpc/svc_xprt.h | 16 +-
include/linux/sunrpc/svcauth.h | 4 +-
include/linux/sunrpc/svcsock.h | 7 +-
include/linux/sunrpc/xdr.h | 153 +-
include/linux/syscalls.h | 12 -
include/linux/sysctl.h | 2 +
include/linux/user_namespace.h | 4 +
include/trace/events/sunrpc.h | 26 +-
include/uapi/linux/fanotify.h | 42 +
include/uapi/linux/nfs3.h | 6 +
include/uapi/linux/nfsd/nfsfh.h | 105 -
kernel/audit_fsnotify.c | 8 +-
kernel/audit_tree.c | 2 +-
kernel/audit_watch.c | 5 +-
kernel/bpf/inode.c | 2 +-
kernel/bpf/syscall.c | 20 +-
kernel/bpf/task_iter.c | 2 +-
kernel/fork.c | 12 +-
kernel/kallsyms.c | 8 +-
kernel/kcmp.c | 29 +-
kernel/kthread.c | 23 +-
kernel/livepatch/core.c | 7 +-
kernel/module.c | 26 +-
kernel/pid.c | 15 +-
kernel/sys.c | 2 +-
kernel/sysctl.c | 54 +-
kernel/trace/trace_kprobe.c | 4 +-
kernel/ucount.c | 4 +
mm/madvise.c | 2 +-
mm/memcontrol.c | 2 +-
mm/mincore.c | 2 +-
net/bluetooth/bnep/core.c | 2 +-
net/bluetooth/cmtp/core.c | 2 +-
net/bluetooth/hidp/core.c | 2 +-
net/sunrpc/auth_gss/gss_rpc_xdr.c | 2 +-
net/sunrpc/auth_gss/svcauth_gss.c | 47 +-
net/sunrpc/sched.c | 1 +
net/sunrpc/svc.c | 314 ++-
net/sunrpc/svc_xprt.c | 104 +-
net/sunrpc/svcauth.c | 8 +-
net/sunrpc/svcauth_unix.c | 18 +-
net/sunrpc/svcsock.c | 32 +-
net/sunrpc/xdr.c | 112 +-
net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 2 +-
net/sunrpc/xprtrdma/svc_rdma_sendto.c | 32 +-
net/sunrpc/xprtrdma/svc_rdma_transport.c | 2 +-
net/unix/af_unix.c | 2 +-
tools/objtool/check.c | 3 +-
184 files changed, 13912 insertions(+), 8825 deletions(-)
It could lead to error happen because the variable res is not updated if
the call to sr_share_read_word returns an error. In this particular case
error code was returned and res stayed uninitialized.
This can be avoided by checking the return value of sr_share_read_word
and propagating the error if the read operation failed.
Found by code review.
Cc: stable(a)vger.kernel.org
Fixes: c9b37458e956 ("USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v3:
- added Cc stable line as suggestions.
Changes in v2:
- modified the subject as suggestions.
---
drivers/net/usb/sr9700.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/sr9700.c b/drivers/net/usb/sr9700.c
index 0a662e42ed96..d5bc596f4521 100644
--- a/drivers/net/usb/sr9700.c
+++ b/drivers/net/usb/sr9700.c
@@ -179,6 +179,7 @@ static int sr_mdio_read(struct net_device *netdev, int phy_id, int loc)
struct usbnet *dev = netdev_priv(netdev);
__le16 res;
int rc = 0;
+ int err;
if (phy_id) {
netdev_dbg(netdev, "Only internal phy supported\n");
@@ -193,7 +194,10 @@ static int sr_mdio_read(struct net_device *netdev, int phy_id, int loc)
if (value & NSR_LINKST)
rc = 1;
}
- sr_share_read_word(dev, 1, loc, &res);
+ err = sr_share_read_word(dev, 1, loc, &res);
+ if (err < 0)
+ return err;
+
if (rc == 1)
res = le16_to_cpu(res) | BMSR_LSTATUS;
else
--
2.25.1
Because maxnode bug there is no way to bind or migrate_pages to the
last node in multi-node NUMA system unless you lie about maxnodes
when making the mbind, set_mempolicy or migrate_pages syscall.
Manpage for those syscall describe maxnodes as the number of bits in
the node bitmap ("bit mask of nodes containing up to maxnode bits").
Thus if maxnode is n then we expect to have a n bit(s) bitmap which
means that the mask of valid bits is ((1 << n) - 1). The get_nodes()
decrement lead to the mask being ((1 << (n - 1)) - 1).
The three syscalls use a common helper get_nodes() and first things
this helper do is decrement maxnode by 1 which leads to using n-1 bits
in the provided mask of nodes (see get_bitmap() an helper function to
get_nodes()).
The lead to two bugs, either the last node in the bitmap provided will
not be use in either of the three syscalls, or the syscalls will error
out and return EINVAL if the only bit set in the bitmap was the last
bit in the mask of nodes (which is ignored because of the bug and an
empty mask of nodes is an invalid argument).
I am surprised this bug was never caught ... it has been in the kernel
since forever.
People can use the following function to detect if the kernel has the
bug:
bool kernel_has_maxnodes_bug(void)
{
unsigned long nodemask = 1;
bool has_bug;
long res;
res = set_mempolicy(MPOL_BIND, &nodemask, 1);
has_bug = res && (errno == EINVAL);
set_mempolicy(MPOL_DEFAULT, NULL, 0);
return has_bug;
}
You can tested with any of the three program below:
gcc mbind.c -o mbind -lnuma
gcc set_mempolicy.c -o set_mempolicy -lnuma
gcc migrate_pages.c -o migrate_pages -lnuma
First argument is maxnode, second argument is the bit index to set in
the mask of node (0 set the first bit, 1 the second bit, ...).
./mbind 2 1 & sleep 2 && numastat -n -p `pidof mbind` && fg
./set_mempolicy 2 1 & sleep 2 && numastat -n -p `pidof set_mempolicy` && fg
./migrate_pages 2 1 & sleep 2 && numastat -n -p `pidof migrate_pages` && fg
mbind.c %< ----------------------------------------------------------
void *anon_mem(size_t size)
{
void *ret;
ret = mmap(NULL, size, PROT_READ|
PROT_WRITE, MAP_PRIVATE|
MAP_ANON, -1, 0);
return ret == MAP_FAILED ? NULL : ret;
}
unsigned long mround(unsigned long v, unsigned long m)
{
if (m == 0) {
return v;
}
return v + m - (v % m);
}
void bitmap_set(void *_bitmap, unsigned long b)
{
uint8_t *bitmap = _bitmap;
bitmap[b >> 3] |= (1 << (b & 7));
}
int main(int argc, char *argv[])
{
unsigned long *nodemask, maxnode, node, i;
size_t bytes;
int8_t *mem;
long res;
if (argv[1] == NULL || argv[2] == NULL) {
printf("missing argument: %s maxnodes node\n", argv[0]);
return -1;
}
maxnode = atoi(argv[1]);
node = atoi(argv[2]);
bytes = mround(mround(maxnode, 8) >> 3,
sizeof(unsigned long));
nodemask = calloc(bytes, 1);
mem = anon_mem(NPAGES << 12);
if (!mem || !nodemask) {
return -1;
}
// Try to bind memory to node
bitmap_set(nodemask, node);
res = mbind(mem, NPAGES << 12, MPOL_BIND,
nodemask, maxnode, 0);
if (res) {
printf("mbind(mem, NPAGES << 12, MPOL_BIND, "
"nodemask, %d, 0) failed with %d\n",
maxnode, errno);
return -1;
}
// Write something to breakup from the zero page
for (unsigned i = 0; i < NPAGES; i++) {
mem[i << 12] = i + 1;
}
// Allow numastats to gather statistics
getchar();
return 0;
}
set_mempolicy %< ----------------------------------------------------
void *anon_mem(size_t size)
{
void *ret;
ret = mmap(NULL, size, PROT_READ|
PROT_WRITE, MAP_PRIVATE|
MAP_ANON, -1, 0);
return ret == MAP_FAILED ? NULL : ret;
}
unsigned long mround(unsigned long v, unsigned long m)
{
if (m == 0) {
return v;
}
return v + m - (v % m);
}
void bitmap_set(void *_bitmap, unsigned long b)
{
uint8_t *bitmap = _bitmap;
bitmap[b >> 3] |= (1 << (b & 7));
}
int main(int argc, char *argv[])
{
unsigned long *nodemask, maxnode, node, i;
size_t bytes;
int8_t *mem;
long res;
if (argv[1] == NULL || argv[2] == NULL) {
printf("missing argument: %s maxnodes node\n", argv[0]);
return -1;
}
maxnode = atoi(argv[1]);
node = atoi(argv[2]);
// bind memory to node 0 ...
i = 1;
res = set_mempolicy(MPOL_BIND, i, 2);
if (res) {
printf("set_mempolicy(MPOL_BIND, []=1, %d) "
"failed with %d\n", maxnode, errno);
return -1;
}
bytes = mround(mround(maxnode, 8) >> 3,
sizeof(unsigned long));
nodemask = calloc(bytes, 1);
mem = anon_mem(NPAGES << 12);
if (!mem || !nodemask) {
return -1;
}
// Try to bind memory to node
bitmap_set(nodemask, node);
res = set_mempolicy(MPOL_BIND, nodemask, maxnode);
if (res) {
printf("set_mempolicy(MPOL_BIND, nodemask, %d) "
"failed with %d\n", maxnode, errno);
return -1;
}
// Write something to breakup from the zero page
for (unsigned i = 0; i < NPAGES; i++) {
mem[i << 12] = i + 1;
}
// Allow numastats to gather statistics
getchar();
return 0;
}
migrate_pages %< ----------------------------------------------------
void *anon_mem(size_t size)
{
void *ret;
ret = mmap(NULL, size, PROT_READ|
PROT_WRITE, MAP_PRIVATE|
MAP_ANON, -1, 0);
return ret == MAP_FAILED ? NULL : ret;
}
unsigned long mround(unsigned long v, unsigned long m)
{
if (m == 0) {
return v;
}
return v + m - (v % m);
}
void bitmap_set(void *_bitmap, unsigned long b)
{
uint8_t *bitmap = _bitmap;
bitmap[b >> 3] |= (1 << (b & 7));
}
int main(int argc, char *argv[])
{
unsigned long *old_nodes, *new_nodes, maxnode, node, i;
size_t bytes;
int8_t *mem;
long res;
if (argv[1] == NULL || argv[2] == NULL) {
printf("missing argument: %s maxnodes node\n", argv[0]);
return -1;
}
maxnode = atoi(argv[1]);
node = atoi(argv[2]);
// bind memory to node 0 ...
i = 1;
res = set_mempolicy(MPOL_BIND, &i, 2);
if (res) {
printf("set_mempolicy(MPOL_BIND, []=1, %d) "
"failed with %d\n", maxnode, errno);
return -1;
}
bytes = mround(mround(maxnode, 8) >> 3,
sizeof(unsigned long));
old_nodes = calloc(bytes, 1);
new_nodes = calloc(bytes, 1);
mem = anon_mem(NPAGES << 12);
if (!mem || !new_nodes || !old_nodes) {
return -1;
}
// Write something to breakup from the zero page
for (unsigned i = 0; i < NPAGES; i++) {
mem[i << 12] = i + 1;
}
// Try to bind memory to node
bitmap_set(old_nodes, 0);
bitmap_set(new_nodes, node);
res = migrate_pages(getpid(), maxnode,
old_nodes, new_nodes);
if (res) {
printf("migrate_pages(pid, %d, old_nodes, "
"new_nodes) failed with %d\n",
maxnode, errno);
return -1;
}
// Allow numastats to gather statistics
getchar();
return 0;
}
Signed-off-by: Jérôme Glisse <jglisse(a)google.com>
To: Andrew Morton <akpm(a)linux-foundation.org>
To: linux-mm(a)kvack.org
Cc: linux-kernel(a)vger.kernel.org
Cc: stable(a)vger.kernel.org
---
mm/mempolicy.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index aec756ae5637..658e5366d266 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -1434,7 +1434,6 @@ static int get_bitmap(unsigned long *mask, const unsigned long __user *nmask,
static int get_nodes(nodemask_t *nodes, const unsigned long __user *nmask,
unsigned long maxnode)
{
- --maxnode;
nodes_clear(*nodes);
if (maxnode == 0 || !nmask)
return 0;
--
2.45.2.1089.g2a221341d9-goog
The patch titled
Subject: crash: fix x86_32 crash memory reserve dead loop bug at high
has been added to the -mm mm-nonmm-unstable branch. Its filename is
crash-fix-x86_32-crash-memory-reserve-dead-loop-bug-at-high.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Jinjie Ruan <ruanjinjie(a)huawei.com>
Subject: crash: fix x86_32 crash memory reserve dead loop bug at high
Date: Thu, 18 Jul 2024 11:54:43 +0800
On x86_32 Qemu machine with 1GB memory, the cmdline "crashkernel=512M" will
also cause system stall as below:
ACPI: Reserving FACP table memory at [mem 0x3ffe18b8-0x3ffe192b]
ACPI: Reserving DSDT table memory at [mem 0x3ffe0040-0x3ffe18b7]
ACPI: Reserving FACS table memory at [mem 0x3ffe0000-0x3ffe003f]
ACPI: Reserving APIC table memory at [mem 0x3ffe192c-0x3ffe19bb]
ACPI: Reserving HPET table memory at [mem 0x3ffe19bc-0x3ffe19f3]
ACPI: Reserving WAET table memory at [mem 0x3ffe19f4-0x3ffe1a1b]
143MB HIGHMEM available.
879MB LOWMEM available.
mapped low ram: 0 - 36ffe000
low ram: 0 - 36ffe000
(stall here)
The reason is that the CRASH_ADDR_LOW_MAX is equal to CRASH_ADDR_HIGH_MAX
on x86_32, the first "low" crash kernel memory reservation for 512M fails,
then it go into the "retry" loop and never came out as below (consider
CRASH_ADDR_LOW_MAX = CRASH_ADDR_HIGH_MAX = 512M):
-> reserve_crashkernel_generic() and high is false
-> alloc at [0, 0x20000000] fail
-> alloc at [0x20000000, 0x20000000] fail and repeatedly
(because CRASH_ADDR_LOW_MAX = CRASH_ADDR_HIGH_MAX).
Fix it by skipping meaningless calls of memblock_phys_alloc_range() with
`start = end`
After this patch, the retry dead loop is avoided and print below info:
cannot allocate crashkernel (size:0x20000000)
And apply generic crashkernel reservation to 32bit system will be ready.
Link: https://lkml.kernel.org/r/20240718035444.2977105-3-ruanjinjie@huawei.com
Fixes: 9c08a2a139fe ("x86: kdump: use generic interface to simplify crashkernel reservation code")
Signed-off-by: Jinjie Ruan <ruanjinjie(a)huawei.com>
Signed-off-by: Baoquan He <bhe(a)redhat.com>
Tested-by: Jinjie Ruan <ruanjinjie(a)huawei.com>
Cc: Albert Ou <aou(a)eecs.berkeley.edu>
Cc: Andrew Davis <afd(a)ti.com>
Cc: Arnd Bergmann <arnd(a)arndb.de>
Cc: Borislav Petkov <bp(a)alien8.de>
Cc: Catalin Marinas <catalin.marinas(a)arm.com>
Cc: Chen Jiahao <chenjiahao16(a)huawei.com>
Cc: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: Dave Young <dyoung(a)redhat.com>
Cc: Eric DeVolder <eric.devolder(a)oracle.com>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Hari Bathini <hbathini(a)linux.ibm.com>
Cc: Helge Deller <deller(a)gmx.de>
Cc: "H. Peter Anvin" <hpa(a)zytor.com>
Cc: Ingo Molnar <mingo(a)redhat.com>
Cc: Javier Martinez Canillas <javierm(a)redhat.com>
Cc: Linus Walleij <linus.walleij(a)linaro.org>
Cc: Palmer Dabbelt <palmer(a)dabbelt.com>
Cc: Paul Walmsley <paul.walmsley(a)sifive.com>
Cc: Rob Herring <robh(a)kernel.org>
Cc: Russell King <linux(a)armlinux.org.uk>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Vivek Goyal <vgoyal(a)redhat.com>
Cc: Will Deacon <will(a)kernel.org>
Cc: Zhen Lei <thunder.leizhen(a)huawei.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
kernel/crash_reserve.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/kernel/crash_reserve.c~crash-fix-x86_32-crash-memory-reserve-dead-loop-bug-at-high
+++ a/kernel/crash_reserve.c
@@ -413,7 +413,8 @@ retry:
search_end = CRASH_ADDR_HIGH_MAX;
search_base = CRASH_ADDR_LOW_MAX;
crash_low_size = DEFAULT_CRASH_KERNEL_LOW_SIZE;
- goto retry;
+ if (search_base != search_end)
+ goto retry;
}
/*
_
Patches currently in -mm which might be from ruanjinjie(a)huawei.com are
crash-fix-x86_32-crash-memory-reserve-dead-loop-bug.patch
crash-fix-x86_32-crash-memory-reserve-dead-loop-bug-at-high.patch
arm-use-generic-interface-to-simplify-crashkernel-reservation.patch
Changes since v1:
Fixed some formatting errors to make the patchset less confusing.
A patchset from linux-5.15 should be backported to 4.19 that can
significantly improve ext4 fs read and write performance. Unixbench test
results for linux-4.19.318 on Phytium D2000 CPU are shown below.
Test cmd: (Phytium D2000 only has 8 cores)
./Run fs -c 8
Before this patch set:
File Copy 1024 bufsize 2000 maxblocks 1124181
File Copy 256 bufsize 500 maxblocks 281885
File Copy 4096 bufsize 8000 maxblocks 3383785
File Read 1024 bufsize 2000 maxblocks 8702173
File Read 256 bufsize 500 maxblocks 3869384
File Read 4096 bufsize 8000 maxblocks 13043151
File Write 1024 bufsize 2000 maxblocks 1107185
File Write 256 bufsize 500 maxblocks 270493
File Write 4096 bufsize 8000 maxblocks 4018084
After this patch set:
File Copy 1024 bufsize 2000 maxblocks 2026206
File Copy 256 bufsize 500 maxblocks 829534
File Copy 4096 bufsize 8000 maxblocks 4066659
File Read 1024 bufsize 2000 maxblocks 8877219
File Read 256 bufsize 500 maxblocks 3997445
File Read 4096 bufsize 8000 maxblocks 13179885
File Write 1024 bufsize 2000 maxblocks 4256929
File Write 256 bufsize 500 maxblocks 1305320
File Write 4096 bufsize 8000 maxblocks 10721052
We can observe a quantum leap in the test results as a consequence of
applying this patchset
Link: https://lore.kernel.org/all/20210716122024.1105856-1-yi.zhang@huawei.com/
Original description:
This patchset address to improve buffer write performance with delalloc.
The first patch reduce the unnecessary update i_disksize, the second two
patch refactor the inline data write procedure and also do some small
fix, the last patch do improve by remove all unnecessary journal handle
in the delalloc write procedure.
After this patch set, we could get a lot of performance improvement.
Below is the Unixbench comparison data test on my machine with 'Intel
Xeon Gold 5120' CPU and nvme SSD backend.
Test cmd:
./Run -c 56 -i 3 fstime fsbuffer fsdisk
Before this patch set:
System Benchmarks Partial Index BASELINE RESULT INDEX
File Copy 1024 bufsize 2000 maxblocks 3960.0 422965.0 1068.1
File Copy 256 bufsize 500 maxblocks 1655.0 105077.0 634.9
File Copy 4096 bufsize 8000 maxblocks 5800.0 1429092.0 2464.0
========
System Benchmarks Index Score (Partial Only) 1186.6
After this patch set:
System Benchmarks Partial Index BASELINE RESULT INDEX
File Copy 1024 bufsize 2000 maxblocks 3960.0 732716.0 1850.3
File Copy 256 bufsize 500 maxblocks 1655.0 184940.0 1117.5
File Copy 4096 bufsize 8000 maxblocks 5800.0 2427152.0 4184.7
========
System Benchmarks Index Score (Partial Only) 2053.0
Zhang Yi (4):
ext4: check and update i_disksize properly
ext4: correct the error path of ext4_write_inline_data_end()
ext4: factor out write end code of inline file
ext4: drop unnecessary journal handle in delalloc write
fs/ext4/ext4.h | 3 -
fs/ext4/inline.c | 120 ++++++++++++++++++-------------------
fs/ext4/inode.c | 150 ++++++++++++-----------------------------------
3 files changed, 99 insertions(+), 174 deletions(-)
--
2.31.1
The patch titled
Subject: mm/page_alloc: fix pcp->count race between drain_pages_zone() vs __rmqueue_pcplist()
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
mm-page_alloc-fix-pcp-count-race-between-drain_pages_zone-vs-__rmqueue_pcplist.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-hotfixes-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Li Zhijian <lizhijian(a)fujitsu.com>
Subject: mm/page_alloc: fix pcp->count race between drain_pages_zone() vs __rmqueue_pcplist()
Date: Tue, 23 Jul 2024 14:44:28 +0800
It's expected that no page should be left in pcp_list after calling
zone_pcp_disable() in offline_pages(). Previously, it's observed that
offline_pages() gets stuck [1] due to some pages remaining in pcp_list.
Cause:
There is a race condition between drain_pages_zone() and __rmqueue_pcplist()
involving the pcp->count variable. See below scenario:
CPU0 CPU1
---------------- ---------------
spin_lock(&pcp->lock);
__rmqueue_pcplist() {
zone_pcp_disable() {
/* list is empty */
if (list_empty(list)) {
/* add pages to pcp_list */
alloced = rmqueue_bulk()
mutex_lock(&pcp_batch_high_lock)
...
__drain_all_pages() {
drain_pages_zone() {
/* read pcp->count, it's 0 here */
count = READ_ONCE(pcp->count)
/* 0 means nothing to drain */
/* update pcp->count */
pcp->count += alloced << order;
...
...
spin_unlock(&pcp->lock);
In this case, after calling zone_pcp_disable() though, there are still some
pages in pcp_list. And these pages in pcp_list are neither movable nor
isolated, offline_pages() gets stuck as a result.
Solution:
Expand the scope of the pcp->lock to also protect pcp->count in
drain_pages_zone(), to ensure no pages are left in the pcp list after
zone_pcp_disable()
[1] https://lore.kernel.org/linux-mm/6a07125f-e720-404c-b2f9-e55f3f166e85@fujit…
Link: https://lkml.kernel.org/r/20240723064428.1179519-1-lizhijian@fujitsu.com
Fixes: 4b23a68f9536 ("mm/page_alloc: protect PCP lists with a spinlock")
Signed-off-by: Li Zhijian <lizhijian(a)fujitsu.com>
Reported-by: Yao Xingtao <yaoxt.fnst(a)fujitsu.com>
Reviewed-by: Vlastimil Babka <vbabka(a)suse.cz>
Cc: David Hildenbrand <david(a)redhat.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/page_alloc.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
--- a/mm/page_alloc.c~mm-page_alloc-fix-pcp-count-race-between-drain_pages_zone-vs-__rmqueue_pcplist
+++ a/mm/page_alloc.c
@@ -2343,16 +2343,20 @@ void drain_zone_pages(struct zone *zone,
static void drain_pages_zone(unsigned int cpu, struct zone *zone)
{
struct per_cpu_pages *pcp = per_cpu_ptr(zone->per_cpu_pageset, cpu);
- int count = READ_ONCE(pcp->count);
-
- while (count) {
- int to_drain = min(count, pcp->batch << CONFIG_PCP_BATCH_SCALE_MAX);
- count -= to_drain;
+ int count;
+ do {
spin_lock(&pcp->lock);
- free_pcppages_bulk(zone, to_drain, pcp, 0);
+ count = pcp->count;
+ if (count) {
+ int to_drain = min(count,
+ pcp->batch << CONFIG_PCP_BATCH_SCALE_MAX);
+
+ free_pcppages_bulk(zone, to_drain, pcp, 0);
+ count -= to_drain;
+ }
spin_unlock(&pcp->lock);
- }
+ } while (count);
}
/*
_
Patches currently in -mm which might be from lizhijian(a)fujitsu.com are
mm-page_alloc-fix-pcp-count-race-between-drain_pages_zone-vs-__rmqueue_pcplist.patch
The patch titled
Subject: scripts/gdb: fix lx-mounts command error
has been added to the -mm mm-nonmm-unstable branch. Its filename is
scripts-gdb-fix-lx-mounts-command-error.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Kuan-Ying Lee <kuan-ying.lee(a)canonical.com>
Subject: scripts/gdb: fix lx-mounts command error
Date: Tue, 23 Jul 2024 14:48:59 +0800
(gdb) lx-mounts
mount super_block devname pathname fstype options
Python Exception <class 'gdb.error'>: There is no member named list.
Error occurred in Python: There is no member named list.
We encounter the above issue after commit 2eea9ce4310d ("mounts: keep
list of mounts in an rbtree"). The commit move a mount from list into
rbtree.
So we can instead use rbtree to iterate all mounts information.
Link: https://lkml.kernel.org/r/20240723064902.124154-4-kuan-ying.lee@canonical.c…
Fixes: 2eea9ce4310d ("mounts: keep list of mounts in an rbtree")
Signed-off-by: Kuan-Ying Lee <kuan-ying.lee(a)canonical.com>
Cc: Jan Kiszka <jan.kiszka(a)siemens.com>
Cc: Kieran Bingham <kbingham(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
scripts/gdb/linux/proc.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/scripts/gdb/linux/proc.py~scripts-gdb-fix-lx-mounts-command-error
+++ a/scripts/gdb/linux/proc.py
@@ -18,6 +18,7 @@ from linux import utils
from linux import tasks
from linux import lists
from linux import vfs
+from linux import rbtree
from struct import *
@@ -172,8 +173,7 @@ values of that process namespace"""
gdb.write("{:^18} {:^15} {:>9} {} {} options\n".format(
"mount", "super_block", "devname", "pathname", "fstype"))
- for mnt in lists.list_for_each_entry(namespace['list'],
- mount_ptr_type, "mnt_list"):
+ for mnt in rbtree.rb_inorder_for_each_entry(namespace['mounts'], mount_ptr_type, "mnt_node"):
devname = mnt['mnt_devname'].string()
devname = devname if devname else "none"
_
Patches currently in -mm which might be from kuan-ying.lee(a)canonical.com are
scripts-gdb-fix-timerlist-parsing-issue.patch
scripts-gdb-add-iteration-function-for-rbtree.patch
scripts-gdb-fix-lx-mounts-command-error.patch
scripts-gdb-add-lx-stack_depot_lookup-command.patch
scripts-gdb-add-lx-kasan_mem_to_shadow-command.patch
The patch titled
Subject: scripts/gdb: add iteration function for rbtree
has been added to the -mm mm-nonmm-unstable branch. Its filename is
scripts-gdb-add-iteration-function-for-rbtree.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Kuan-Ying Lee <kuan-ying.lee(a)canonical.com>
Subject: scripts/gdb: add iteration function for rbtree
Date: Tue, 23 Jul 2024 14:48:58 +0800
Add inorder iteration function for rbtree usage.
This is a preparation patch for the next patch to fix the gdb mounts
issue.
Link: https://lkml.kernel.org/r/20240723064902.124154-3-kuan-ying.lee@canonical.c…
Fixes: 2eea9ce4310d ("mounts: keep list of mounts in an rbtree")
Signed-off-by: Kuan-Ying Lee <kuan-ying.lee(a)canonical.com>
Cc: Jan Kiszka <jan.kiszka(a)siemens.com>
Cc: Kieran Bingham <kbingham(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
scripts/gdb/linux/rbtree.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
--- a/scripts/gdb/linux/rbtree.py~scripts-gdb-add-iteration-function-for-rbtree
+++ a/scripts/gdb/linux/rbtree.py
@@ -9,6 +9,18 @@ from linux import utils
rb_root_type = utils.CachedType("struct rb_root")
rb_node_type = utils.CachedType("struct rb_node")
+def rb_inorder_for_each(root):
+ def inorder(node):
+ if node:
+ yield from inorder(node['rb_left'])
+ yield node
+ yield from inorder(node['rb_right'])
+
+ yield from inorder(root['rb_node'])
+
+def rb_inorder_for_each_entry(root, gdbtype, member):
+ for node in rb_inorder_for_each(root):
+ yield utils.container_of(node, gdbtype, member)
def rb_first(root):
if root.type == rb_root_type.get_type():
_
Patches currently in -mm which might be from kuan-ying.lee(a)canonical.com are
scripts-gdb-fix-timerlist-parsing-issue.patch
scripts-gdb-add-iteration-function-for-rbtree.patch
scripts-gdb-fix-lx-mounts-command-error.patch
scripts-gdb-add-lx-stack_depot_lookup-command.patch
scripts-gdb-add-lx-kasan_mem_to_shadow-command.patch
The patch titled
Subject: scripts/gdb: fix timerlist parsing issue
has been added to the -mm mm-nonmm-unstable branch. Its filename is
scripts-gdb-fix-timerlist-parsing-issue.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Kuan-Ying Lee <kuan-ying.lee(a)canonical.com>
Subject: scripts/gdb: fix timerlist parsing issue
Date: Tue, 23 Jul 2024 14:48:57 +0800
Patch series "Fix some GDB command error and add some GDB commands", v3.
Fix some GDB command errors and add some useful GDB commands.
This patch (of 5):
Commit 7988e5ae2be7 ("tick: Split nohz and highres features from
nohz_mode") and commit 7988e5ae2be7 ("tick: Split nohz and highres
features from nohz_mode") move 'tick_stopped' and 'nohz_mode' to flags
field which will break the gdb lx-mounts command:
(gdb) lx-timerlist
Python Exception <class 'gdb.error'>: There is no member named nohz_mode.
Error occurred in Python: There is no member named nohz_mode.
(gdb) lx-timerlist
Python Exception <class 'gdb.error'>: There is no member named tick_stopped.
Error occurred in Python: There is no member named tick_stopped.
We move 'tick_stopped' and 'nohz_mode' to flags field instead.
Link: https://lkml.kernel.org/r/20240723064902.124154-1-kuan-ying.lee@canonical.c…
Link: https://lkml.kernel.org/r/20240723064902.124154-2-kuan-ying.lee@canonical.c…
Fixes: a478ffb2ae23 ("tick: Move individual bit features to debuggable mask accesses")
Fixes: 7988e5ae2be7 ("tick: Split nohz and highres features from nohz_mode")
Signed-off-by: Kuan-Ying Lee <kuan-ying.lee(a)canonical.com>
Cc: Jan Kiszka <jan.kiszka(a)siemens.com>
Cc: Kieran Bingham <kbingham(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
scripts/gdb/linux/timerlist.py | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
--- a/scripts/gdb/linux/timerlist.py~scripts-gdb-fix-timerlist-parsing-issue
+++ a/scripts/gdb/linux/timerlist.py
@@ -87,21 +87,22 @@ def print_cpu(hrtimer_bases, cpu, max_cl
text += "\n"
if constants.LX_CONFIG_TICK_ONESHOT:
- fmts = [(" .{} : {}", 'nohz_mode'),
- (" .{} : {} nsecs", 'last_tick'),
- (" .{} : {}", 'tick_stopped'),
- (" .{} : {}", 'idle_jiffies'),
- (" .{} : {}", 'idle_calls'),
- (" .{} : {}", 'idle_sleeps'),
- (" .{} : {} nsecs", 'idle_entrytime'),
- (" .{} : {} nsecs", 'idle_waketime'),
- (" .{} : {} nsecs", 'idle_exittime'),
- (" .{} : {} nsecs", 'idle_sleeptime'),
- (" .{}: {} nsecs", 'iowait_sleeptime'),
- (" .{} : {}", 'last_jiffies'),
- (" .{} : {}", 'next_timer'),
- (" .{} : {} nsecs", 'idle_expires')]
- text += "\n".join([s.format(f, ts[f]) for s, f in fmts])
+ TS_FLAG_STOPPED = 1 << 1
+ TS_FLAG_NOHZ = 1 << 4
+ text += f" .{'nohz':15s}: {int(bool(ts['flags'] & TS_FLAG_NOHZ))}\n"
+ text += f" .{'last_tick':15s}: {ts['last_tick']}\n"
+ text += f" .{'tick_stopped':15s}: {int(bool(ts['flags'] & TS_FLAG_STOPPED))}\n"
+ text += f" .{'idle_jiffies':15s}: {ts['idle_jiffies']}\n"
+ text += f" .{'idle_calls':15s}: {ts['idle_calls']}\n"
+ text += f" .{'idle_sleeps':15s}: {ts['idle_sleeps']}\n"
+ text += f" .{'idle_entrytime':15s}: {ts['idle_entrytime']} nsecs\n"
+ text += f" .{'idle_waketime':15s}: {ts['idle_waketime']} nsecs\n"
+ text += f" .{'idle_exittime':15s}: {ts['idle_exittime']} nsecs\n"
+ text += f" .{'idle_sleeptime':15s}: {ts['idle_sleeptime']} nsecs\n"
+ text += f" .{'iowait_sleeptime':15s}: {ts['iowait_sleeptime']} nsecs\n"
+ text += f" .{'last_jiffies':15s}: {ts['last_jiffies']}\n"
+ text += f" .{'next_timer':15s}: {ts['next_timer']}\n"
+ text += f" .{'idle_expires':15s}: {ts['idle_expires']} nsecs\n"
text += "\njiffies: {}\n".format(jiffies)
text += "\n"
_
Patches currently in -mm which might be from kuan-ying.lee(a)canonical.com are
scripts-gdb-fix-timerlist-parsing-issue.patch
scripts-gdb-add-iteration-function-for-rbtree.patch
scripts-gdb-fix-lx-mounts-command-error.patch
scripts-gdb-add-lx-stack_depot_lookup-command.patch
scripts-gdb-add-lx-kasan_mem_to_shadow-command.patch
From: Zhang Yi <yi.zhang(a)huawei.com>
commit 4df031ff5876d94b48dd9ee486ba5522382a06b2 upstream
After commit 3da40c7b0898 ("ext4: only call ext4_truncate when size <=
isize"), i_disksize could always be updated to i_size in ext4_setattr(),
and we could sure that i_disksize <= i_size since holding inode lock and
if i_disksize < i_size there are delalloc writes pending in the range
upto i_size. If the end of the current write is <= i_size, there's no
need to touch i_disksize since writeback will push i_disksize upto
i_size eventually. So we can switch to check i_size instead of
i_disksize in ext4_da_write_end() when write to the end of the file.
we also could remove ext4_mark_inode_dirty() together because we defer
inode dirtying to generic_write_end() or ext4_da_write_inline_data_end().
Cc: stable(a)vger.kernel.org
Signed-off-by: Zhang Yi <yi.zhang(a)huawei.com>
Reviewed-by: Jan Kara <jack(a)suse.cz>
Signed-off-by: Theodore Ts'o <tytso(a)mit.edu>
Link: https://lore.kernel.org/r/20210716122024.1105856-2-yi.zhang@huawei.com
Reviewed-by: Cheng Nie <niecheng1(a)uniontech.com>
Signed-off-by: Dandan Zhang <zhangdandan(a)uniontech.com>
Signed-off-by: WangYuli <wangyuli(a)uniontech.com>
---
fs/ext4/inode.c | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 646285fbc9fc..d8a8e4ee5ff8 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3207,35 +3207,37 @@ static int ext4_da_write_end(struct file *file,
end = start + copied - 1;
/*
- * generic_write_end() will run mark_inode_dirty() if i_size
- * changes. So let's piggyback the i_disksize mark_inode_dirty
- * into that.
+ * Since we are holding inode lock, we are sure i_disksize <=
+ * i_size. We also know that if i_disksize < i_size, there are
+ * delalloc writes pending in the range upto i_size. If the end of
+ * the current write is <= i_size, there's no need to touch
+ * i_disksize since writeback will push i_disksize upto i_size
+ * eventually. If the end of the current write is > i_size and
+ * inside an allocated block (ext4_da_should_update_i_disksize()
+ * check), we need to update i_disksize here as neither
+ * ext4_writepage() nor certain ext4_writepages() paths not
+ * allocating blocks update i_disksize.
+ *
+ * Note that we defer inode dirtying to generic_write_end() /
+ * ext4_da_write_inline_data_end().
*/
new_i_size = pos + copied;
- if (copied && new_i_size > EXT4_I(inode)->i_disksize) {
+ if (copied && new_i_size > inode->i_size) {
if (ext4_has_inline_data(inode) ||
- ext4_da_should_update_i_disksize(page, end)) {
+ ext4_da_should_update_i_disksize(page, end))
ext4_update_i_disksize(inode, new_i_size);
- /* We need to mark inode dirty even if
- * new_i_size is less that inode->i_size
- * bu greater than i_disksize.(hint delalloc)
- */
- ext4_mark_inode_dirty(handle, inode);
- }
}
if (write_mode != CONVERT_INLINE_DATA &&
ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA) &&
ext4_has_inline_data(inode))
- ret2 = ext4_da_write_inline_data_end(inode, pos, len, copied,
+ ret = ext4_da_write_inline_data_end(inode, pos, len, copied,
page);
else
- ret2 = generic_write_end(file, mapping, pos, len, copied,
+ ret = generic_write_end(file, mapping, pos, len, copied,
page, fsdata);
- copied = ret2;
- if (ret2 < 0)
- ret = ret2;
+ copied = ret;
ret2 = ext4_journal_stop(handle);
if (!ret)
ret = ret2;
--
2.43.4
commit 3cad1bc010416c6dd780643476bc59ed742436b9 upstream.
When fcntl_setlk() races with close(), it removes the created lock with
do_lock_file_wait().
However, LSMs can allow the first do_lock_file_wait() that created the lock
while denying the second do_lock_file_wait() that tries to remove the lock.
In theory (but AFAIK not in practice), posix_lock_file() could also fail to
remove a lock due to GFP_KERNEL allocation failure (when splitting a range
in the middle).
After the bug has been triggered, use-after-free reads will occur in
lock_get_status() when userspace reads /proc/locks. This can likely be used
to read arbitrary kernel memory, but can't corrupt kernel memory.
This only affects systems with SELinux / Smack / AppArmor / BPF-LSM in
enforcing mode and only works from some security contexts.
Fix it by calling locks_remove_posix() instead, which is designed to
reliably get rid of POSIX locks associated with the given file and
files_struct and is also used by filp_flush().
Fixes: c293621bbf67 ("[PATCH] stale POSIX lock handling")
Cc: stable(a)kernel.org
Link: https://bugs.chromium.org/p/project-zero/issues/detail?id=2563
Signed-off-by: Jann Horn <jannh(a)google.com>
Link: https://lore.kernel.org/r/20240702-fs-lock-recover-2-v1-1-edd456f63789@goog…
Reviewed-by: Jeff Layton <jlayton(a)kernel.org>
Signed-off-by: Christian Brauner <brauner(a)kernel.org>
[stable fixup: ->c.flc_type was ->fl_type in older kernels]
Signed-off-by: Jann Horn <jannh(a)google.com>
---
fs/locks.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/locks.c b/fs/locks.c
index fb717dae9029..31659a2d9862 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -2381,8 +2381,9 @@ int fcntl_setlk(unsigned int fd, struct file *filp, unsigned int cmd,
error = do_lock_file_wait(filp, cmd, file_lock);
/*
- * Attempt to detect a close/fcntl race and recover by releasing the
- * lock that was just acquired. There is no need to do that when we're
+ * Detect close/fcntl races and recover by zapping all POSIX locks
+ * associated with this file and our files_struct, just like on
+ * filp_flush(). There is no need to do that when we're
* unlocking though, or for OFD locks.
*/
if (!error && file_lock->fl_type != F_UNLCK &&
@@ -2397,9 +2398,7 @@ int fcntl_setlk(unsigned int fd, struct file *filp, unsigned int cmd,
f = files_lookup_fd_locked(files, fd);
spin_unlock(&files->file_lock);
if (f != filp) {
- file_lock->fl_type = F_UNLCK;
- error = do_lock_file_wait(filp, cmd, file_lock);
- WARN_ON_ONCE(error);
+ locks_remove_posix(filp, files);
error = -EBADF;
}
}
base-commit: 2eaf5c0d81911ba05bace3a722cbcd708fdbbcba
--
2.45.2.1089.g2a221341d9-goog
Unaccepted memory is considered unusable free memory, which is not
counted as free on the zone watermark check. This causes
get_page_from_freelist() to accept more memory to hit the high
watermark, but it creates problems in the reclaim path.
The reclaim path encounters a failed zone watermark check and attempts
to reclaim memory. This is usually successful, but if there is little or
no reclaimable memory, it can result in endless reclaim with little to
no progress. This can occur early in the boot process, just after start
of the init process when the only reclaimable memory is the page cache
of the init executable and its libraries.
To address this issue, teach shrink_node() and shrink_zones() to accept
memory before attempting to reclaim.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Reported-by: Jianxiong Gao <jxgao(a)google.com>
Fixes: dcdfdd40fa82 ("mm: Add support for unaccepted memory")
Cc: stable(a)vger.kernel.org # v6.5+
---
mm/internal.h | 9 +++++++++
mm/page_alloc.c | 8 +-------
mm/vmscan.c | 36 ++++++++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+), 7 deletions(-)
diff --git a/mm/internal.h b/mm/internal.h
index cc2c5e07fad3..ea55cbad061f 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -1515,4 +1515,13 @@ static inline void shrinker_debugfs_remove(struct dentry *debugfs_entry,
void workingset_update_node(struct xa_node *node);
extern struct list_lru shadow_nodes;
+#ifdef CONFIG_UNACCEPTED_MEMORY
+bool try_to_accept_memory(struct zone *zone, unsigned int order);
+#else
+static inline bool try_to_accept_memory(struct zone *zone, unsigned int order)
+{
+ return false;
+}
+#endif /* CONFIG_UNACCEPTED_MEMORY */
+
#endif /* __MM_INTERNAL_H */
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 9ecf99190ea2..9a108c92245f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -287,7 +287,6 @@ EXPORT_SYMBOL(nr_online_nodes);
static bool page_contains_unaccepted(struct page *page, unsigned int order);
static void accept_page(struct page *page, unsigned int order);
-static bool try_to_accept_memory(struct zone *zone, unsigned int order);
static inline bool has_unaccepted_memory(void);
static bool __free_unaccepted(struct page *page);
@@ -6940,7 +6939,7 @@ static bool try_to_accept_memory_one(struct zone *zone)
return true;
}
-static bool try_to_accept_memory(struct zone *zone, unsigned int order)
+bool try_to_accept_memory(struct zone *zone, unsigned int order)
{
long to_accept;
int ret = false;
@@ -6999,11 +6998,6 @@ static void accept_page(struct page *page, unsigned int order)
{
}
-static bool try_to_accept_memory(struct zone *zone, unsigned int order)
-{
- return false;
-}
-
static inline bool has_unaccepted_memory(void)
{
return false;
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 2e34de9cd0d4..b2af1263b1bc 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -5900,12 +5900,44 @@ static void shrink_node_memcgs(pg_data_t *pgdat, struct scan_control *sc)
} while ((memcg = mem_cgroup_iter(target_memcg, memcg, NULL)));
}
+#ifdef CONFIG_UNACCEPTED_MEMORY
+static bool node_try_to_accept_memory(pg_data_t *pgdat, struct scan_control *sc)
+{
+ bool progress = false;
+ struct zone *zone;
+ int z;
+
+ for (z = 0; z <= sc->reclaim_idx; z++) {
+ zone = pgdat->node_zones + z;
+ if (!managed_zone(zone))
+ continue;
+
+ if (try_to_accept_memory(zone, sc->order))
+ progress = true;
+ }
+
+ return progress;
+}
+#else
+static inline bool node_try_to_accept_memory(pg_data_t *pgdat,
+ struct scan_control *sc)
+{
+ return false;
+}
+#endif /* CONFIG_UNACCEPTED_MEMORY */
+
static void shrink_node(pg_data_t *pgdat, struct scan_control *sc)
{
unsigned long nr_reclaimed, nr_scanned, nr_node_reclaimed;
struct lruvec *target_lruvec;
bool reclaimable = false;
+ /* Try to accept memory before going for reclaim */
+ if (node_try_to_accept_memory(pgdat, sc)) {
+ if (!should_continue_reclaim(pgdat, 0, sc))
+ return;
+ }
+
if (lru_gen_enabled() && root_reclaim(sc)) {
lru_gen_shrink_node(pgdat, sc);
return;
@@ -6118,6 +6150,10 @@ static void shrink_zones(struct zonelist *zonelist, struct scan_control *sc)
GFP_KERNEL | __GFP_HARDWALL))
continue;
+ /* Try to accept memory before going for reclaim */
+ if (try_to_accept_memory(zone, sc->order))
+ continue;
+
/*
* If we already have plenty of memory free for
* compaction in this zone, don't free any more.
--
2.43.0
From: Gabriel Krisman Bertazi <krisman(a)collabora.com>
[ Upstream commit 124e7c61deb27d758df5ec0521c36cf08d417f7a ]
ext4_abort will eventually call ext4_errno_to_code, which translates the
errno to an EXT4_ERR specific error. This means that ext4_abort expects
an errno. By using EXT4_ERR_ here, it gets misinterpreted (as an errno),
and ends up saving EXT4_ERR_EBUSY on the superblock during an abort,
which makes no sense.
ESHUTDOWN will get properly translated to EXT4_ERR_SHUTDOWN, so use that
instead.
Signed-off-by: Gabriel Krisman Bertazi <krisman(a)collabora.com>
Link: https://lore.kernel.org/r/20211026173302.84000-1-krisman@collabora.com
Signed-off-by: Theodore Ts'o <tytso(a)mit.edu>
Signed-off-by: Ajay Kaher <ajay.kaher(a)broadcom.com>
---
fs/ext4/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 160e5824948270..0e8406f5bf0aa0 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5820,7 +5820,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
}
if (ext4_test_mount_flag(sb, EXT4_MF_FS_ABORTED))
- ext4_abort(sb, EXT4_ERR_ESHUTDOWN, "Abort forced by user");
+ ext4_abort(sb, ESHUTDOWN, "Abort forced by user");
sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
(test_opt(sb, POSIX_ACL) ? SB_POSIXACL : 0);
--
cgit 1.2.3-korg
From: Jason Xing <kernelxing(a)tencent.com>
[ Upstream commit 6648e613226e18897231ab5e42ffc29e63fa3365 ]
Fix NULL pointer data-races in sk_psock_skb_ingress_enqueue() which
syzbot reported [1].
[1]
BUG: KCSAN: data-race in sk_psock_drop / sk_psock_skb_ingress_enqueue
write to 0xffff88814b3278b8 of 8 bytes by task 10724 on cpu 1:
sk_psock_stop_verdict net/core/skmsg.c:1257 [inline]
sk_psock_drop+0x13e/0x1f0 net/core/skmsg.c:843
sk_psock_put include/linux/skmsg.h:459 [inline]
sock_map_close+0x1a7/0x260 net/core/sock_map.c:1648
unix_release+0x4b/0x80 net/unix/af_unix.c:1048
__sock_release net/socket.c:659 [inline]
sock_close+0x68/0x150 net/socket.c:1421
__fput+0x2c1/0x660 fs/file_table.c:422
__fput_sync+0x44/0x60 fs/file_table.c:507
__do_sys_close fs/open.c:1556 [inline]
__se_sys_close+0x101/0x1b0 fs/open.c:1541
__x64_sys_close+0x1f/0x30 fs/open.c:1541
do_syscall_64+0xd3/0x1d0
entry_SYSCALL_64_after_hwframe+0x6d/0x75
read to 0xffff88814b3278b8 of 8 bytes by task 10713 on cpu 0:
sk_psock_data_ready include/linux/skmsg.h:464 [inline]
sk_psock_skb_ingress_enqueue+0x32d/0x390 net/core/skmsg.c:555
sk_psock_skb_ingress_self+0x185/0x1e0 net/core/skmsg.c:606
sk_psock_verdict_apply net/core/skmsg.c:1008 [inline]
sk_psock_verdict_recv+0x3e4/0x4a0 net/core/skmsg.c:1202
unix_read_skb net/unix/af_unix.c:2546 [inline]
unix_stream_read_skb+0x9e/0xf0 net/unix/af_unix.c:2682
sk_psock_verdict_data_ready+0x77/0x220 net/core/skmsg.c:1223
unix_stream_sendmsg+0x527/0x860 net/unix/af_unix.c:2339
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0x140/0x180 net/socket.c:745
____sys_sendmsg+0x312/0x410 net/socket.c:2584
___sys_sendmsg net/socket.c:2638 [inline]
__sys_sendmsg+0x1e9/0x280 net/socket.c:2667
__do_sys_sendmsg net/socket.c:2676 [inline]
__se_sys_sendmsg net/socket.c:2674 [inline]
__x64_sys_sendmsg+0x46/0x50 net/socket.c:2674
do_syscall_64+0xd3/0x1d0
entry_SYSCALL_64_after_hwframe+0x6d/0x75
value changed: 0xffffffff83d7feb0 -> 0x0000000000000000
Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 10713 Comm: syz-executor.4 Tainted: G W 6.8.0-syzkaller-08951-gfe46a7dd189e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
Prior to this, commit 4cd12c6065df ("bpf, sockmap: Fix NULL pointer
dereference in sk_psock_verdict_data_ready()") fixed one NULL pointer
similarly due to no protection of saved_data_ready. Here is another
different caller causing the same issue because of the same reason. So
we should protect it with sk_callback_lock read lock because the writer
side in the sk_psock_drop() uses "write_lock_bh(&sk->sk_callback_lock);".
To avoid errors that could happen in future, I move those two pairs of
lock into the sk_psock_data_ready(), which is suggested by John Fastabend.
Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface")
Reported-by: syzbot+aa8c8ec2538929f18f2d(a)syzkaller.appspotmail.com
Signed-off-by: Jason Xing <kernelxing(a)tencent.com>
Signed-off-by: Daniel Borkmann <daniel(a)iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend(a)gmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=aa8c8ec2538929f18f2d
Link: https://lore.kernel.org/all/20240329134037.92124-1-kerneljasonxing@gmail.com
Link: https://lore.kernel.org/bpf/20240404021001.94815-1-kerneljasonxing@gmail.com
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
[Ashwin: Regenerated the patch for v5.10]
Signed-off-by: Ashwin Dayanand Kamat <ashwin.kamat(a)broadcom.com>
---
include/linux/skmsg.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h
index 1138dd3071db..a197c9a49e97 100644
--- a/include/linux/skmsg.h
+++ b/include/linux/skmsg.h
@@ -406,10 +406,12 @@ static inline void sk_psock_put(struct sock *sk, struct sk_psock *psock)
static inline void sk_psock_data_ready(struct sock *sk, struct sk_psock *psock)
{
+ read_lock_bh(&sk->sk_callback_lock);
if (psock->parser.enabled)
psock->parser.saved_data_ready(sk);
else
sk->sk_data_ready(sk);
+ read_unlock_bh(&sk->sk_callback_lock);
}
static inline void psock_set_prog(struct bpf_prog **pprog,
--
2.45.1
From: Daniel Borkmann <daniel(a)iogearbox.net>
[ Upstream commit cfa1a2329a691ffd991fcf7248a57d752e712881 ]
The BPF ring buffer internally is implemented as a power-of-2 sized circular
buffer, with two logical and ever-increasing counters: consumer_pos is the
consumer counter to show which logical position the consumer consumed the
data, and producer_pos which is the producer counter denoting the amount of
data reserved by all producers.
Each time a record is reserved, the producer that "owns" the record will
successfully advance producer counter. In user space each time a record is
read, the consumer of the data advanced the consumer counter once it finished
processing. Both counters are stored in separate pages so that from user
space, the producer counter is read-only and the consumer counter is read-write.
One aspect that simplifies and thus speeds up the implementation of both
producers and consumers is how the data area is mapped twice contiguously
back-to-back in the virtual memory, allowing to not take any special measures
for samples that have to wrap around at the end of the circular buffer data
area, because the next page after the last data page would be first data page
again, and thus the sample will still appear completely contiguous in virtual
memory.
Each record has a struct bpf_ringbuf_hdr { u32 len; u32 pg_off; } header for
book-keeping the length and offset, and is inaccessible to the BPF program.
Helpers like bpf_ringbuf_reserve() return `(void *)hdr + BPF_RINGBUF_HDR_SZ`
for the BPF program to use. Bing-Jhong and Muhammad reported that it is however
possible to make a second allocated memory chunk overlapping with the first
chunk and as a result, the BPF program is now able to edit first chunk's
header.
For example, consider the creation of a BPF_MAP_TYPE_RINGBUF map with size
of 0x4000. Next, the consumer_pos is modified to 0x3000 /before/ a call to
bpf_ringbuf_reserve() is made. This will allocate a chunk A, which is in
[0x0,0x3008], and the BPF program is able to edit [0x8,0x3008]. Now, lets
allocate a chunk B with size 0x3000. This will succeed because consumer_pos
was edited ahead of time to pass the `new_prod_pos - cons_pos > rb->mask`
check. Chunk B will be in range [0x3008,0x6010], and the BPF program is able
to edit [0x3010,0x6010]. Due to the ring buffer memory layout mentioned
earlier, the ranges [0x0,0x4000] and [0x4000,0x8000] point to the same data
pages. This means that chunk B at [0x4000,0x4008] is chunk A's header.
bpf_ringbuf_submit() / bpf_ringbuf_discard() use the header's pg_off to then
locate the bpf_ringbuf itself via bpf_ringbuf_restore_from_rec(). Once chunk
B modified chunk A's header, then bpf_ringbuf_commit() refers to the wrong
page and could cause a crash.
Fix it by calculating the oldest pending_pos and check whether the range
from the oldest outstanding record to the newest would span beyond the ring
buffer size. If that is the case, then reject the request. We've tested with
the ring buffer benchmark in BPF selftests (./benchs/run_bench_ringbufs.sh)
before/after the fix and while it seems a bit slower on some benchmarks, it
is still not significantly enough to matter.
Fixes: 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it")
Reported-by: Bing-Jhong Billy Jheng <billy(a)starlabs.sg>
Reported-by: Muhammad Ramdhan <ramdhan(a)starlabs.sg>
Co-developed-by: Bing-Jhong Billy Jheng <billy(a)starlabs.sg>
Co-developed-by: Andrii Nakryiko <andrii(a)kernel.org>
Signed-off-by: Bing-Jhong Billy Jheng <billy(a)starlabs.sg>
Signed-off-by: Andrii Nakryiko <andrii(a)kernel.org>
Signed-off-by: Daniel Borkmann <daniel(a)iogearbox.net>
Signed-off-by: Andrii Nakryiko <andrii(a)kernel.org>
Link: https://lore.kernel.org/bpf/20240621140828.18238-1-daniel@iogearbox.net
Signed-off-by: Dominique Martinet <dominique.martinet(a)atmark-techno.com>
---
The only conflict with the patch was in the comment at top of the patch
(the commit that had changed this comment, 583c1f420173 ("bpf: Define
new BPF_MAP_TYPE_USER_RINGBUF map type"), has nothing to do with this
fix), so I went ahead with it.
I'm not familiar with the ringbuf code but it doesn't look too wrong to
me at first glance; and with this all stable branches are covered.
kernel/bpf/ringbuf.c | 30 +++++++++++++++++++++++++-----
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/kernel/bpf/ringbuf.c b/kernel/bpf/ringbuf.c
index 1e4bf23528a3..eac0026e2fa6 100644
--- a/kernel/bpf/ringbuf.c
+++ b/kernel/bpf/ringbuf.c
@@ -41,9 +41,12 @@ struct bpf_ringbuf {
* mapping consumer page as r/w, but restrict producer page to r/o.
* This protects producer position from being modified by user-space
* application and ruining in-kernel position tracking.
+ * Note that the pending counter is placed in the same
+ * page as the producer, so that it shares the same cache line.
*/
unsigned long consumer_pos __aligned(PAGE_SIZE);
unsigned long producer_pos __aligned(PAGE_SIZE);
+ unsigned long pending_pos;
char data[] __aligned(PAGE_SIZE);
};
@@ -145,6 +148,7 @@ static struct bpf_ringbuf *bpf_ringbuf_alloc(size_t data_sz, int numa_node)
rb->mask = data_sz - 1;
rb->consumer_pos = 0;
rb->producer_pos = 0;
+ rb->pending_pos = 0;
return rb;
}
@@ -323,9 +327,9 @@ bpf_ringbuf_restore_from_rec(struct bpf_ringbuf_hdr *hdr)
static void *__bpf_ringbuf_reserve(struct bpf_ringbuf *rb, u64 size)
{
- unsigned long cons_pos, prod_pos, new_prod_pos, flags;
- u32 len, pg_off;
+ unsigned long cons_pos, prod_pos, new_prod_pos, pend_pos, flags;
struct bpf_ringbuf_hdr *hdr;
+ u32 len, pg_off, tmp_size, hdr_len;
if (unlikely(size > RINGBUF_MAX_RECORD_SZ))
return NULL;
@@ -343,13 +347,29 @@ static void *__bpf_ringbuf_reserve(struct bpf_ringbuf *rb, u64 size)
spin_lock_irqsave(&rb->spinlock, flags);
}
+ pend_pos = rb->pending_pos;
prod_pos = rb->producer_pos;
new_prod_pos = prod_pos + len;
- /* check for out of ringbuf space by ensuring producer position
- * doesn't advance more than (ringbuf_size - 1) ahead
+ while (pend_pos < prod_pos) {
+ hdr = (void *)rb->data + (pend_pos & rb->mask);
+ hdr_len = READ_ONCE(hdr->len);
+ if (hdr_len & BPF_RINGBUF_BUSY_BIT)
+ break;
+ tmp_size = hdr_len & ~BPF_RINGBUF_DISCARD_BIT;
+ tmp_size = round_up(tmp_size + BPF_RINGBUF_HDR_SZ, 8);
+ pend_pos += tmp_size;
+ }
+ rb->pending_pos = pend_pos;
+
+ /* check for out of ringbuf space:
+ * - by ensuring producer position doesn't advance more than
+ * (ringbuf_size - 1) ahead
+ * - by ensuring oldest not yet committed record until newest
+ * record does not span more than (ringbuf_size - 1)
*/
- if (new_prod_pos - cons_pos > rb->mask) {
+ if (new_prod_pos - cons_pos > rb->mask ||
+ new_prod_pos - pend_pos > rb->mask) {
spin_unlock_irqrestore(&rb->spinlock, flags);
return NULL;
}
--
2.39.2
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 233323f9b9f828cd7cd5145ad811c1990b692542
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024071528-foothill-overdraft-d69a@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
233323f9b9f8 ("ACPI: processor_idle: Fix invalid comparison with insertion sort for latency")
0e6078c3c673 ("ACPI: processor idle: Use swap() instead of open coding it")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 233323f9b9f828cd7cd5145ad811c1990b692542 Mon Sep 17 00:00:00 2001
From: Kuan-Wei Chiu <visitorckw(a)gmail.com>
Date: Tue, 2 Jul 2024 04:56:39 +0800
Subject: [PATCH] ACPI: processor_idle: Fix invalid comparison with insertion
sort for latency
The acpi_cst_latency_cmp() comparison function currently used for
sorting C-state latencies does not satisfy transitivity, causing
incorrect sorting results.
Specifically, if there are two valid acpi_processor_cx elements A and B
and one invalid element C, it may occur that A < B, A = C, and B = C.
Sorting algorithms assume that if A < B and A = C, then C < B, leading
to incorrect ordering.
Given the small size of the array (<=8), we replace the library sort
function with a simple insertion sort that properly ignores invalid
elements and sorts valid ones based on latency. This change ensures
correct ordering of the C-state latencies.
Fixes: 65ea8f2c6e23 ("ACPI: processor idle: Fix up C-state latency if not ordered")
Reported-by: Julian Sikorski <belegdol(a)gmail.com>
Closes: https://lore.kernel.org/lkml/70674dc7-5586-4183-8953-8095567e73df@gmail.com
Signed-off-by: Kuan-Wei Chiu <visitorckw(a)gmail.com>
Tested-by: Julian Sikorski <belegdol(a)gmail.com>
Cc: All applicable <stable(a)vger.kernel.org>
Link: https://patch.msgid.link/20240701205639.117194-1-visitorckw@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index bd6a7857ce05..831fa4a12159 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -16,7 +16,6 @@
#include <linux/acpi.h>
#include <linux/dmi.h>
#include <linux/sched.h> /* need_resched() */
-#include <linux/sort.h>
#include <linux/tick.h>
#include <linux/cpuidle.h>
#include <linux/cpu.h>
@@ -386,25 +385,24 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, 1);
}
-static int acpi_cst_latency_cmp(const void *a, const void *b)
+static void acpi_cst_latency_sort(struct acpi_processor_cx *states, size_t length)
{
- const struct acpi_processor_cx *x = a, *y = b;
+ int i, j, k;
- if (!(x->valid && y->valid))
- return 0;
- if (x->latency > y->latency)
- return 1;
- if (x->latency < y->latency)
- return -1;
- return 0;
-}
-static void acpi_cst_latency_swap(void *a, void *b, int n)
-{
- struct acpi_processor_cx *x = a, *y = b;
+ for (i = 1; i < length; i++) {
+ if (!states[i].valid)
+ continue;
- if (!(x->valid && y->valid))
- return;
- swap(x->latency, y->latency);
+ for (j = i - 1, k = i; j >= 0; j--) {
+ if (!states[j].valid)
+ continue;
+
+ if (states[j].latency > states[k].latency)
+ swap(states[j].latency, states[k].latency);
+
+ k = j;
+ }
+ }
}
static int acpi_processor_power_verify(struct acpi_processor *pr)
@@ -449,10 +447,7 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
if (buggy_latency) {
pr_notice("FW issue: working around C-state latencies out of order\n");
- sort(&pr->power.states[1], max_cstate,
- sizeof(struct acpi_processor_cx),
- acpi_cst_latency_cmp,
- acpi_cst_latency_swap);
+ acpi_cst_latency_sort(&pr->power.states[1], max_cstate);
}
lapic_timer_propagate_broadcast(pr);
On Tue, Sep 26, 2023 at 9:09 AM Masahiro Yamada <masahiroy(a)kernel.org> wrote:
>
> The 32-bit ARM kernel stops working if the kernel grows to the point
> where veneers for __get_user_* are created.
>
> AAPCS32 [1] states, "Register r12 (IP) may be used by a linker as a
> scratch register between a routine and any subroutine it calls. It
> can also be used within a routine to hold intermediate values between
> subroutine calls."
>
> However, bl instructions buried within the inline asm are unpredictable
> for compilers; hence, "ip" must be added to the clobber list.
>
> This becomes critical when veneers for __get_user_* are created because
> veneers use the ip register since commit 02e541db0540 ("ARM: 8323/1:
> force linker to use PIC veneers").
>
> [1]: https://github.com/ARM-software/abi-aa/blob/2023Q1/aapcs32/aapcs32.rst
>
> Signed-off-by: Masahiro Yamada <masahiroy(a)kernel.org>
> Reviewed-by: Ard Biesheuvel <ardb(a)kernel.org>
+ stable(a)vger.kernel.org
It seems like this (commit 24d3ba0a7b44c1617c27f5045eecc4f34752ab03
upstream) would be a good candidate for -stable?
The issue it fixes can manifest in lots of very strange ways, so it
would be good to avoid others getting tripped up by it on -stable
branches.
(Apologies for being a bit verbose in the following, I've included a
lot of details and breadcrumbs so others might find this if they run
into the same issues.)
I was recently looking into an arm32 issue, and found getting a custom
built kernel consistently working in qemu-system-arm to bisect issues
in the range of 5.15-6.6 was a bit difficult, as I would hit a couple
different odd errors.
For 5.15 I was seeing systemd fail to start in a fairly opaque way:
starting systemd-udevd.service - Rule-based Manager for Device
Events and Files.
systemd-udevd.service: Main process exited, code=exited, status=1/FAILURE
systemd-udevd.service: Failed with result 'exit-code'.
Failed to start systemd-udevd.service - Rule-based Manager for
Device Events and Files.
But further looking through the logs I found:
systemd[1]: Failed to open netlink: Operation not permitted
Despite lots of digging to try to understand what was going wrong, the
one thing that worked was switching to CONFIG_CC_OPTIMIZE_FOR_SIZE
(which I only tried as I came across this old thread:
https://lists.yoctoproject.org/g/linux-yocto/message/8035 ), this
seemed very suspicious, but I didn't have a lot of time to dig
further.
That resolved things until ~6.1, where I started seeing crashes at init:
[ 16.982562] Run /init as init process
[ 16.989311] Failed to execute /init (error -22)
[ 16.990017] Run /sbin/init as init process
[ 16.994737] Starting init: /sbin/init exists but couldn't execute
it (error -22)
That I bisected that failure down to being supposedly caused by commit
5750121ae738 ("kbuild: list sub-directories in ./Kbuild")
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
And searching around that commit luckily led me to this change, which
finally seems to resolve the different issues I saw for 6.6, 6.1 and
5.15!
Now, In my rush to get something booting with qemu, I started with the
debian config but disabled modules, and didn't put much time into
getting rid of config options or drivers I wouldn't need. So the
kernel is pretty large. So maybe not super common, but I definitely
wouldn't want others to have to go down this debugging rabbit hole.
thanks
-john
From: Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
When enabling access to the special register set, Receiver time-out and
RHR interrupts can happen. In this case, the IRQ handler will try to read
from the FIFO thru the RHR register at address 0x00, but address 0x00 is
mapped to DLL register, resulting in erroneous FIFO reading.
Call graph example:
sc16is7xx_startup(): entry
sc16is7xx_ms_proc(): entry
sc16is7xx_set_termios(): entry
sc16is7xx_set_baud(): DLH/DLL = $009C --> access special register set
sc16is7xx_port_irq() entry --> IIR is 0x0C
sc16is7xx_handle_rx() entry
sc16is7xx_fifo_read(): --> unable to access FIFO (RHR) because it is
mapped to DLL (LCR=LCR_CONF_MODE_A)
sc16is7xx_set_baud(): exit --> Restore access to general register set
Fix the problem by claiming the efr_lock mutex when accessing the Special
register set.
Fixes: dfeae619d781 ("serial: sc16is7xx")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
---
drivers/tty/serial/sc16is7xx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 58696e05492c..b4c1798a1df2 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -592,6 +592,8 @@ static int sc16is7xx_set_baud(struct uart_port *port, int baud)
SC16IS7XX_MCR_CLKSEL_BIT,
prescaler == 1 ? 0 : SC16IS7XX_MCR_CLKSEL_BIT);
+ mutex_lock(&one->efr_lock);
+
/* Backup LCR and access special register set (DLL/DLH) */
lcr = sc16is7xx_port_read(port, SC16IS7XX_LCR_REG);
sc16is7xx_port_write(port, SC16IS7XX_LCR_REG,
@@ -606,6 +608,8 @@ static int sc16is7xx_set_baud(struct uart_port *port, int baud)
/* Restore LCR and access to general register set */
sc16is7xx_port_write(port, SC16IS7XX_LCR_REG, lcr);
+ mutex_unlock(&one->efr_lock);
+
return DIV_ROUND_CLOSEST((clk / prescaler) / 16, div);
}
--
2.39.2
From: Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
Sometimes, when a packet is received on channel A at almost the same time
as a packet is about to be transmitted on channel B, we observe with a
logic analyzer that the received packet on channel A is transmitted on
channel B. In other words, the Tx buffer data on channel B is corrupted
with data from channel A.
The problem appeared since commit 4409df5866b7 ("serial: sc16is7xx: change
EFR lock to operate on each channels"), which changed the EFR locking to
operate on each channel instead of chip-wise.
This commit has introduced a regression, because the EFR lock is used not
only to protect the EFR registers access, but also, in a very obscure and
undocumented way, to protect access to the data buffer, which is shared by
the Tx and Rx handlers, but also by each channel of the IC.
Fix this regression first by switching to kfifo_out_linear_ptr() in
sc16is7xx_handle_tx() to eliminate the need for a shared Rx/Tx buffer.
Secondly, replace the chip-wise Rx buffer with a separate Rx buffer for
each channel.
Fixes: 4409df5866b7 ("serial: sc16is7xx: change EFR lock to operate on each channels")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
---
drivers/tty/serial/sc16is7xx.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index c79dcd7c8d1a..58696e05492c 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -327,6 +327,7 @@ struct sc16is7xx_one {
struct kthread_work reg_work;
struct kthread_delayed_work ms_work;
struct sc16is7xx_one_config config;
+ unsigned char buf[SC16IS7XX_FIFO_SIZE]; /* Rx buffer. */
unsigned int old_mctrl;
u8 old_lcr; /* Value before EFR access. */
bool irda_mode;
@@ -340,7 +341,6 @@ struct sc16is7xx_port {
unsigned long gpio_valid_mask;
#endif
u8 mctrl_mask;
- unsigned char buf[SC16IS7XX_FIFO_SIZE];
struct kthread_worker kworker;
struct task_struct *kworker_task;
struct sc16is7xx_one p[];
@@ -612,18 +612,18 @@ static int sc16is7xx_set_baud(struct uart_port *port, int baud)
static void sc16is7xx_handle_rx(struct uart_port *port, unsigned int rxlen,
unsigned int iir)
{
- struct sc16is7xx_port *s = dev_get_drvdata(port->dev);
+ struct sc16is7xx_one *one = to_sc16is7xx_one(port, port);
unsigned int lsr = 0, bytes_read, i;
bool read_lsr = (iir == SC16IS7XX_IIR_RLSE_SRC) ? true : false;
u8 ch, flag;
- if (unlikely(rxlen >= sizeof(s->buf))) {
+ if (unlikely(rxlen >= sizeof(one->buf))) {
dev_warn_ratelimited(port->dev,
"ttySC%i: Possible RX FIFO overrun: %d\n",
port->line, rxlen);
port->icount.buf_overrun++;
/* Ensure sanity of RX level */
- rxlen = sizeof(s->buf);
+ rxlen = sizeof(one->buf);
}
while (rxlen) {
@@ -636,10 +636,10 @@ static void sc16is7xx_handle_rx(struct uart_port *port, unsigned int rxlen,
lsr = 0;
if (read_lsr) {
- s->buf[0] = sc16is7xx_port_read(port, SC16IS7XX_RHR_REG);
+ one->buf[0] = sc16is7xx_port_read(port, SC16IS7XX_RHR_REG);
bytes_read = 1;
} else {
- sc16is7xx_fifo_read(port, s->buf, rxlen);
+ sc16is7xx_fifo_read(port, one->buf, rxlen);
bytes_read = rxlen;
}
@@ -672,7 +672,7 @@ static void sc16is7xx_handle_rx(struct uart_port *port, unsigned int rxlen,
}
for (i = 0; i < bytes_read; ++i) {
- ch = s->buf[i];
+ ch = one->buf[i];
if (uart_handle_sysrq_char(port, ch))
continue;
@@ -690,10 +690,10 @@ static void sc16is7xx_handle_rx(struct uart_port *port, unsigned int rxlen,
static void sc16is7xx_handle_tx(struct uart_port *port)
{
- struct sc16is7xx_port *s = dev_get_drvdata(port->dev);
struct tty_port *tport = &port->state->port;
unsigned long flags;
unsigned int txlen;
+ unsigned char *tail;
if (unlikely(port->x_char)) {
sc16is7xx_port_write(port, SC16IS7XX_THR_REG, port->x_char);
@@ -718,8 +718,9 @@ static void sc16is7xx_handle_tx(struct uart_port *port)
txlen = 0;
}
- txlen = uart_fifo_out(port, s->buf, txlen);
- sc16is7xx_fifo_write(port, s->buf, txlen);
+ txlen = kfifo_out_linear_ptr(&tport->xmit_fifo, &tail, txlen);
+ sc16is7xx_fifo_write(port, tail, txlen);
+ uart_xmit_advance(port, txlen);
uart_port_lock_irqsave(port, &flags);
if (kfifo_len(&tport->xmit_fifo) < WAKEUP_CHARS)
--
2.39.2
The patch below does not apply to the 6.10-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-6.10.y
git checkout FETCH_HEAD
git cherry-pick -x e528be3c87be953b73e7826a2d7e4b837cbad39d
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072302-policy-spleen-3156@gregkh' --subject-prefix 'PATCH 6.10.y' HEAD^..
Possible dependencies:
e528be3c87be ("thermal: core: Allow thermal zones to tell the core to ignore them")
7c8267275de6 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From e528be3c87be953b73e7826a2d7e4b837cbad39d Mon Sep 17 00:00:00 2001
From: "Rafael J. Wysocki" <rafael.j.wysocki(a)intel.com>
Date: Wed, 17 Jul 2024 21:45:02 +0200
Subject: [PATCH] thermal: core: Allow thermal zones to tell the core to ignore
them
The iwlwifi wireless driver registers a thermal zone that is only needed
when the network interface handled by it is up and it wants that thermal
zone to be effectively ignored by the core otherwise.
Before commit a8a261774466 ("thermal: core: Call monitor_thermal_zone()
if zone temperature is invalid") that could be achieved by returning
an error code from the thermal zone's .get_temp() callback because the
core did not really handle errors returned by it almost at all.
However, commit a8a261774466 made the core attempt to recover from the
situation in which the temperature of a thermal zone cannot be
determined due to errors returned by its .get_temp() and is always
invalid from the core's perspective.
That was done because there are thermal zones in which .get_temp()
returns errors to start with due to some difficulties related to the
initialization ordering, but then it will start to produce valid
temperature values at one point.
Unfortunately, the simple approach taken by commit a8a261774466,
which is to poll the thermal zone periodically until its .get_temp()
callback starts to return valid temperature values, is at odds with
the special thermal zone in iwlwifi in which .get_temp() may always
return an error because its network interface may always be down. If
that happens, every attempt to invoke the thermal zone's .get_temp()
callback resulting in an error causes the thermal core to print a
dev_warn() message to the kernel log which is super-noisy.
To address this problem, make the core handle the case in which
.get_temp() returns 0, but the temperature value returned by it
is not actually valid, in a special way. Namely, make the core
completely ignore the invalid temperature value coming from
.get_temp() in that case, which requires folding in
update_temperature() into its caller and a few related changes.
On the iwlwifi side, modify iwl_mvm_tzone_get_temp() to return 0
and put THERMAL_TEMP_INVALID into the temperature return memory
location instead of returning an error when the firmware is not
running or it is not of the right type.
Also, to clearly separate the handling of invalid temperature
values from the thermal zone initialization, introduce a special
THERMAL_TEMP_INIT value specifically for the latter purpose.
Fixes: a8a261774466 ("thermal: core: Call monitor_thermal_zone() if zone temperature is invalid")
Closes: https://lore.kernel.org/linux-pm/20240715044527.GA1544@sol.localdomain/
Reported-by: Eric Biggers <ebiggers(a)kernel.org>
Reported-by: Stefan Lippers-Hollmann <s.l-h(a)gmx.de>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=201761
Tested-by: Oleksandr Natalenko <oleksandr(a)natalenko.name>
Tested-by: Stefan Lippers-Hollmann <s.l-h(a)gmx.de>
Cc: 6.10+ <stable(a)vger.kernel.org> # 6.10+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
Link: https://patch.msgid.link/4950004.31r3eYUQgx@rjwysocki.net
[ rjw: Rebased on top of the current mainline ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
index ed0796aff722..d92470960b38 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
@@ -621,8 +621,14 @@ static int iwl_mvm_tzone_get_temp(struct thermal_zone_device *device,
guard(mvm)(mvm);
if (!iwl_mvm_firmware_running(mvm) ||
- mvm->fwrt.cur_fw_img != IWL_UCODE_REGULAR)
- return -ENODATA;
+ mvm->fwrt.cur_fw_img != IWL_UCODE_REGULAR) {
+ /*
+ * Tell the core that there is no valid temperature value to
+ * return, but it need not worry about this.
+ */
+ *temperature = THERMAL_TEMP_INVALID;
+ return 0;
+ }
ret = iwl_mvm_get_temp(mvm, &temp);
if (ret)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 8795187fbc52..f6e700e48aad 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -300,8 +300,6 @@ static void monitor_thermal_zone(struct thermal_zone_device *tz)
thermal_zone_device_set_polling(tz, tz->passive_delay_jiffies);
else if (tz->polling_delay_jiffies)
thermal_zone_device_set_polling(tz, tz->polling_delay_jiffies);
- else if (tz->temperature == THERMAL_TEMP_INVALID)
- thermal_zone_device_set_polling(tz, msecs_to_jiffies(THERMAL_RECHECK_DELAY_MS));
}
static struct thermal_governor *thermal_get_tz_governor(struct thermal_zone_device *tz)
@@ -382,7 +380,7 @@ static void handle_thermal_trip(struct thermal_zone_device *tz,
td->threshold = trip->temperature;
if (tz->last_temperature >= old_threshold &&
- tz->last_temperature != THERMAL_TEMP_INVALID) {
+ tz->last_temperature != THERMAL_TEMP_INIT) {
/*
* Mitigation is under way, so it needs to stop if the zone
* temperature falls below the low temperature of the trip.
@@ -417,27 +415,6 @@ static void handle_thermal_trip(struct thermal_zone_device *tz,
}
}
-static void update_temperature(struct thermal_zone_device *tz)
-{
- int temp, ret;
-
- ret = __thermal_zone_get_temp(tz, &temp);
- if (ret) {
- if (ret != -EAGAIN)
- dev_warn(&tz->device,
- "failed to read out thermal zone (%d)\n",
- ret);
- return;
- }
-
- tz->last_temperature = tz->temperature;
- tz->temperature = temp;
-
- trace_thermal_temperature(tz);
-
- thermal_genl_sampling_temp(tz->id, temp);
-}
-
static void thermal_zone_device_check(struct work_struct *work)
{
struct thermal_zone_device *tz = container_of(work, struct
@@ -452,7 +429,7 @@ static void thermal_zone_device_init(struct thermal_zone_device *tz)
INIT_DELAYED_WORK(&tz->poll_queue, thermal_zone_device_check);
- tz->temperature = THERMAL_TEMP_INVALID;
+ tz->temperature = THERMAL_TEMP_INIT;
tz->passive = 0;
tz->prev_low_trip = -INT_MAX;
tz->prev_high_trip = INT_MAX;
@@ -504,6 +481,7 @@ void __thermal_zone_device_update(struct thermal_zone_device *tz,
struct thermal_trip_desc *td;
LIST_HEAD(way_down_list);
LIST_HEAD(way_up_list);
+ int temp, ret;
if (tz->suspended)
return;
@@ -511,10 +489,29 @@ void __thermal_zone_device_update(struct thermal_zone_device *tz,
if (!thermal_zone_device_is_enabled(tz))
return;
- update_temperature(tz);
+ ret = __thermal_zone_get_temp(tz, &temp);
+ if (ret) {
+ if (ret != -EAGAIN)
+ dev_info(&tz->device, "Temperature check failed (%d)\n", ret);
- if (tz->temperature == THERMAL_TEMP_INVALID)
+ thermal_zone_device_set_polling(tz, msecs_to_jiffies(THERMAL_RECHECK_DELAY_MS));
+ return;
+ } else if (temp <= THERMAL_TEMP_INVALID) {
+ /*
+ * Special case: No valid temperature value is available, but
+ * the zone owner does not want the core to do anything about
+ * it. Continue regular zone polling if needed, so that this
+ * function can be called again, but skip everything else.
+ */
goto monitor;
+ }
+
+ tz->last_temperature = tz->temperature;
+ tz->temperature = temp;
+
+ trace_thermal_temperature(tz);
+
+ thermal_genl_sampling_temp(tz->id, temp);
tz->notify_event = event;
diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
index 30c0e78859a7..ba8e6fc807ca 100644
--- a/drivers/thermal/thermal_core.h
+++ b/drivers/thermal/thermal_core.h
@@ -133,6 +133,9 @@ struct thermal_zone_device {
struct thermal_trip_desc trips[] __counted_by(num_trips);
};
+/* Initial thermal zone temperature. */
+#define THERMAL_TEMP_INIT INT_MIN
+
/*
* Default delay after a failing thermal zone temperature check before
* attempting to check it again.
diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c
index 81e019493557..aedb8369e2aa 100644
--- a/drivers/thermal/thermal_helpers.c
+++ b/drivers/thermal/thermal_helpers.c
@@ -163,6 +163,8 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp)
}
ret = __thermal_zone_get_temp(tz, temp);
+ if (!ret && *temp <= THERMAL_TEMP_INVALID)
+ ret = -ENODATA;
unlock:
mutex_unlock(&tz->lock);
Commit 310d6c15e910 ("mm/damon/core: merge regions aggressively when
max_nr_regions") causes a build warning and a build failure [1] on
5.15.y. Those are due to
1) unnecessarily strict type check from max(), and
2) use of not-yet-introduced damon_ctx->attrs field, respectively.
Fix the warning by backporting a minmax.h upstream commit that made the
type check less strict for unnecessary case, and upstream commits that
it depends on.
Note that all patches except the fourth one ("minmax: fix header
inclusions") are clean cherry-picks of upstream commit. For the fourth
one, minor conflict resolving was needed.
Also, the last patch, which is the backport of the DAMON fix, was
cleanly cherry-picked, but added manual fix for the build failure.
[1] https://lore.kernel.org/2024071532-pebble-jailhouse-48b2@gregkh
Andy Shevchenko (1):
minmax: fix header inclusions
Bart Van Assche (1):
tracing: Define the is_signed_type() macro once
David Laight (3):
minmax: allow min()/max()/clamp() if the arguments have the same
signedness.
minmax: allow comparisons of 'int' against 'unsigned char/short'
minmax: relax check to allow comparison between unsigned arguments and
signed constants
Jason A. Donenfeld (2):
minmax: sanity check constant bounds when clamping
minmax: clamp more efficiently by avoiding extra comparison
SeongJae Park (1):
mm/damon/core: merge regions aggressively when max_nr_regions is unmet
include/linux/compiler.h | 6 +++
include/linux/minmax.h | 89 ++++++++++++++++++++++++++----------
include/linux/overflow.h | 1 -
include/linux/trace_events.h | 2 -
mm/damon/core.c | 23 ++++++++--
5 files changed, 90 insertions(+), 31 deletions(-)
base-commit: 4d1b7f1bf3858ed48a98c004bda5fdff2cdf13c8
--
2.39.2
Commit 310d6c15e910 ("mm/damon/core: merge regions aggressively when
max_nr_regions") causes a build warning [1] on 6.1.y. That was due to
unnecessarily strict type check from max().
Fix the warning by backporting a minmax.h upstream commit that made the
type check less strict for unnecessary case, and upstream commits that
it depends on.
Note that all patches except the third one ("minmax: fix header
inclusions") are clean cherry-picks of upstream commit. For the third
one, a minor conflict fix was needed.
[1] https://lore.kernel.org/2024071519-janitor-robe-779f@gregkh
Andy Shevchenko (1):
minmax: fix header inclusions
David Laight (3):
minmax: allow min()/max()/clamp() if the arguments have the same
signedness.
minmax: allow comparisons of 'int' against 'unsigned char/short'
minmax: relax check to allow comparison between unsigned arguments and
signed constants
Jason A. Donenfeld (2):
minmax: sanity check constant bounds when clamping
minmax: clamp more efficiently by avoiding extra comparison
SeongJae Park (1):
mm/damon/core: merge regions aggressively when max_nr_regions is unmet
include/linux/minmax.h | 89 ++++++++++++++++++++++++++++++------------
mm/damon/core.c | 21 +++++++++-
2 files changed, 83 insertions(+), 27 deletions(-)
base-commit: 291e563ecab1ea89c70172ecf0d6bff7b725d3cb
--
2.39.2
This is the start of the stable review cycle for the 6.10.1 release.
There are 9 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Thu, 25 Jul 2024 11:40:39 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.10.1-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.10.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.10.1-rc1
Richard Fitzgerald <rf(a)opensource.cirrus.com>
ASoC: cs35l56: Limit Speaker Volume to +12dB maximum
Richard Fitzgerald <rf(a)opensource.cirrus.com>
ASoC: cs35l56: Use header defines for Speaker Volume control definition
Hao Ge <gehao(a)kylinos.cn>
tpm: Use auth only after NULL check in tpm_buf_check_hmac_response()
David Howells <dhowells(a)redhat.com>
cifs: Fix setting of zero_point after DIO write
David Howells <dhowells(a)redhat.com>
cifs: Fix server re-repick on subrequest retry
Steve French <stfrench(a)microsoft.com>
cifs: fix noisy message on copy_file_range
David Howells <dhowells(a)redhat.com>
cifs: Fix missing fscache invalidation
David Howells <dhowells(a)redhat.com>
cifs: Fix missing error code set
Kees Cook <kees(a)kernel.org>
ext4: use memtostr_pad() for s_volume_name
-------------
Diffstat:
Makefile | 4 ++--
drivers/char/tpm/tpm2-sessions.c | 5 +++--
fs/ext4/ext4.h | 2 +-
fs/ext4/ioctl.c | 2 +-
fs/smb/client/cifsfs.c | 2 +-
fs/smb/client/file.c | 21 +++++++++++++++++----
fs/smb/client/smb2pdu.c | 3 ---
include/sound/cs35l56.h | 2 +-
sound/soc/codecs/cs35l56.c | 6 +++++-
9 files changed, 31 insertions(+), 16 deletions(-)
Patch series to limit the upper range of the CS35L56 volume control to
+12 dB.
These commits were not marked 'Fixes' because they were thought to be only
a cosmetic issue. The user could reduce the volume to a usable value.
But for some complex audio topologies with SOF Audio DSP + CS42L43 +
multiple CS35L56 it has turned out to be not obvious to the user what the
problem actually is and what to do to fix it. As support for these
topologies went into 6.10 we would like this series to be applied to 6.10.
Richard Fitzgerald (2):
ASoC: cs35l56: Use header defines for Speaker Volume control
definition
ASoC: cs35l56: Limit Speaker Volume to +12dB maximum
include/sound/cs35l56.h | 2 +-
sound/soc/codecs/cs35l56.c | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
--
2.39.2
On 23.07.24 06:11, Theodore Ts'o wrote:
> On Mon, Jul 22, 2024 at 12:06:59AM -0700, Kees Cook wrote:
>>> Is strscpy_pad appropriate if the @src parameter itself is a fixed
>>> length char[16] which isn't null terminated when the label itself is 16
>>> chars long?
>>
>> Nope; it needed memtostr_pad(). I sent the fix back at the end of May, but it only just recently landed:
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
>
> Yeah, sorry, I was on vacation for 3.5 weeks starting just before
> Memorial day, and it took me a while to get caught up. Unfortunately,
> I missed the bug in the strncpy extirpation patch, and it was't
> something that our regression tests caught. (Sometimes, the
> old/deprecated ways are just more reliable; all of ext4's strncpy()
> calls were working and had been correct for decades. :-P )
>
> Anyway, Kees's bugfix is in Linus's tree, and it should be shortly be
> making its way to -stable.
Adding Greg and the stable list to the list of recipients: given that we
already have two reports about trouble due to this[1] he might want to
fast-track the fix (be27cd64461c45 ("ext4: use memtostr_pad() for
s_volume_name")) to 6.10.y, as it's not queued yet -- at least afaics
from looking at
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tre…
Ciao, Thorsten
[1] https://bugzilla.kernel.org/show_bug.cgi?id=219072 and
https://bugzilla.kernel.org/show_bug.cgi?id=219078
From: Bailey Forrest <bcf(a)google.com>
The NIC requires each TSO segment to not span more than 10
descriptors. gve_can_send_tso() performs this check. However,
the current code misses an edge case when a TSO skb has a large
frag that needs to be split into multiple descriptors, causing
the 10 descriptor limit per TSO-segment to be exceeded. This
change fixes the edge case.
Fixes: a57e5de476be ("gve: DQO: Add TX path")
Signed-off-by: Praveen Kaligineedi <pkaligineedi(a)google.com>
Signed-off-by: Bailey Forrest <bcf(a)google.com>
Reviewed-by: Jeroen de Borst <jeroendb(a)google.com>
---
drivers/net/ethernet/google/gve/gve_tx_dqo.c | 22 +++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/google/gve/gve_tx_dqo.c b/drivers/net/ethernet/google/gve/gve_tx_dqo.c
index 0b3cca3fc792..dc39dc481f21 100644
--- a/drivers/net/ethernet/google/gve/gve_tx_dqo.c
+++ b/drivers/net/ethernet/google/gve/gve_tx_dqo.c
@@ -866,22 +866,42 @@ static bool gve_can_send_tso(const struct sk_buff *skb)
const int header_len = skb_tcp_all_headers(skb);
const int gso_size = shinfo->gso_size;
int cur_seg_num_bufs;
+ int last_frag_size;
int cur_seg_size;
int i;
cur_seg_size = skb_headlen(skb) - header_len;
+ last_frag_size = skb_headlen(skb);
cur_seg_num_bufs = cur_seg_size > 0;
for (i = 0; i < shinfo->nr_frags; i++) {
if (cur_seg_size >= gso_size) {
cur_seg_size %= gso_size;
cur_seg_num_bufs = cur_seg_size > 0;
+
+ /* If the last buffer is split in the middle of a TSO
+ * segment, then it will count as two descriptors.
+ */
+ if (last_frag_size > GVE_TX_MAX_BUF_SIZE_DQO) {
+ int last_frag_remain = last_frag_size %
+ GVE_TX_MAX_BUF_SIZE_DQO;
+
+ /* If the last frag was evenly divisible by
+ * GVE_TX_MAX_BUF_SIZE_DQO, then it will not be
+ * split in the current segment.
+ */
+ if (last_frag_remain &&
+ cur_seg_size > last_frag_remain) {
+ cur_seg_num_bufs++;
+ }
+ }
}
if (unlikely(++cur_seg_num_bufs > max_bufs_per_seg))
return false;
- cur_seg_size += skb_frag_size(&shinfo->frags[i]);
+ last_frag_size = skb_frag_size(&shinfo->frags[i]);
+ cur_seg_size += last_frag_size;
}
return true;
--
2.45.2.993.g49e7a77208-goog
Following the implementation of "igc: Add TransmissionOverrun counter"
patch, when a taprio command is triggered by user, igc processes two
commands: TAPRIO_CMD_REPLACE followed by TAPRIO_CMD_STATS. However, both
commands unconditionally pass through igc_tsn_offload_apply() which
evaluates and triggers reset adapter. The double reset causes issues in
the calculation of adapter->qbv_count in igc.
TAPRIO_CMD_REPLACE command is expected to reset the adapter since it
activates qbv. It's unexpected for TAPRIO_CMD_STATS to do the same
because it doesn't configure any driver-specific TSN settings. So, the
evaluation in igc_tsn_offload_apply() isn't needed for TAPRIO_CMD_STATS.
To address this, commands parsing are relocated to
igc_tsn_enable_qbv_scheduling(). Commands that don't require an adapter
reset will exit after processing, thus avoiding igc_tsn_offload_apply().
Fixes: d3750076d464 ("igc: Add TransmissionOverrun counter")
Signed-off-by: Faizal Rahim <faizal.abdul.rahim(a)linux.intel.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 33 ++++++++++++-----------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 87b655b839c1..33069880c86c 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -6310,21 +6310,6 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
size_t n;
int i;
- switch (qopt->cmd) {
- case TAPRIO_CMD_REPLACE:
- break;
- case TAPRIO_CMD_DESTROY:
- return igc_tsn_clear_schedule(adapter);
- case TAPRIO_CMD_STATS:
- igc_taprio_stats(adapter->netdev, &qopt->stats);
- return 0;
- case TAPRIO_CMD_QUEUE_STATS:
- igc_taprio_queue_stats(adapter->netdev, &qopt->queue_stats);
- return 0;
- default:
- return -EOPNOTSUPP;
- }
-
if (qopt->base_time < 0)
return -ERANGE;
@@ -6433,7 +6418,23 @@ static int igc_tsn_enable_qbv_scheduling(struct igc_adapter *adapter,
if (hw->mac.type != igc_i225)
return -EOPNOTSUPP;
- err = igc_save_qbv_schedule(adapter, qopt);
+ switch (qopt->cmd) {
+ case TAPRIO_CMD_REPLACE:
+ err = igc_save_qbv_schedule(adapter, qopt);
+ break;
+ case TAPRIO_CMD_DESTROY:
+ err = igc_tsn_clear_schedule(adapter);
+ break;
+ case TAPRIO_CMD_STATS:
+ igc_taprio_stats(adapter->netdev, &qopt->stats);
+ return 0;
+ case TAPRIO_CMD_QUEUE_STATS:
+ igc_taprio_queue_stats(adapter->netdev, &qopt->queue_stats);
+ return 0;
+ default:
+ return -EOPNOTSUPP;
+ }
+
if (err)
return err;
--
2.25.1
(gdb) lx-mounts
mount super_block devname pathname fstype options
Python Exception <class 'gdb.error'>: There is no member named list.
Error occurred in Python: There is no member named list.
We encoutner the above issue after commit 2eea9ce4310d ("mounts: keep
list of mounts in an rbtree"). The commit move a mount from list into
rbtree.
So we can instead use rbtree to iterate all mounts information.
Fixes: 2eea9ce4310d ("mounts: keep list of mounts in an rbtree")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Kuan-Ying Lee <kuan-ying.lee(a)canonical.com>
---
scripts/gdb/linux/proc.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/gdb/linux/proc.py b/scripts/gdb/linux/proc.py
index 43c687e7a69d..65dd1bd12964 100644
--- a/scripts/gdb/linux/proc.py
+++ b/scripts/gdb/linux/proc.py
@@ -18,6 +18,7 @@ from linux import utils
from linux import tasks
from linux import lists
from linux import vfs
+from linux import rbtree
from struct import *
@@ -172,8 +173,7 @@ values of that process namespace"""
gdb.write("{:^18} {:^15} {:>9} {} {} options\n".format(
"mount", "super_block", "devname", "pathname", "fstype"))
- for mnt in lists.list_for_each_entry(namespace['list'],
- mount_ptr_type, "mnt_list"):
+ for mnt in rbtree.rb_inorder_for_each_entry(namespace['mounts'], mount_ptr_type, "mnt_node"):
devname = mnt['mnt_devname'].string()
devname = devname if devname else "none"
--
2.34.1
Add inorder iteration function for rbtree usage.
This is a preparation patch for the next patch to
fix the gdb mounts issue.
Fixes: 2eea9ce4310d ("mounts: keep list of mounts in an rbtree")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Kuan-Ying Lee <kuan-ying.lee(a)canonical.com>
---
scripts/gdb/linux/rbtree.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/scripts/gdb/linux/rbtree.py b/scripts/gdb/linux/rbtree.py
index fe462855eefd..fcbcc5f4153c 100644
--- a/scripts/gdb/linux/rbtree.py
+++ b/scripts/gdb/linux/rbtree.py
@@ -9,6 +9,18 @@ from linux import utils
rb_root_type = utils.CachedType("struct rb_root")
rb_node_type = utils.CachedType("struct rb_node")
+def rb_inorder_for_each(root):
+ def inorder(node):
+ if node:
+ yield from inorder(node['rb_left'])
+ yield node
+ yield from inorder(node['rb_right'])
+
+ yield from inorder(root['rb_node'])
+
+def rb_inorder_for_each_entry(root, gdbtype, member):
+ for node in rb_inorder_for_each(root):
+ yield utils.container_of(node, gdbtype, member)
def rb_first(root):
if root.type == rb_root_type.get_type():
--
2.34.1
Armada 380 has smilar USB-2.0 PHYs as CP-110 (Armada 8K).
Add support for Armada 380 to cp110 utmi phy driver, and enable it for
armada-388-clearfog boards.
Additionally add a small bugfix for armada-388 clearfog:
Enable Clearfog Base M.2 connector for cellular modems with USB-2.0/3.0
interface.
This is not separated out to avoid future merge conflicts.
Signed-off-by: Josua Mayer <josua(a)solid-run.com>
---
Changes in v3:
- updated bindings with additional comments, tested with dtbs_check:
used anyOf for the newly-added optional regs
- added fix for clearfog base m.2 connector / enable third usb
- dropped unnecessary syscon node using invalid compatible
(Reported-by: Krzysztof Kozlowski <krzk(a)kernel.org>)
- Link to v2: https://lore.kernel.org/r/20240716-a38x-utmi-phy-v2-0-dae3a9c6ca3e@solid-ru…
Changes in v2:
- add support for optional regs / make syscon use optional
- add device-tree changes for armada-388-clearfog
- attempted to fix warning reported by krobot (untested)
- tested on actual hardware
- drafted dt-bindings
- Link to v1: https://lore.kernel.org/r/20240715-a38x-utmi-phy-v1-0-d57250f53cf2@solid-ru…
---
Josua Mayer (6):
arm: dts: marvell: armada-388-clearfog: enable third usb on m.2/mpcie
arm: dts: marvell: armada-388-clearfog-base: add rfkill for m.2
dt-bindings: phy: cp110-utmi-phy: add compatible string for armada-38x
arm: dts: marvell: armada-38x: add description for usb phys
phy: mvebu-cp110-utmi: add support for armada-380 utmi phys
arm: dts: marvell: armada-388-clearfog: add description for usb phys
.../phy/marvell,armada-cp110-utmi-phy.yaml | 34 +++-
.../boot/dts/marvell/armada-388-clearfog-base.dts | 41 ++++
arch/arm/boot/dts/marvell/armada-388-clearfog.dts | 8 +
arch/arm/boot/dts/marvell/armada-388-clearfog.dtsi | 30 ++-
arch/arm/boot/dts/marvell/armada-38x.dtsi | 24 +++
drivers/phy/marvell/phy-mvebu-cp110-utmi.c | 209 ++++++++++++++++-----
6 files changed, 288 insertions(+), 58 deletions(-)
---
base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
change-id: 20240715-a38x-utmi-phy-02e8059afe35
Sincerely,
--
Josua Mayer <josua(a)solid-run.com>
UFS link is just put into hibern8 state during the 'freeze' process of the
hibernation. Afterwards, the system may get powered down. But that doesn't
matter during wakeup. Because during wakeup from hibernation, UFS link is
again put into hibern8 state by the restore kernel and then the control is
handed over to the to image kernel.
So in both the places, UFS link is never turned OFF. But
ufshcd_system_restore() just assumes that the link will be in OFF state and
sets the link state accordingly. And this breaks hibernation wakeup:
[ 2445.371335] phy phy-1d87000.phy.3: phy_power_on was called before phy_init
[ 2445.427883] ufshcd-qcom 1d84000.ufshc: Controller enable failed
[ 2445.427890] ufshcd-qcom 1d84000.ufshc: ufshcd_host_reset_and_restore: Host init failed -5
[ 2445.427906] ufs_device_wlun 0:0:0:49488: ufshcd_wl_resume failed: -5
[ 2445.427918] ufs_device_wlun 0:0:0:49488: PM: dpm_run_callback(): scsi_bus_restore returns -5
[ 2445.427973] ufs_device_wlun 0:0:0:49488: PM: failed to restore async: error -5
So fix the issue by removing the code that sets the link to OFF state.
Cc: Anjana Hari <quic_ahari(a)quicinc.com>
Cc: stable(a)vger.kernel.org # 6.3
Fixes: 88441a8d355d ("scsi: ufs: core: Add hibernation callbacks")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam(a)linaro.org>
---
drivers/ufs/core/ufshcd.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 9f037a40316a..a9dfa82adac9 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -10261,9 +10261,6 @@ int ufshcd_system_restore(struct device *dev)
*/
ufshcd_readl(hba, REG_UTP_TASK_REQ_LIST_BASE_H);
- /* Resuming from hibernate, assume that link was OFF */
- ufshcd_set_link_off(hba);
-
return 0;
}
--
2.25.1
This reverts commit 7a6bbc2829d4ab592c7e440a6f6f5deb3cd95db4.
The offending commit tried to suppress a double "Starting disk" message
for some drivers, but instead started spamming the log with bogus
messages every five seconds:
[ 311.798956] sd 0:0:0:0: [sda] Starting disk
[ 316.919103] sd 0:0:0:0: [sda] Starting disk
[ 322.040775] sd 0:0:0:0: [sda] Starting disk
[ 327.161140] sd 0:0:0:0: [sda] Starting disk
[ 332.281352] sd 0:0:0:0: [sda] Starting disk
[ 337.401878] sd 0:0:0:0: [sda] Starting disk
[ 342.521527] sd 0:0:0:0: [sda] Starting disk
[ 345.850401] sd 0:0:0:0: [sda] Starting disk
[ 350.967132] sd 0:0:0:0: [sda] Starting disk
[ 356.090454] sd 0:0:0:0: [sda] Starting disk
...
on machines that do not actually stop the disk on runtime suspend (e.g.
the Qualcomm sc8280xp CRD with UFS).
Let's just revert for now to address the regression.
Fixes: 7a6bbc2829d4 ("scsi: sd: Do not repeat the starting disk message")
Cc: stable(a)vger.kernel.org
Signed-off-by: Johan Hovold <johan+linaro(a)kernel.org>
---
drivers/scsi/sd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Hi,
I just noticed this regression that snuck into 6.10-final and tracked it
down to 7a6bbc2829d4 ("scsi: sd: Do not repeat the starting disk
message").
I wanted to get this out ASAP to address the immediate regression while
someone who cares enough can work out a proper fix for the double start
message (which seems less annoying).
Note that the offending commit is marked for stable.
Johan
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 1b7561abe05d..6b64af7d4927 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -4119,6 +4119,8 @@ static int sd_resume(struct device *dev)
{
struct scsi_disk *sdkp = dev_get_drvdata(dev);
+ sd_printk(KERN_NOTICE, sdkp, "Starting disk\n");
+
if (opal_unlock_from_suspend(sdkp->opal_dev)) {
sd_printk(KERN_NOTICE, sdkp, "OPAL unlock failed\n");
return -EIO;
@@ -4135,13 +4137,12 @@ static int sd_resume_common(struct device *dev, bool runtime)
if (!sdkp) /* E.g.: runtime resume at the start of sd_probe() */
return 0;
- sd_printk(KERN_NOTICE, sdkp, "Starting disk\n");
-
if (!sd_do_start_stop(sdkp->device, runtime)) {
sdkp->suspended = false;
return 0;
}
+ sd_printk(KERN_NOTICE, sdkp, "Starting disk\n");
ret = sd_start_stop_device(sdkp, 1);
if (!ret) {
sd_resume(dev);
--
2.44.2
When an i915 PMU counter is enabled and the driver is then unbound, the
PMU will be unregistered via perf_pmu_unregister(), however the event
will still be alive. i915 currently tries to deal with this situation
by:
a) Marking the pmu as "closed" and shortcut the calls from perf
b) Taking a reference from i915, that is put back when the event
is destroyed.
c) Setting event_init to NULL to avoid any further event
(a) is ugly, but may be left as is since it protects not trying to
access the HW that is now gone. Unless a pmu driver can call
perf_pmu_unregister() and not receive any more calls, it's a necessary
ugliness.
(b) doesn't really work: when the event is destroyed and the i915 ref is
put it may free the i915 object, that contains the pmu, not only the
event. After event->destroy() callback, perf still expects the pmu
object to be alive.
Instead of pigging back on the event->destroy() to take and put the
device reference, implement the new get()/put() on the pmu object for
that purpose.
(c) is not entirely correct as from the perf POV it's not an optional
call: perf would just dereference the NULL pointer. However this also
protects other entrypoints in i915_pmu. A new event creation from perf
after the pmu has been unregistered should not be possible anyway:
perf_init_event() bails out when not finding the pmu. This may be
cleaned up later.
Cc: <stable(a)vger.kernel.org> # 5.11+
Signed-off-by: Lucas De Marchi <lucas.demarchi(a)intel.com>
---
drivers/gpu/drm/i915/i915_pmu.c | 34 +++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index 21eb0c5b320d..cb5f6471ec6e 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -514,15 +514,6 @@ static enum hrtimer_restart i915_sample(struct hrtimer *hrtimer)
return HRTIMER_RESTART;
}
-static void i915_pmu_event_destroy(struct perf_event *event)
-{
- struct i915_pmu *pmu = event_to_pmu(event);
- struct drm_i915_private *i915 = pmu_to_i915(pmu);
-
- drm_WARN_ON(&i915->drm, event->parent);
-
- drm_dev_put(&i915->drm);
-}
static int
engine_event_status(struct intel_engine_cs *engine,
@@ -628,11 +619,6 @@ static int i915_pmu_event_init(struct perf_event *event)
if (ret)
return ret;
- if (!event->parent) {
- drm_dev_get(&i915->drm);
- event->destroy = i915_pmu_event_destroy;
- }
-
return 0;
}
@@ -872,6 +858,24 @@ static int i915_pmu_event_event_idx(struct perf_event *event)
return 0;
}
+static struct pmu *i915_pmu_get(struct pmu *base)
+{
+ struct i915_pmu *pmu = container_of(base, struct i915_pmu, base);
+ struct drm_i915_private *i915 = pmu_to_i915(pmu);
+
+ drm_dev_get(&i915->drm);
+
+ return base;
+}
+
+static void i915_pmu_put(struct pmu *base)
+{
+ struct i915_pmu *pmu = container_of(base, struct i915_pmu, base);
+ struct drm_i915_private *i915 = pmu_to_i915(pmu);
+
+ drm_dev_put(&i915->drm);
+}
+
struct i915_str_attribute {
struct device_attribute attr;
const char *str;
@@ -1299,6 +1303,8 @@ void i915_pmu_register(struct drm_i915_private *i915)
pmu->base.stop = i915_pmu_event_stop;
pmu->base.read = i915_pmu_event_read;
pmu->base.event_idx = i915_pmu_event_event_idx;
+ pmu->base.get = i915_pmu_get;
+ pmu->base.put = i915_pmu_put;
ret = perf_pmu_register(&pmu->base, pmu->name, -1);
if (ret)
--
2.43.0
Introduce a version of the fence ops that on release doesn't remove
the fence from the pending list, and thus doesn't require a lock to
fix poll->fence wait->fence unref deadlocks.
vmwgfx overwrites the wait callback to iterate over the list of all
fences and update their status, to do that it holds a lock to prevent
the list modifcations from other threads. The fence destroy callback
both deletes the fence and removes it from the list of pending
fences, for which it holds a lock.
dma buf polling cb unrefs a fence after it's been signaled: so the poll
calls the wait, which signals the fences, which are being destroyed.
The destruction tries to acquire the lock on the pending fences list
which it can never get because it's held by the wait from which it
was called.
Old bug, but not a lot of userspace apps were using dma-buf polling
interfaces. Fix those, in particular this fixes KDE stalls/deadlock.
Signed-off-by: Zack Rusin <zack.rusin(a)broadcom.com>
Fixes: 2298e804e96e ("drm/vmwgfx: rework to new fence interface, v2")
Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list(a)broadcom.com>
Cc: dri-devel(a)lists.freedesktop.org
Cc: <stable(a)vger.kernel.org> # v6.2+
---
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
index 5efc6a766f64..588d50ababf6 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
@@ -32,7 +32,6 @@
#define VMW_FENCE_WRAP (1 << 31)
struct vmw_fence_manager {
- int num_fence_objects;
struct vmw_private *dev_priv;
spinlock_t lock;
struct list_head fence_list;
@@ -124,13 +123,13 @@ static void vmw_fence_obj_destroy(struct dma_fence *f)
{
struct vmw_fence_obj *fence =
container_of(f, struct vmw_fence_obj, base);
-
struct vmw_fence_manager *fman = fman_from_fence(fence);
- spin_lock(&fman->lock);
- list_del_init(&fence->head);
- --fman->num_fence_objects;
- spin_unlock(&fman->lock);
+ if (!list_empty(&fence->head)) {
+ spin_lock(&fman->lock);
+ list_del_init(&fence->head);
+ spin_unlock(&fman->lock);
+ }
fence->destroy(fence);
}
@@ -257,7 +256,6 @@ static const struct dma_fence_ops vmw_fence_ops = {
.release = vmw_fence_obj_destroy,
};
-
/*
* Execute signal actions on fences recently signaled.
* This is done from a workqueue so we don't have to execute
@@ -355,7 +353,6 @@ static int vmw_fence_obj_init(struct vmw_fence_manager *fman,
goto out_unlock;
}
list_add_tail(&fence->head, &fman->fence_list);
- ++fman->num_fence_objects;
out_unlock:
spin_unlock(&fman->lock);
@@ -403,7 +400,7 @@ static bool vmw_fence_goal_new_locked(struct vmw_fence_manager *fman,
u32 passed_seqno)
{
u32 goal_seqno;
- struct vmw_fence_obj *fence;
+ struct vmw_fence_obj *fence, *next_fence;
if (likely(!fman->seqno_valid))
return false;
@@ -413,7 +410,7 @@ static bool vmw_fence_goal_new_locked(struct vmw_fence_manager *fman,
return false;
fman->seqno_valid = false;
- list_for_each_entry(fence, &fman->fence_list, head) {
+ list_for_each_entry_safe(fence, next_fence, &fman->fence_list, head) {
if (!list_empty(&fence->seq_passed_actions)) {
fman->seqno_valid = true;
vmw_fence_goal_write(fman->dev_priv,
--
2.43.0
From: Chris Wulff <crwulff(a)gmail.com>
Make sure the descriptor has been set before looking at maxpacket.
This fixes a null pointer panic in this case.
This may happen if the gadget doesn't properly set up the endpoint
for the current speed, or the gadget descriptors are malformed and
the descriptor for the speed/endpoint are not found.
Fixes: 54f83b8c8ea9 ("USB: gadget: Reject endpoints with 0 maxpacket value")
Cc: stable(a)vger.kernel.org
Signed-off-by: Chris Wulff <crwulff(a)gmail.com>
---
drivers/usb/gadget/udc/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
index 2dfae7a17b3f..36a5d5935889 100644
--- a/drivers/usb/gadget/udc/core.c
+++ b/drivers/usb/gadget/udc/core.c
@@ -118,7 +118,7 @@ int usb_ep_enable(struct usb_ep *ep)
goto out;
/* UDC drivers can't handle endpoints with maxpacket size 0 */
- if (usb_endpoint_maxp(ep->desc) == 0) {
+ if (!ep->desc || usb_endpoint_maxp(ep->desc) == 0) {
/*
* We should log an error message here, but we can't call
* dev_err() because there's no way to find the gadget
--
2.43.0
In commit 15d9da3f818c ("binder: use bitmap for faster descriptor
lookup"), it was incorrectly assumed that references to the context
manager node should always get descriptor zero assigned to them.
However, if the context manager dies and a new process takes its place,
then assigning descriptor zero to the new context manager might lead to
collisions, as there could still be references to the older node. This
issue was reported by syzbot with the following trace:
kernel BUG at drivers/android/binder.c:1173!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 447 Comm: binder-util Not tainted 6.10.0-rc6-00348-g31643d84b8c3 #10
Hardware name: linux,dummy-virt (DT)
pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : binder_inc_ref_for_node+0x500/0x544
lr : binder_inc_ref_for_node+0x1e4/0x544
sp : ffff80008112b940
x29: ffff80008112b940 x28: ffff0e0e40310780 x27: 0000000000000000
x26: 0000000000000001 x25: ffff0e0e40310738 x24: ffff0e0e4089ba34
x23: ffff0e0e40310b00 x22: ffff80008112bb50 x21: ffffaf7b8f246970
x20: ffffaf7b8f773f08 x19: ffff0e0e4089b800 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000 x15: 000000002de4aa60
x14: 0000000000000000 x13: 2de4acf000000000 x12: 0000000000000020
x11: 0000000000000018 x10: 0000000000000020 x9 : ffffaf7b90601000
x8 : ffff0e0e48739140 x7 : 0000000000000000 x6 : 000000000000003f
x5 : ffff0e0e40310b28 x4 : 0000000000000000 x3 : ffff0e0e40310720
x2 : ffff0e0e40310728 x1 : 0000000000000000 x0 : ffff0e0e40310710
Call trace:
binder_inc_ref_for_node+0x500/0x544
binder_transaction+0xf68/0x2620
binder_thread_write+0x5bc/0x139c
binder_ioctl+0xef4/0x10c8
[...]
This patch adds back the previous behavior of assigning the next
non-zero descriptor if references to previous context managers still
exist. It amends both strategies, the newer dbitmap code and also the
legacy slow_desc_lookup_olocked(), by allowing them to start looking
for available descriptors at a given offset.
Fixes: 15d9da3f818c ("binder: use bitmap for faster descriptor lookup")
Cc: stable(a)vger.kernel.org
Reported-and-tested-by: syzbot+3dae065ca76952a67257(a)syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/000000000000c1c0a0061d1e6979@google.com/
Signed-off-by: Carlos Llamas <cmllamas(a)google.com>
---
drivers/android/binder.c | 15 ++++++---------
drivers/android/dbitmap.h | 16 ++++++----------
2 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index f26286e3713e..905290c98c3c 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -1044,13 +1044,13 @@ static struct binder_ref *binder_get_ref_olocked(struct binder_proc *proc,
}
/* Find the smallest unused descriptor the "slow way" */
-static u32 slow_desc_lookup_olocked(struct binder_proc *proc)
+static u32 slow_desc_lookup_olocked(struct binder_proc *proc, u32 offset)
{
struct binder_ref *ref;
struct rb_node *n;
u32 desc;
- desc = 1;
+ desc = offset;
for (n = rb_first(&proc->refs_by_desc); n; n = rb_next(n)) {
ref = rb_entry(n, struct binder_ref, rb_node_desc);
if (ref->data.desc > desc)
@@ -1071,21 +1071,18 @@ static int get_ref_desc_olocked(struct binder_proc *proc,
u32 *desc)
{
struct dbitmap *dmap = &proc->dmap;
+ unsigned int nbits, offset;
unsigned long *new, bit;
- unsigned int nbits;
/* 0 is reserved for the context manager */
- if (node == proc->context->binder_context_mgr_node) {
- *desc = 0;
- return 0;
- }
+ offset = (node == proc->context->binder_context_mgr_node) ? 0 : 1;
if (!dbitmap_enabled(dmap)) {
- *desc = slow_desc_lookup_olocked(proc);
+ *desc = slow_desc_lookup_olocked(proc, offset);
return 0;
}
- if (dbitmap_acquire_first_zero_bit(dmap, &bit) == 0) {
+ if (dbitmap_acquire_next_zero_bit(dmap, offset, &bit) == 0) {
*desc = bit;
return 0;
}
diff --git a/drivers/android/dbitmap.h b/drivers/android/dbitmap.h
index b8ac7b4764fd..1d58c2e7abd6 100644
--- a/drivers/android/dbitmap.h
+++ b/drivers/android/dbitmap.h
@@ -6,8 +6,7 @@
*
* Used by the binder driver to optimize the allocation of the smallest
* available descriptor ID. Each bit in the bitmap represents the state
- * of an ID, with the exception of BIT(0) which is used exclusively to
- * reference binder's context manager.
+ * of an ID.
*
* A dbitmap can grow or shrink as needed. This part has been designed
* considering that users might need to briefly release their locks in
@@ -132,16 +131,17 @@ dbitmap_grow(struct dbitmap *dmap, unsigned long *new, unsigned int nbits)
}
/*
- * Finds and sets the first zero bit in the bitmap. Upon success @bit
+ * Finds and sets the next zero bit in the bitmap. Upon success @bit
* is populated with the index and 0 is returned. Otherwise, -ENOSPC
* is returned to indicate that a dbitmap_grow() is needed.
*/
static inline int
-dbitmap_acquire_first_zero_bit(struct dbitmap *dmap, unsigned long *bit)
+dbitmap_acquire_next_zero_bit(struct dbitmap *dmap, unsigned long offset,
+ unsigned long *bit)
{
unsigned long n;
- n = find_first_zero_bit(dmap->map, dmap->nbits);
+ n = find_next_zero_bit(dmap->map, dmap->nbits, offset);
if (n == dmap->nbits)
return -ENOSPC;
@@ -154,9 +154,7 @@ dbitmap_acquire_first_zero_bit(struct dbitmap *dmap, unsigned long *bit)
static inline void
dbitmap_clear_bit(struct dbitmap *dmap, unsigned long bit)
{
- /* BIT(0) should always set for the context manager */
- if (bit)
- clear_bit(bit, dmap->map);
+ clear_bit(bit, dmap->map);
}
static inline int dbitmap_init(struct dbitmap *dmap)
@@ -168,8 +166,6 @@ static inline int dbitmap_init(struct dbitmap *dmap)
}
dmap->nbits = NBITS_MIN;
- /* BIT(0) is reserved for the context manager */
- set_bit(0, dmap->map);
return 0;
}
--
2.45.2.993.g49e7a77208-goog
Custom control mapping introduced a bug, where the filter function was
applied to every single control.
Fix it so it is only applied to the matching controls.
The following dmesg errors during probe are now fixed:
usb 1-5: Found UVC 1.00 device Integrated_Webcam_HD (0c45:670c)
usb 1-5: Failed to query (GET_CUR) UVC control 2 on unit 2: -75 (exp. 1).
usb 1-5: Failed to query (GET_CUR) UVC control 3 on unit 2: -75 (exp. 1).
usb 1-5: Failed to query (GET_CUR) UVC control 6 on unit 2: -75 (exp. 1).
usb 1-5: Failed to query (GET_CUR) UVC control 7 on unit 2: -75 (exp. 1).
usb 1-5: Failed to query (GET_CUR) UVC control 8 on unit 2: -75 (exp. 1).
usb 1-5: Failed to query (GET_CUR) UVC control 9 on unit 2: -75 (exp. 1).
usb 1-5: Failed to query (GET_CUR) UVC control 10 on unit 2: -75 (exp. 1).
Reported-by: Paul Menzen <pmenzel(a)molgen.mpg.de>
Closes: https://lore.kernel.org/linux-media/518cd6b4-68a8-4895-b8fc-97d4dae1ddc4@mo…
Cc: stable(a)vger.kernel.org
Fixes: 8f4362a8d42b ("media: uvcvideo: Allow custom control mapping")
Signed-off-by: Ricardo Ribalda <ribalda(a)chromium.org>
---
Paul, could you check if this fixes your issue, thanks!
---
Changes in v2:
- Replace !(A && B) with (!A || !B)
- Add error message to commit message
- Link to v1: https://lore.kernel.org/r/20240722-fix-filter-mapping-v1-1-07cc9c6bf4e3@chr…
---
drivers/media/usb/uvc/uvc_ctrl.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index 0136df5732ba..4fe26e82e3d1 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -2680,6 +2680,10 @@ static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain,
for (i = 0; i < ARRAY_SIZE(uvc_ctrl_mappings); ++i) {
const struct uvc_control_mapping *mapping = &uvc_ctrl_mappings[i];
+ if (!uvc_entity_match_guid(ctrl->entity, mapping->entity) ||
+ ctrl->info.selector != mapping->selector)
+ continue;
+
/* Let the device provide a custom mapping. */
if (mapping->filter_mapping) {
mapping = mapping->filter_mapping(chain, ctrl);
@@ -2687,9 +2691,7 @@ static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain,
continue;
}
- if (uvc_entity_match_guid(ctrl->entity, mapping->entity) &&
- ctrl->info.selector == mapping->selector)
- __uvc_ctrl_add_mapping(chain, ctrl, mapping);
+ __uvc_ctrl_add_mapping(chain, ctrl, mapping);
}
}
---
base-commit: 68a72104cbcf38ad16500216e213fa4eb21c4be2
change-id: 20240722-fix-filter-mapping-18477dc69048
Best regards,
--
Ricardo Ribalda <ribalda(a)chromium.org>
From: Nilay Shroff <nilay(a)linux.ibm.com>
[ Upstream commit d3a043733f25d743f3aa617c7f82dbcb5ee2211a ]
In current native multipath design when a shared namespace is created,
we loop through each possible numa-node, calculate the NUMA distance of
that node from each nvme controller and then cache the optimal IO path
for future reference while sending IO. The issue with this design is that
we may refer to the NUMA distance table for an offline node which may not
be populated at the time and so we may inadvertently end up finding and
caching a non-optimal path for IO. Then latter when the corresponding
numa-node becomes online and hence the NUMA distance table entry for that
node is created, ideally we should re-calculate the multipath node distance
for the newly added node however that doesn't happen unless we rescan/reset
the controller. So essentially, we may keep using non-optimal IO path for a
node which is made online after namespace is created.
This patch helps fix this issue ensuring that when a shared namespace is
created, we calculate the multipath node distance for each online numa-node
instead of each possible numa-node. Then latter when a node becomes online
and we receive any IO on that newly added node, we would calculate the
multipath node distance for newly added node but this time NUMA distance
table would have been already populated for newly added node. Hence we
would be able to correctly calculate the multipath node distance and choose
the optimal path for the IO.
Signed-off-by: Nilay Shroff <nilay(a)linux.ibm.com>
Reviewed-by: Christoph Hellwig <hch(a)lst.de>
Signed-off-by: Keith Busch <kbusch(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/nvme/host/multipath.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index f96d330d39641..ead42a81cb352 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -558,7 +558,7 @@ static void nvme_mpath_set_live(struct nvme_ns *ns)
int node, srcu_idx;
srcu_idx = srcu_read_lock(&head->srcu);
- for_each_node(node)
+ for_each_online_node(node)
__nvme_find_path(head, node);
srcu_read_unlock(&head->srcu, srcu_idx);
}
--
2.43.0
From: Jonathan Denose <jdenose(a)google.com>
[ Upstream commit a69ce592cbe0417664bc5a075205aa75c2ec1273 ]
The Lenovo N24 on resume becomes stuck in a state where it
sends incorrect packets, causing elantech_packet_check_v4 to fail.
The only way for the device to resume sending the correct packets is for
it to be disabled and then re-enabled.
This change adds a dmi check to trigger this behavior on resume.
Signed-off-by: Jonathan Denose <jdenose(a)google.com>
Link: https://lore.kernel.org/r/20240503155020.v2.1.Ifa0e25ebf968d8f307f58d678036…
Signed-off-by: Dmitry Torokhov <dmitry.torokhov(a)gmail.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/input/mouse/elantech.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 9ff89bfda7a24..8e286e023916f 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1476,16 +1476,47 @@ static void elantech_disconnect(struct psmouse *psmouse)
psmouse->private = NULL;
}
+/*
+ * Some hw_version 4 models fail to properly activate absolute mode on
+ * resume without going through disable/enable cycle.
+ */
+static const struct dmi_system_id elantech_needs_reenable[] = {
+#if defined(CONFIG_DMI) && defined(CONFIG_X86)
+ {
+ /* Lenovo N24 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "81AF"),
+ },
+ },
+#endif
+ { }
+};
+
/*
* Put the touchpad back into absolute mode when reconnecting
*/
static int elantech_reconnect(struct psmouse *psmouse)
{
+ int err;
+
psmouse_reset(psmouse);
if (elantech_detect(psmouse, 0))
return -1;
+ if (dmi_check_system(elantech_needs_reenable)) {
+ err = ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_DISABLE);
+ if (err)
+ psmouse_warn(psmouse, "failed to deactivate mouse on %s: %d\n",
+ psmouse->ps2dev.serio->phys, err);
+
+ err = ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE);
+ if (err)
+ psmouse_warn(psmouse, "failed to reactivate mouse on %s: %d\n",
+ psmouse->ps2dev.serio->phys, err);
+ }
+
if (elantech_set_absolute_mode(psmouse)) {
psmouse_err(psmouse,
"failed to put touchpad back into absolute mode.\n");
--
2.43.0
Zero and negative number is not a valid IRQ for in-kernel code and the
irq_of_parse_and_map() function returns zero on error. So this check for
valid IRQs should only accept values > 0.
Cc: stable(a)vger.kernel.org
Fixes: 2d9e31b9412c ("dmaengine: moxart: remove NO_IRQ")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v2:
- added Cc stable line;
- added Fixes line.
---
drivers/dma/moxart-dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/moxart-dma.c b/drivers/dma/moxart-dma.c
index c48d68cbff92..0690ccab431d 100644
--- a/drivers/dma/moxart-dma.c
+++ b/drivers/dma/moxart-dma.c
@@ -573,7 +573,7 @@ static int moxart_probe(struct platform_device *pdev)
return -ENOMEM;
irq = irq_of_parse_and_map(node, 0);
- if (!irq) {
+ if (irq <= 0) {
dev_err(dev, "no IRQ resource\n");
return -EINVAL;
}
--
2.25.1
Good day,
I wanted to upgrade my kernel to the latest 5.15.162 but it seems to fail with
this error message after upgrading to fedora 40, any ideas what could be the
problem?
$ make
HOSTCXX scripts/gcc-plugins/randomize_layout_plugin.so
scripts/gcc-plugins/randomize_layout_plugin.c: In function 'bool dominated_by_is_err(const_tree, basic_block)':
scripts/gcc-plugins/randomize_layout_plugin.c:693:20: error: 'last_stmt' was not declared in this scope; did you mean 'call_stmt'?
693 | dom_stmt = last_stmt(dom);
| ^~~~~~~~~
| call_stmt
make[2]: *** [scripts/gcc-plugins/Makefile:48: scripts/gcc-plugins/randomize_layout_plugin.so] Error 1
make[1]: *** [scripts/Makefile.build:552: scripts/gcc-plugins] Error 2
make: *** [Makefile:1246: scripts] Error 2
Maybe a problem with gcc 14?
My current kernel was compiled with gcc 13:
[ 0.000000] [ T0] Linux version 5.15.160 (thomas2(a)localhost.localdomain) (gcc (GCC) 13.3.1 20240522 (Red Hat 13.3.1-1), GNU ld version 2.40-14.fc39) #15 PREEMPT Sat Jun 1 16:54:27 CEST 2024
$ gcc --version
gcc (GCC) 14.1.1 20240522 (Red Hat 14.1.1-4)
any help appreciated.
with kind regards
thomas
PS: please cc my as I'm not subscribed to the list.
Custom control mapping introduced a bug, where the filter function was
applied to every single control.
Fix it so it is only applied to the matching controls.
Reported-by: Paul Menzen <pmenzel(a)molgen.mpg.de>
Closes: https://lore.kernel.org/linux-media/518cd6b4-68a8-4895-b8fc-97d4dae1ddc4@mo…
Cc: stable(a)vger.kernel.org
Fixes: 8f4362a8d42b ("media: uvcvideo: Allow custom control mapping")
Signed-off-by: Ricardo Ribalda <ribalda(a)chromium.org>
---
Paul, could you check if this fixes your issue, thanks!
---
drivers/media/usb/uvc/uvc_ctrl.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index 0136df5732ba..06fede57bf36 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -2680,6 +2680,10 @@ static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain,
for (i = 0; i < ARRAY_SIZE(uvc_ctrl_mappings); ++i) {
const struct uvc_control_mapping *mapping = &uvc_ctrl_mappings[i];
+ if (!(uvc_entity_match_guid(ctrl->entity, mapping->entity) &&
+ ctrl->info.selector == mapping->selector))
+ continue;
+
/* Let the device provide a custom mapping. */
if (mapping->filter_mapping) {
mapping = mapping->filter_mapping(chain, ctrl);
@@ -2687,9 +2691,7 @@ static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain,
continue;
}
- if (uvc_entity_match_guid(ctrl->entity, mapping->entity) &&
- ctrl->info.selector == mapping->selector)
- __uvc_ctrl_add_mapping(chain, ctrl, mapping);
+ __uvc_ctrl_add_mapping(chain, ctrl, mapping);
}
}
---
base-commit: 68a72104cbcf38ad16500216e213fa4eb21c4be2
change-id: 20240722-fix-filter-mapping-18477dc69048
Best regards,
--
Ricardo Ribalda <ribalda(a)chromium.org>
Commit a0821ca14bb8 ("media: atomisp: Remove test pattern generator (TPG)
support") broke BYT support because it removed a seemingly unused field
from struct sh_css_sp_config and a seemingly unused value from enum
ia_css_input_mode.
But these are part of the ABI between the kernel and firmware on ISP2400
and this part of the TPG support removal changes broke ISP2400 support.
ISP2401 support was not affected because on ISP2401 only a part of
struct sh_css_sp_config is used.
Restore the removed field and enum value to fix this.
Fixes: a0821ca14bb8 ("media: atomisp: Remove test pattern generator (TPG) support")
Cc: stable(a)vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
---
.../media/atomisp/pci/ia_css_stream_public.h | 8 ++++++--
.../media/atomisp/pci/sh_css_internal.h | 19 ++++++++++++++++---
2 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/ia_css_stream_public.h b/drivers/staging/media/atomisp/pci/ia_css_stream_public.h
index 961c61288083..aad860e54d3a 100644
--- a/drivers/staging/media/atomisp/pci/ia_css_stream_public.h
+++ b/drivers/staging/media/atomisp/pci/ia_css_stream_public.h
@@ -27,12 +27,16 @@
#include "ia_css_prbs.h"
#include "ia_css_input_port.h"
-/* Input modes, these enumerate all supported input modes.
- * Note that not all ISP modes support all input modes.
+/*
+ * Input modes, these enumerate all supported input modes.
+ * This enum is part of the atomisp firmware ABI and must
+ * NOT be changed!
+ * Note that not all ISP modes support all input modes.
*/
enum ia_css_input_mode {
IA_CSS_INPUT_MODE_SENSOR, /** data from sensor */
IA_CSS_INPUT_MODE_FIFO, /** data from input-fifo */
+ IA_CSS_INPUT_MODE_TPG, /** data from test-pattern generator */
IA_CSS_INPUT_MODE_PRBS, /** data from pseudo-random bit stream */
IA_CSS_INPUT_MODE_MEMORY, /** data from a frame in memory */
IA_CSS_INPUT_MODE_BUFFERED_SENSOR /** data is sent through mipi buffer */
diff --git a/drivers/staging/media/atomisp/pci/sh_css_internal.h b/drivers/staging/media/atomisp/pci/sh_css_internal.h
index a2d972ea3fa0..959e7f549641 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_internal.h
+++ b/drivers/staging/media/atomisp/pci/sh_css_internal.h
@@ -344,7 +344,14 @@ struct sh_css_sp_input_formatter_set {
#define IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT (3)
-/* SP configuration information */
+/*
+ * SP configuration information
+ *
+ * This struct is part of the atomisp firmware ABI and is directly copied
+ * to ISP DRAM by sh_css_store_sp_group_to_ddr()
+ *
+ * Do NOT change this struct's layout or remove seemingly unused fields!
+ */
struct sh_css_sp_config {
u8 no_isp_sync; /* Signal host immediately after start */
u8 enable_raw_pool_locking; /** Enable Raw Buffer Locking for HALv3 Support */
@@ -354,6 +361,10 @@ struct sh_css_sp_config {
host (true) or when they are passed to the preview/video pipe
(false). */
+ /*
+ * Note the fields below are only used on the ISP2400 not on the ISP2401,
+ * sh_css_store_sp_group_to_ddr() skip copying these when run on the ISP2401.
+ */
struct {
u8 a_changed;
u8 b_changed;
@@ -363,11 +374,13 @@ struct sh_css_sp_config {
} input_formatter;
sync_generator_cfg_t sync_gen;
+ tpg_cfg_t tpg;
prbs_cfg_t prbs;
input_system_cfg_t input_circuit;
u8 input_circuit_cfg_changed;
- u32 mipi_sizes_for_check[N_CSI_PORTS][IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT];
- u8 enable_isys_event_queue;
+ u32 mipi_sizes_for_check[N_CSI_PORTS][IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT];
+ /* These last 2 fields are used on both the ISP2400 and the ISP2401 */
+ u8 enable_isys_event_queue;
u8 disable_cont_vf;
};
--
2.45.2
From: Zhang Yi <yi.zhang(a)huawei.com>
commit cc883236b79297f6266ca6f4e7f24f3fd3c736c1 upstream
After we factor out the inline data write procedure from
ext4_da_write_end(), we don't need to start journal handle for the cases
of both buffer overwrite and append-write. If we need to update
i_disksize, mark_inode_dirty() do start handle and update inode buffer.
So we could just remove all the journal handle codes in the delalloc
write procedure.
After this patch, we could get a lot of performance improvement. Below
is the Unixbench comparison data test on my machine with 'Intel Xeon
Gold 5120' CPU and nvme SSD backend.
Test cmd:
./Run -c 56 -i 3 fstime fsbuffer fsdisk
Before this patch:
System Benchmarks Partial Index BASELINE RESULT INDEX
File Copy 1024 bufsize 2000 maxblocks 3960.0 422965.0 1068.1
File Copy 256 bufsize 500 maxblocks 1655.0 105077.0 634.9
File Copy 4096 bufsize 8000 maxblocks 5800.0 1429092.0 2464.0
======
System Benchmarks Index Score (Partial Only) 1186.6
After this patch:
System Benchmarks Partial Index BASELINE RESULT INDEX
File Copy 1024 bufsize 2000 maxblocks 3960.0 732716.0 1850.3
File Copy 256 bufsize 500 maxblocks 1655.0 184940.0 1117.5
File Copy 4096 bufsize 8000 maxblocks 5800.0 2427152.0 4184.7
======
System Benchmarks Index Score (Partial Only) 2053.0
Cc: stable(a)vger.kernel.org
Signed-off-by: Zhang Yi <yi.zhang(a)huawei.com>
Reviewed-by: Jan Kara <jack(a)suse.cz>
Signed-off-by: Theodore Ts'o <tytso(a)mit.edu>
Link: https://lore.kernel.org/r/20210716122024.1105856-5-yi.zhang@huawei.com
Reviewed-by: Cheng Nie <niecheng1(a)uniontech.com>
Signed-off-by: Dandan Zhang <zhangdandan(a)uniontech.com>
Signed-off-by: WangYuli <wangyuli(a)uniontech.com>
---
fs/ext4/inode.c | 60 +++++--------------------------------------------
1 file changed, 5 insertions(+), 55 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 1e6753084a00..597c2f49c889 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3032,19 +3032,6 @@ static int ext4_nonda_switch(struct super_block *sb)
return 0;
}
-/* We always reserve for an inode update; the superblock could be there too */
-static int ext4_da_write_credits(struct inode *inode, loff_t pos, unsigned len)
-{
- if (likely(ext4_has_feature_large_file(inode->i_sb)))
- return 1;
-
- if (pos + len <= 0x7fffffffULL)
- return 1;
-
- /* We might need to update the superblock to set LARGE_FILE */
- return 2;
-}
-
static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned flags,
struct page **pagep, void **fsdata)
@@ -3053,7 +3040,6 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
struct page *page;
pgoff_t index;
struct inode *inode = mapping->host;
- handle_t *handle;
if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb))))
return -EIO;
@@ -3079,41 +3065,11 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
return 0;
}
- /*
- * grab_cache_page_write_begin() can take a long time if the
- * system is thrashing due to memory pressure, or if the page
- * is being written back. So grab it first before we start
- * the transaction handle. This also allows us to allocate
- * the page (if needed) without using GFP_NOFS.
- */
-retry_grab:
+retry:
page = grab_cache_page_write_begin(mapping, index, flags);
if (!page)
return -ENOMEM;
- unlock_page(page);
-
- /*
- * With delayed allocation, we don't log the i_disksize update
- * if there is delayed block allocation. But we still need
- * to journalling the i_disksize update if writes to the end
- * of file which has an already mapped buffer.
- */
-retry_journal:
- handle = ext4_journal_start(inode, EXT4_HT_WRITE_PAGE,
- ext4_da_write_credits(inode, pos, len));
- if (IS_ERR(handle)) {
- put_page(page);
- return PTR_ERR(handle);
- }
- lock_page(page);
- if (page->mapping != mapping) {
- /* The page got truncated from under us */
- unlock_page(page);
- put_page(page);
- ext4_journal_stop(handle);
- goto retry_grab;
- }
/* In case writeback began while the page was unlocked */
wait_for_stable_page(page);
@@ -3125,20 +3081,18 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
#endif
if (ret < 0) {
unlock_page(page);
- ext4_journal_stop(handle);
+ put_page(page);
/*
* block_write_begin may have instantiated a few blocks
* outside i_size. Trim these off again. Don't need
- * i_size_read because we hold i_mutex.
+ * i_size_read because we hold inode lock.
*/
if (pos + len > inode->i_size)
ext4_truncate_failed_write(inode);
if (ret == -ENOSPC &&
ext4_should_retry_alloc(inode->i_sb, &retries))
- goto retry_journal;
-
- put_page(page);
+ goto retry;
return ret;
}
@@ -3175,8 +3129,6 @@ static int ext4_da_write_end(struct file *file,
struct page *page, void *fsdata)
{
struct inode *inode = mapping->host;
- int ret;
- handle_t *handle = ext4_journal_current_handle();
loff_t new_i_size;
unsigned long start, end;
int write_mode = (int)(unsigned long)fsdata;
@@ -3215,9 +3167,7 @@ static int ext4_da_write_end(struct file *file,
ext4_da_should_update_i_disksize(page, end))
ext4_update_i_disksize(inode, new_i_size);
- copied = generic_write_end(file, mapping, pos, len, copied, page, fsdata);
- ret = ext4_journal_stop(handle);
- return ret ? ret : copied;
+ return generic_write_end(file, mapping, pos, len, copied, page, fsdata);
}
static void ext4_da_invalidatepage(struct page *page, unsigned int offset,
--
2.43.4
From: Zhang Yi <yi.zhang(a)huawei.com>
commit 55ce2f649b9e88111270333a8127e23f4f8f42d7 upstream
Current error path of ext4_write_inline_data_end() is not correct.
Firstly, it should pass out the error value if ext4_get_inode_loc()
return fail, or else it could trigger infinite loop if we inject error
here. And then it's better to add inode to orphan list if it return fail
in ext4_journal_stop(), otherwise we could not restore inline xattr
entry after power failure. Finally, we need to reset the 'ret' value if
ext4_write_inline_data_end() return success in ext4_write_end() and
ext4_journalled_write_end(), otherwise we could not get the error return
value of ext4_journal_stop().
Cc: stable(a)vger.kernel.org
Signed-off-by: Zhang Yi <yi.zhang(a)huawei.com>
Reviewed-by: Jan Kara <jack(a)suse.cz>
Signed-off-by: Theodore Ts'o <tytso(a)mit.edu>
Link: https://lore.kernel.org/r/20210716122024.1105856-3-yi.zhang@huawei.com
Reviewed-by: Cheng Nie <niecheng1(a)uniontech.com>
Signed-off-by: Dandan Zhang <zhangdandan(a)uniontech.com>
Signed-off-by: WangYuli <wangyuli(a)uniontech.com>
---
fs/ext4/inline.c | 15 +++++----------
fs/ext4/inode.c | 7 +++++--
2 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index 71bb3cfc5933..de04bd5fb551 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -745,18 +745,13 @@ int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len,
void *kaddr;
struct ext4_iloc iloc;
- if (unlikely(copied < len)) {
- if (!PageUptodate(page)) {
- copied = 0;
- goto out;
- }
- }
+ if (unlikely(copied < len) && !PageUptodate(page))
+ return 0;
ret = ext4_get_inode_loc(inode, &iloc);
if (ret) {
ext4_std_error(inode->i_sb, ret);
- copied = 0;
- goto out;
+ return ret;
}
ext4_write_lock_xattr(inode, &no_expand);
@@ -769,7 +764,7 @@ int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len,
(void) ext4_find_inline_data_nolock(inode);
kaddr = kmap_atomic(page);
- ext4_write_inline_data(inode, &iloc, kaddr, pos, len);
+ ext4_write_inline_data(inode, &iloc, kaddr, pos, copied);
kunmap_atomic(kaddr);
SetPageUptodate(page);
/* clear page dirty so that writepages wouldn't work for us. */
@@ -778,7 +773,7 @@ int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len,
ext4_write_unlock_xattr(inode, &no_expand);
brelse(iloc.bh);
mark_inode_dirty(inode);
-out:
+
return copied;
}
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index d8a8e4ee5ff8..44a715e6aae1 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1428,6 +1428,7 @@ static int ext4_write_end(struct file *file,
goto errout;
}
copied = ret;
+ ret = 0;
} else
copied = block_write_end(file, mapping, pos,
len, copied, page, fsdata);
@@ -1450,13 +1451,14 @@ static int ext4_write_end(struct file *file,
if (i_size_changed || inline_data)
ext4_mark_inode_dirty(handle, inode);
+errout:
if (pos + len > inode->i_size && ext4_can_truncate(inode))
/* if we have allocated more blocks and copied
* less. We will have blocks allocated outside
* inode->i_size. So truncate them
*/
ext4_orphan_add(handle, inode);
-errout:
+
ret2 = ext4_journal_stop(handle);
if (!ret)
ret = ret2;
@@ -1538,6 +1540,7 @@ static int ext4_journalled_write_end(struct file *file,
goto errout;
}
copied = ret;
+ ret = 0;
} else if (unlikely(copied < len) && !PageUptodate(page)) {
copied = 0;
ext4_journalled_zero_new_buffers(handle, page, from, to);
@@ -1566,6 +1569,7 @@ static int ext4_journalled_write_end(struct file *file,
ret = ret2;
}
+errout:
if (pos + len > inode->i_size && ext4_can_truncate(inode))
/* if we have allocated more blocks and copied
* less. We will have blocks allocated outside
@@ -1573,7 +1577,6 @@ static int ext4_journalled_write_end(struct file *file,
*/
ext4_orphan_add(handle, inode);
-errout:
ret2 = ext4_journal_stop(handle);
if (!ret)
ret = ret2;
--
2.43.4
From: Zhang Yi <yi.zhang(a)huawei.com>
After commit 3da40c7b0898 ("ext4: only call ext4_truncate when size <=
isize"), i_disksize could always be updated to i_size in ext4_setattr(),
and we could sure that i_disksize <= i_size since holding inode lock and
if i_disksize < i_size there are delalloc writes pending in the range
upto i_size. If the end of the current write is <= i_size, there's no
need to touch i_disksize since writeback will push i_disksize upto
i_size eventually. So we can switch to check i_size instead of
i_disksize in ext4_da_write_end() when write to the end of the file.
we also could remove ext4_mark_inode_dirty() together because we defer
inode dirtying to generic_write_end() or ext4_da_write_inline_data_end().
Signed-off-by: Zhang Yi <yi.zhang(a)huawei.com>
Reviewed-by: Jan Kara <jack(a)suse.cz>
Signed-off-by: Theodore Ts'o <tytso(a)mit.edu>
Link: https://lore.kernel.org/r/20210716122024.1105856-2-yi.zhang@huawei.com
Reviewed-by: Cheng Nie <niecheng1(a)uniontech.com>
Signed-off-by: Dandan Zhang <zhangdandan(a)uniontech.com>
Signed-off-by: WangYuli <wangyuli(a)uniontech.com>
---
fs/ext4/inode.c | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 646285fbc9fc..d8a8e4ee5ff8 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3207,35 +3207,37 @@ static int ext4_da_write_end(struct file *file,
end = start + copied - 1;
/*
- * generic_write_end() will run mark_inode_dirty() if i_size
- * changes. So let's piggyback the i_disksize mark_inode_dirty
- * into that.
+ * Since we are holding inode lock, we are sure i_disksize <=
+ * i_size. We also know that if i_disksize < i_size, there are
+ * delalloc writes pending in the range upto i_size. If the end of
+ * the current write is <= i_size, there's no need to touch
+ * i_disksize since writeback will push i_disksize upto i_size
+ * eventually. If the end of the current write is > i_size and
+ * inside an allocated block (ext4_da_should_update_i_disksize()
+ * check), we need to update i_disksize here as neither
+ * ext4_writepage() nor certain ext4_writepages() paths not
+ * allocating blocks update i_disksize.
+ *
+ * Note that we defer inode dirtying to generic_write_end() /
+ * ext4_da_write_inline_data_end().
*/
new_i_size = pos + copied;
- if (copied && new_i_size > EXT4_I(inode)->i_disksize) {
+ if (copied && new_i_size > inode->i_size) {
if (ext4_has_inline_data(inode) ||
- ext4_da_should_update_i_disksize(page, end)) {
+ ext4_da_should_update_i_disksize(page, end))
ext4_update_i_disksize(inode, new_i_size);
- /* We need to mark inode dirty even if
- * new_i_size is less that inode->i_size
- * bu greater than i_disksize.(hint delalloc)
- */
- ext4_mark_inode_dirty(handle, inode);
- }
}
if (write_mode != CONVERT_INLINE_DATA &&
ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA) &&
ext4_has_inline_data(inode))
- ret2 = ext4_da_write_inline_data_end(inode, pos, len, copied,
+ ret = ext4_da_write_inline_data_end(inode, pos, len, copied,
page);
else
- ret2 = generic_write_end(file, mapping, pos, len, copied,
+ ret = generic_write_end(file, mapping, pos, len, copied,
page, fsdata);
- copied = ret2;
- if (ret2 < 0)
- ret = ret2;
+ copied = ret;
ret2 = ext4_journal_stop(handle);
if (!ret)
ret = ret2;
--
2.43.4
From: Zhang Yi <yi.zhang(a)huawei.com>
After we factor out the inline data write procedure from
ext4_da_write_end(), we don't need to start journal handle for the cases
of both buffer overwrite and append-write. If we need to update
i_disksize, mark_inode_dirty() do start handle and update inode buffer.
So we could just remove all the journal handle codes in the delalloc
write procedure.
After this patch, we could get a lot of performance improvement. Below
is the Unixbench comparison data test on my machine with 'Intel Xeon
Gold 5120' CPU and nvme SSD backend.
Test cmd:
./Run -c 56 -i 3 fstime fsbuffer fsdisk
Before this patch:
System Benchmarks Partial Index BASELINE RESULT INDEX
File Copy 1024 bufsize 2000 maxblocks 3960.0 422965.0 1068.1
File Copy 256 bufsize 500 maxblocks 1655.0 105077.0 634.9
File Copy 4096 bufsize 8000 maxblocks 5800.0 1429092.0 2464.0
======
System Benchmarks Index Score (Partial Only) 1186.6
After this patch:
System Benchmarks Partial Index BASELINE RESULT INDEX
File Copy 1024 bufsize 2000 maxblocks 3960.0 732716.0 1850.3
File Copy 256 bufsize 500 maxblocks 1655.0 184940.0 1117.5
File Copy 4096 bufsize 8000 maxblocks 5800.0 2427152.0 4184.7
======
System Benchmarks Index Score (Partial Only) 2053.0
Signed-off-by: Zhang Yi <yi.zhang(a)huawei.com>
Reviewed-by: Jan Kara <jack(a)suse.cz>
Signed-off-by: Theodore Ts'o <tytso(a)mit.edu>
Link: https://lore.kernel.org/r/20210716122024.1105856-5-yi.zhang@huawei.com
Reviewed-by: Cheng Nie <niecheng1(a)uniontech.com>
Signed-off-by: Dandan Zhang <zhangdandan(a)uniontech.com>
Signed-off-by: WangYuli <wangyuli(a)uniontech.com>
---
fs/ext4/inode.c | 60 +++++--------------------------------------------
1 file changed, 5 insertions(+), 55 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 1e6753084a00..597c2f49c889 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3032,19 +3032,6 @@ static int ext4_nonda_switch(struct super_block *sb)
return 0;
}
-/* We always reserve for an inode update; the superblock could be there too */
-static int ext4_da_write_credits(struct inode *inode, loff_t pos, unsigned len)
-{
- if (likely(ext4_has_feature_large_file(inode->i_sb)))
- return 1;
-
- if (pos + len <= 0x7fffffffULL)
- return 1;
-
- /* We might need to update the superblock to set LARGE_FILE */
- return 2;
-}
-
static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned flags,
struct page **pagep, void **fsdata)
@@ -3053,7 +3040,6 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
struct page *page;
pgoff_t index;
struct inode *inode = mapping->host;
- handle_t *handle;
if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb))))
return -EIO;
@@ -3079,41 +3065,11 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
return 0;
}
- /*
- * grab_cache_page_write_begin() can take a long time if the
- * system is thrashing due to memory pressure, or if the page
- * is being written back. So grab it first before we start
- * the transaction handle. This also allows us to allocate
- * the page (if needed) without using GFP_NOFS.
- */
-retry_grab:
+retry:
page = grab_cache_page_write_begin(mapping, index, flags);
if (!page)
return -ENOMEM;
- unlock_page(page);
-
- /*
- * With delayed allocation, we don't log the i_disksize update
- * if there is delayed block allocation. But we still need
- * to journalling the i_disksize update if writes to the end
- * of file which has an already mapped buffer.
- */
-retry_journal:
- handle = ext4_journal_start(inode, EXT4_HT_WRITE_PAGE,
- ext4_da_write_credits(inode, pos, len));
- if (IS_ERR(handle)) {
- put_page(page);
- return PTR_ERR(handle);
- }
- lock_page(page);
- if (page->mapping != mapping) {
- /* The page got truncated from under us */
- unlock_page(page);
- put_page(page);
- ext4_journal_stop(handle);
- goto retry_grab;
- }
/* In case writeback began while the page was unlocked */
wait_for_stable_page(page);
@@ -3125,20 +3081,18 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
#endif
if (ret < 0) {
unlock_page(page);
- ext4_journal_stop(handle);
+ put_page(page);
/*
* block_write_begin may have instantiated a few blocks
* outside i_size. Trim these off again. Don't need
- * i_size_read because we hold i_mutex.
+ * i_size_read because we hold inode lock.
*/
if (pos + len > inode->i_size)
ext4_truncate_failed_write(inode);
if (ret == -ENOSPC &&
ext4_should_retry_alloc(inode->i_sb, &retries))
- goto retry_journal;
-
- put_page(page);
+ goto retry;
return ret;
}
@@ -3175,8 +3129,6 @@ static int ext4_da_write_end(struct file *file,
struct page *page, void *fsdata)
{
struct inode *inode = mapping->host;
- int ret;
- handle_t *handle = ext4_journal_current_handle();
loff_t new_i_size;
unsigned long start, end;
int write_mode = (int)(unsigned long)fsdata;
@@ -3215,9 +3167,7 @@ static int ext4_da_write_end(struct file *file,
ext4_da_should_update_i_disksize(page, end))
ext4_update_i_disksize(inode, new_i_size);
- copied = generic_write_end(file, mapping, pos, len, copied, page, fsdata);
- ret = ext4_journal_stop(handle);
- return ret ? ret : copied;
+ return generic_write_end(file, mapping, pos, len, copied, page, fsdata);
}
static void ext4_da_invalidatepage(struct page *page, unsigned int offset,
--
2.43.4
From: Zhang Yi <yi.zhang(a)huawei.com>
Current error path of ext4_write_inline_data_end() is not correct.
Firstly, it should pass out the error value if ext4_get_inode_loc()
return fail, or else it could trigger infinite loop if we inject error
here. And then it's better to add inode to orphan list if it return fail
in ext4_journal_stop(), otherwise we could not restore inline xattr
entry after power failure. Finally, we need to reset the 'ret' value if
ext4_write_inline_data_end() return success in ext4_write_end() and
ext4_journalled_write_end(), otherwise we could not get the error return
value of ext4_journal_stop().
Signed-off-by: Zhang Yi <yi.zhang(a)huawei.com>
Reviewed-by: Jan Kara <jack(a)suse.cz>
Signed-off-by: Theodore Ts'o <tytso(a)mit.edu>
Link: https://lore.kernel.org/r/20210716122024.1105856-3-yi.zhang@huawei.com
Reviewed-by: Cheng Nie <niecheng1(a)uniontech.com>
Signed-off-by: Dandan Zhang <zhangdandan(a)uniontech.com>
Signed-off-by: WangYuli <wangyuli(a)uniontech.com>
---
fs/ext4/inline.c | 15 +++++----------
fs/ext4/inode.c | 7 +++++--
2 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index 71bb3cfc5933..de04bd5fb551 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -745,18 +745,13 @@ int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len,
void *kaddr;
struct ext4_iloc iloc;
- if (unlikely(copied < len)) {
- if (!PageUptodate(page)) {
- copied = 0;
- goto out;
- }
- }
+ if (unlikely(copied < len) && !PageUptodate(page))
+ return 0;
ret = ext4_get_inode_loc(inode, &iloc);
if (ret) {
ext4_std_error(inode->i_sb, ret);
- copied = 0;
- goto out;
+ return ret;
}
ext4_write_lock_xattr(inode, &no_expand);
@@ -769,7 +764,7 @@ int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len,
(void) ext4_find_inline_data_nolock(inode);
kaddr = kmap_atomic(page);
- ext4_write_inline_data(inode, &iloc, kaddr, pos, len);
+ ext4_write_inline_data(inode, &iloc, kaddr, pos, copied);
kunmap_atomic(kaddr);
SetPageUptodate(page);
/* clear page dirty so that writepages wouldn't work for us. */
@@ -778,7 +773,7 @@ int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len,
ext4_write_unlock_xattr(inode, &no_expand);
brelse(iloc.bh);
mark_inode_dirty(inode);
-out:
+
return copied;
}
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index d8a8e4ee5ff8..44a715e6aae1 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1428,6 +1428,7 @@ static int ext4_write_end(struct file *file,
goto errout;
}
copied = ret;
+ ret = 0;
} else
copied = block_write_end(file, mapping, pos,
len, copied, page, fsdata);
@@ -1450,13 +1451,14 @@ static int ext4_write_end(struct file *file,
if (i_size_changed || inline_data)
ext4_mark_inode_dirty(handle, inode);
+errout:
if (pos + len > inode->i_size && ext4_can_truncate(inode))
/* if we have allocated more blocks and copied
* less. We will have blocks allocated outside
* inode->i_size. So truncate them
*/
ext4_orphan_add(handle, inode);
-errout:
+
ret2 = ext4_journal_stop(handle);
if (!ret)
ret = ret2;
@@ -1538,6 +1540,7 @@ static int ext4_journalled_write_end(struct file *file,
goto errout;
}
copied = ret;
+ ret = 0;
} else if (unlikely(copied < len) && !PageUptodate(page)) {
copied = 0;
ext4_journalled_zero_new_buffers(handle, page, from, to);
@@ -1566,6 +1569,7 @@ static int ext4_journalled_write_end(struct file *file,
ret = ret2;
}
+errout:
if (pos + len > inode->i_size && ext4_can_truncate(inode))
/* if we have allocated more blocks and copied
* less. We will have blocks allocated outside
@@ -1573,7 +1577,6 @@ static int ext4_journalled_write_end(struct file *file,
*/
ext4_orphan_add(handle, inode);
-errout:
ret2 = ext4_journal_stop(handle);
if (!ret)
ret = ret2;
--
2.43.4
A patchset from linux-5.15 should be backported to 4.19 that can
significantly improve ext4 fs read and write performance. Unixbench test
results for linux-4.19.318 on Phytium D2000 CPU are shown below.
Test cmd: (Phytium D2000 only has 8 cores)
./Run fs -c 8
Before this patch set:
File Copy 1024 bufsize 2000 maxblocks 1124181
File Copy 256 bufsize 500 maxblocks 281885
File Copy 4096 bufsize 8000 maxblocks 3383785
File Read 1024 bufsize 2000 maxblocks 8702173
File Read 256 bufsize 500 maxblocks 3869384
File Read 4096 bufsize 8000 maxblocks 13043151
File Write 1024 bufsize 2000 maxblocks 1107185
File Write 256 bufsize 500 maxblocks 270493
File Write 4096 bufsize 8000 maxblocks 4018084
After this patch set:
File Copy 1024 bufsize 2000 maxblocks 2026206
File Copy 256 bufsize 500 maxblocks 829534
File Copy 4096 bufsize 8000 maxblocks 4066659
File Read 1024 bufsize 2000 maxblocks 8877219
File Read 256 bufsize 500 maxblocks 3997445
File Read 4096 bufsize 8000 maxblocks 13179885
File Write 1024 bufsize 2000 maxblocks 4256929
File Write 256 bufsize 500 maxblocks 1305320
File Write 4096 bufsize 8000 maxblocks 10721052
We can observe a quantum leap in the test results as a consequence of
applying this patchset
Link: https://lore.kernel.org/all/20210716122024.1105856-1-yi.zhang@huawei.com/
Original description:
This patchset address to improve buffer write performance with delalloc.
The first patch reduce the unnecessary update i_disksize, the second two
patch refactor the inline data write procedure and also do some small
fix, the last patch do improve by remove all unnecessary journal handle
in the delalloc write procedure.
After this patch set, we could get a lot of performance improvement.
Below is the Unixbench comparison data test on my machine with 'Intel
Xeon Gold 5120' CPU and nvme SSD backend.
Test cmd:
./Run -c 56 -i 3 fstime fsbuffer fsdisk
Before this patch set:
System Benchmarks Partial Index BASELINE RESULT INDEX
File Copy 1024 bufsize 2000 maxblocks 3960.0 422965.0 1068.1
File Copy 256 bufsize 500 maxblocks 1655.0 105077.0 634.9
File Copy 4096 bufsize 8000 maxblocks 5800.0 1429092.0 2464.0
========
System Benchmarks Index Score (Partial Only) 1186.6
After this patch set:
System Benchmarks Partial Index BASELINE RESULT INDEX
File Copy 1024 bufsize 2000 maxblocks 3960.0 732716.0 1850.3
File Copy 256 bufsize 500 maxblocks 1655.0 184940.0 1117.5
File Copy 4096 bufsize 8000 maxblocks 5800.0 2427152.0 4184.7
========
System Benchmarks Index Score (Partial Only) 2053.0
Zhang Yi (4):
ext4: check and update i_disksize properly
ext4: correct the error path of ext4_write_inline_data_end()
ext4: factor out write end code of inline file
ext4: drop unnecessary journal handle in delalloc write
fs/ext4/ext4.h | 3 -
fs/ext4/inline.c | 120 ++++++++++++++++++-------------------
fs/ext4/inode.c | 150 ++++++++++++-----------------------------------
3 files changed, 99 insertions(+), 174 deletions(-)
--
2.31.1
Hello,
I sent you a message a few hours ago but no reply yet, or you didn't receive it? Kindly read my letter and reply back. I want to make an inquiry
Thanks.
Dr.Allen Cheng
Human Resource Manager | Product Research Assistant
FC Industrial Laboratories Ltd
Originally, the check_unaligned_access_emulated_all_cpus function
only checked the boot hart. This fixes the function to check all
harts.
Fixes: 71c54b3d169d ("riscv: report misaligned accesses emulation to hwprobe")
Signed-off-by: Jesse Taube <jesse(a)rivosinc.com>
Reviewed-by: Charlie Jenkins <charlie(a)rivosinc.com>
Cc: stable(a)vger.kernel.org
---
V1 -> V2:
- New patch
V2 -> V3:
- Split patch
V3 -> V4:
- Re-add check for a system where a heterogeneous
CPU is hotplugged into a previously homogenous
system.
V4 -> V5:
- Change work_struct *unused to work_struct *work __always_unused
---
arch/riscv/kernel/traps_misaligned.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/riscv/kernel/traps_misaligned.c b/arch/riscv/kernel/traps_misaligned.c
index b62d5a2f4541..9a1e94383d6d 100644
--- a/arch/riscv/kernel/traps_misaligned.c
+++ b/arch/riscv/kernel/traps_misaligned.c
@@ -526,11 +526,11 @@ int handle_misaligned_store(struct pt_regs *regs)
return 0;
}
-static bool check_unaligned_access_emulated(int cpu)
+static void check_unaligned_access_emulated(struct work_struct *work __always_unused)
{
+ int cpu = smp_processor_id();
long *mas_ptr = per_cpu_ptr(&misaligned_access_speed, cpu);
unsigned long tmp_var, tmp_val;
- bool misaligned_emu_detected;
*mas_ptr = RISCV_HWPROBE_MISALIGNED_UNKNOWN;
@@ -538,19 +538,16 @@ static bool check_unaligned_access_emulated(int cpu)
" "REG_L" %[tmp], 1(%[ptr])\n"
: [tmp] "=r" (tmp_val) : [ptr] "r" (&tmp_var) : "memory");
- misaligned_emu_detected = (*mas_ptr == RISCV_HWPROBE_MISALIGNED_EMULATED);
/*
* If unaligned_ctl is already set, this means that we detected that all
* CPUS uses emulated misaligned access at boot time. If that changed
* when hotplugging the new cpu, this is something we don't handle.
*/
- if (unlikely(unaligned_ctl && !misaligned_emu_detected)) {
+ if (unlikely(unaligned_ctl && (*mas_ptr != RISCV_HWPROBE_MISALIGNED_EMULATED))) {
pr_crit("CPU misaligned accesses non homogeneous (expected all emulated)\n");
while (true)
cpu_relax();
}
-
- return misaligned_emu_detected;
}
bool check_unaligned_access_emulated_all_cpus(void)
@@ -562,8 +559,11 @@ bool check_unaligned_access_emulated_all_cpus(void)
* accesses emulated since tasks requesting such control can run on any
* CPU.
*/
+ schedule_on_each_cpu(check_unaligned_access_emulated);
+
for_each_online_cpu(cpu)
- if (!check_unaligned_access_emulated(cpu))
+ if (per_cpu(misaligned_access_speed, cpu)
+ != RISCV_HWPROBE_MISALIGNED_EMULATED)
return false;
unaligned_ctl = true;
--
2.45.2
Before this change, network restrictions were enforced according to the
calling thread's Landlock domain, leading to potential inconsistent
results when the same socket was used by different threads or processes
(with different domains). This change fixes such access control
inconsistency by enforcing the socket's Landlock domain instead of the
caller's Landlock domain.
Socket's Landlock domain is inherited from the thread that created this
socket. This means that a socket created without sandboxing will be
free to connect and bind without limitation. This also means that a
socket created by a sandboxed thread will inherit the thread's policy,
which will be enforced on this socket even when used by another thread
or passed to another process.
The initial rationale [1] was that a socket does not directly grants
access to data, but it is an object used to define an access (e.g.
connection to a peer). Contrary to my initial assumption, we can
identify to which protocol/port a newly created socket can give access
to with the socket's file->f_cred inherited from its creator. Moreover,
from a kernel point of view, especially for shared objects, we need a
more consistent access model. This means that the same action on the
same socket performed by different threads will have the same effect.
This follows the same approach as for file descriptors tied to the file
system (e.g. LANDLOCK_ACCESS_FS_TRUNCATE).
One potential risk of this change is for unsandboxed processes to send
socket file descriptors to sandboxed processes, which could give
unrestricted network access to the sandboxed process (by reconfigure the
socket). While it makes sense for processes to transfer (AF_UNIX)
socketpairs, which is OK because they can only exchange data between
themselves, it should be rare for processes to legitimately pass other
kind of sockets (e.g. AF_INET).
Another potential risk of this approach is socket file descriptor leaks.
This is the same risk as with regular file descriptor leaks giving
access to the content of a file, which is well known and documented.
This could be mitigated with a future complementary restriction on
received or inherited file descriptors.
One interesting side effect of this new approach is that a process can
create a socket that will only allow to connect to a set of ports. This
can be done by creating a thread, sandboxing it, creating a socket, and
using the related file descriptor (in the same process). Passing this
restricted socket to a more sandboxed process makes it possible to have
a more dynamic security policy.
This new approach aligns with SELinux and Smack instead of AppArmor and
Tomoyo. It is also in line with capability-based security mechanisms
such as Capsicum.
This slight semantic change is important for current and future
Landlock's consistency, and it must be backported.
Current tests are still OK because this behavior wasn't covered. A
following commit adds new tests.
Cc: Günther Noack <gnoack(a)google.com>
Cc: Ivanov Mikhail <ivanov.mikhail1(a)huawei-partners.com>
Cc: Konstantin Meskhidze <konstantin.meskhidze(a)huawei.com>
Cc: Paul Moore <paul(a)paul-moore.com>
Cc: Tahera Fahimi <fahimitahera(a)gmail.com>
Cc: <stable(a)vger.kernel.org> # 6.7.x: 088e2efaf3d2: landlock: Simplify current_check_access_socket()
Fixes: fff69fb03dde ("landlock: Support network rules with TCP bind and connect")
Link: https://lore.kernel.org/r/263c1eb3-602f-57fe-8450-3f138581bee7@digikod.net [1]
Signed-off-by: Mickaël Salaün <mic(a)digikod.net>
Link: https://lore.kernel.org/r/20240719150618.197991-2-mic@digikod.net
---
security/landlock/net.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/security/landlock/net.c b/security/landlock/net.c
index c8bcd29bde09..78e027a74819 100644
--- a/security/landlock/net.c
+++ b/security/landlock/net.c
@@ -50,10 +50,11 @@ get_raw_handled_net_accesses(const struct landlock_ruleset *const domain)
return access_dom;
}
-static const struct landlock_ruleset *get_current_net_domain(void)
+static const struct landlock_ruleset *
+get_socket_net_domain(const struct socket *const sock)
{
const struct landlock_ruleset *const dom =
- landlock_get_current_domain();
+ landlock_cred(sock->file->f_cred)->domain;
if (!dom || !get_raw_handled_net_accesses(dom))
return NULL;
@@ -61,10 +62,9 @@ static const struct landlock_ruleset *get_current_net_domain(void)
return dom;
}
-static int current_check_access_socket(struct socket *const sock,
- struct sockaddr *const address,
- const int addrlen,
- access_mask_t access_request)
+static int check_access_socket(struct socket *const sock,
+ struct sockaddr *const address,
+ const int addrlen, access_mask_t access_request)
{
__be16 port;
layer_mask_t layer_masks[LANDLOCK_NUM_ACCESS_NET] = {};
@@ -72,7 +72,7 @@ static int current_check_access_socket(struct socket *const sock,
struct landlock_id id = {
.type = LANDLOCK_KEY_NET_PORT,
};
- const struct landlock_ruleset *const dom = get_current_net_domain();
+ const struct landlock_ruleset *const dom = get_socket_net_domain(sock);
if (!dom)
return 0;
@@ -175,16 +175,16 @@ static int current_check_access_socket(struct socket *const sock,
static int hook_socket_bind(struct socket *const sock,
struct sockaddr *const address, const int addrlen)
{
- return current_check_access_socket(sock, address, addrlen,
- LANDLOCK_ACCESS_NET_BIND_TCP);
+ return check_access_socket(sock, address, addrlen,
+ LANDLOCK_ACCESS_NET_BIND_TCP);
}
static int hook_socket_connect(struct socket *const sock,
struct sockaddr *const address,
const int addrlen)
{
- return current_check_access_socket(sock, address, addrlen,
- LANDLOCK_ACCESS_NET_CONNECT_TCP);
+ return check_access_socket(sock, address, addrlen,
+ LANDLOCK_ACCESS_NET_CONNECT_TCP);
}
static struct security_hook_list landlock_hooks[] __ro_after_init = {
--
2.45.2
In read_handle(), of_get_address() may return NULL if getting address and
size of the node failed. When of_read_number() uses prop to handle
conversions between different byte orders, it could lead to a null pointer
dereference. Add NULL check to fix potential issue.
Found by static analysis.
Cc: stable(a)vger.kernel.org
Fixes: 14baf4d9c739 ("cxl: Add guest-specific code")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v4:
- modified vulnerability description according to suggestions, making the
process of static analysis of vulnerabilities clearer. No active research
on developer behavior.
Changes in v3:
- fixed up the changelog text as suggestions.
Changes in v2:
- added an explanation of how the potential vulnerability was discovered,
but not meet the description specification requirements.
---
drivers/misc/cxl/of.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/cxl/of.c b/drivers/misc/cxl/of.c
index bcc005dff1c0..d8dbb3723951 100644
--- a/drivers/misc/cxl/of.c
+++ b/drivers/misc/cxl/of.c
@@ -58,7 +58,7 @@ static int read_handle(struct device_node *np, u64 *handle)
/* Get address and size of the node */
prop = of_get_address(np, 0, &size, NULL);
- if (size)
+ if (!prop || size)
return -EINVAL;
/* Helper to read a big number; size is in cells (not bytes) */
--
2.25.1
It has turned out that having _set_required_opps() to recursively call
dev_pm_opp_set_opp() to set the required OPPs, doesn't really work as well
as we expected.
More precisely, at each recursive call to dev_pm_opp_set_opp() we are
changing the OPP for a genpd's OPP table for a device that has been
attached to it. The problem with this, is that we may have several devices
being attached to the same genpd, thus sharing the same OPP-table that is
being used for their required OPPs. So, typically we may have several
active requests simultaneously for different OPPs for a genpd's OPP table.
This may lead to that the per device vote for a performance-state
(opp-level) for a genpd doesn't get requested accordingly.
Moreover, dev_pm_opp_set_opp() doesn't get called for a required OPP when a
device has been attached to a single PM domain. Even if a consumer driver
would attempt to assign the required-devs, via _opp_attach_genpd() or
_opp_set_required_devs() it would not be possible, as there is no separate
virtual device at hand to use in this case.
The above said, let's fix the problem by replacing the call to
dev_pm_opp_set_opp() in _set_required_opps() by a call to _set_opp_level().
At the moment there's no drawback doing this, as there is no need to manage
anything but the performance-state of the genpd. If it later turns out that
another resource needs to be managed for a required-OPP, it can still be
extended without having to call dev_pm_opp_set_opp().
Fixes: e37440e7e2c2 ("OPP: Call dev_pm_opp_set_opp() for required OPPs")
Cc: stable(a)vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson(a)linaro.org>
---
Changes in v2:
- Clarified the commitmsg.
- Addressed some comments from Viresh.
- Drop calls to _add_opp_dev() for required_devs.
---
drivers/opp/core.c | 56 ++++++++++++++++++----------------------------
1 file changed, 22 insertions(+), 34 deletions(-)
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index 5f4598246a87..494f8860220d 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -1061,6 +1061,27 @@ static int _set_opp_bw(const struct opp_table *opp_table,
return 0;
}
+static int _set_opp_level(struct device *dev, struct dev_pm_opp *opp)
+{
+ unsigned int level = 0;
+ int ret = 0;
+
+ if (opp) {
+ if (opp->level == OPP_LEVEL_UNSET)
+ return 0;
+
+ level = opp->level;
+ }
+
+ /* Request a new performance state through the device's PM domain. */
+ ret = dev_pm_domain_set_performance_state(dev, level);
+ if (ret)
+ dev_err(dev, "Failed to set performance state %u (%d)\n", level,
+ ret);
+
+ return ret;
+}
+
/* This is only called for PM domain for now */
static int _set_required_opps(struct device *dev, struct opp_table *opp_table,
struct dev_pm_opp *opp, bool up)
@@ -1091,7 +1112,7 @@ static int _set_required_opps(struct device *dev, struct opp_table *opp_table,
if (devs[index]) {
required_opp = opp ? opp->required_opps[index] : NULL;
- ret = dev_pm_opp_set_opp(devs[index], required_opp);
+ ret = _set_opp_level(devs[index], required_opp);
if (ret)
return ret;
}
@@ -1102,27 +1123,6 @@ static int _set_required_opps(struct device *dev, struct opp_table *opp_table,
return 0;
}
-static int _set_opp_level(struct device *dev, struct dev_pm_opp *opp)
-{
- unsigned int level = 0;
- int ret = 0;
-
- if (opp) {
- if (opp->level == OPP_LEVEL_UNSET)
- return 0;
-
- level = opp->level;
- }
-
- /* Request a new performance state through the device's PM domain. */
- ret = dev_pm_domain_set_performance_state(dev, level);
- if (ret)
- dev_err(dev, "Failed to set performance state %u (%d)\n", level,
- ret);
-
- return ret;
-}
-
static void _find_current_opp(struct device *dev, struct opp_table *opp_table)
{
struct dev_pm_opp *opp = ERR_PTR(-ENODEV);
@@ -2457,18 +2457,6 @@ static int _opp_attach_genpd(struct opp_table *opp_table, struct device *dev,
}
}
- /*
- * Add the virtual genpd device as a user of the OPP table, so
- * we can call dev_pm_opp_set_opp() on it directly.
- *
- * This will be automatically removed when the OPP table is
- * removed, don't need to handle that here.
- */
- if (!_add_opp_dev(virt_dev, opp_table->required_opp_tables[index])) {
- ret = -ENOMEM;
- goto err;
- }
-
opp_table->required_devs[index] = virt_dev;
index++;
name++;
--
2.34.1
This is the start of the stable review cycle for the 6.1.100 release.
There are 95 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Fri, 19 Jul 2024 06:37:32 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.100-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.1.100-rc2
Dan Carpenter <dan.carpenter(a)linaro.org>
i2c: rcar: fix error code in probe()
Nathan Chancellor <nathan(a)kernel.org>
kbuild: Make ld-version.sh more robust against version string changes
Alexandre Chartre <alexandre.chartre(a)oracle.com>
x86/bhi: Avoid warning in #DB handler due to BHI mitigation
Brian Gerst <brgerst(a)gmail.com>
x86/entry/64: Remove obsolete comment on tracing vs. SYSRET
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: clear NO_RXDMA flag after resetting
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: testunit: avoid re-issued work after read message
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: ensure Gen3+ reset does not disturb local targets
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: introduce Gen4 devices
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: reset controller is mandatory for Gen3+
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: mark HostNotify target address as used
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: bring hardware to known state when probing
John Stultz <jstultz(a)google.com>
sched: Move psi_account_irqtime() out of update_rq_clock_task() hotpath
Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
nilfs2: fix kernel bug on rename operation of broken directory
Eduard Zingerman <eddyz87(a)gmail.com>
bpf: Allow reads from uninit stack
Jim Mattson <jmattson(a)google.com>
x86/retpoline: Move a NOENDBR annotation to the SRSO dummy return thunk
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Copy the complete capability structure to user
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Avoid updating PD type for capability request
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Fix DSP capabilities request
Jason A. Donenfeld <Jason(a)zx2c4.com>
wireguard: send: annotate intentional data race in checking empty queue
Jason A. Donenfeld <Jason(a)zx2c4.com>
wireguard: queueing: annotate intentional data race in cpu round robin
Helge Deller <deller(a)kernel.org>
wireguard: allowedips: avoid unaligned 64-bit memory accesses
Jason A. Donenfeld <Jason(a)zx2c4.com>
wireguard: selftests: use acpi=off instead of -no-acpi for recent QEMU
Kuan-Wei Chiu <visitorckw(a)gmail.com>
ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
Ilya Dryomov <idryomov(a)gmail.com>
libceph: fix race between delayed_work() and ceph_monc_stop()
Audra Mitchell <audra(a)redhat.com>
Fix userfaultfd_api to return EINVAL as expected
Edson Juliano Drosdeck <edson.drosdeck(a)gmail.com>
ALSA: hda/realtek: Limit mic boost on VAIO PRO PX
Nazar Bilinskyi <nbilinskyi(a)gmail.com>
ALSA: hda/realtek: Enable Mute LED on HP 250 G7
Michał Kopeć <michal.kopec(a)3mdeb.com>
ALSA: hda/realtek: add quirk for Clevo V5[46]0TU
Armin Wolf <W_Armin(a)gmx.de>
platform/x86: toshiba_acpi: Fix array out-of-bounds access
Thomas Weißschuh <linux(a)weissschuh.net>
nvmem: core: only change name to fram for current attribute
Joy Chakraborty <joychakr(a)google.com>
nvmem: meson-efuse: Fix return value of nvmem callbacks
Joy Chakraborty <joychakr(a)google.com>
nvmem: rmem: Fix return value of rmem_read()
Hobin Woo <hobin.woo(a)samsung.com>
ksmbd: discard write access to the directory open
Mathias Nyman <mathias.nyman(a)linux.intel.com>
xhci: always resume roothubs if xHC was reset during resume
He Zhe <zhe.he(a)windriver.com>
hpet: Support 32-bit userspace
Alan Stern <stern(a)rowland.harvard.edu>
USB: core: Fix duplicate endpoint bug by clearing reserved bits in the descriptor
Lee Jones <lee(a)kernel.org>
usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
WangYuli <wangyuli(a)uniontech.com>
USB: Add USB_QUIRK_NO_SET_INTF quirk for START BP-850k
Dmitry Smirnov <d.smirnov(a)inbox.lv>
USB: serial: mos7840: fix crash on resume
Vanillan Wang <vanillanwang(a)163.com>
USB: serial: option: add Rolling RW350-GL variants
Mank Wang <mank.wang(a)netprisma.us>
USB: serial: option: add Netprisma LCUK54 series modules
Slark Xiao <slark_xiao(a)163.com>
USB: serial: option: add support for Foxconn T99W651
Bjørn Mork <bjorn(a)mork.no>
USB: serial: option: add Fibocom FM350-GL
Daniele Palmas <dnlplm(a)gmail.com>
USB: serial: option: add Telit FN912 rmnet compositions
Daniele Palmas <dnlplm(a)gmail.com>
USB: serial: option: add Telit generic core-dump composition
Ronald Wahl <ronald.wahl(a)raritan.com>
net: ks8851: Fix potential TX stall after interface reopen
Ronald Wahl <ronald.wahl(a)raritan.com>
net: ks8851: Fix deadlock with the SPI chip variant
Eric Dumazet <edumazet(a)google.com>
tcp: avoid too many retransmit packets
Eric Dumazet <edumazet(a)google.com>
tcp: use signed arithmetic in tcp_rtx_probe0_timed_out()
Josh Don <joshdon(a)google.com>
Revert "sched/fair: Make sure to try to detach at least one movable task"
Steve French <stfrench(a)microsoft.com>
cifs: fix setting SecurityFlags to true
Satheesh Paul <psatheesh(a)marvell.com>
octeontx2-af: fix issue with IPv4 match for RSS
Kiran Kumar K <kirankumark(a)marvell.com>
octeontx2-af: fix issue with IPv6 ext match for RSS
Kiran Kumar K <kirankumark(a)marvell.com>
octeontx2-af: extend RSS supported offload types
Michal Mazur <mmazur2(a)marvell.com>
octeontx2-af: fix detection of IP layer
Srujana Challa <schalla(a)marvell.com>
octeontx2-af: fix a issue with cpt_lf_alloc mailbox
Srujana Challa <schalla(a)marvell.com>
octeontx2-af: update cpt lf alloc mailbox
Nithin Dabilpuram <ndabilpuram(a)marvell.com>
octeontx2-af: replace cpt slot with lf id on reg write
Chen Ni <nichen(a)iscas.ac.cn>
ARM: davinci: Convert comma to semicolon
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Use strnlen() on name fields in V1 wmfw files
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Prevent buffer overrun when processing V2 alg headers
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Validate payload length before processing block
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Return error if block header overflows file
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Fix overflow checking of wmfw header
Sven Schnelle <svens(a)linux.ibm.com>
s390: Mark psw in __load_psw_mask() as __unitialized
Daniel Borkmann <daniel(a)iogearbox.net>
net, sunrpc: Remap EPERM in case of connection failure in xs_tcp_setup_socket
Chengen Du <chengen.du(a)canonical.com>
net/sched: Fix UAF when resolving a clash
Kuniyuki Iwashima <kuniyu(a)amazon.com>
udp: Set SOCK_RCU_FREE earlier in udp_lib_get_port().
Oleksij Rempel <linux(a)rempel-privat.de>
ethtool: netlink: do not return SQI value if link is down
Dmitry Antipov <dmantipov(a)yandex.ru>
ppp: reject claimed-as-LCP but actually malformed packets
Jian Hui Lee <jianhui.lee(a)canonical.com>
net: ethernet: mtk-star-emac: set mac_managed_pm when probing
Mohammad Shehar Yaar Tausif <sheharyaar48(a)gmail.com>
bpf: fix order of args in call to bpf_map_kvcalloc
Martin KaFai Lau <martin.lau(a)kernel.org>
bpf: Remove __bpf_local_storage_map_alloc
Yafang Shao <laoar.shao(a)gmail.com>
bpf: use bpf_map_kvcalloc in bpf_local_storage
Martin KaFai Lau <martin.lau(a)kernel.org>
bpf: Reduce smap->elem_size
Yonghong Song <yhs(a)fb.com>
bpf: Refactor some inode/task/sk storage functions for reuse
Aleksander Jan Bajkowski <olek2(a)wp.pl>
net: ethernet: lantiq_etop: fix double free in detach
Michal Kubiak <michal.kubiak(a)intel.com>
i40e: Fix XDP program unloading while removing the driver
Hugh Dickins <hughd(a)google.com>
net: fix rc7's __skb_datagram_iter()
Aleksandr Mishin <amishin(a)t-argos.ru>
octeontx2-af: Fix incorrect value output on error path in rvu_check_rsrc_availability()
Geliang Tang <tanggeliang(a)kylinos.cn>
skmsg: Skip zero length skb in sk_msg_recvmsg
Oleksij Rempel <linux(a)rempel-privat.de>
net: phy: microchip: lan87xx: reinit PHY after cable test
Neal Cardwell <ncardwell(a)google.com>
tcp: fix incorrect undo caused by DSACK of TLP retransmit
Brian Foster <bfoster(a)redhat.com>
vfs: don't mod negative dentry count when on shrinker list
linke li <lilinke99(a)qq.com>
fs/dcache: Re-use value stored to dentry->d_flags instead of re-reading
Jeff Layton <jlayton(a)kernel.org>
filelock: fix potential use-after-free in posix_lock_inode
Jingbo Xu <jefflexu(a)linux.alibaba.com>
cachefiles: add missing lock protection when polling
Baokun Li <libaokun1(a)huawei.com>
cachefiles: cyclic allocation of msg_id to avoid reuse
Hou Tao <houtao1(a)huawei.com>
cachefiles: wait for ondemand_object_worker to finish when dropping object
Baokun Li <libaokun1(a)huawei.com>
cachefiles: cancel all requests for the object that is being dropped
Baokun Li <libaokun1(a)huawei.com>
cachefiles: stop sending new request when dropping object
Jia Zhu <zhujia.zj(a)bytedance.com>
cachefiles: narrow the scope of triggering EPOLLIN events in ondemand mode
Baokun Li <libaokun1(a)huawei.com>
cachefiles: propagate errors from vfs_getxattr() to avoid infinite loop
Waiman Long <longman(a)redhat.com>
mm: prevent derefencing NULL ptr in pfn_section_valid()
Heiko Carstens <hca(a)linux.ibm.com>
Compiler Attributes: Add __uninitialized macro
-------------
Diffstat:
Documentation/admin-guide/cifs/usage.rst | 34 +--
Makefile | 4 +-
arch/arm/mach-davinci/pm.c | 2 +-
arch/s390/include/asm/processor.h | 2 +-
arch/x86/entry/entry_64.S | 19 +-
arch/x86/entry/entry_64_compat.S | 14 +-
arch/x86/lib/retpoline.S | 2 +-
drivers/acpi/processor_idle.c | 37 ++--
drivers/char/hpet.c | 34 ++-
drivers/firmware/cirrus/cs_dsp.c | 231 +++++++++++++++------
drivers/i2c/busses/i2c-rcar.c | 67 +++---
drivers/i2c/i2c-core-base.c | 1 +
drivers/i2c/i2c-slave-testunit.c | 7 +
drivers/misc/fastrpc.c | 14 +-
drivers/net/ethernet/intel/i40e/i40e_main.c | 9 +-
drivers/net/ethernet/lantiq_etop.c | 4 +-
drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 10 +-
drivers/net/ethernet/marvell/octeontx2/af/npc.h | 8 +-
drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 +-
.../net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 33 ++-
.../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 67 +++++-
drivers/net/ethernet/mediatek/mtk_star_emac.c | 7 +
drivers/net/ethernet/micrel/ks8851_common.c | 10 +-
drivers/net/ethernet/micrel/ks8851_spi.c | 4 +-
drivers/net/phy/microchip_t1.c | 2 +-
drivers/net/ppp/ppp_generic.c | 15 ++
drivers/net/wireguard/allowedips.c | 4 +-
drivers/net/wireguard/queueing.h | 4 +-
drivers/net/wireguard/send.c | 2 +-
drivers/nvmem/core.c | 5 +-
drivers/nvmem/meson-efuse.c | 14 +-
drivers/nvmem/rmem.c | 5 +-
drivers/platform/x86/toshiba_acpi.c | 1 +
drivers/usb/core/config.c | 18 +-
drivers/usb/core/quirks.c | 3 +
drivers/usb/gadget/configfs.c | 3 +
drivers/usb/host/xhci.c | 16 +-
drivers/usb/serial/mos7840.c | 45 ++++
drivers/usb/serial/option.c | 38 ++++
fs/cachefiles/daemon.c | 14 +-
fs/cachefiles/internal.h | 15 ++
fs/cachefiles/ondemand.c | 52 ++++-
fs/cachefiles/xattr.c | 5 +-
fs/dcache.c | 12 +-
fs/locks.c | 2 +-
fs/nilfs2/dir.c | 32 ++-
fs/smb/client/cifsglob.h | 4 +-
fs/smb/server/smb2pdu.c | 13 +-
fs/userfaultfd.c | 7 +-
include/linux/bpf.h | 8 +
include/linux/bpf_local_storage.h | 17 +-
include/linux/compiler_attributes.h | 12 ++
include/linux/mmzone.h | 3 +-
kernel/bpf/bpf_inode_storage.c | 38 +---
kernel/bpf/bpf_local_storage.c | 199 +++++++++++-------
kernel/bpf/bpf_task_storage.c | 38 +---
kernel/bpf/syscall.c | 15 ++
kernel/bpf/verifier.c | 11 +-
kernel/sched/core.c | 7 +-
kernel/sched/fair.c | 12 +-
kernel/sched/psi.c | 21 +-
kernel/sched/sched.h | 1 +
kernel/sched/stats.h | 11 +-
net/ceph/mon_client.c | 14 +-
net/core/bpf_sk_storage.c | 35 +---
net/core/datagram.c | 3 +-
net/core/skmsg.c | 3 +-
net/ethtool/linkstate.c | 41 ++--
net/ipv4/tcp_input.c | 11 +-
net/ipv4/tcp_timer.c | 31 ++-
net/ipv4/udp.c | 4 +-
net/sched/act_ct.c | 8 +
net/sunrpc/xprtsock.c | 7 +
scripts/ld-version.sh | 8 +-
sound/pci/hda/patch_realtek.c | 4 +
.../selftests/bpf/progs/test_global_func10.c | 9 +-
tools/testing/selftests/bpf/verifier/calls.c | 13 +-
.../selftests/bpf/verifier/helper_access_var_len.c | 104 ++++++----
tools/testing/selftests/bpf/verifier/int_ptr.c | 9 +-
.../selftests/bpf/verifier/search_pruning.c | 13 +-
tools/testing/selftests/bpf/verifier/sock.c | 27 ---
tools/testing/selftests/bpf/verifier/spill_fill.c | 7 +-
tools/testing/selftests/bpf/verifier/var_off.c | 52 -----
tools/testing/selftests/wireguard/qemu/Makefile | 8 +-
84 files changed, 1133 insertions(+), 624 deletions(-)
This is the start of the stable review cycle for the 6.6.41 release.
There are 122 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Fri, 19 Jul 2024 06:37:32 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.41-rc2…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.6.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.6.41-rc2
Dan Carpenter <dan.carpenter(a)linaro.org>
i2c: rcar: fix error code in probe()
Nathan Chancellor <nathan(a)kernel.org>
kbuild: Make ld-version.sh more robust against version string changes
Alexandre Chartre <alexandre.chartre(a)oracle.com>
x86/bhi: Avoid warning in #DB handler due to BHI mitigation
Brian Gerst <brgerst(a)gmail.com>
x86/entry/64: Remove obsolete comment on tracing vs. SYSRET
Nikolay Borisov <nik.borisov(a)suse.com>
x86/entry: Rename ignore_sysret()
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: clear NO_RXDMA flag after resetting
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: testunit: avoid re-issued work after read message
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: ensure Gen3+ reset does not disturb local targets
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: introduce Gen4 devices
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: reset controller is mandatory for Gen3+
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: mark HostNotify target address as used
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
i2c: rcar: bring hardware to known state when probing
Qu Wenruo <wqu(a)suse.com>
btrfs: tree-checker: add type and sequence check for inline backrefs
John Stultz <jstultz(a)google.com>
sched: Move psi_account_irqtime() out of update_rq_clock_task() hotpath
Baokun Li <libaokun1(a)huawei.com>
ext4: avoid ptr null pointer dereference
Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
nilfs2: fix kernel bug on rename operation of broken directory
John Hubbard <jhubbard(a)nvidia.com>
selftests/net: fix gro.c compilation failure due to non-existent opt_ipproto_off
SeongJae Park <sj(a)kernel.org>
mm/damon/core: merge regions aggressively when max_nr_regions is unmet
Gavin Shan <gshan(a)redhat.com>
mm/shmem: disable PMD-sized page cache if needed
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Restrict untrusted app to attach to privileged PD
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Fix ownership reassignment of remote heap
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Fix memory leak in audio daemon attach operation
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Copy the complete capability structure to user
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Avoid updating PD type for capability request
Ekansh Gupta <quic_ekangupt(a)quicinc.com>
misc: fastrpc: Fix DSP capabilities request
Jason A. Donenfeld <Jason(a)zx2c4.com>
wireguard: send: annotate intentional data race in checking empty queue
Jason A. Donenfeld <Jason(a)zx2c4.com>
wireguard: queueing: annotate intentional data race in cpu round robin
Helge Deller <deller(a)kernel.org>
wireguard: allowedips: avoid unaligned 64-bit memory accesses
Jason A. Donenfeld <Jason(a)zx2c4.com>
wireguard: selftests: use acpi=off instead of -no-acpi for recent QEMU
Mario Limonciello <mario.limonciello(a)amd.com>
cpufreq: Allow drivers to advertise boost enabled
Mario Limonciello <mario.limonciello(a)amd.com>
cpufreq: ACPI: Mark boost policy as enabled when setting boost
Kuan-Wei Chiu <visitorckw(a)gmail.com>
ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
Ilya Dryomov <idryomov(a)gmail.com>
libceph: fix race between delayed_work() and ceph_monc_stop()
Taniya Das <quic_tdas(a)quicinc.com>
pmdomain: qcom: rpmhpd: Skip retention level for Power Domains
Audra Mitchell <audra(a)redhat.com>
Fix userfaultfd_api to return EINVAL as expected
Edson Juliano Drosdeck <edson.drosdeck(a)gmail.com>
ALSA: hda/realtek: Limit mic boost on VAIO PRO PX
Nazar Bilinskyi <nbilinskyi(a)gmail.com>
ALSA: hda/realtek: Enable Mute LED on HP 250 G7
Michał Kopeć <michal.kopec(a)3mdeb.com>
ALSA: hda/realtek: add quirk for Clevo V5[46]0TU
Jacky Huang <ychuang3(a)nuvoton.com>
tty: serial: ma35d1: Add a NULL check for of_node
Armin Wolf <W_Armin(a)gmx.de>
platform/x86: toshiba_acpi: Fix array out-of-bounds access
Thomas Weißschuh <linux(a)weissschuh.net>
nvmem: core: only change name to fram for current attribute
Joy Chakraborty <joychakr(a)google.com>
nvmem: meson-efuse: Fix return value of nvmem callbacks
Joy Chakraborty <joychakr(a)google.com>
nvmem: rmem: Fix return value of rmem_read()
Johan Hovold <johan+linaro(a)kernel.org>
arm64: dts: qcom: sc8280xp-x13s: fix touchscreen power on
Cong Zhang <quic_congzhan(a)quicinc.com>
arm64: dts: qcom: sa8775p: Correct IRQ number of EL2 non-secure physical timer
João Paulo Gonçalves <joao.goncalves(a)toradex.com>
iio: trigger: Fix condition for own trigger
Hobin Woo <hobin.woo(a)samsung.com>
ksmbd: discard write access to the directory open
Gavin Shan <gshan(a)redhat.com>
mm/filemap: make MAX_PAGECACHE_ORDER acceptable to xarray
Gavin Shan <gshan(a)redhat.com>
mm/filemap: skip to create PMD-sized page cache if needed
Uladzislau Rezki (Sony) <urezki(a)gmail.com>
mm: vmalloc: check if a hash-index is in cpu_possible_mask
Heiko Carstens <hca(a)linux.ibm.com>
s390/mm: Add NULL pointer check to crst_table_free() base_crst_free()
Mathias Nyman <mathias.nyman(a)linux.intel.com>
xhci: always resume roothubs if xHC was reset during resume
He Zhe <zhe.he(a)windriver.com>
hpet: Support 32-bit userspace
Joy Chakraborty <joychakr(a)google.com>
misc: microchip: pci1xxxx: Fix return value of nvmem callbacks
Alan Stern <stern(a)rowland.harvard.edu>
USB: core: Fix duplicate endpoint bug by clearing reserved bits in the descriptor
Lee Jones <lee(a)kernel.org>
usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
Heikki Krogerus <heikki.krogerus(a)linux.intel.com>
usb: dwc3: pci: add support for the Intel Panther Lake
WangYuli <wangyuli(a)uniontech.com>
USB: Add USB_QUIRK_NO_SET_INTF quirk for START BP-850k
Dmitry Smirnov <d.smirnov(a)inbox.lv>
USB: serial: mos7840: fix crash on resume
Vanillan Wang <vanillanwang(a)163.com>
USB: serial: option: add Rolling RW350-GL variants
Mank Wang <mank.wang(a)netprisma.us>
USB: serial: option: add Netprisma LCUK54 series modules
Slark Xiao <slark_xiao(a)163.com>
USB: serial: option: add support for Foxconn T99W651
Bjørn Mork <bjorn(a)mork.no>
USB: serial: option: add Fibocom FM350-GL
Daniele Palmas <dnlplm(a)gmail.com>
USB: serial: option: add Telit FN912 rmnet compositions
Daniele Palmas <dnlplm(a)gmail.com>
USB: serial: option: add Telit generic core-dump composition
Ronald Wahl <ronald.wahl(a)raritan.com>
net: ks8851: Fix potential TX stall after interface reopen
Ronald Wahl <ronald.wahl(a)raritan.com>
net: ks8851: Fix deadlock with the SPI chip variant
Eric Dumazet <edumazet(a)google.com>
tcp: avoid too many retransmit packets
Eric Dumazet <edumazet(a)google.com>
tcp: use signed arithmetic in tcp_rtx_probe0_timed_out()
Josh Don <joshdon(a)google.com>
Revert "sched/fair: Make sure to try to detach at least one movable task"
Steve French <stfrench(a)microsoft.com>
cifs: fix setting SecurityFlags to true
Satheesh Paul <psatheesh(a)marvell.com>
octeontx2-af: fix issue with IPv4 match for RSS
Kiran Kumar K <kirankumark(a)marvell.com>
octeontx2-af: fix issue with IPv6 ext match for RSS
Michal Mazur <mmazur2(a)marvell.com>
octeontx2-af: fix detection of IP layer
Srujana Challa <schalla(a)marvell.com>
octeontx2-af: fix a issue with cpt_lf_alloc mailbox
Nithin Dabilpuram <ndabilpuram(a)marvell.com>
octeontx2-af: replace cpt slot with lf id on reg write
Aleksandr Loktionov <aleksandr.loktionov(a)intel.com>
i40e: fix: remove needless retries of NVM update
Chen Ni <nichen(a)iscas.ac.cn>
ARM: davinci: Convert comma to semicolon
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Use strnlen() on name fields in V1 wmfw files
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ASoC: SOF: Intel: hda: fix null deref on system suspend entry
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Prevent buffer overrun when processing V2 alg headers
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Validate payload length before processing block
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Return error if block header overflows file
Richard Fitzgerald <rf(a)opensource.cirrus.com>
firmware: cs_dsp: Fix overflow checking of wmfw header
Bjorn Andersson <quic_bjorande(a)quicinc.com>
arm64: dts: qcom: sc8180x: Fix LLCC reg property again
Sven Schnelle <svens(a)linux.ibm.com>
s390: Mark psw in __load_psw_mask() as __unitialized
Daniel Borkmann <daniel(a)iogearbox.net>
net, sunrpc: Remap EPERM in case of connection failure in xs_tcp_setup_socket
Chengen Du <chengen.du(a)canonical.com>
net/sched: Fix UAF when resolving a clash
Kuniyuki Iwashima <kuniyu(a)amazon.com>
udp: Set SOCK_RCU_FREE earlier in udp_lib_get_port().
Oleksij Rempel <o.rempel(a)pengutronix.de>
ethtool: netlink: do not return SQI value if link is down
Dmitry Antipov <dmantipov(a)yandex.ru>
ppp: reject claimed-as-LCP but actually malformed packets
Jian Hui Lee <jianhui.lee(a)canonical.com>
net: ethernet: mtk-star-emac: set mac_managed_pm when probing
Kumar Kartikeya Dwivedi <memxor(a)gmail.com>
bpf: Fail bpf_timer_cancel when callback is being cancelled
Benjamin Tissoires <bentiss(a)kernel.org>
bpf: replace bpf_timer_init with a generic helper
Benjamin Tissoires <bentiss(a)kernel.org>
bpf: make timer data struct more generic
Mohammad Shehar Yaar Tausif <sheharyaar48(a)gmail.com>
bpf: fix order of args in call to bpf_map_kvcalloc
Aleksander Jan Bajkowski <olek2(a)wp.pl>
net: ethernet: lantiq_etop: fix double free in detach
Michal Kubiak <michal.kubiak(a)intel.com>
i40e: Fix XDP program unloading while removing the driver
Hugh Dickins <hughd(a)google.com>
net: fix rc7's __skb_datagram_iter()
Aleksandr Mishin <amishin(a)t-argos.ru>
octeontx2-af: Fix incorrect value output on error path in rvu_check_rsrc_availability()
Geliang Tang <tanggeliang(a)kylinos.cn>
skmsg: Skip zero length skb in sk_msg_recvmsg
Oleksij Rempel <o.rempel(a)pengutronix.de>
net: phy: microchip: lan87xx: reinit PHY after cable test
Daniel Borkmann <daniel(a)iogearbox.net>
bpf: Fix too early release of tcx_entry
Neal Cardwell <ncardwell(a)google.com>
tcp: fix incorrect undo caused by DSACK of TLP retransmit
Dan Carpenter <dan.carpenter(a)linaro.org>
net: bcmasp: Fix error code in probe()
Brian Foster <bfoster(a)redhat.com>
vfs: don't mod negative dentry count when on shrinker list
linke li <lilinke99(a)qq.com>
fs/dcache: Re-use value stored to dentry->d_flags instead of re-reading
Jeff Layton <jlayton(a)kernel.org>
filelock: fix potential use-after-free in posix_lock_inode
Christian Eggers <ceggers(a)arri.de>
dsa: lan9303: Fix mapping between DSA port number and PHY address
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
net: dsa: introduce dsa_phylink_to_port()
Jingbo Xu <jefflexu(a)linux.alibaba.com>
cachefiles: add missing lock protection when polling
Baokun Li <libaokun1(a)huawei.com>
cachefiles: cyclic allocation of msg_id to avoid reuse
Hou Tao <houtao1(a)huawei.com>
cachefiles: wait for ondemand_object_worker to finish when dropping object
Baokun Li <libaokun1(a)huawei.com>
cachefiles: cancel all requests for the object that is being dropped
Baokun Li <libaokun1(a)huawei.com>
cachefiles: stop sending new request when dropping object
Jia Zhu <zhujia.zj(a)bytedance.com>
cachefiles: narrow the scope of triggering EPOLLIN events in ondemand mode
Baokun Li <libaokun1(a)huawei.com>
cachefiles: propagate errors from vfs_getxattr() to avoid infinite loop
Yi Liu <yi.l.liu(a)intel.com>
vfio/pci: Init the count variable in collecting hot-reset devices
Peter Wang <peter.wang(a)mediatek.com>
scsi: ufs: core: Fix ufshcd_abort_one racing issue
Peter Wang <peter.wang(a)mediatek.com>
scsi: ufs: core: Fix ufshcd_clear_cmd racing issue
Waiman Long <longman(a)redhat.com>
mm: prevent derefencing NULL ptr in pfn_section_valid()
Heiko Carstens <hca(a)linux.ibm.com>
Compiler Attributes: Add __uninitialized macro
-------------
Diffstat:
Documentation/admin-guide/cifs/usage.rst | 34 +--
Makefile | 4 +-
arch/arm/mach-davinci/pm.c | 2 +-
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 2 +-
arch/arm64/boot/dts/qcom/sc8180x.dtsi | 11 +-
.../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 15 +-
arch/s390/include/asm/processor.h | 2 +-
arch/s390/mm/pgalloc.c | 4 +
arch/x86/entry/entry_64.S | 23 +-
arch/x86/entry/entry_64_compat.S | 14 +-
arch/x86/include/asm/processor.h | 2 +-
arch/x86/kernel/cpu/common.c | 2 +-
drivers/acpi/processor_idle.c | 37 ++--
drivers/char/hpet.c | 34 ++-
drivers/cpufreq/acpi-cpufreq.c | 4 +-
drivers/cpufreq/cpufreq.c | 3 +-
drivers/firmware/cirrus/cs_dsp.c | 231 +++++++++++++++------
drivers/i2c/busses/i2c-rcar.c | 67 +++---
drivers/i2c/i2c-core-base.c | 1 +
drivers/i2c/i2c-slave-testunit.c | 7 +
drivers/iio/industrialio-trigger.c | 2 +-
drivers/misc/fastrpc.c | 41 +++-
drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c | 4 -
drivers/net/dsa/lan9303-core.c | 23 +-
drivers/net/ethernet/broadcom/asp2/bcmasp.c | 1 +
drivers/net/ethernet/intel/i40e/i40e_adminq.h | 4 -
drivers/net/ethernet/intel/i40e/i40e_main.c | 9 +-
drivers/net/ethernet/lantiq_etop.c | 4 +-
drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 2 +-
drivers/net/ethernet/marvell/octeontx2/af/npc.h | 8 +-
drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 +-
.../net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 23 +-
.../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 12 +-
drivers/net/ethernet/mediatek/mtk_star_emac.c | 7 +
drivers/net/ethernet/micrel/ks8851_common.c | 10 +-
drivers/net/ethernet/micrel/ks8851_spi.c | 4 +-
drivers/net/phy/microchip_t1.c | 2 +-
drivers/net/ppp/ppp_generic.c | 15 ++
drivers/net/wireguard/allowedips.c | 4 +-
drivers/net/wireguard/queueing.h | 4 +-
drivers/net/wireguard/send.c | 2 +-
drivers/nvmem/core.c | 5 +-
drivers/nvmem/meson-efuse.c | 14 +-
drivers/nvmem/rmem.c | 5 +-
drivers/platform/x86/toshiba_acpi.c | 1 +
drivers/pmdomain/qcom/rpmhpd.c | 7 +
drivers/tty/serial/ma35d1_serial.c | 13 +-
drivers/ufs/core/ufs-mcq.c | 11 +-
drivers/ufs/core/ufshcd.c | 2 +
drivers/usb/core/config.c | 18 +-
drivers/usb/core/quirks.c | 3 +
drivers/usb/dwc3/dwc3-pci.c | 8 +
drivers/usb/gadget/configfs.c | 3 +
drivers/usb/host/xhci.c | 16 +-
drivers/usb/serial/mos7840.c | 45 ++++
drivers/usb/serial/option.c | 38 ++++
drivers/vfio/pci/vfio_pci_core.c | 2 +-
fs/btrfs/tree-checker.c | 39 ++++
fs/cachefiles/daemon.c | 14 +-
fs/cachefiles/internal.h | 15 ++
fs/cachefiles/ondemand.c | 52 ++++-
fs/cachefiles/xattr.c | 5 +-
fs/dcache.c | 12 +-
fs/ext4/sysfs.c | 2 +
fs/locks.c | 2 +-
fs/nilfs2/dir.c | 32 ++-
fs/smb/client/cifsglob.h | 4 +-
fs/smb/server/smb2pdu.c | 13 +-
fs/userfaultfd.c | 7 +-
include/linux/compiler_attributes.h | 12 ++
include/linux/mmzone.h | 3 +-
include/linux/pagemap.h | 11 +-
include/net/dsa.h | 6 +
include/net/tcx.h | 13 +-
include/uapi/misc/fastrpc.h | 3 +
kernel/bpf/bpf_local_storage.c | 4 +-
kernel/bpf/helpers.c | 186 ++++++++++++-----
kernel/sched/core.c | 7 +-
kernel/sched/fair.c | 12 +-
kernel/sched/psi.c | 21 +-
kernel/sched/sched.h | 1 +
kernel/sched/stats.h | 11 +-
mm/damon/core.c | 21 +-
mm/filemap.c | 2 +-
mm/shmem.c | 15 +-
mm/vmalloc.c | 10 +-
net/ceph/mon_client.c | 14 +-
net/core/datagram.c | 3 +-
net/core/skmsg.c | 3 +-
net/dsa/port.c | 12 +-
net/ethtool/linkstate.c | 41 ++--
net/ipv4/tcp_input.c | 11 +-
net/ipv4/tcp_timer.c | 31 ++-
net/ipv4/udp.c | 4 +-
net/sched/act_ct.c | 8 +
net/sched/sch_ingress.c | 12 +-
net/sunrpc/xprtsock.c | 7 +
scripts/ld-version.sh | 8 +-
sound/pci/hda/patch_realtek.c | 4 +
sound/soc/sof/intel/hda-dai.c | 12 +-
tools/testing/selftests/net/gro.c | 3 -
tools/testing/selftests/wireguard/qemu/Makefile | 8 +-
102 files changed, 1147 insertions(+), 442 deletions(-)
35e351780fa9 ("fork: defer linking file vma until vma is fully initialized")
switched the ordering of vm_ops->open() and copy_page_range() on fork. This is a
bug for VFIO, because it causes two problems:
1. Because open() is called before copy_page_range(), the range can conceivably
have unmapped 'holes' in it. This causes the code underneath untrack_pfn() to
WARN.
2. More seriously, open() is trying to guarantee that the entire range is
zapped, so any future accesses in the child will result in the VFIO fault
handler being called. Because we copy_page_range() *after* open() (and
therefore after zapping), this guarantee is violated.
We can't revert 35e351780fa9, because it fixes a real bug for hugetlbfs. The fix
is also not as simple as just reodering open() and copy_page_range(), as Miaohe
points out in [1]. So, although these patches are kind of large for stable, just
backport this refactoring which completely sidesteps the issue.
Note that patch 2 is the key one here which fixes the issue. Patch 1 is a
prerequisite required for patch 2 to build / work. This would almost be enough,
but we might see significantly regressed performance. Patch 3 fixes that up,
putting performance back on par with what it was before.
Note [1] also has a more full discussion justifying taking these backports.
I proposed the same backport for 6.9 [2], and now for 6.6. 6.6 is the oldest
kernel which needs the change: 35e351780fa9 was reverted for unrelated reasons
in 6.1, and was never backported to 5.15 or earlier.
[1]: https://lore.kernel.org/all/20240702042948.2629267-1-leah.rumancik@gmail.co…
[2]: https://lore.kernel.org/r/20240717213339.1921530-1-axelrasmussen@google.com
Alex Williamson (3):
vfio: Create vfio_fs_type with inode per device
vfio/pci: Use unmap_mapping_range()
vfio/pci: Insert full vma on mmap'd MMIO fault
drivers/vfio/device_cdev.c | 7 +
drivers/vfio/group.c | 7 +
drivers/vfio/pci/vfio_pci_core.c | 271 ++++++++-----------------------
drivers/vfio/vfio_main.c | 44 +++++
include/linux/vfio.h | 1 +
include/linux/vfio_pci_core.h | 2 -
6 files changed, 125 insertions(+), 207 deletions(-)
--
2.45.2.993.g49e7a77208-goog
Introduce a version of the fence ops that on release doesn't remove
the fence from the pending list, and thus doesn't require a lock to
fix poll->fence wait->fence unref deadlocks.
vmwgfx overwrites the wait callback to iterate over the list of all
fences and update their status, to do that it holds a lock to prevent
the list modifcations from other threads. The fence destroy callback
both deletes the fence and removes it from the list of pending
fences, for which it holds a lock.
dma buf polling cb unrefs a fence after it's been signaled: so the poll
calls the wait, which signals the fences, which are being destroyed.
The destruction tries to acquire the lock on the pending fences list
which it can never get because it's held by the wait from which it
was called.
Old bug, but not a lot of userspace apps were using dma-buf polling
interfaces. Fix those, in particular this fixes KDE stalls/deadlock.
Signed-off-by: Zack Rusin <zack.rusin(a)broadcom.com>
Fixes: 2298e804e96e ("drm/vmwgfx: rework to new fence interface, v2")
Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list(a)broadcom.com>
Cc: dri-devel(a)lists.freedesktop.org
Cc: <stable(a)vger.kernel.org> # v6.2+
---
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
index 5efc6a766f64..588d50ababf6 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
@@ -32,7 +32,6 @@
#define VMW_FENCE_WRAP (1 << 31)
struct vmw_fence_manager {
- int num_fence_objects;
struct vmw_private *dev_priv;
spinlock_t lock;
struct list_head fence_list;
@@ -124,13 +123,13 @@ static void vmw_fence_obj_destroy(struct dma_fence *f)
{
struct vmw_fence_obj *fence =
container_of(f, struct vmw_fence_obj, base);
-
struct vmw_fence_manager *fman = fman_from_fence(fence);
- spin_lock(&fman->lock);
- list_del_init(&fence->head);
- --fman->num_fence_objects;
- spin_unlock(&fman->lock);
+ if (!list_empty(&fence->head)) {
+ spin_lock(&fman->lock);
+ list_del_init(&fence->head);
+ spin_unlock(&fman->lock);
+ }
fence->destroy(fence);
}
@@ -257,7 +256,6 @@ static const struct dma_fence_ops vmw_fence_ops = {
.release = vmw_fence_obj_destroy,
};
-
/*
* Execute signal actions on fences recently signaled.
* This is done from a workqueue so we don't have to execute
@@ -355,7 +353,6 @@ static int vmw_fence_obj_init(struct vmw_fence_manager *fman,
goto out_unlock;
}
list_add_tail(&fence->head, &fman->fence_list);
- ++fman->num_fence_objects;
out_unlock:
spin_unlock(&fman->lock);
@@ -403,7 +400,7 @@ static bool vmw_fence_goal_new_locked(struct vmw_fence_manager *fman,
u32 passed_seqno)
{
u32 goal_seqno;
- struct vmw_fence_obj *fence;
+ struct vmw_fence_obj *fence, *next_fence;
if (likely(!fman->seqno_valid))
return false;
@@ -413,7 +410,7 @@ static bool vmw_fence_goal_new_locked(struct vmw_fence_manager *fman,
return false;
fman->seqno_valid = false;
- list_for_each_entry(fence, &fman->fence_list, head) {
+ list_for_each_entry_safe(fence, next_fence, &fman->fence_list, head) {
if (!list_empty(&fence->seq_passed_actions)) {
fman->seqno_valid = true;
vmw_fence_goal_write(fman->dev_priv,
--
2.43.0
In amdgpu_connector_add_common_modes(), the return value of drm_cvt_mode()
is assigned to mode, which will lead to a NULL pointer dereference on
failure of drm_cvt_mode(). Add a check to avoid npd.
Cc: stable(a)vger.kernel.org
Fixes: d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v3:
- added Cc stable line.
Changes in v2:
- modified the patch according to suggestions;
- added Fixes line.
---
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
index 9caba10315a8..25b51b600f6f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
@@ -458,6 +458,9 @@ static void amdgpu_connector_add_common_modes(struct drm_encoder *encoder,
continue;
mode = drm_cvt_mode(dev, common_modes[i].w, common_modes[i].h, 60, false, false, false);
+ if (!mode)
+ return;
+
drm_mode_probed_add(connector, mode);
}
}
--
2.25.1
In radeon_add_common_modes(), the return value of drm_cvt_mode() is
assigned to mode, which will lead to a possible NULL pointer dereference
on failure of drm_cvt_mode(). Add a check to avoid npd.
Cc: stable(a)vger.kernel.org
Fixes: d50ba256b5f1 ("drm/kms: start adding command line interface using fb.")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v2:
- added a blank line;
- added Cc line.
---
drivers/gpu/drm/radeon/radeon_connectors.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index b84b58926106..37c56c16af8d 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -520,6 +520,9 @@ static void radeon_add_common_modes(struct drm_encoder *encoder, struct drm_conn
continue;
mode = drm_cvt_mode(dev, common_modes[i].w, common_modes[i].h, 60, false, false, false);
+ if (!mode)
+ continue;
+
drm_mode_probed_add(connector, mode);
}
}
--
2.25.1
In qxl_add_mode(), the return value of drm_cvt_mode() is assigned to mode,
which will lead to a possible NULL pointer dereference on failure of
drm_cvt_mode(). Add a check to avoid npd.
Cc: stable(a)vger.kernel.org
Fixes: 1b043677d4be ("drm/qxl: add qxl_add_mode helper function")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v2:
- added a blank line;
- added Cc line.
---
drivers/gpu/drm/qxl/qxl_display.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index c6d35c33d5d6..c371ee59ab07 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -236,6 +236,9 @@ static int qxl_add_mode(struct drm_connector *connector,
return 0;
mode = drm_cvt_mode(dev, width, height, 60, false, false, false);
+ if (!mode)
+ return -ENOMEM;
+
if (preferred)
mode->type |= DRM_MODE_TYPE_PREFERRED;
mode->hdisplay = width;
--
2.25.1
In drm_client_modeset_probe(), the return value of drm_mode_duplicate() is
assigned to modeset->mode, which will lead to a possible NULL pointer
dereference on failure of drm_mode_duplicate(). Add a check to avoid npd.
Cc: stable(a)vger.kernel.org
Fixes: cf13909aee05 ("drm/fb-helper: Move out modeset config code")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v2:
- added the recipient's email address, due to the prolonged absence of a
response from the recipients.
- added Cc stable.
---
drivers/gpu/drm/drm_client_modeset.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
index 31af5cf37a09..cca37b225385 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -880,6 +880,9 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
kfree(modeset->mode);
modeset->mode = drm_mode_duplicate(dev, mode);
+ if (!modeset->mode)
+ continue;
+
drm_connector_get(connector);
modeset->connectors[modeset->num_connectors++] = connector;
modeset->x = offset->x;
--
2.25.1
Between the kernel releases 6.9.9 and 6.10.0, something changed that causes
heavy digital distortion on playback from at least ALSA and PipeWire.
The rhythm of the music is discernable in the output, so it isn't just
random noise.
It sounds a bit like bitcrushing, but not quite.
The generated overtones appear to be dependet on the sample rate.
I am sorry I can not be more specific, there are no kernel messages this time.
As Mr. Sakamoto recently committed all these changes to firewire he might
be able to identify the issue easily, which is why I'd like to ask him to
look into it.
Kind regards,
Edmund Raile.
#regzbot introduced: v6.9.9..v6.10
I'm announcing the release of the 6.6.41 kernel.
All users of the 6.6 kernel series must upgrade.
The updated 6.6.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.6.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/admin-guide/cifs/usage.rst | 36 --
Makefile | 2
arch/arm/mach-davinci/pm.c | 2
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 2
arch/arm64/boot/dts/qcom/sc8180x.dtsi | 11
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 15
arch/s390/include/asm/processor.h | 2
arch/s390/mm/pgalloc.c | 4
arch/x86/entry/entry_64.S | 23 -
arch/x86/entry/entry_64_compat.S | 14
arch/x86/include/asm/processor.h | 2
arch/x86/kernel/cpu/common.c | 2
drivers/acpi/processor_idle.c | 37 --
drivers/char/hpet.c | 34 +
drivers/cpufreq/acpi-cpufreq.c | 4
drivers/cpufreq/cpufreq.c | 3
drivers/firmware/cirrus/cs_dsp.c | 227 +++++++++----
drivers/i2c/busses/i2c-rcar.c | 67 ++-
drivers/i2c/i2c-core-base.c | 1
drivers/i2c/i2c-slave-testunit.c | 7
drivers/iio/industrialio-trigger.c | 2
drivers/misc/fastrpc.c | 41 +-
drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c | 4
drivers/net/dsa/lan9303-core.c | 23 -
drivers/net/ethernet/broadcom/asp2/bcmasp.c | 1
drivers/net/ethernet/intel/i40e/i40e_adminq.h | 4
drivers/net/ethernet/intel/i40e/i40e_main.c | 9
drivers/net/ethernet/lantiq_etop.c | 4
drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 2
drivers/net/ethernet/marvell/octeontx2/af/npc.h | 8
drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2
drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 23 -
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 12
drivers/net/ethernet/mediatek/mtk_star_emac.c | 7
drivers/net/ethernet/micrel/ks8851_common.c | 10
drivers/net/ethernet/micrel/ks8851_spi.c | 4
drivers/net/phy/microchip_t1.c | 2
drivers/net/ppp/ppp_generic.c | 15
drivers/net/wireguard/allowedips.c | 4
drivers/net/wireguard/queueing.h | 4
drivers/net/wireguard/send.c | 2
drivers/nvmem/core.c | 5
drivers/nvmem/meson-efuse.c | 14
drivers/nvmem/rmem.c | 5
drivers/platform/x86/toshiba_acpi.c | 1
drivers/pmdomain/qcom/rpmhpd.c | 7
drivers/tty/serial/ma35d1_serial.c | 13
drivers/ufs/core/ufs-mcq.c | 11
drivers/ufs/core/ufshcd.c | 2
drivers/usb/core/config.c | 18 -
drivers/usb/core/quirks.c | 3
drivers/usb/dwc3/dwc3-pci.c | 8
drivers/usb/gadget/configfs.c | 3
drivers/usb/host/xhci.c | 16
drivers/usb/serial/mos7840.c | 45 ++
drivers/usb/serial/option.c | 38 ++
drivers/vfio/pci/vfio_pci_core.c | 2
fs/btrfs/tree-checker.c | 39 ++
fs/cachefiles/daemon.c | 14
fs/cachefiles/internal.h | 15
fs/cachefiles/ondemand.c | 52 ++
fs/cachefiles/xattr.c | 5
fs/dcache.c | 12
fs/ext4/sysfs.c | 2
fs/locks.c | 2
fs/nilfs2/dir.c | 32 +
fs/smb/client/cifsglob.h | 4
fs/smb/server/smb2pdu.c | 13
fs/userfaultfd.c | 7
include/linux/compiler_attributes.h | 12
include/linux/mmzone.h | 3
include/linux/pagemap.h | 11
include/net/tcx.h | 13
include/uapi/misc/fastrpc.h | 3
kernel/bpf/bpf_local_storage.c | 4
kernel/bpf/helpers.c | 186 +++++++---
kernel/sched/core.c | 7
kernel/sched/fair.c | 12
kernel/sched/psi.c | 21 -
kernel/sched/sched.h | 1
kernel/sched/stats.h | 11
mm/damon/core.c | 23 +
mm/filemap.c | 2
mm/shmem.c | 15
mm/vmalloc.c | 10
net/ceph/mon_client.c | 14
net/core/datagram.c | 3
net/core/skmsg.c | 3
net/ethtool/linkstate.c | 41 +-
net/ipv4/tcp_input.c | 11
net/ipv4/tcp_timer.c | 31 +
net/ipv4/udp.c | 4
net/sched/act_ct.c | 8
net/sched/sch_ingress.c | 12
net/sunrpc/xprtsock.c | 7
scripts/ld-version.sh | 8
sound/pci/hda/patch_realtek.c | 4
sound/soc/sof/intel/hda-dai.c | 12
tools/testing/selftests/net/gro.c | 3
tools/testing/selftests/wireguard/qemu/Makefile | 8
100 files changed, 1134 insertions(+), 435 deletions(-)
Alan Stern (1):
USB: core: Fix duplicate endpoint bug by clearing reserved bits in the descriptor
Aleksander Jan Bajkowski (1):
net: ethernet: lantiq_etop: fix double free in detach
Aleksandr Loktionov (1):
i40e: fix: remove needless retries of NVM update
Aleksandr Mishin (1):
octeontx2-af: Fix incorrect value output on error path in rvu_check_rsrc_availability()
Alexandre Chartre (1):
x86/bhi: Avoid warning in #DB handler due to BHI mitigation
Armin Wolf (1):
platform/x86: toshiba_acpi: Fix array out-of-bounds access
Audra Mitchell (1):
Fix userfaultfd_api to return EINVAL as expected
Baokun Li (5):
cachefiles: propagate errors from vfs_getxattr() to avoid infinite loop
cachefiles: stop sending new request when dropping object
cachefiles: cancel all requests for the object that is being dropped
cachefiles: cyclic allocation of msg_id to avoid reuse
ext4: avoid ptr null pointer dereference
Benjamin Tissoires (2):
bpf: make timer data struct more generic
bpf: replace bpf_timer_init with a generic helper
Bjorn Andersson (1):
arm64: dts: qcom: sc8180x: Fix LLCC reg property again
Bjørn Mork (1):
USB: serial: option: add Fibocom FM350-GL
Brian Foster (1):
vfs: don't mod negative dentry count when on shrinker list
Brian Gerst (1):
x86/entry/64: Remove obsolete comment on tracing vs. SYSRET
Chen Ni (1):
ARM: davinci: Convert comma to semicolon
Chengen Du (1):
net/sched: Fix UAF when resolving a clash
Christian Eggers (1):
dsa: lan9303: Fix mapping between DSA port number and PHY address
Cong Zhang (1):
arm64: dts: qcom: sa8775p: Correct IRQ number of EL2 non-secure physical timer
Dan Carpenter (2):
net: bcmasp: Fix error code in probe()
i2c: rcar: fix error code in probe()
Daniel Borkmann (2):
bpf: Fix too early release of tcx_entry
net, sunrpc: Remap EPERM in case of connection failure in xs_tcp_setup_socket
Daniele Palmas (2):
USB: serial: option: add Telit generic core-dump composition
USB: serial: option: add Telit FN912 rmnet compositions
Dmitry Antipov (1):
ppp: reject claimed-as-LCP but actually malformed packets
Dmitry Smirnov (1):
USB: serial: mos7840: fix crash on resume
Edson Juliano Drosdeck (1):
ALSA: hda/realtek: Limit mic boost on VAIO PRO PX
Ekansh Gupta (6):
misc: fastrpc: Fix DSP capabilities request
misc: fastrpc: Avoid updating PD type for capability request
misc: fastrpc: Copy the complete capability structure to user
misc: fastrpc: Fix memory leak in audio daemon attach operation
misc: fastrpc: Fix ownership reassignment of remote heap
misc: fastrpc: Restrict untrusted app to attach to privileged PD
Eric Dumazet (2):
tcp: use signed arithmetic in tcp_rtx_probe0_timed_out()
tcp: avoid too many retransmit packets
Gavin Shan (3):
mm/filemap: skip to create PMD-sized page cache if needed
mm/filemap: make MAX_PAGECACHE_ORDER acceptable to xarray
mm/shmem: disable PMD-sized page cache if needed
Geliang Tang (1):
skmsg: Skip zero length skb in sk_msg_recvmsg
Greg Kroah-Hartman (1):
Linux 6.6.41
He Zhe (1):
hpet: Support 32-bit userspace
Heikki Krogerus (1):
usb: dwc3: pci: add support for the Intel Panther Lake
Heiko Carstens (2):
Compiler Attributes: Add __uninitialized macro
s390/mm: Add NULL pointer check to crst_table_free() base_crst_free()
Helge Deller (1):
wireguard: allowedips: avoid unaligned 64-bit memory accesses
Hobin Woo (1):
ksmbd: discard write access to the directory open
Hou Tao (1):
cachefiles: wait for ondemand_object_worker to finish when dropping object
Hugh Dickins (1):
net: fix rc7's __skb_datagram_iter()
Ilya Dryomov (1):
libceph: fix race between delayed_work() and ceph_monc_stop()
Jacky Huang (1):
tty: serial: ma35d1: Add a NULL check for of_node
Jason A. Donenfeld (3):
wireguard: selftests: use acpi=off instead of -no-acpi for recent QEMU
wireguard: queueing: annotate intentional data race in cpu round robin
wireguard: send: annotate intentional data race in checking empty queue
Jeff Layton (1):
filelock: fix potential use-after-free in posix_lock_inode
Jia Zhu (1):
cachefiles: narrow the scope of triggering EPOLLIN events in ondemand mode
Jian Hui Lee (1):
net: ethernet: mtk-star-emac: set mac_managed_pm when probing
Jingbo Xu (1):
cachefiles: add missing lock protection when polling
Johan Hovold (1):
arm64: dts: qcom: sc8280xp-x13s: fix touchscreen power on
John Hubbard (1):
selftests/net: fix gro.c compilation failure due to non-existent opt_ipproto_off
John Stultz (1):
sched: Move psi_account_irqtime() out of update_rq_clock_task() hotpath
Josh Don (1):
Revert "sched/fair: Make sure to try to detach at least one movable task"
Joy Chakraborty (3):
misc: microchip: pci1xxxx: Fix return value of nvmem callbacks
nvmem: rmem: Fix return value of rmem_read()
nvmem: meson-efuse: Fix return value of nvmem callbacks
João Paulo Gonçalves (1):
iio: trigger: Fix condition for own trigger
Kai Vehmanen (1):
ASoC: SOF: Intel: hda: fix null deref on system suspend entry
Kiran Kumar K (1):
octeontx2-af: fix issue with IPv6 ext match for RSS
Kuan-Wei Chiu (1):
ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
Kumar Kartikeya Dwivedi (1):
bpf: Fail bpf_timer_cancel when callback is being cancelled
Kuniyuki Iwashima (1):
udp: Set SOCK_RCU_FREE earlier in udp_lib_get_port().
Lee Jones (1):
usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
Mank Wang (1):
USB: serial: option: add Netprisma LCUK54 series modules
Mario Limonciello (2):
cpufreq: ACPI: Mark boost policy as enabled when setting boost
cpufreq: Allow drivers to advertise boost enabled
Mathias Nyman (1):
xhci: always resume roothubs if xHC was reset during resume
Michal Kubiak (1):
i40e: Fix XDP program unloading while removing the driver
Michal Mazur (1):
octeontx2-af: fix detection of IP layer
Michał Kopeć (1):
ALSA: hda/realtek: add quirk for Clevo V5[46]0TU
Mohammad Shehar Yaar Tausif (1):
bpf: fix order of args in call to bpf_map_kvcalloc
Nathan Chancellor (1):
kbuild: Make ld-version.sh more robust against version string changes
Nazar Bilinskyi (1):
ALSA: hda/realtek: Enable Mute LED on HP 250 G7
Neal Cardwell (1):
tcp: fix incorrect undo caused by DSACK of TLP retransmit
Nikolay Borisov (1):
x86/entry: Rename ignore_sysret()
Nithin Dabilpuram (1):
octeontx2-af: replace cpt slot with lf id on reg write
Oleksij Rempel (2):
net: phy: microchip: lan87xx: reinit PHY after cable test
ethtool: netlink: do not return SQI value if link is down
Peter Wang (2):
scsi: ufs: core: Fix ufshcd_clear_cmd racing issue
scsi: ufs: core: Fix ufshcd_abort_one racing issue
Qu Wenruo (1):
btrfs: tree-checker: add type and sequence check for inline backrefs
Richard Fitzgerald (5):
firmware: cs_dsp: Fix overflow checking of wmfw header
firmware: cs_dsp: Return error if block header overflows file
firmware: cs_dsp: Validate payload length before processing block
firmware: cs_dsp: Prevent buffer overrun when processing V2 alg headers
firmware: cs_dsp: Use strnlen() on name fields in V1 wmfw files
Ronald Wahl (2):
net: ks8851: Fix deadlock with the SPI chip variant
net: ks8851: Fix potential TX stall after interface reopen
Ryusuke Konishi (1):
nilfs2: fix kernel bug on rename operation of broken directory
Satheesh Paul (1):
octeontx2-af: fix issue with IPv4 match for RSS
SeongJae Park (1):
mm/damon/core: merge regions aggressively when max_nr_regions is unmet
Slark Xiao (1):
USB: serial: option: add support for Foxconn T99W651
Srujana Challa (1):
octeontx2-af: fix a issue with cpt_lf_alloc mailbox
Steve French (1):
cifs: fix setting SecurityFlags to true
Sven Schnelle (1):
s390: Mark psw in __load_psw_mask() as __unitialized
Taniya Das (1):
pmdomain: qcom: rpmhpd: Skip retention level for Power Domains
Thomas Weißschuh (1):
nvmem: core: only change name to fram for current attribute
Uladzislau Rezki (Sony) (1):
mm: vmalloc: check if a hash-index is in cpu_possible_mask
Vanillan Wang (1):
USB: serial: option: add Rolling RW350-GL variants
Waiman Long (1):
mm: prevent derefencing NULL ptr in pfn_section_valid()
WangYuli (1):
USB: Add USB_QUIRK_NO_SET_INTF quirk for START BP-850k
Wolfram Sang (7):
i2c: rcar: bring hardware to known state when probing
i2c: mark HostNotify target address as used
i2c: rcar: reset controller is mandatory for Gen3+
i2c: rcar: introduce Gen4 devices
i2c: rcar: ensure Gen3+ reset does not disturb local targets
i2c: testunit: avoid re-issued work after read message
i2c: rcar: clear NO_RXDMA flag after resetting
Yi Liu (1):
vfio/pci: Init the count variable in collecting hot-reset devices
linke li (1):
fs/dcache: Re-use value stored to dentry->d_flags instead of re-reading
I'm announcing the release of the 6.1.100 kernel.
All users of the 6.1 kernel series must upgrade.
The updated 6.1.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.1.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/admin-guide/cifs/usage.rst | 36 -
Makefile | 2
arch/arm/mach-davinci/pm.c | 2
arch/s390/include/asm/processor.h | 2
arch/x86/entry/entry_64.S | 19
arch/x86/entry/entry_64_compat.S | 14
arch/x86/lib/retpoline.S | 2
drivers/acpi/processor_idle.c | 37 -
drivers/char/hpet.c | 34 +
drivers/firmware/cirrus/cs_dsp.c | 227 +++++++----
drivers/i2c/busses/i2c-rcar.c | 67 ++-
drivers/i2c/i2c-core-base.c | 1
drivers/i2c/i2c-slave-testunit.c | 7
drivers/misc/fastrpc.c | 14
drivers/net/ethernet/intel/i40e/i40e_main.c | 9
drivers/net/ethernet/lantiq_etop.c | 4
drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 10
drivers/net/ethernet/marvell/octeontx2/af/npc.h | 8
drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2
drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 33 +
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 67 +++
drivers/net/ethernet/mediatek/mtk_star_emac.c | 7
drivers/net/ethernet/micrel/ks8851_common.c | 10
drivers/net/ethernet/micrel/ks8851_spi.c | 4
drivers/net/phy/microchip_t1.c | 2
drivers/net/ppp/ppp_generic.c | 15
drivers/net/wireguard/allowedips.c | 4
drivers/net/wireguard/queueing.h | 4
drivers/net/wireguard/send.c | 2
drivers/nvmem/core.c | 5
drivers/nvmem/meson-efuse.c | 14
drivers/nvmem/rmem.c | 5
drivers/platform/x86/toshiba_acpi.c | 1
drivers/usb/core/config.c | 18
drivers/usb/core/quirks.c | 3
drivers/usb/gadget/configfs.c | 3
drivers/usb/host/xhci.c | 16
drivers/usb/serial/mos7840.c | 45 ++
drivers/usb/serial/option.c | 38 +
fs/cachefiles/daemon.c | 14
fs/cachefiles/internal.h | 15
fs/cachefiles/ondemand.c | 52 ++
fs/cachefiles/xattr.c | 5
fs/dcache.c | 12
fs/locks.c | 2
fs/nilfs2/dir.c | 32 +
fs/smb/client/cifsglob.h | 4
fs/smb/server/smb2pdu.c | 13
fs/userfaultfd.c | 7
include/linux/bpf.h | 8
include/linux/bpf_local_storage.h | 17
include/linux/compiler_attributes.h | 12
include/linux/mmzone.h | 3
kernel/bpf/bpf_inode_storage.c | 38 -
kernel/bpf/bpf_local_storage.c | 197 +++++----
kernel/bpf/bpf_task_storage.c | 38 -
kernel/bpf/syscall.c | 15
kernel/bpf/verifier.c | 11
kernel/sched/core.c | 7
kernel/sched/fair.c | 12
kernel/sched/psi.c | 21 -
kernel/sched/sched.h | 1
kernel/sched/stats.h | 11
net/ceph/mon_client.c | 14
net/core/bpf_sk_storage.c | 35 -
net/core/datagram.c | 3
net/core/skmsg.c | 3
net/ethtool/linkstate.c | 41 +
net/ipv4/tcp_input.c | 11
net/ipv4/tcp_timer.c | 31 +
net/ipv4/udp.c | 4
net/sched/act_ct.c | 8
net/sunrpc/xprtsock.c | 7
scripts/ld-version.sh | 8
sound/pci/hda/patch_realtek.c | 4
tools/testing/selftests/bpf/progs/test_global_func10.c | 9
tools/testing/selftests/bpf/verifier/calls.c | 13
tools/testing/selftests/bpf/verifier/helper_access_var_len.c | 104 +++--
tools/testing/selftests/bpf/verifier/int_ptr.c | 9
tools/testing/selftests/bpf/verifier/search_pruning.c | 13
tools/testing/selftests/bpf/verifier/sock.c | 27 -
tools/testing/selftests/bpf/verifier/spill_fill.c | 7
tools/testing/selftests/bpf/verifier/var_off.c | 52 --
tools/testing/selftests/wireguard/qemu/Makefile | 8
84 files changed, 1130 insertions(+), 621 deletions(-)
Alan Stern (1):
USB: core: Fix duplicate endpoint bug by clearing reserved bits in the descriptor
Aleksander Jan Bajkowski (1):
net: ethernet: lantiq_etop: fix double free in detach
Aleksandr Mishin (1):
octeontx2-af: Fix incorrect value output on error path in rvu_check_rsrc_availability()
Alexandre Chartre (1):
x86/bhi: Avoid warning in #DB handler due to BHI mitigation
Armin Wolf (1):
platform/x86: toshiba_acpi: Fix array out-of-bounds access
Audra Mitchell (1):
Fix userfaultfd_api to return EINVAL as expected
Baokun Li (4):
cachefiles: propagate errors from vfs_getxattr() to avoid infinite loop
cachefiles: stop sending new request when dropping object
cachefiles: cancel all requests for the object that is being dropped
cachefiles: cyclic allocation of msg_id to avoid reuse
Bjørn Mork (1):
USB: serial: option: add Fibocom FM350-GL
Brian Foster (1):
vfs: don't mod negative dentry count when on shrinker list
Brian Gerst (1):
x86/entry/64: Remove obsolete comment on tracing vs. SYSRET
Chen Ni (1):
ARM: davinci: Convert comma to semicolon
Chengen Du (1):
net/sched: Fix UAF when resolving a clash
Dan Carpenter (1):
i2c: rcar: fix error code in probe()
Daniel Borkmann (1):
net, sunrpc: Remap EPERM in case of connection failure in xs_tcp_setup_socket
Daniele Palmas (2):
USB: serial: option: add Telit generic core-dump composition
USB: serial: option: add Telit FN912 rmnet compositions
Dmitry Antipov (1):
ppp: reject claimed-as-LCP but actually malformed packets
Dmitry Smirnov (1):
USB: serial: mos7840: fix crash on resume
Edson Juliano Drosdeck (1):
ALSA: hda/realtek: Limit mic boost on VAIO PRO PX
Eduard Zingerman (1):
bpf: Allow reads from uninit stack
Ekansh Gupta (3):
misc: fastrpc: Fix DSP capabilities request
misc: fastrpc: Avoid updating PD type for capability request
misc: fastrpc: Copy the complete capability structure to user
Eric Dumazet (2):
tcp: use signed arithmetic in tcp_rtx_probe0_timed_out()
tcp: avoid too many retransmit packets
Geliang Tang (1):
skmsg: Skip zero length skb in sk_msg_recvmsg
Greg Kroah-Hartman (1):
Linux 6.1.100
He Zhe (1):
hpet: Support 32-bit userspace
Heiko Carstens (1):
Compiler Attributes: Add __uninitialized macro
Helge Deller (1):
wireguard: allowedips: avoid unaligned 64-bit memory accesses
Hobin Woo (1):
ksmbd: discard write access to the directory open
Hou Tao (1):
cachefiles: wait for ondemand_object_worker to finish when dropping object
Hugh Dickins (1):
net: fix rc7's __skb_datagram_iter()
Ilya Dryomov (1):
libceph: fix race between delayed_work() and ceph_monc_stop()
Jason A. Donenfeld (3):
wireguard: selftests: use acpi=off instead of -no-acpi for recent QEMU
wireguard: queueing: annotate intentional data race in cpu round robin
wireguard: send: annotate intentional data race in checking empty queue
Jeff Layton (1):
filelock: fix potential use-after-free in posix_lock_inode
Jia Zhu (1):
cachefiles: narrow the scope of triggering EPOLLIN events in ondemand mode
Jian Hui Lee (1):
net: ethernet: mtk-star-emac: set mac_managed_pm when probing
Jim Mattson (1):
x86/retpoline: Move a NOENDBR annotation to the SRSO dummy return thunk
Jingbo Xu (1):
cachefiles: add missing lock protection when polling
John Stultz (1):
sched: Move psi_account_irqtime() out of update_rq_clock_task() hotpath
Josh Don (1):
Revert "sched/fair: Make sure to try to detach at least one movable task"
Joy Chakraborty (2):
nvmem: rmem: Fix return value of rmem_read()
nvmem: meson-efuse: Fix return value of nvmem callbacks
Kiran Kumar K (2):
octeontx2-af: extend RSS supported offload types
octeontx2-af: fix issue with IPv6 ext match for RSS
Kuan-Wei Chiu (1):
ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
Kuniyuki Iwashima (1):
udp: Set SOCK_RCU_FREE earlier in udp_lib_get_port().
Lee Jones (1):
usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
Mank Wang (1):
USB: serial: option: add Netprisma LCUK54 series modules
Martin KaFai Lau (2):
bpf: Reduce smap->elem_size
bpf: Remove __bpf_local_storage_map_alloc
Mathias Nyman (1):
xhci: always resume roothubs if xHC was reset during resume
Michal Kubiak (1):
i40e: Fix XDP program unloading while removing the driver
Michal Mazur (1):
octeontx2-af: fix detection of IP layer
Michał Kopeć (1):
ALSA: hda/realtek: add quirk for Clevo V5[46]0TU
Mohammad Shehar Yaar Tausif (1):
bpf: fix order of args in call to bpf_map_kvcalloc
Nathan Chancellor (1):
kbuild: Make ld-version.sh more robust against version string changes
Nazar Bilinskyi (1):
ALSA: hda/realtek: Enable Mute LED on HP 250 G7
Neal Cardwell (1):
tcp: fix incorrect undo caused by DSACK of TLP retransmit
Nithin Dabilpuram (1):
octeontx2-af: replace cpt slot with lf id on reg write
Oleksij Rempel (2):
net: phy: microchip: lan87xx: reinit PHY after cable test
ethtool: netlink: do not return SQI value if link is down
Richard Fitzgerald (5):
firmware: cs_dsp: Fix overflow checking of wmfw header
firmware: cs_dsp: Return error if block header overflows file
firmware: cs_dsp: Validate payload length before processing block
firmware: cs_dsp: Prevent buffer overrun when processing V2 alg headers
firmware: cs_dsp: Use strnlen() on name fields in V1 wmfw files
Ronald Wahl (2):
net: ks8851: Fix deadlock with the SPI chip variant
net: ks8851: Fix potential TX stall after interface reopen
Ryusuke Konishi (1):
nilfs2: fix kernel bug on rename operation of broken directory
Satheesh Paul (1):
octeontx2-af: fix issue with IPv4 match for RSS
Slark Xiao (1):
USB: serial: option: add support for Foxconn T99W651
Srujana Challa (2):
octeontx2-af: update cpt lf alloc mailbox
octeontx2-af: fix a issue with cpt_lf_alloc mailbox
Steve French (1):
cifs: fix setting SecurityFlags to true
Sven Schnelle (1):
s390: Mark psw in __load_psw_mask() as __unitialized
Thomas Weißschuh (1):
nvmem: core: only change name to fram for current attribute
Vanillan Wang (1):
USB: serial: option: add Rolling RW350-GL variants
Waiman Long (1):
mm: prevent derefencing NULL ptr in pfn_section_valid()
WangYuli (1):
USB: Add USB_QUIRK_NO_SET_INTF quirk for START BP-850k
Wolfram Sang (7):
i2c: rcar: bring hardware to known state when probing
i2c: mark HostNotify target address as used
i2c: rcar: reset controller is mandatory for Gen3+
i2c: rcar: introduce Gen4 devices
i2c: rcar: ensure Gen3+ reset does not disturb local targets
i2c: testunit: avoid re-issued work after read message
i2c: rcar: clear NO_RXDMA flag after resetting
Yafang Shao (1):
bpf: use bpf_map_kvcalloc in bpf_local_storage
Yonghong Song (1):
bpf: Refactor some inode/task/sk storage functions for reuse
linke li (1):
fs/dcache: Re-use value stored to dentry->d_flags instead of re-reading