This is the start of the stable review cycle for the 6.1.106 release.
There are 38 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 Sat, 17 Aug 2024 13:18:17 +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.106-rc…
or in the git tree and …
[View More]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.106-rc1
Will Deacon <will(a)kernel.org>
KVM: arm64: Don't pass a TLBI level hint when zapping table entries
Eric Dumazet <edumazet(a)google.com>
wifi: cfg80211: restrict NL80211_ATTR_TXQ_QUANTUM values
Waiman Long <longman(a)redhat.com>
cgroup: Move rcu_head up near the top of cgroup_root
Kees Cook <kees(a)kernel.org>
binfmt_flat: Fix corruption when not offsetting data start
Andi Shyti <andi.shyti(a)linux.intel.com>
drm/i915/gem: Adjust vma offset for framebuffer mmap offset
Dan Carpenter <dan.carpenter(a)linaro.org>
drm/i915: Fix a NULL vs IS_ERR() bug
Nirmoy Das <nirmoy.das(a)intel.com>
drm/i915: Add a function to mmap framebuffer obj
Yafang Shao <laoar.shao(a)gmail.com>
cgroup: Make operations on the cgroup root_list RCU safe
Andi Shyti <andi.shyti(a)linux.intel.com>
drm/i915/gem: Fix Virtual Memory mapping boundaries calculation
Matthieu Baerts (NGI0) <matttbe(a)kernel.org>
mptcp: fully established after ADD_ADDR echo on MPJ
WangYuli <wangyuli(a)uniontech.com>
nvme/pci: Add APST quirk for Lenovo N60z laptop
Josef Bacik <josef(a)toxicpanda.com>
nfsd: make svc_stat per-network namespace instead of global
Josef Bacik <josef(a)toxicpanda.com>
nfsd: remove nfsd_stats, make th_cnt a global counter
Josef Bacik <josef(a)toxicpanda.com>
nfsd: make all of the nfsd stats per-network namespace
Josef Bacik <josef(a)toxicpanda.com>
nfsd: expose /proc/net/sunrpc/nfsd in net namespaces
Josef Bacik <josef(a)toxicpanda.com>
nfsd: rename NFSD_NET_* to NFSD_STATS_*
Josef Bacik <josef(a)toxicpanda.com>
sunrpc: use the struct net as the svc proc private
Josef Bacik <josef(a)toxicpanda.com>
sunrpc: remove ->pg_stats from svc_program
Josef Bacik <josef(a)toxicpanda.com>
sunrpc: pass in the sv_stats struct through svc_create_pooled
Josef Bacik <josef(a)toxicpanda.com>
nfsd: stop setting ->pg_stats for unused stats
Josef Bacik <josef(a)toxicpanda.com>
sunrpc: don't change ->sv_stats if it doesn't exist
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix frame size warning in svc_export_parse()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Rewrite synopsis of nfsd_percpu_counters_init()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor the duplicate reply cache shrinker
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace nfsd_prune_bucket()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Rename nfsd_reply_cache_alloc()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor nfsd_reply_cache_free_locked()
Jeff Layton <jlayton(a)kernel.org>
nfsd: move init of percpu reply_cache_stats counters back to nfsd_init_net
Jeff Layton <jlayton(a)kernel.org>
nfsd: move reply cache initialization into nfsd startup
Huacai Chen <chenhuacai(a)kernel.org>
LoongArch: Define __ARCH_WANT_NEW_STAT in unistd.h
Kees Cook <kees(a)kernel.org>
exec: Fix ToCToU between perm check and set-uid/gid usage
Amadeusz Sławiński <amadeuszx.slawinski(a)linux.intel.com>
ASoC: topology: Fix route memory corruption
Amadeusz Sławiński <amadeuszx.slawinski(a)linux.intel.com>
ASoC: topology: Clean up route loading
Matthieu Baerts (NGI0) <matttbe(a)kernel.org>
selftests: mptcp: join: test both signal & subflow
Matthieu Baerts (NGI0) <matttbe(a)kernel.org>
mptcp: pm: do not ignore 'subflow' if 'signal' flag is also set
Matthieu Baerts (NGI0) <matttbe(a)kernel.org>
mptcp: pm: don't try to create sf if alloc failed
Matthieu Baerts (NGI0) <matttbe(a)kernel.org>
mptcp: pm: reduce indentation blocks
Geliang Tang <geliang.tang(a)suse.com>
mptcp: pass addr to mptcp_pm_alloc_anno_list
-------------
Diffstat:
Makefile | 4 +-
arch/arm64/kvm/hyp/pgtable.c | 10 +-
arch/loongarch/include/uapi/asm/unistd.h | 1 +
drivers/gpu/drm/i915/gem/i915_gem_mman.c | 192 ++++++++++++++++------
drivers/gpu/drm/i915/gem/i915_gem_mman.h | 2 +-
drivers/nvme/host/pci.c | 7 +
fs/binfmt_flat.c | 4 +-
fs/exec.c | 8 +-
fs/lockd/svc.c | 3 -
fs/nfs/callback.c | 3 -
fs/nfsd/export.c | 32 ++--
fs/nfsd/export.h | 4 +-
fs/nfsd/netns.h | 25 ++-
fs/nfsd/nfs4proc.c | 6 +-
fs/nfsd/nfscache.c | 201 ++++++++++++++----------
fs/nfsd/nfsctl.c | 24 ++-
fs/nfsd/nfsd.h | 1 +
fs/nfsd/nfsfh.c | 3 +-
fs/nfsd/nfssvc.c | 24 +--
fs/nfsd/stats.c | 52 +++---
fs/nfsd/stats.h | 83 ++++------
fs/nfsd/trace.h | 22 +++
fs/nfsd/vfs.c | 6 +-
include/linux/cgroup-defs.h | 7 +-
include/linux/sunrpc/svc.h | 5 +-
kernel/cgroup/cgroup-internal.h | 3 +-
kernel/cgroup/cgroup.c | 23 ++-
net/mptcp/options.c | 3 +-
net/mptcp/pm_netlink.c | 49 +++---
net/mptcp/pm_userspace.c | 2 +-
net/mptcp/protocol.h | 2 +-
net/sunrpc/stats.c | 2 +-
net/sunrpc/svc.c | 36 +++--
net/wireless/nl80211.c | 6 +-
sound/soc/soc-topology.c | 32 +---
tools/testing/selftests/net/mptcp/mptcp_join.sh | 14 ++
36 files changed, 555 insertions(+), 346 deletions(-)
[View Less]
This is the start of the stable review cycle for the 6.6.47 release.
There are 67 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 Sat, 17 Aug 2024 13:18:17 +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.47-rc1…
or in the git tree and …
[View More]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.47-rc1
Will Deacon <will(a)kernel.org>
KVM: arm64: Don't pass a TLBI level hint when zapping table entries
Will Deacon <will(a)kernel.org>
KVM: arm64: Don't defer TLB invalidation when zapping table entries
Waiman Long <longman(a)redhat.com>
cgroup: Move rcu_head up near the top of cgroup_root
Peter Xu <peterx(a)redhat.com>
mm/debug_vm_pgtable: drop RANDOM_ORVALUE trick
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
Revert "Input: bcm5974 - check endpoint type before starting traffic"
Dave Kleikamp <dave.kleikamp(a)oracle.com>
Revert "jfs: fix shift-out-of-bounds in dbJoin"
Kees Cook <kees(a)kernel.org>
binfmt_flat: Fix corruption when not offsetting data start
Takashi Iwai <tiwai(a)suse.de>
ALSA: usb: Fix UBSAN warning in parse_audio_unit()
Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com>
fs/ntfs3: Do copy_to_user out of run_lock
Pei Li <peili.dev(a)gmail.com>
jfs: Fix shift-out-of-bounds in dbDiscardAG
Edward Adam Davis <eadavis(a)qq.com>
jfs: fix null ptr deref in dtInsertEntry
Willem de Bruijn <willemb(a)google.com>
fou: remove warn in gue_gro_receive on unsupported protocol
Chao Yu <chao(a)kernel.org>
f2fs: fix to cover read extent cache access with lock
Chao Yu <chao(a)kernel.org>
f2fs: fix to do sanity check on F2FS_INLINE_DATA flag in inode during GC
yunshui <jiangyunshui(a)kylinos.cn>
bpf, net: Use DEV_STAT_INC()
Wojciech Gładysz <wojciech.gladysz(a)infogain.com>
ext4: sanity check for NULL pointer after ext4_force_shutdown
Matthew Wilcox (Oracle) <willy(a)infradead.org>
ext4: convert ext4_da_do_write_end() to take a folio
Eric Dumazet <edumazet(a)google.com>
wifi: cfg80211: restrict NL80211_ATTR_TXQ_QUANTUM values
Peter Xu <peterx(a)redhat.com>
mm/page_table_check: support userfault wr-protect entries
Jan Kara <jack(a)suse.cz>
ext4: do not create EA inode under buffer lock
Jan Kara <jack(a)suse.cz>
ext4: fold quota accounting into ext4_xattr_inode_lookup_create()
Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
Bluetooth: RFCOMM: Fix not validating setsockopt user input
Eric Dumazet <edumazet(a)google.com>
nfc: llcp: fix nfc_llcp_setsockopt() unsafe copies
Eric Dumazet <edumazet(a)google.com>
net: add copy_safe_from_sockptr() helper
Eric Dumazet <edumazet(a)google.com>
mISDN: fix MISDN_TIME_STAMP handling
Gustavo A. R. Silva <gustavoars(a)kernel.org>
fs: Annotate struct file_handle with __counted_by() and use struct_size()
Alexei Starovoitov <ast(a)kernel.org>
bpf: Avoid kfree_rcu() under lock in bpf_lpm_trie.
Kees Cook <keescook(a)chromium.org>
bpf: Replace bpf_lpm_trie_key 0-length array with flexible array
Gavrilov Ilia <Ilia.Gavrilov(a)infotecs.ru>
pppoe: Fix memory leak in pppoe_sendmsg()
Dmitry Antipov <dmantipov(a)yandex.ru>
net: sctp: fix skb leak in sctp_inq_free()
Allison Henderson <allison.henderson(a)oracle.com>
net:rds: Fix possible deadlock in rds_message_put
Jan Kara <jack(a)suse.cz>
quota: Detect loops in quota tree
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
Input: bcm5974 - check endpoint type before starting traffic
John Fastabend <john.fastabend(a)gmail.com>
net: tls, add test to capture error on large splice
Gao Xiang <xiang(a)kernel.org>
erofs: avoid debugging output for (de)compressed data
Edward Adam Davis <eadavis(a)qq.com>
reiserfs: fix uninit-value in comp_keys
Phillip Lougher <phillip(a)squashfs.org.uk>
Squashfs: fix variable overflow triggered by sysbot
Lizhi Xu <lizhi.xu(a)windriver.com>
squashfs: squashfs_read_data need to check if the length is 0
Manas Ghandat <ghandatmanas(a)gmail.com>
jfs: fix shift-out-of-bounds in dbJoin
Jakub Kicinski <kuba(a)kernel.org>
net: don't dump stack on queue timeout
Lizhi Xu <lizhi.xu(a)windriver.com>
jfs: fix log->bdev_handle null ptr deref in lbmStartIO
Jan Kara <jack(a)suse.cz>
jfs: Convert to bdev_open_by_dev()
Jan Kara <jack(a)suse.cz>
fs: Convert to bdev_open_by_dev()
Johannes Berg <johannes.berg(a)intel.com>
wifi: mac80211: fix change_address deadlock during unregister
Johannes Berg <johannes.berg(a)intel.com>
wifi: mac80211: take wiphy lock for MAC addr change
Eric Dumazet <edumazet(a)google.com>
tcp_metrics: optimize tcp_metrics_flush_all()
Yafang Shao <laoar.shao(a)gmail.com>
cgroup: Make operations on the cgroup root_list RCU safe
Dongli Zhang <dongli.zhang(a)oracle.com>
genirq/cpuhotplug: Retry with cpu_online_mask when migration fails
David Stevens <stevensd(a)chromium.org>
genirq/cpuhotplug: Skip suspended interrupts when restoring affinity
WangYuli <wangyuli(a)uniontech.com>
nvme/pci: Add APST quirk for Lenovo N60z laptop
Yang Shi <yang(a)os.amperecomputing.com>
mm: gup: stop abusing try_grab_folio
Josef Bacik <josef(a)toxicpanda.com>
nfsd: make svc_stat per-network namespace instead of global
Josef Bacik <josef(a)toxicpanda.com>
nfsd: remove nfsd_stats, make th_cnt a global counter
Josef Bacik <josef(a)toxicpanda.com>
nfsd: make all of the nfsd stats per-network namespace
Josef Bacik <josef(a)toxicpanda.com>
nfsd: expose /proc/net/sunrpc/nfsd in net namespaces
Josef Bacik <josef(a)toxicpanda.com>
nfsd: rename NFSD_NET_* to NFSD_STATS_*
Josef Bacik <josef(a)toxicpanda.com>
sunrpc: use the struct net as the svc proc private
Josef Bacik <josef(a)toxicpanda.com>
sunrpc: remove ->pg_stats from svc_program
Josef Bacik <josef(a)toxicpanda.com>
sunrpc: pass in the sv_stats struct through svc_create_pooled
Josef Bacik <josef(a)toxicpanda.com>
nfsd: stop setting ->pg_stats for unused stats
Josef Bacik <josef(a)toxicpanda.com>
sunrpc: don't change ->sv_stats if it doesn't exist
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix frame size warning in svc_export_parse()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Rewrite synopsis of nfsd_percpu_counters_init()
Huacai Chen <chenhuacai(a)kernel.org>
LoongArch: Define __ARCH_WANT_NEW_STAT in unistd.h
Amadeusz Sławiński <amadeuszx.slawinski(a)linux.intel.com>
ASoC: topology: Fix route memory corruption
Amadeusz Sławiński <amadeuszx.slawinski(a)linux.intel.com>
ASoC: topology: Clean up route loading
Kees Cook <kees(a)kernel.org>
exec: Fix ToCToU between perm check and set-uid/gid usage
-------------
Diffstat:
Documentation/bpf/map_lpm_trie.rst | 2 +-
Documentation/mm/page_table_check.rst | 9 +-
Makefile | 4 +-
arch/arm64/kvm/hyp/pgtable.c | 12 +-
arch/loongarch/include/uapi/asm/unistd.h | 1 +
arch/x86/include/asm/pgtable.h | 18 +-
drivers/isdn/mISDN/socket.c | 10 +-
drivers/net/ppp/pppoe.c | 23 +--
drivers/nvme/host/pci.c | 7 +
fs/binfmt_flat.c | 4 +-
fs/buffer.c | 2 +
fs/cramfs/inode.c | 2 +-
fs/erofs/decompressor.c | 8 +-
fs/exec.c | 8 +-
fs/ext4/inode.c | 24 ++-
fs/ext4/xattr.c | 155 +++++++-------
fs/f2fs/extent_cache.c | 50 ++---
fs/f2fs/f2fs.h | 2 +-
fs/f2fs/gc.c | 10 +
fs/f2fs/inode.c | 10 +-
fs/fhandle.c | 6 +-
fs/jfs/jfs_dmap.c | 2 +
fs/jfs/jfs_dtree.c | 2 +
fs/jfs/jfs_logmgr.c | 33 +--
fs/jfs/jfs_logmgr.h | 2 +-
fs/jfs/jfs_mount.c | 3 +-
fs/lockd/svc.c | 3 -
fs/nfs/callback.c | 3 -
fs/nfsd/cache.h | 2 -
fs/nfsd/export.c | 32 ++-
fs/nfsd/export.h | 4 +-
fs/nfsd/netns.h | 25 ++-
fs/nfsd/nfs4proc.c | 6 +-
fs/nfsd/nfs4state.c | 3 +-
fs/nfsd/nfscache.c | 40 +---
fs/nfsd/nfsctl.c | 16 +-
fs/nfsd/nfsd.h | 1 +
fs/nfsd/nfsfh.c | 3 +-
fs/nfsd/nfssvc.c | 14 +-
fs/nfsd/stats.c | 54 ++---
fs/nfsd/stats.h | 88 +++-----
fs/nfsd/vfs.c | 6 +-
fs/ntfs3/frecord.c | 75 ++++++-
fs/quota/quota_tree.c | 128 +++++++++---
fs/quota/quota_v2.c | 15 +-
fs/reiserfs/stree.c | 2 +-
fs/romfs/super.c | 2 +-
fs/squashfs/block.c | 2 +-
fs/squashfs/file.c | 3 +-
fs/squashfs/file_direct.c | 6 +-
fs/super.c | 15 +-
include/linux/cgroup-defs.h | 7 +-
include/linux/fs.h | 3 +-
include/linux/sockptr.h | 25 +++
include/linux/sunrpc/svc.h | 5 +-
include/uapi/linux/bpf.h | 19 +-
kernel/bpf/lpm_trie.c | 33 +--
kernel/cgroup/cgroup-internal.h | 3 +-
kernel/cgroup/cgroup.c | 23 ++-
kernel/irq/cpuhotplug.c | 27 ++-
kernel/irq/manage.c | 12 +-
mm/debug_vm_pgtable.c | 31 +--
mm/gup.c | 251 ++++++++++++-----------
mm/huge_memory.c | 6 +-
mm/hugetlb.c | 2 +-
mm/internal.h | 4 +-
mm/page_table_check.c | 30 +++
net/bluetooth/rfcomm/sock.c | 14 +-
net/core/filter.c | 8 +-
net/ipv4/fou_core.c | 2 +-
net/ipv4/tcp_metrics.c | 7 +-
net/mac80211/iface.c | 27 ++-
net/nfc/llcp_sock.c | 12 +-
net/rds/recv.c | 13 +-
net/sched/sch_generic.c | 5 +-
net/sctp/inqueue.c | 14 +-
net/sunrpc/stats.c | 2 +-
net/sunrpc/svc.c | 39 ++--
net/wireless/nl80211.c | 6 +-
samples/bpf/map_perf_test_user.c | 2 +-
samples/bpf/xdp_router_ipv4_user.c | 2 +-
sound/soc/soc-topology.c | 32 +--
sound/usb/mixer.c | 7 +
tools/include/uapi/linux/bpf.h | 19 +-
tools/testing/selftests/bpf/progs/map_ptr_kern.c | 2 +-
tools/testing/selftests/bpf/test_lpm_map.c | 18 +-
tools/testing/selftests/net/tls.c | 14 ++
87 files changed, 987 insertions(+), 696 deletions(-)
[View Less]
From: Arnd Bergmann <arnd(a)arndb.de>
Both of these architectures require u64 function arguments to be
passed in even/odd pairs of registers or stack slots, which in case of
sync_file_range would result in a seven-argument system call that is
not currently possible. The system call is therefore incompatible with
all existing binaries.
While it would be possible to implement support for seven arguments
like on mips, it seems better to use a six-argument version, either
with the normal …
[View More]argument order but misaligned as on most architectures
or with the reordered sync_file_range2() calling conventions as on
arm and powerpc.
Cc: stable(a)vger.kernel.org
Acked-by: Guo Ren <guoren(a)kernel.org>
Signed-off-by: Arnd Bergmann <arnd(a)arndb.de>
---
arch/csky/include/uapi/asm/unistd.h | 1 +
arch/hexagon/include/uapi/asm/unistd.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/csky/include/uapi/asm/unistd.h b/arch/csky/include/uapi/asm/unistd.h
index 7ff6a2466af1..e0594b6370a6 100644
--- a/arch/csky/include/uapi/asm/unistd.h
+++ b/arch/csky/include/uapi/asm/unistd.h
@@ -6,6 +6,7 @@
#define __ARCH_WANT_SYS_CLONE3
#define __ARCH_WANT_SET_GET_RLIMIT
#define __ARCH_WANT_TIME32_SYSCALLS
+#define __ARCH_WANT_SYNC_FILE_RANGE2
#include <asm-generic/unistd.h>
#define __NR_set_thread_area (__NR_arch_specific_syscall + 0)
diff --git a/arch/hexagon/include/uapi/asm/unistd.h b/arch/hexagon/include/uapi/asm/unistd.h
index 432c4db1b623..21ae22306b5d 100644
--- a/arch/hexagon/include/uapi/asm/unistd.h
+++ b/arch/hexagon/include/uapi/asm/unistd.h
@@ -36,5 +36,6 @@
#define __ARCH_WANT_SYS_VFORK
#define __ARCH_WANT_SYS_FORK
#define __ARCH_WANT_TIME32_SYSCALLS
+#define __ARCH_WANT_SYNC_FILE_RANGE2
#include <asm-generic/unistd.h>
--
2.39.2
[View Less]
No upstream commit exists for this commit.
Fuzzing of 5.10 stable branch reports a slab-out-of-bounds error in
ata_scsi_pass_thru.
The error is fixed in 5.18 by commit ce70fd9a551a ("scsi: core: Remove the
cmd field from struct scsi_request") upstream.
Backporting this commit would require significant changes to the code so
it is better to use a simple fix for that particular error.
The problem is that the length of the received SCSI command is not
validated if scsi_op == VARIABLE_LENGTH_CMD.…
[View More] It can lead to out-of-bounds
reading if the user sends a request with SCSI command of length less than
32.
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
Acked-by: Damien Le Moal <dlemoal(a)kernel.org>
Co-developed-by: Mikhail Ivanov <iwanov-23(a)bk.ru>
Signed-off-by: Mikhail Ivanov <iwanov-23(a)bk.ru>
Co-developed-by: Mikhail Ukhin <mish.uxin2012(a)yandex.ru>
Signed-off-by: Mikhail Ukhin <mish.uxin2012(a)yandex.ru>
Signed-off-by: Artem Sadovnikov <ancowi69(a)gmail.com>
---
Link: https://lore.kernel.org/lkml/20240711151546.341491-1-ancowi69@gmail.com/T/#u
unfortunately, stable(a)vger.kernel.org wasn't initially mentioned.
drivers/ata/libata-scsi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 36f32fa052df..4397986db053 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3949,6 +3949,9 @@ static unsigned int ata_scsi_var_len_cdb_xlat(struct ata_queued_cmd *qc)
const u8 *cdb = scmd->cmnd;
const u16 sa = get_unaligned_be16(&cdb[8]);
+ if (scmd->cmd_len != 32)
+ return 1;
+
/*
* if service action represents a ata pass-thru(32) command,
* then pass it to ata_scsi_pass_thru handler.
--
2.34.1
[View Less]
Although there are several patches improving the extent map shrinker,
there are still reports of too frequent shrinker behavior, taking too
much CPU for the kswapd process.
So let's only enable extent shrinker for now, until we got more
comprehensive understanding and a better solution.
Link: https://lore.kernel.org/linux-btrfs/3df4acd616a07ef4d2dc6bad668701504b412ff…
Link: https://lore.kernel.org/linux-btrfs/c30fd6b3-ca7a-4759-8a53-d42878bf84f7@gm…
Fixes: 956a17d9d050 ("btrfs: add a …
[View More]shrinker for extent maps")
CC: stable(a)vger.kernel.org # 6.10+
Signed-off-by: Qu Wenruo <wqu(a)suse.com>
---
I also checked how XFS (the only other fs implemented the
free_cached_objects callback) implemented the callback.
They did two things:
- Make sure there is only one queued reclaim
Currently we only do the reclaim for kswapd, but for multi-node
systems, we can still have multiple kswapd processes.
But I do not think that's the root cause.
- With an extra delay of 60% of xfs_syncd_centiseccs
The default value for xfs_syncd_centiseccs is 3000 centiseconds (30s),
with a minimal 100 centiseconds (1s).
This results the reclaim work only to be executed at most every 18
seconds by default (or 0.6s for the minimal interval).
I believe this is the root cause, we have no extra delay and that
makes btrfs to shrink extent maps too frequently.
---
fs/btrfs/super.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 11044e9e2cb1..98fa0f382480 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -2402,7 +2402,13 @@ static long btrfs_nr_cached_objects(struct super_block *sb, struct shrink_contro
trace_btrfs_extent_map_shrinker_count(fs_info, nr);
- return nr;
+ /*
+ * Only report the real number for DEBUG builds, as there are reports of
+ * serious performance degradation caused by too frequent shrinks.
+ */
+ if (IS_ENABLED(CONFIG_BTRFS_DEBUG))
+ return nr;
+ return 0;
}
static long btrfs_free_cached_objects(struct super_block *sb, struct shrink_control *sc)
--
2.46.0
[View Less]
The kms paths keep a persistent map active to read and compare the cursor
buffer. These maps can race with each other in simple scenario where:
a) buffer "a" mapped for update
b) buffer "a" mapped for compare
c) do the compare
d) unmap "a" for compare
e) update the cursor
f) unmap "a" for update
At step "e" the buffer has been unmapped and the read contents is bogus.
Prevent unmapping of active read buffers by simply keeping a count of
how many paths have currently active maps and unmap only …
[View More]when the count
reaches 0.
Fixes: 485d98d472d5 ("drm/vmwgfx: Add support for CursorMob and CursorBypass 4")
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> # v5.19+
Signed-off-by: Zack Rusin <zack.rusin(a)broadcom.com>
---
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 13 +++++++++++--
drivers/gpu/drm/vmwgfx/vmwgfx_bo.h | 3 +++
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
index f42ebc4a7c22..a0e433fbcba6 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
@@ -360,6 +360,8 @@ void *vmw_bo_map_and_cache_size(struct vmw_bo *vbo, size_t size)
void *virtual;
int ret;
+ atomic_inc(&vbo->map_count);
+
virtual = ttm_kmap_obj_virtual(&vbo->map, ¬_used);
if (virtual)
return virtual;
@@ -383,11 +385,17 @@ void *vmw_bo_map_and_cache_size(struct vmw_bo *vbo, size_t size)
*/
void vmw_bo_unmap(struct vmw_bo *vbo)
{
+ int map_count;
+
if (vbo->map.bo == NULL)
return;
- ttm_bo_kunmap(&vbo->map);
- vbo->map.bo = NULL;
+ map_count = atomic_dec_return(&vbo->map_count);
+
+ if (!map_count) {
+ ttm_bo_kunmap(&vbo->map);
+ vbo->map.bo = NULL;
+ }
}
@@ -421,6 +429,7 @@ static int vmw_bo_init(struct vmw_private *dev_priv,
vmw_bo->tbo.priority = 3;
vmw_bo->res_tree = RB_ROOT;
xa_init(&vmw_bo->detached_resources);
+ atomic_set(&vmw_bo->map_count, 0);
params->size = ALIGN(params->size, PAGE_SIZE);
drm_gem_private_object_init(vdev, &vmw_bo->tbo.base, params->size);
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.h b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.h
index 62b4342d5f7c..43b5439ec9f7 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.h
@@ -71,6 +71,8 @@ struct vmw_bo_params {
* @map: Kmap object for semi-persistent mappings
* @res_tree: RB tree of resources using this buffer object as a backing MOB
* @res_prios: Eviction priority counts for attached resources
+ * @map_count: The number of currently active maps. Will differ from the
+ * cpu_writers because it includes kernel maps.
* @cpu_writers: Number of synccpu write grabs. Protected by reservation when
* increased. May be decreased without reservation.
* @dx_query_ctx: DX context if this buffer object is used as a DX query MOB
@@ -90,6 +92,7 @@ struct vmw_bo {
u32 res_prios[TTM_MAX_BO_PRIORITY];
struct xarray detached_resources;
+ atomic_t map_count;
atomic_t cpu_writers;
/* Not ref-counted. Protected by binding_mutex */
struct vmw_resource *dx_query_ctx;
--
2.43.0
[View Less]
It is done everywhere in cxgb4 code, e.g. in is_filter_exact_match()
There is no reason it should not be done here
Found by Linux Verification Center (linuxtesting.org) with SVACE
Signed-off-by: Nikolay Kuratov <kniv(a)yandex-team.ru>
Cc: stable(a)vger.kernel.org
Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters")
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/…
[View More]cxgb4_filter.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
index 786ceae34488..e417ff0ea06c 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
@@ -1244,7 +1244,7 @@ static u64 hash_filter_ntuple(struct ch_filter_specification *fs,
* in the Compressed Filter Tuple.
*/
if (tp->vlan_shift >= 0 && fs->mask.ivlan)
- ntuple |= (FT_VLAN_VLD_F | fs->val.ivlan) << tp->vlan_shift;
+ ntuple |= (u64)(FT_VLAN_VLD_F | fs->val.ivlan) << tp->vlan_shift;
if (tp->port_shift >= 0 && fs->mask.iport)
ntuple |= (u64)fs->val.iport << tp->port_shift;
--
2.34.1
[View Less]
Greetings,
Did you receive my last email message I sent to this Email
address: ( stable(a)vger.kernel.org ) concerning relocating my
investment to your country due to the on going war in my country
Russia.
Best Regards,
Mr.Boris Soroka.