6.7.6-rc1 review
Subsystems (4)
Greg Kroah-Hartman
maintainerPATCH 269/309 ASoC: amd: yc: Add DMI quirk for Lenovo Ideapad Pro 5 16ARP8
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Limonciello <[email protected]>
commit 610010737f74482a61896596a0116876ecf9e65c upstream.
The laptop requires a quirk ID to enable its internal microphone. Add it to the DMI quirk table.
--- sound/soc/amd/yc/acp6x-mach.c | 7 +++++++ 1 file changed, 7 insertions(+)
sound/soc/amd/yc/acp6x-mach.c +7 -0
@@ -251,6 +251,13 @@ static const struct dmi_system_id yc_acp { .driver_data = &acp6x_card, .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"LENOVO" ), + DMI_MATCH(DMI_PRODUCT_NAME, "83AS"), + } + }, + { + .driver_data = &acp6x_card, + .matches = {DMI_MATCH (DMI_BOARD_VENDOR ,"ASUSTeK COMPUTER INC." ), DMI_MATCH(DMI_PRODUCT_NAME, "UM5302TA"), }
Greg Kroah-Hartman
maintainerPATCH 270/309 tools/rv: Fix curr_reactor uninitialized variable
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Bristot de Oliveira <[email protected]>
commit 61ec586bc0815959d3314cf7ce242529c977b357 upstream.
clang is reporting:
$ make HOSTCC=clang CC=clang LLVM_IAS=1
clang -O -g -DVERSION=\"6.8.0-rc3\" -flto=auto -fexceptions
-fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS $(pkg-config --cflags libtracefs) -I include -c -o src/in_kernel.o src/in_kernel.c
[...]
src/in_kernel.c:227:6: warning: variable 'curr_reactor' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
227 | if (!end)
| ^~~~
src/in_kernel.c:242:9: note: uninitialized use occurs here
242 | return curr_reactor;
| ^~~~~~~~~~~~
src/in_kernel.c:227:2: note: remove the 'if' if its condition is always false
227 | if (!end)
| ^~~~~~~~~
228 | goto out_free;
| ~~~~~~~~~~~~~
src/in_kernel.c:221:6: warning: variable 'curr_reactor' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
221 | if (!start)
| ^~~~~~
src/in_kernel.c:242:9: note: uninitialized use occurs here
242 | return curr_reactor;
| ^~~~~~~~~~~~
src/in_kernel.c:221:2: note: remove the 'if' if its condition is always false
221 | if (!start)
| ^~~~~~~~~~~
222 | goto out_free;
| ~~~~~~~~~~~~~
src/in_kernel.c:215:20: note: initialize the variable 'curr_reactor' to silence this warning
215 | char *curr_reactor;
| ^
| = NULL2 warnings generated.
Which is correct. Setting curr_reactor to NULL avoids the problem.
--- tools/verification/rv/src/in_kernel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/verification/rv/src/in_kernel.c +1 -1
@@ -210,9 +210,9 @@ static char *ikm_read_reactor(char *monistatic char *ikm_get_current_reactor (char *monitor_name) {char *reactors =ikm_read_reactor (monitor_name); +char *curr_reactor =NULL ;char *start;char *end; -char *curr_reactor;if (!reactors)return NULL ;
Greg Kroah-Hartman
maintainerPATCH 271/309 tools/rv: Fix Makefile compiler options for clang
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Bristot de Oliveira <[email protected]>
commit f9b2c87105c989a7b259c6da87673ada96dce2f8 upstream.
The following errors are showing up when compiling rv with clang:
$ make HOSTCC=clang CC=clang LLVM_IAS=1 [...] clang -O -g -DVERSION=\"6.8.0-rc1\" -flto=auto -ffat-lto-objects -fexceptions -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -Wno-maybe-uninitialized $(pkg-config --cflags libtracefs) -I include -c -o src/utils.o src/utils.c clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument] warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option] 1 warning generated.
clang -o rv -ggdb src/in_kernel.o src/rv.o src/trace.o src/utils.o $(pkg-config --libs libtracefs) src/in_kernel.o: file not recognized: file format not recognized
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:110: rv] Error 1
Solve these issues by:
- removing -ffat-lto-objects and -Wno-maybe-uninitialized if using clang
- informing the linker about -flto=auto
--- tools/verification/rv/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
tools/verification/rv/Makefile +6 -1
@@ -28,10 +28,15 @@ FOPTS := -flto=auto -ffat-lto-objects -f -fasynchronous-unwind-tables -fstack-clash-protection WOPTS := -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -Wno-maybe-uninitialized +ifeq ($(CC),clang) + FOPTS := $(filter-out -ffat-lto-objects, $(FOPTS)) + WOPTS := $(filter-out -Wno-maybe-uninitialized, $(WOPTS)) +endif + TRACEFS_HEADERS := $$($(PKG_CONFIG) --cflags libtracefs) CFLAGS := -O -g -DVERSION=\"$(VERSION)\" $(FOPTS) $(MOPTS) $(WOPTS) $(TRACEFS_HEADERS) $(EXTRA_CFLAGS) -I include -LDFLAGS := -ggdb $(EXTRA_LDFLAGS) +LDFLAGS := -flto=auto -ggdb $(EXTRA_LDFLAGS) LIBS := $$($(PKG_CONFIG) --libs libtracefs) SRC := $(wildcard src/*.c)
Greg Kroah-Hartman
maintainerPATCH 272/309 tools/rtla: Remove unused sched_getattr() function
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Bristot de Oliveira <[email protected]>
commit 084ce16df0f060efd371092a09a7ae74a536dc11 upstream.
Clang is reporting:
$ make HOSTCC=clang CC=clang LLVM_IAS=1
[...]
clang -O -g -DVERSION=\"6.8.0-rc3\" -flto=auto -fexceptions -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS $(pkg-config --cflags libtracefs) -c -o src/utils.o src/utils.c
src/utils.c:241:19: warning: unused function 'sched_getattr' [-Wunused-function]
241 | static inline int sched_getattr(pid_t pid, struct sched_attr *attr,
| ^~~~~~~~~~~~~
1 warning generated.Which is correct, so remove the unused function.
--- tools/tracing/rtla/src/utils.c | 6 ------ 1 file changed, 6 deletions(-)
tools/tracing/rtla/src/utils.c +0 -6
@@ -238,12 +238,6 @@ static inline int sched_setattr(pid_t pireturn syscall (__NR_sched_setattr, pid, attr, flags); } -static inline int sched_getattr (pid_t pid,struct sched_attr *attr, -unsigned int size,unsigned int flags) -{ -return syscall (__NR_sched_getattr, pid, attr, size, flags); -} -int __set_sched_attr (int pid,struct sched_attr *attr) {int flags =0 ;
Greg Kroah-Hartman
maintainerPATCH 273/309 tools/rtla: Replace setting prio with nice for SCHED_OTHER
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: limingming3 <[email protected]>
commit 14f08c976ffe0d2117c6199c32663df1cbc45c65 upstream.
Since the sched_priority for SCHED_OTHER is always 0, it makes no sence to set it.
Setting nice for SCHED_OTHER seems more meaningful.
--- tools/tracing/rtla/src/utils.c | 6 +++--- tools/tracing/rtla/src/utils.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-)
tools/tracing/rtla/src/utils.c +3 -3
@@ -473,13 +473,13 @@ int parse_prio(char *arg, struct sched_aif (prio ==INVALID_VAL )return -1 ; -if (prio <sched_get_priority_min (SCHED_OTHER )) +if (prio <MIN_NICE )return -1 ; -if (prio >sched_get_priority_max (SCHED_OTHER )) +if (prio >MAX_NICE )return -1 ; sched_param->sched_policy =SCHED_OTHER ; - sched_param->sched_priority = prio; + sched_param->sched_nice = prio;break ;default :return -1 ;
tools/tracing/rtla/src/utils.h +2 -0
@@ -9,6 +9,8 @@*/ #define BUFF_U64_STR_SIZE 24#define MAX_PATH 1024 +#define MAX_NICE 20 +#define MIN_NICE -19#define container_of (ptr, type, member)({ \ const typeof(((type *)0)->member) *__mptr = (ptr); \
Greg Kroah-Hartman
maintainerPATCH 274/309 tools/rtla: Fix clang warning about mount_point var size
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Bristot de Oliveira <[email protected]>
commit 30369084ac6e27479a347899e74f523e6ca29b89 upstream.
clang is reporting this warning:
$ make HOSTCC=clang CC=clang LLVM_IAS=1 [...] clang -O -g -DVERSION=\"6.8.0-rc3\" -flto=auto -fexceptions -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS $(pkg-config --cflags libtracefs) -c -o src/utils.o src/utils.c
src/utils.c:548:66: warning: 'fscanf' may overflow; destination buffer in argument 3 has size 1024, but the corresponding specifier may require size 1025 [-Wfortify-source]
548 | while (fscanf(fp, "%*s %" STR(MAX_PATH) "s %99s %*s %*d %*d\n", mount_point, type) == 2) {
| ^
Increase mount_point variable size to MAX_PATH+1 to avoid the overflow.
--- tools/tracing/rtla/src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/tracing/rtla/src/utils.c +1 -1
@@ -530,7 +530,7 @@ int set_cpu_dma_latency(int32_t latency)*/ static const int find_mount (const char *fs,char *mp,int sizeof_mp) { -char mount_point[MAX_PATH ]; +char mount_point[MAX_PATH +1 ];char type[100 ];int found =0 ;FILE *fp;
Greg Kroah-Hartman
maintainerPATCH 275/309 tools/rtla: Exit with EXIT_SUCCESS when help is invoked
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Kacur <[email protected]>
commit b5f319360371087d52070d8f3fc7789e80ce69a6 upstream.
Fix rtla so that the following commands exit with 0 when help is invoked
rtla osnoise top -h
rtla osnoise hist -h
rtla timerlat top -h
rtla timerlat hist -h
--- tools/tracing/rtla/src/osnoise_hist.c | 6 +++++- tools/tracing/rtla/src/osnoise_top.c | 6 +++++- tools/tracing/rtla/src/timerlat_hist.c | 6 +++++- tools/tracing/rtla/src/timerlat_top.c | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-)
tools/tracing/rtla/src/osnoise_hist.c +5 -1
@@ -480,7 +480,11 @@ static void osnoise_hist_usage(char *usafor (i =0 ; msg[i]; i++)fprintf (stderr,"%s\n" , msg[i]); -exit (1 ); + +if (usage) +exit (EXIT_FAILURE ); + +exit (EXIT_SUCCESS ); }/*
tools/tracing/rtla/src/osnoise_top.c +5 -1
@@ -331,7 +331,11 @@ static void osnoise_top_usage(struct osnfor (i =0 ; msg[i]; i++)fprintf (stderr,"%s\n" , msg[i]); -exit (1 ); + +if (usage) +exit (EXIT_FAILURE ); + +exit (EXIT_SUCCESS ); }/*
tools/tracing/rtla/src/timerlat_hist.c +5 -1
@@ -546,7 +546,11 @@ static void timerlat_hist_usage(char *usfor (i =0 ; msg[i]; i++)fprintf (stderr,"%s\n" , msg[i]); -exit (1 ); + +if (usage) +exit (EXIT_FAILURE ); + +exit (EXIT_SUCCESS ); }/*
tools/tracing/rtla/src/timerlat_top.c +5 -1
@@ -375,7 +375,11 @@ static void timerlat_top_usage(char *usafor (i =0 ; msg[i]; i++)fprintf (stderr,"%s\n" , msg[i]); -exit (1 ); + +if (usage) +exit (EXIT_FAILURE ); + +exit (EXIT_SUCCESS ); }/*
Greg Kroah-Hartman
maintainerPATCH 276/309 tools/rtla: Fix uninitialized bucket/data->bucket_size warning
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Bristot de Oliveira <[email protected]>
commit 64dc40f7523369912d7adb22c8cb655f71610505 upstream.
When compiling rtla with clang, I am getting the following warnings:
$ make HOSTCC=clang CC=clang LLVM_IAS=1
[..]
clang -O -g -DVERSION=\"6.8.0-rc3\" -flto=auto -fexceptions
-fstack-protector-strong -fasynchronous-unwind-tables
-fstack-clash-protection -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
$(pkg-config --cflags libtracefs)
-c -o src/osnoise_hist.o src/osnoise_hist.csrc/osnoise_hist.c:138:6: warning: variable 'bucket' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
138 | if (data->bucket_size)
| ^~~~~~~~~~~~~~~~~
src/osnoise_hist.c:149:6: note: uninitialized use occurs here
149 | if (bucket < entries)
| ^~~~~~
src/osnoise_hist.c:138:2: note: remove the 'if' if its condition is always true
138 | if (data->bucket_size)
| ^~~~~~~~~~~~~~~~~~~~~~
139 | bucket = duration / data->bucket_size;
src/osnoise_hist.c:132:12: note: initialize the variable 'bucket' to silence this warning
132 | int bucket;
| ^
| = 01 warning generated.
[...]
clang -O -g -DVERSION=\"6.8.0-rc3\" -flto=auto -fexceptions
-fstack-protector-strong -fasynchronous-unwind-tables
-fstack-clash-protection -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
$(pkg-config --cflags libtracefs)
-c -o src/timerlat_hist.o src/timerlat_hist.csrc/timerlat_hist.c:181:6: warning: variable 'bucket' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
181 | if (data->bucket_size)
| ^~~~~~~~~~~~~~~~~
src/timerlat_hist.c:204:6: note: uninitialized use occurs here
204 | if (bucket < entries)
| ^~~~~~
src/timerlat_hist.c:181:2: note: remove the 'if' if its condition is always true
181 | if (data->bucket_size)
| ^~~~~~~~~~~~~~~~~~~~~~
182 | bucket = latency / data->bucket_size;
src/timerlat_hist.c:175:12: note: initialize the variable 'bucket' to silence this warning
175 | int bucket;
| ^
| = 01 warning generated.
This is a legit warning, but data->bucket_size is always > 0 (see timerlat_hist_parse_args()), so the if is not necessary.
Remove the unneeded if (data->bucket_size) to avoid the warning.
--- tools/tracing/rtla/src/osnoise_hist.c | 3 +-- tools/tracing/rtla/src/timerlat_hist.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
tools/tracing/rtla/src/osnoise_hist.c +1 -2
@@ -135,8 +135,7 @@ static void osnoise_hist_update_multipleif (params->output_divisor) duration = duration / params->output_divisor; -if (data->bucket_size) - bucket = duration / data->bucket_size; + bucket = duration / data->bucket_size; total_duration = duration * count;
tools/tracing/rtla/src/timerlat_hist.c +1 -2
@@ -178,8 +178,7 @@ timerlat_hist_update(struct osnoise_toolif (params->output_divisor) latency = latency / params->output_divisor; -if (data->bucket_size) - bucket = latency / data->bucket_size; + bucket = latency / data->bucket_size;if (!context) { hist = data->hist[cpu].irq;
Greg Kroah-Hartman
maintainerPATCH 277/309 tools/rtla: Fix Makefile compiler options for clang
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Bristot de Oliveira <[email protected]>
commit bc4cbc9d260ba8358ca63662919f4bb223cb603b upstream.
The following errors are showing up when compiling rtla with clang:
$ make HOSTCC=clang CC=clang LLVM_IAS=1 [...]
clang -O -g -DVERSION=\"6.8.0-rc1\" -flto=auto -ffat-lto-objects
-fexceptions -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -Wno-maybe-uninitialized $(pkg-config --cflags libtracefs) -c -o src/utils.o src/utils.c
clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option] 1 warning generated.
clang -o rtla -ggdb src/osnoise.o src/osnoise_hist.o src/osnoise_top.o src/rtla.o src/timerlat_aa.o src/timerlat.o src/timerlat_hist.o src/timerlat_top.o src/timerlat_u.o src/trace.o src/utils.o $(pkg-config --libs libtracefs)
src/osnoise.o: file not recognized: file format not recognized
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:110: rtla] Error 1
Solve these issues by:
- removing -ffat-lto-objects and -Wno-maybe-uninitialized if using clang
- informing the linker about -flto=auto
--- tools/tracing/rtla/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
tools/tracing/rtla/Makefile +6 -1
@@ -28,10 +28,15 @@ FOPTS := -flto=auto -ffat-lto-objects -f -fasynchronous-unwind-tables -fstack-clash-protection WOPTS := -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -Wno-maybe-uninitialized +ifeq ($(CC),clang) + FOPTS := $(filter-out -ffat-lto-objects, $(FOPTS)) + WOPTS := $(filter-out -Wno-maybe-uninitialized, $(WOPTS)) +endif + TRACEFS_HEADERS := $$($(PKG_CONFIG) --cflags libtracefs) CFLAGS := -O -g -DVERSION=\"$(VERSION)\" $(FOPTS) $(MOPTS) $(WOPTS) $(TRACEFS_HEADERS) $(EXTRA_CFLAGS) -LDFLAGS := -ggdb $(EXTRA_LDFLAGS) +LDFLAGS := -flto=auto -ggdb $(EXTRA_LDFLAGS) LIBS := $$($(PKG_CONFIG) --libs libtracefs) SRC := $(wildcard src/*.c)
Greg Kroah-Hartman
maintainerPATCH 278/309 fs: relax mount_setattr() permission checks
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Brauner <[email protected]>
commit 46f5ab762d048dad224436978315cbc2fa79c630 upstream.
When we added mount_setattr() I added additional checks compared to the legacy do_reconfigure_mnt() and do_change_type() helpers used by regular mount(2). If that mount had a parent then verify that the caller and the mount namespace the mount is attached to match and if not make sure that it's an anonymous mount.
The real rootfs falls into neither category. It is neither an anoymous mount because it is obviously attached to the initial mount namespace but it also obviously doesn't have a parent mount. So that means legacy mount(2) allows changing mount properties on the real rootfs but mount_setattr(2) blocks this. I never thought much about this but of course someone on this planet of earth changes properties on the real rootfs as can be seen in [1].
Since util-linux finally switched to the new mount api in 2.39 not so long ago it also relies on mount_setattr() and that surfaced this issue when Fedora 39 finally switched to it. Fix this.
--- fs/namespace.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
fs/namespace.c +8 -3
@@ -4472,10 +4472,15 @@ static int do_mount_setattr(struct path/* * If this is an attached mount make sure it's located in the callers * mount namespace. If it's not don't let the caller interact with it. -* If this is a detached mount make sure it has an anonymous mount -* namespace attached to it, i.e. we've created it via OPEN_TREE_CLONE. +* +* If this mount doesn't have a parent it's most often simply a +* detached mount with an anonymous mount namespace. IOW, something +* that's simply not attached yet. But there are apparently also users +* that do change mount properties on the rootfs itself. That obviously +* neither has a parent nor is it a detached mount so we cannot +* unconditionally check for detached mounts. */ -if (!(mnt_has_parent (mnt) ?check_mnt (mnt) :is_anon_ns (mnt->mnt_ns))) +if ((mnt_has_parent (mnt) || !is_anon_ns (mnt->mnt_ns)) && !check_mnt (mnt)) goto out;/*
Greg Kroah-Hartman
maintainerPATCH 279/309 net: ethernet: ti: cpsw: enable mac_managed_pm to fix mdio
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sinthu Raja <[email protected]>
commit bc4ce46b1e3d1da4309405cd4afc7c0fcddd0b90 upstream.
The below commit introduced a WARN when phy state is not in the states:PHY_HALTED, PHY_READY and PHY_UP.
commit 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state")
When cpsw resumes, there have port in PHY_NOLINK state, so the below warning comes out. Set mac_managed_pm be true to tell mdio that the phy resume/suspend is managed by the mac, to fix the following warning:
WARNING: CPU: 0 PID: 965 at drivers/net/phy/phy_device.c:326 mdio_bus_phy_resume+0x140/0x144 CPU: 0 PID: 965 Comm: sh Tainted: G O 6.1.46-g247b2535b2 #1 Hardware name: Generic AM33XX (Flattened Device Tree) unwind_backtrace from show_stack+0x18/0x1c show_stack from dump_stack_lvl+0x24/0x2c dump_stack_lvl from __warn+0x84/0x15c __warn from warn_slowpath_fmt+0x1a8/0x1c8 warn_slowpath_fmt from mdio_bus_phy_resume+0x140/0x144 mdio_bus_phy_resume from dpm_run_callback+0x3c/0x140 dpm_run_callback from device_resume+0xb8/0x2b8 device_resume from dpm_resume+0x144/0x314 dpm_resume from dpm_resume_end+0x14/0x20 dpm_resume_end from suspend_devices_and_enter+0xd0/0x924 suspend_devices_and_enter from pm_suspend+0x2e0/0x33c pm_suspend from state_store+0x74/0xd0 state_store from kernfs_fop_write_iter+0x104/0x1ec kernfs_fop_write_iter from vfs_write+0x1b8/0x358 vfs_write from ksys_write+0x78/0xf8 ksys_write from ret_fast_syscall+0x0/0x54 Exception stack(0xe094dfa8 to 0xe094dff0)
dfa0: 00000004 005c3fb8 00000001 005c3fb8 00000004 00000001
dfc0: 00000004 005c3fb8 b6f6bba0 00000004 00000004 0059edb8 00000000 00000000
dfe0: 00000004 bed918f0 b6f09bd3 b6e89a66
--- drivers/net/ethernet/ti/cpsw.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/ti/cpsw.c +2 -0
@@ -631,6 +631,8 @@ static void cpsw_slave_open(struct cpsw_ } } + phy->mac_managed_pm = true; + slave->phy = phy;phy_attached_info (slave->phy);
Greg Kroah-Hartman
maintainerPATCH 280/309 s390/qeth: Fix potential loss of L3-IP@ in case of network issues
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexandra Winter <[email protected]>
commit 2fe8a236436fe40d8d26a1af8d150fc80f04ee1a upstream.
Symptom:
In case of a bad cable connection (e.g. dirty optics) a fast sequence of network DOWN-UP-DOWN-UP could happen. UP triggers recovery of the qeth interface. In case of a second DOWN while recovery is still ongoing, it can happen that the IP@ of a Layer3 qeth interface is lost and will not be recovered by the second UP.
Problem:
When registration of IP addresses with Layer 3 qeth devices fails, (e.g. because of bad address format) the respective IP address is deleted from its hash-table in the driver. If registration fails because of a ENETDOWN condition, the address should stay in the hashtable, so a subsequent recovery can restore it.
3caa4af834df ("qeth: keep ip-address after LAN_OFFLINE failure") fixes this for registration failures during normal operation, but not during recovery.
Solution:
Keep L3-IP address in case of ENETDOWN in qeth_l3_recover_ip(). For consistency with qeth_l3_add_ip() we also keep it in case of EADDRINUSE, i.e. for some reason the card already/still has this address registered.
--- drivers/s390/net/qeth_l3_main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/s390/net/qeth_l3_main.c +6 -3
@@ -255,9 +255,10 @@ static void qeth_l3_clear_ip_htable(struif (!recover) {hash_del (&addr->hnode);kfree (addr); -continue ; + }else { +/* prepare for recovery */ + addr->disp_flag =QETH_DISP_ADDR_ADD ; } - addr->disp_flag =QETH_DISP_ADDR_ADD ; }mutex_unlock (&card->ip_lock);
@@ -278,9 +279,11 @@ static void qeth_l3_recover_ip(struct qeif (addr->disp_flag ==QETH_DISP_ADDR_ADD ) { rc =qeth_l3_register_addr_entry (card, addr); -if (!rc) { +if (!rc || rc == -EADDRINUSE || rc == -ENETDOWN ) { +/* keep it in the records */ addr->disp_flag =QETH_DISP_ADDR_DO_NOTHING ; }else { +/* bad address */ hash_del (&addr->hnode);kfree (addr); }
Greg Kroah-Hartman
maintainerPATCH 281/309 mm/damon/sysfs-schemes: fix wrong DAMOS tried regions update timeout setup
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: SeongJae Park <[email protected]>
commit b9e4bc1046d20e0623a80660ef8627448056f817 upstream.
DAMON sysfs interface's update_schemes_tried_regions command has a timeout of two apply intervals of the DAMOS scheme. Having zero value DAMOS scheme apply interval means it will use the aggregation interval as the value. However, the timeout setup logic is mistakenly using the sampling interval insted of the aggregartion interval for the case. This could cause earlier-than-expected timeout of the command. Fix it.
--- mm/damon/sysfs-schemes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/damon/sysfs-schemes.c +1 -1
@@ -1928,7 +1928,7 @@ static void damos_tried_regions_init_upd sysfs_regions->upd_timeout_jiffies = jiffies +2 *usecs_to_jiffies (scheme->apply_interval_us ? scheme->apply_interval_us : - ctx->attrs.sample_interval); + ctx->attrs.aggr_interval); } }
Greg Kroah-Hartman
maintainerPATCH 282/309 net: ethernet: ti: cpsw_new: enable mac_managed_pm to fix mdio
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sinthu Raja <[email protected]>
commit 9def04e759caa5a3d741891037ae99f81e2fff01 upstream.
The below commit introduced a WARN when phy state is not in the states:PHY_HALTED, PHY_READY and PHY_UP.
commit 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state")
When cpsw_new resumes, there have port in PHY_NOLINK state, so the below warning comes out. Set mac_managed_pm be true to tell mdio that the phy resume/suspend is managed by the mac, to fix the following warning:
WARNING: CPU: 0 PID: 965 at drivers/net/phy/phy_device.c:326 mdio_bus_phy_resume+0x140/0x144 CPU: 0 PID: 965 Comm: sh Tainted: G O 6.1.46-g247b2535b2 #1 Hardware name: Generic AM33XX (Flattened Device Tree) unwind_backtrace from show_stack+0x18/0x1c show_stack from dump_stack_lvl+0x24/0x2c dump_stack_lvl from __warn+0x84/0x15c __warn from warn_slowpath_fmt+0x1a8/0x1c8 warn_slowpath_fmt from mdio_bus_phy_resume+0x140/0x144 mdio_bus_phy_resume from dpm_run_callback+0x3c/0x140 dpm_run_callback from device_resume+0xb8/0x2b8 device_resume from dpm_resume+0x144/0x314 dpm_resume from dpm_resume_end+0x14/0x20 dpm_resume_end from suspend_devices_and_enter+0xd0/0x924 suspend_devices_and_enter from pm_suspend+0x2e0/0x33c pm_suspend from state_store+0x74/0xd0 state_store from kernfs_fop_write_iter+0x104/0x1ec kernfs_fop_write_iter from vfs_write+0x1b8/0x358 vfs_write from ksys_write+0x78/0xf8 ksys_write from ret_fast_syscall+0x0/0x54 Exception stack(0xe094dfa8 to 0xe094dff0)
dfa0: 00000004 005c3fb8 00000001 005c3fb8 00000004 00000001
dfc0: 00000004 005c3fb8 b6f6bba0 00000004 00000004 0059edb8 00000000 00000000
dfe0: 00000004 bed918f0 b6f09bd3 b6e89a66
--- drivers/net/ethernet/ti/cpsw_new.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/ti/cpsw_new.c +3 -0
@@ -773,6 +773,9 @@ static void cpsw_slave_open(struct cpsw_ slave->slave_num);return ; } + + phy->mac_managed_pm = true; + slave->phy = phy;phy_attached_info (slave->phy);
Greg Kroah-Hartman
maintainerPATCH 283/309 pmdomain: renesas: r8a77980-sysc: CR7 must be always on
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
commit f0e4a1356466ec1858ae8e5c70bea2ce5e55008b upstream.
The power domain containing the Cortex-R7 CPU core on the R-Car V3H SoC must always be in power-on state, unlike on other SoCs in the R-Car Gen3 family. See Table 9.4 "Power domains" in the R-Car Series, 3rd Generation Hardware User’s Manual Rev.1.00 and later.
Fix this by marking the domain as a CPU domain without control registers, so the driver will not touch it.
--- drivers/pmdomain/renesas/r8a77980-sysc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pmdomain/renesas/r8a77980-sysc.c +2 -1
@@ -25,7 +25,8 @@ static const struct rcar_sysc_area r8a77 PD_CPU_NOCR }, {"ca53-cpu3" ,0x200 ,3 ,R8A77980_PD_CA53_CPU3 ,R8A77980_PD_CA53_SCU , PD_CPU_NOCR }, - { "cr7", 0x240, 0, R8A77980_PD_CR7, R8A77980_PD_ALWAYS_ON }, + { "cr7", 0x240, 0, R8A77980_PD_CR7, R8A77980_PD_ALWAYS_ON, + PD_CPU_NOCR }, { "a3ir", 0x180, 0, R8A77980_PD_A3IR, R8A77980_PD_ALWAYS_ON }, { "a2ir0", 0x400, 0, R8A77980_PD_A2IR0, R8A77980_PD_A3IR }, { "a2ir1", 0x400, 1, R8A77980_PD_A2IR1, R8A77980_PD_A3IR },
Greg Kroah-Hartman
maintainerPATCH 284/309 riscv/efistub: Ensure GP-relative addressing is not used
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Kiszka <[email protected]>
commit afb2a4fb84555ef9e61061f6ea63ed7087b295d5 upstream.
The cflags for the RISC-V efistub were missing -mno-relax, thus were under the risk that the compiler could use GP-relative addressing. That happened for _edata with binutils-2.41 and kernel 6.1, causing the relocation to fail due to an invalid kernel_size in handle_kernel_image. It was not yet observed with newer versions, but that may just be luck.
--- drivers/firmware/efi/libstub/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/libstub/Makefile +1 -1
@@ -28,7 +28,7 @@ cflags-$(CONFIG_ARM) += -DEFI_HAVE_STRL -DEFI_HAVE_MEMCHR -DEFI_HAVE_STRRCHR \ -DEFI_HAVE_STRCMP -fno-builtin -fpic \ $(call cc-option,-mno-single-pic-base) -cflags-$(CONFIG_RISCV) += -fpic -DNO_ALTERNATIVE +cflags-$(CONFIG_RISCV) += -fpic -DNO_ALTERNATIVE -mno-relax cflags-$(CONFIG_LOONGARCH) += -fpie cflags-$(CONFIG_EFI_PARAMS_FROM_FDT) += -I$(srctree)/scripts/dtc/libfdt
Greg Kroah-Hartman
maintainerPATCH 285/309 net: stmmac: protect updates of 64-bit statistics counters
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Petr Tesarik <[email protected]>
commit 38cc3c6dcc09dc3a1800b5ec22aef643ca11eab8 upstream.
As explained by a comment in <linux/u64_stats_sync.h>, write side of struct u64_stats_sync must ensure mutual exclusion, or one seqcount update could be lost on 32-bit platforms, thus blocking readers forever. Such lockups have been observed in real world after stmmac_xmit() on one CPU raced with stmmac_napi_poll_tx() on another CPU.
To fix the issue without introducing a new lock, split the statics into three parts:
1. fields updated only under the tx queue lock,
2. fields updated only during NAPI poll,
3. fields updated only from interrupt context,
Updates to fields in the first two groups are already serialized through other locks. It is sufficient to split the existing struct u64_stats_sync so that each group has its own.
Note that tx_set_ic_bit is updated from both contexts. Split this counter so that each context gets its own, and calculate their sum to get the total value in stmmac_get_ethtool_stats().
For the third group, multiple interrupts may be processed by different CPUs at the same time, but interrupts on the same CPU will not nest. Move fields from this group to a newly created per-cpu struct stmmac_pcpu_stats.
--- drivers/net/ethernet/stmicro/stmmac/common.h | 56 +++++--- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 15 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c | 15 +- drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 15 +- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 15 +- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 129 ++++++++++++------ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 133 +++++++++---------- 7 files changed, 221 insertions(+), 157 deletions(-)
drivers/net/ethernet/stmicro/stmmac/common.h +40 -16
@@ -59,28 +59,51 @@#undef FRAME_FILTER_DEBUG/* #define FRAME_FILTER_DEBUG */ +struct stmmac_q_tx_stats { +u64_stats_t tx_bytes; +u64_stats_t tx_set_ic_bit; +u64_stats_t tx_tso_frames; +u64_stats_t tx_tso_nfrags; +}; + +struct stmmac_napi_tx_stats { +u64_stats_t tx_packets; +u64_stats_t tx_pkt_n; +u64_stats_t poll; +u64_stats_t tx_clean; +u64_stats_t tx_set_ic_bit; +}; +struct stmmac_txq_stats { -u64 tx_bytes; -u64 tx_packets; -u64 tx_pkt_n; -u64 tx_normal_irq_n; -u64 napi_poll; -u64 tx_clean; -u64 tx_set_ic_bit; -u64 tx_tso_frames; -u64 tx_tso_nfrags; -struct u64_stats_sync syncp; +/* Updates protected by tx queue lock. */ +struct u64_stats_sync q_syncp; +struct stmmac_q_tx_stats q; + +/* Updates protected by NAPI poll logic. */ +struct u64_stats_sync napi_syncp; +struct stmmac_napi_tx_stats napi; }____cacheline_aligned_in_smp ; +struct stmmac_napi_rx_stats { +u64_stats_t rx_bytes; +u64_stats_t rx_packets; +u64_stats_t rx_pkt_n; +u64_stats_t poll; +}; +struct stmmac_rxq_stats { -u64 rx_bytes; -u64 rx_packets; -u64 rx_pkt_n; -u64 rx_normal_irq_n; -u64 napi_poll; -struct u64_stats_sync syncp; +/* Updates protected by NAPI poll logic. */ +struct u64_stats_sync napi_syncp; +struct stmmac_napi_rx_stats napi; }____cacheline_aligned_in_smp ; +/* Updates on each CPU protected by not allowing nested irqs. */ +struct stmmac_pcpu_stats { +struct u64_stats_sync syncp; +u64_stats_t rx_normal_irq_n[MTL_MAX_TX_QUEUES ]; +u64_stats_t tx_normal_irq_n[MTL_MAX_RX_QUEUES ]; +}; +/* Extra statistic and debug information exposed by ethtool */ struct stmmac_extra_stats {/* Transmit errors */
@@ -205,6 +228,7 @@ struct stmmac_extra_stats {/* per queue statistics */ struct stmmac_txq_stats txq_stats[MTL_MAX_TX_QUEUES ];struct stmmac_rxq_stats rxq_stats[MTL_MAX_RX_QUEUES ]; +struct stmmac_pcpu_stats __percpu *pcpu_stats;unsigned long rx_dropped;unsigned long rx_errors;unsigned long tx_dropped;
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +7 -8
@@ -441,8 +441,7 @@ static int sun8i_dwmac_dma_interrupt(str struct stmmac_extra_stats *x, u32 chan, u32 dir) { - struct stmmac_rxq_stats *rxq_stats = &priv->xstats.rxq_stats[chan]; -struct stmmac_txq_stats *txq_stats = &priv->xstats.txq_stats[chan]; + struct stmmac_pcpu_stats *stats = this_cpu_ptr(priv->xstats.pcpu_stats);int ret =0 ;u32 v;
@@ -455,9 +454,9 @@ static int sun8i_dwmac_dma_interrupt(strif (v &EMAC_TX_INT ) { ret |= handle_tx; -u64_stats_update_begin (&txq_stats->syncp); - txq_stats->tx_normal_irq_n++; -u64_stats_update_end (&txq_stats->syncp); +u64_stats_update_begin (&stats->syncp); +u64_stats_inc (&stats->tx_normal_irq_n[chan]); +u64_stats_update_end (&stats->syncp); }if (v &EMAC_TX_DMA_STOP_INT )
@@ -479,9 +478,9 @@ static int sun8i_dwmac_dma_interrupt(strif (v &EMAC_RX_INT ) { ret |= handle_rx; -u64_stats_update_begin (&rxq_stats->syncp); - rxq_stats->rx_normal_irq_n++; -u64_stats_update_end (&rxq_stats->syncp); +u64_stats_update_begin (&stats->syncp); +u64_stats_inc (&stats->rx_normal_irq_n[chan]); +u64_stats_update_end (&stats->syncp); }if (v &EMAC_RX_BUF_UA_INT )
drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c +7 -8
@@ -171,8 +171,7 @@ int dwmac4_dma_interrupt(struct stmmac_pconst struct dwmac4_addrs *dwmac4_addrs = priv->plat->dwmac4_addrs;u32 intr_status =readl (ioaddr +DMA_CHAN_STATUS (dwmac4_addrs, chan));u32 intr_en =readl (ioaddr +DMA_CHAN_INTR_ENA (dwmac4_addrs, chan)); -struct stmmac_rxq_stats *rxq_stats = &priv->xstats.rxq_stats[chan]; -struct stmmac_txq_stats *txq_stats = &priv->xstats.txq_stats[chan]; +struct stmmac_pcpu_stats *stats =this_cpu_ptr (priv->xstats.pcpu_stats);int ret =0 ;if (dir ==DMA_DIR_RX )
@@ -201,15 +200,15 @@ int dwmac4_dma_interrupt(struct stmmac_p }/* TX/RX NORMAL interrupts */ if (likely (intr_status &DMA_CHAN_STATUS_RI )) { -u64_stats_update_begin (&rxq_stats->syncp); - rxq_stats->rx_normal_irq_n++; -u64_stats_update_end (&rxq_stats->syncp); +u64_stats_update_begin (&stats->syncp); +u64_stats_inc (&stats->rx_normal_irq_n[chan]); +u64_stats_update_end (&stats->syncp); ret |= handle_rx; }if (likely (intr_status &DMA_CHAN_STATUS_TI )) { -u64_stats_update_begin (&txq_stats->syncp); - txq_stats->tx_normal_irq_n++; -u64_stats_update_end (&txq_stats->syncp); +u64_stats_update_begin (&stats->syncp); +u64_stats_inc (&stats->tx_normal_irq_n[chan]); +u64_stats_update_end (&stats->syncp); ret |= handle_tx; }
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c +7 -8
@@ -162,8 +162,7 @@ static void show_rx_process_state(unsignint dwmac_dma_interrupt (struct stmmac_priv *priv,void __iomem *ioaddr,struct stmmac_extra_stats *x,u32 chan,u32 dir) { -struct stmmac_rxq_stats *rxq_stats = &priv->xstats.rxq_stats[chan]; -struct stmmac_txq_stats *txq_stats = &priv->xstats.txq_stats[chan]; +struct stmmac_pcpu_stats *stats =this_cpu_ptr (priv->xstats.pcpu_stats);int ret =0 ;/* read the status register (CSR5) */ u32 intr_status =readl (ioaddr +DMA_STATUS );
@@ -215,16 +214,16 @@ int dwmac_dma_interrupt(struct stmmac_pru32 value =readl (ioaddr +DMA_INTR_ENA );/* to schedule NAPI on real RIE event. */ if (likely (value &DMA_INTR_ENA_RIE )) { -u64_stats_update_begin (&rxq_stats->syncp); - rxq_stats->rx_normal_irq_n++; -u64_stats_update_end (&rxq_stats->syncp); +u64_stats_update_begin (&stats->syncp); +u64_stats_inc (&stats->rx_normal_irq_n[chan]); +u64_stats_update_end (&stats->syncp); ret |= handle_rx; } }if (likely (intr_status &DMA_STATUS_TI )) { -u64_stats_update_begin (&txq_stats->syncp); - txq_stats->tx_normal_irq_n++; -u64_stats_update_end (&txq_stats->syncp); +u64_stats_update_begin (&stats->syncp); +u64_stats_inc (&stats->tx_normal_irq_n[chan]); +u64_stats_update_end (&stats->syncp); ret |= handle_tx; }if (unlikely (intr_status &DMA_STATUS_ERI ))
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c +7 -8
@@ -337,8 +337,7 @@ static int dwxgmac2_dma_interrupt(struct struct stmmac_extra_stats *x, u32 chan, u32 dir) { - struct stmmac_rxq_stats *rxq_stats = &priv->xstats.rxq_stats[chan]; -struct stmmac_txq_stats *txq_stats = &priv->xstats.txq_stats[chan]; + struct stmmac_pcpu_stats *stats = this_cpu_ptr(priv->xstats.pcpu_stats);u32 intr_status =readl (ioaddr +XGMAC_DMA_CH_STATUS (chan));u32 intr_en =readl (ioaddr +XGMAC_DMA_CH_INT_EN (chan));int ret =0 ;
@@ -367,15 +366,15 @@ static int dwxgmac2_dma_interrupt(struct/* TX/RX NORMAL interrupts */ if (likely (intr_status &XGMAC_NIS )) {if (likely (intr_status &XGMAC_RI )) { -u64_stats_update_begin (&rxq_stats->syncp); - rxq_stats->rx_normal_irq_n++; -u64_stats_update_end (&rxq_stats->syncp); +u64_stats_update_begin (&stats->syncp); +u64_stats_inc (&stats->rx_normal_irq_n[chan]); +u64_stats_update_end (&stats->syncp); ret |= handle_rx; }if (likely (intr_status & (XGMAC_TI |XGMAC_TBU ))) { -u64_stats_update_begin (&txq_stats->syncp); - txq_stats->tx_normal_irq_n++; -u64_stats_update_end (&txq_stats->syncp); +u64_stats_update_begin (&stats->syncp); +u64_stats_inc (&stats->tx_normal_irq_n[chan]); +u64_stats_update_end (&stats->syncp); ret |= handle_tx; } }
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +87 -42
170 lines not on this page · raw message
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +66 -67
273 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 286/309 hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shradha Gupta <[email protected]>
commit 9cae43da9867412f8bd09aee5c8a8dc5e8dc3dc2 upstream.
If hv_netvsc driver is unloaded and reloaded, the NET_DEVICE_REGISTER handler cannot perform VF register successfully as the register call is received before netvsc_probe is finished. This is because we register register_netdevice_notifier() very early( even before vmbus_driver_register()).
To fix this, we try to register each such matching VF( if it is visible as a netdevice) at the end of netvsc_probe.
--- drivers/net/hyperv/netvsc_drv.c | 82 ++++++++++++++++++++++++++++++---------- 1 file changed, 62 insertions(+), 20 deletions(-)
drivers/net/hyperv/netvsc_drv.c +62 -20
@@ -42,6 +42,10 @@#define LINKCHANGE_INT (2 * HZ)#define VF_TAKEOVER_INT (HZ / 10) +/* Macros to define the context of vf registration */ +#define VF_REG_IN_PROBE 1 +#define VF_REG_IN_NOTIFIER 2 +static unsigned int ring_size__ro_after_init =128 ;module_param (ring_size, uint,0444 );MODULE_PARM_DESC (ring_size,"Ring buffer size (# of 4K pages)" );
@@ -2183,7 +2187,7 @@ static rx_handler_result_t netvsc_vf_han }static int netvsc_vf_join (struct net_device *vf_netdev, -struct net_device *ndev) +struct net_device *ndev,int context) {struct net_device_context *ndev_ctx =netdev_priv (ndev);int ret;
@@ -2206,7 +2210,11 @@ static int netvsc_vf_join(struct net_dev goto upper_link_failed; } -schedule_delayed_work (&ndev_ctx->vf_takeover,VF_TAKEOVER_INT ); +/* If this registration is called from probe context vf_takeover +* is taken care of later in probe itself. +*/ +if (context ==VF_REG_IN_NOTIFIER ) +schedule_delayed_work (&ndev_ctx->vf_takeover,VF_TAKEOVER_INT );call_netdevice_notifiers (NETDEV_JOIN , vf_netdev);
@@ -2344,7 +2352,7 @@ static int netvsc_prepare_bonding(structreturn NOTIFY_DONE ; } -static int netvsc_register_vf (struct net_device *vf_netdev) +static int netvsc_register_vf (struct net_device *vf_netdev,int context) {struct net_device_context *net_device_ctx;struct netvsc_device *netvsc_dev;
@@ -2384,7 +2392,7 @@ static int netvsc_register_vf(struct netnetdev_info (ndev,"VF registering: %s\n" , vf_netdev->name); -if (netvsc_vf_join (vf_netdev, ndev) !=0 ) +if (netvsc_vf_join (vf_netdev, ndev, context) !=0 )return NOTIFY_DONE ;dev_hold (vf_netdev);
@@ -2482,10 +2490,31 @@ static int netvsc_unregister_vf(struct nreturn NOTIFY_OK ; } +static int check_dev_is_matching_vf (struct net_device *event_ndev) +{ +/* Skip NetVSC interfaces */ +if (event_ndev->netdev_ops == &device_ops) +return -ENODEV ; + +/* Avoid non-Ethernet type devices */ +if (event_ndev->type !=ARPHRD_ETHER ) +return -ENODEV ; + +/* Avoid Vlan dev with same MAC registering as VF */ +if (is_vlan_dev (event_ndev)) +return -ENODEV ; + +/* Avoid Bonding master dev with same MAC registering as VF */ +if (netif_is_bond_master (event_ndev)) +return -ENODEV ; + +return 0 ; +} +static int netvsc_probe (struct hv_device *dev,const struct hv_vmbus_device_id *dev_id) { -struct net_device *net =NULL ; +struct net_device *net =NULL , *vf_netdev;struct net_device_context *net_device_ctx;struct netvsc_device_info *device_info =NULL ;struct netvsc_device *nvdev;
@@ -2597,6 +2626,30 @@ static int netvsc_probe(struct hv_device }list_add (&net_device_ctx->list, &netvsc_dev_list); + +/* When the hv_netvsc driver is unloaded and reloaded, the +* NET_DEVICE_REGISTER for the vf device is replayed before probe +* is complete. This is because register_netdevice_notifier() gets +* registered before vmbus_driver_register() so that callback func +* is set before probe and we don't miss events like NETDEV_POST_INIT +* So, in this section we try to register the matching vf device that +* is present as a netdevice, knowing that its register call is not +* processed in the netvsc_netdev_notifier(as probing is progress and +* get_netvsc_byslot fails). +*/ +for_each_netdev (dev_net (net), vf_netdev) { + ret =check_dev_is_matching_vf (vf_netdev); +if (ret !=0 ) +continue ; + +if (net !=get_netvsc_byslot (vf_netdev)) +continue ; + +netvsc_prepare_bonding (vf_netdev); +netvsc_register_vf (vf_netdev,VF_REG_IN_PROBE ); +__netvsc_vf_setup (net, vf_netdev); +break ; + }rtnl_unlock ();netvsc_devinfo_put (device_info);
@@ -2752,28 +2805,17 @@ static int netvsc_netdev_event(struct no unsigned long event, void *ptr) { struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); +int ret =0 ; -/* Skip our own events */ -if (event_dev->netdev_ops == &device_ops) -return NOTIFY_DONE ; - -/* Avoid non-Ethernet type devices */ -if (event_dev->type !=ARPHRD_ETHER ) -return NOTIFY_DONE ; - -/* Avoid Vlan dev with same MAC registering as VF */ -if (is_vlan_dev (event_dev)) -return NOTIFY_DONE ; - -/* Avoid Bonding master dev with same MAC registering as VF */ -if (netif_is_bond_master (event_dev)) + ret =check_dev_is_matching_vf (event_dev); +if (ret !=0 )return NOTIFY_DONE ;switch (event) {case NETDEV_POST_INIT :return netvsc_prepare_bonding (event_dev);case NETDEV_REGISTER : -return netvsc_register_vf (event_dev); +return netvsc_register_vf (event_dev,VF_REG_IN_NOTIFIER );case NETDEV_UNREGISTER :return netvsc_unregister_vf (event_dev);case NETDEV_UP :
Greg Kroah-Hartman
maintainerPATCH 287/309 ceph: prevent use-after-free in encode_cap_msg()
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rishabh Dave <[email protected]>
commit cda4672da1c26835dcbd7aec2bfed954eda9b5ef upstream.
In fs/ceph/caps.c, in encode_cap_msg(), "use after free" error was caught by KASAN at this line - 'ceph_buffer_get(arg->xattr_buf);'. This implies before the refcount could be increment here, it was freed.
In same file, in "handle_cap_grant()" refcount is decremented by this line - 'ceph_buffer_put(ci->i_xattrs.blob);'. It appears that a race occurred and resource was freed by the latter line before the former line could increment it.
encode_cap_msg() is called by __send_cap() and __send_cap() is called by ceph_check_caps() after calling __prep_cap(). __prep_cap() is where arg->xattr_buf is assigned to ci->i_xattrs.blob. This is the spot where the refcount must be increased to prevent "use after free" error.
--- fs/ceph/caps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/ceph/caps.c +2 -1
@@ -1452,7 +1452,7 @@ static void __prep_cap(struct cap_msg_arif (flushing &CEPH_CAP_XATTR_EXCL ) { arg->old_xattr_buf =__ceph_build_xattrs_blob (ci); arg->xattr_version = ci->i_xattrs.version; - arg->xattr_buf = ci->i_xattrs.blob; + arg->xattr_buf =ceph_buffer_get (ci->i_xattrs.blob); }else { arg->xattr_buf =NULL ; arg->old_xattr_buf =NULL ;
@@ -1553,6 +1553,7 @@ static void __send_cap(struct cap_msg_arencode_cap_msg (msg, arg);ceph_con_send (&arg->session->s_con, msg);ceph_buffer_put (arg->old_xattr_buf); +ceph_buffer_put (arg->xattr_buf);if (arg->wake)wake_up_all (&ci->i_cap_wq); }
Greg Kroah-Hartman
maintainerPATCH 288/309 nouveau/gsp: use correct size for registry rpc.
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Airlie <[email protected]>
commit 61712c94782ce105253ee1939cda0c5c025b2c0c upstream.
Timur pointed this out before, and it just slipped my mind, but this might help some things work better, around pcie power management.
--- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c +1 -1
@@ -1111,7 +1111,6 @@ r535_gsp_rpc_set_registry(struct nvkm_gsif (IS_ERR (rpc))return PTR_ERR (rpc); - rpc->size =sizeof (*rpc); rpc->numEntries =NV_GSP_REG_NUM_ENTRIES ; str_offset = offsetof(typeof(*rpc), entries[NV_GSP_REG_NUM_ENTRIES]);
@@ -1127,6 +1126,7 @@ r535_gsp_rpc_set_registry(struct nvkm_gs strings += name_len; str_offset += name_len; } + rpc->size = str_offset;return nvkm_gsp_rpc_wr (gsp, rpc, false); }
Greg Kroah-Hartman
maintainerPATCH 289/309 fs,hugetlb: fix NULL pointer dereference in hugetlbs_fill_super
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oscar Salvador <[email protected]>
commit 79d72c68c58784a3e1cd2378669d51bfd0cb7498 upstream.
When configuring a hugetlb filesystem via the fsconfig() syscall, there is a possible NULL dereference in hugetlbfs_fill_super() caused by assigning NULL to ctx->hstate in hugetlbfs_parse_param() when the requested pagesize is non valid.
E.g: Taking the following steps:
fd = fsopen("hugetlbfs", FSOPEN_CLOEXEC);
fsconfig(fd, FSCONFIG_SET_STRING, "pagesize", "1024", 0);
fsconfig(fd, FSCONFIG_CMD_CREATE, NULL, NULL, 0);Given that the requested "pagesize" is invalid, ctxt->hstate will be replaced with NULL, losing its previous value, and we will print an error:
...
...
case Opt_pagesize:
ps = memparse(param->string, &rest);
ctx->hstate = h;
if (!ctx->hstate) {
pr_err("Unsupported page size %lu MB\n", ps / SZ_1M);
return -EINVAL; }
return 0;
...
...
This is a problem because later on, we will dereference ctxt->hstate in hugetlbfs_fill_super()
...
...
sb->s_blocksize = huge_page_size(ctx->hstate);
...
...
Causing below Oops.
Fix this by replacing cxt->hstate value only when then pagesize is known to be valid.
kernel: hugetlbfs: Unsupported page size 0 MB
kernel: BUG: kernel NULL pointer dereference, address: 0000000000000028
kernel: #PF: supervisor read access in kernel mode
kernel: #PF: error_code(0x0000) - not-present page
kernel: PGD 800000010f66c067 P4D 800000010f66c067 PUD 1b22f8067 PMD 0
kernel: Oops: 0000 [#1] PREEMPT SMP PTI
kernel: CPU: 4 PID: 5659 Comm: syscall Tainted: G E 6.8.0-rc2-default+ #22 5a47c3fef76212addcc6eb71344aabc35190ae8f
kernel: Hardware name: Intel Corp. GROVEPORT/GROVEPORT, BIOS GVPRCRB1.86B.0016.D04.1705030402 05/03/2017
kernel: RIP: 0010:hugetlbfs_fill_super+0xb4/0x1a0
kernel: Code: 48 8b 3b e8 3e c6 ed ff 48 85 c0 48 89 45 20 0f 84 d6 00 00 00 48 b8 ff ff ff ff ff ff ff 7f 4c 89 e7 49 89 44 24 20 48 8b 03 <8b> 48 28 b8 00 10 00 00 48 d3 e0 49 89 44 24 18 48 8b 03 8b 40 28
kernel: RSP: 0018:ffffbe9960fcbd48 EFLAGS: 00010246
kernel: RAX: 0000000000000000 RBX: ffff9af5272ae780 RCX: 0000000000372004
kernel: RDX: ffffffffffffffff RSI: ffffffffffffffff RDI: ffff9af555e9b000
kernel: RBP: ffff9af52ee66b00 R08: 0000000000000040 R09: 0000000000370004
kernel: R10: ffffbe9960fcbd48 R11: 0000000000000040 R12: ffff9af555e9b000
kernel: R13: ffffffffa66b86c0 R14: ffff9af507d2f400 R15: ffff9af507d2f400
kernel: FS: 00007ffbc0ba4740(0000) GS:ffff9b0bd7000000(0000) knlGS:0000000000000000
kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: CR2: 0000000000000028 CR3: 00000001b1ee0000 CR4: 00000000001506f0
kernel: Call Trace:
kernel: <TASK> kernel: ? __die_body+0x1a/0x60 kernel: ? page_fault_oops+0x16f/0x4a0 kernel: ? search_bpf_extables+0x65/0x70 kernel: ? fixup_exception+0x22/0x310 kernel: ? exc_page_fault+0x69/0x150 kernel: ? asm_exc_page_fault+0x22/0x30 kernel: ? __pfx_hugetlbfs_fill_super+0x10/0x10 kernel: ? hugetlbfs_fill_super+0xb4/0x1a0 kernel: ? hugetlbfs_fill_super+0x28/0x1a0 kernel: ? __pfx_hugetlbfs_fill_super+0x10/0x10 kernel: vfs_get_super+0x40/0xa0 kernel: ? __pfx_bpf_lsm_capable+0x10/0x10 kernel: vfs_get_tree+0x25/0xd0 kernel: vfs_cmd_create+0x64/0xe0 kernel: __x64_sys_fsconfig+0x395/0x410 kernel: do_syscall_64+0x80/0x160 kernel: ? syscall_exit_to_user_mode+0x82/0x240 kernel: ? do_syscall_64+0x8d/0x160 kernel: ? syscall_exit_to_user_mode+0x82/0x240 kernel: ? do_syscall_64+0x8d/0x160 kernel: ? exc_page_fault+0x69/0x150 kernel: entry_SYSCALL_64_after_hwframe+0x6e/0x76
kernel: RIP: 0033:0x7ffbc0cb87c9
kernel: Code: 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 97 96 0d 00 f7 d8 64 89 01 48
kernel: RSP: 002b:00007ffc29d2f388 EFLAGS: 00000206 ORIG_RAX: 00000000000001af
kernel: RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ffbc0cb87c9
kernel: RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000003
kernel: RBP: 00007ffc29d2f3b0 R08: 0000000000000000 R09: 0000000000000000
kernel: R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
kernel: R13: 00007ffc29d2f4c0 R14: 0000000000000000 R15: 0000000000000000
kernel: </TASK>
kernel: Modules linked in: rpcsec_gss_krb5(E) auth_rpcgss(E) nfsv4(E) dns_resolver(E) nfs(E) lockd(E) grace(E) sunrpc(E) netfs(E) af_packet(E) bridge(E) stp(E) llc(E) iscsi_ibft(E) iscsi_boot_sysfs(E) intel_rapl_msr(E) intel_rapl_common(E) iTCO_wdt(E) intel_pmc_bxt(E) sb_edac(E) iTCO_vendor_support(E) x86_pkg_temp_thermal(E) intel_powerclamp(E) coretemp(E) kvm_intel(E) rfkill(E) ipmi_ssif(E) kvm(E) acpi_ipmi(E) irqbypass(E) pcspkr(E) igb(E) ipmi_si(E) mei_me(E) i2c_i801(E) joydev(E) intel_pch_thermal(E) i2c_smbus(E) dca(E) lpc_ich(E) mei(E) ipmi_devintf(E) ipmi_msghandler(E) acpi_pad(E) tiny_power_button(E) button(E) fuse(E) efi_pstore(E) configfs(E) ip_tables(E) x_tables(E) ext4(E) mbcache(E) jbd2(E) hid_generic(E) usbhid(E) sd_mod(E) t10_pi(E) crct10dif_pclmul(E) crc32_pclmul(E) crc32c_intel(E) polyval_clmulni(E) ahci(E) xhci_pci(E) polyval_generic(E) gf128mul(E) ghash_clmulni_intel(E) sha512_ssse3(E) sha256_ssse3(E) xhci_pci_renesas(E) libahci(E) ehci_pci(E) sha1_ssse3(E) xhci_hcd(E) ehci_hcd(E) libata(E)
kernel: mgag200(E) i2c_algo_bit(E) usbcore(E) wmi(E) sg(E) dm_multipath(E) dm_mod(E) scsi_dh_rdac(E) scsi_dh_emc(E) scsi_dh_alua(E) scsi_mod(E) scsi_common(E) aesni_intel(E) crypto_simd(E) cryptd(E)
kernel: Unloaded tainted modules: acpi_cpufreq(E):1 fjes(E):1
kernel: CR2: 0000000000000028
kernel: ---[ end trace 0000000000000000 ]---
kernel: RIP: 0010:hugetlbfs_fill_super+0xb4/0x1a0
kernel: Code: 48 8b 3b e8 3e c6 ed ff 48 85 c0 48 89 45 20 0f 84 d6 00 00 00 48 b8 ff ff ff ff ff ff ff 7f 4c 89 e7 49 89 44 24 20 48 8b 03 <8b> 48 28 b8 00 10 00 00 48 d3 e0 49 89 44 24 18 48 8b 03 8b 40 28
kernel: RSP: 0018:ffffbe9960fcbd48 EFLAGS: 00010246
kernel: RAX: 0000000000000000 RBX: ffff9af5272ae780 RCX: 0000000000372004
kernel: RDX: ffffffffffffffff RSI: ffffffffffffffff RDI: ffff9af555e9b000
kernel: RBP: ffff9af52ee66b00 R08: 0000000000000040 R09: 0000000000370004
kernel: R10: ffffbe9960fcbd48 R11: 0000000000000040 R12: ffff9af555e9b000
kernel: R13: ffffffffa66b86c0 R14: ffff9af507d2f400 R15: ffff9af507d2f400
kernel: FS: 00007ffbc0ba4740(0000) GS:ffff9b0bd7000000(0000) knlGS:0000000000000000
kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: CR2: 0000000000000028 CR3: 00000001b1ee0000 CR4: 00000000001506f0
--- fs/hugetlbfs/inode.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
fs/hugetlbfs/inode.c +4 -2
@@ -1354,6 +1354,7 @@ static int hugetlbfs_parse_param(struct {struct hugetlbfs_fs_context *ctx = fc->fs_private;struct fs_parse_result result; +struct hstate *h;char *rest;unsigned long ps;int opt;
@@ -1398,11 +1399,12 @@ static int hugetlbfs_parse_param(structcase Opt_pagesize: ps =memparse (param->string, &rest); - ctx->hstate =size_to_hstate (ps); -if (!ctx->hstate) { + h =size_to_hstate (ps); +if (!h) {pr_err ("Unsupported page size %lu MB\n" , ps /SZ_1M );return -EINVAL ; } + ctx->hstate = h;return 0 ;case Opt_min_size:
Greg Kroah-Hartman
maintainerPATCH 290/309 mm: hugetlb pages should not be reserved by shmat() if SHM_NORESERVE
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Prakash Sangappa <[email protected]>
commit e656c7a9e59607d1672d85ffa9a89031876ffe67 upstream.
For shared memory of type SHM_HUGETLB, hugetlb pages are reserved in shmget() call. If SHM_NORESERVE flags is specified then the hugetlb pages are not reserved. However when the shared memory is attached with the shmat() call the hugetlb pages are getting reserved incorrectly for SHM_HUGETLB shared memory created with SHM_NORESERVE which is a bug.
-------------------------------
Following test shows the issue.
$cat shmhtb.c
int main()
{
int shmflags = 0660 | IPC_CREAT | SHM_HUGETLB | SHM_NORESERVE;
int shmid;
shmid = shmget(SKEY, SHMSZ, shmflags);
if (shmid < 0)
{
printf("shmat: shmget() failed, %d\n", errno);
return 1;
}
printf("After shmget()\n");
system("cat /proc/meminfo | grep -i hugepages_");
shmat(shmid, NULL, 0);
printf("\nAfter shmat()\n");
system("cat /proc/meminfo | grep -i hugepages_");
shmctl(shmid, IPC_RMID, NULL);
return 0;
} #sysctl -w vm.nr_hugepages=20
#./shmhtb
After shmget()
HugePages_Total: 20 HugePages_Free: 20 HugePages_Rsvd: 0 HugePages_Surp: 0
After shmat()
HugePages_Total: 20 HugePages_Free: 20 HugePages_Rsvd: 5 <-- HugePages_Surp: 0
--------------------------------
Fix is to ensure that hugetlb pages are not reserved for SHM_HUGETLB shared memory in the shmat() call.
--- fs/hugetlbfs/inode.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
fs/hugetlbfs/inode.c +12 -1
@@ -100,6 +100,7 @@ static int hugetlbfs_file_mmap(struct filoff_t len, vma_len;int ret;struct hstate *h =hstate_file (file); +vm_flags_t vm_flags;/* * vma address alignment (but not the pgoff alignment) has
@@ -141,10 +142,20 @@ static int hugetlbfs_file_mmap(struct fifile_accessed (file); ret = -ENOMEM ; + + vm_flags = vma->vm_flags; +/* +* for SHM_HUGETLB, the pages are reserved in the shmget() call so skip +* reserving here. Note: only for SHM hugetlbfs file, the inode +* flag S_PRIVATE is set. +*/ +if (inode->i_flags &S_PRIVATE ) + vm_flags |=VM_NORESERVE ; +if (!hugetlb_reserve_pages (inode, vma->vm_pgoff >>huge_page_order (h), len >>huge_page_shift (h), vma, - vma->vm_flags)) + vm_flags)) goto out; ret =0 ;
Greg Kroah-Hartman
maintainerPATCH 291/309 LoongArch: Fix earlycon parameter if KASAN enabled
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Huacai Chen <[email protected]>
commit 639420e9f6cd9ca074732b17ac450d2518d5937f upstream.
The earlycon parameter is based on fixmap, and fixmap addresses are not supposed to be shadowed by KASAN. So return the kasan_early_shadow_page in kasan_mem_to_shadow() if the input address is above FIXADDR_START. Otherwise earlycon cannot work after kasan_init().
--- arch/loongarch/mm/kasan_init.c | 3 +++ 1 file changed, 3 insertions(+)
arch/loongarch/mm/kasan_init.c +3 -0
@@ -44,6 +44,9 @@ void *kasan_mem_to_shadow(const void *adunsigned long xrange = (maddr >>XRANGE_SHIFT ) &0xffff ;unsigned long offset =0 ; +if (maddr >=FIXADDR_START ) +return (void *)(kasan_early_shadow_page); + maddr &=XRANGE_SHADOW_MASK ;switch (xrange) {case XKPRANGE_CC_SEG :
Greg Kroah-Hartman
maintainerPATCH 292/309 blk-wbt: Fix detection of dirty-throttled tasks
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Kara <[email protected]>
commit f814bdda774c183b0cc15ec8f3b6e7c6f4527ba5 upstream.
The detection of dirty-throttled tasks in blk-wbt has been subtly broken since its beginning in 2016. Namely if we are doing cgroup writeback and the throttled task is not in the root cgroup, balance_dirty_pages() will set dirty_sleep for the non-root bdi_writeback structure. However blk-wbt checks dirty_sleep only in the root cgroup bdi_writeback structure. Thus detection of recently throttled tasks is not working in this case (we noticed this when we switched to cgroup v2 and suddently writeback was slow).
Since blk-wbt has no easy way to get to proper bdi_writeback and furthermore its intention has always been to work on the whole device rather than on individual cgroups, just move the dirty_sleep timestamp from bdi_writeback to backing_dev_info. That fixes the checking for recently throttled task and saves memory for everybody as a bonus.
--- block/blk-wbt.c | 4 ++-- include/linux/backing-dev-defs.h | 7 +++++-- mm/backing-dev.c | 2 +- mm/page-writeback.c | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-)
block/blk-wbt.c +2 -2
@@ -165,9 +165,9 @@ static void wb_timestamp(struct rq_wb *r*/ static bool wb_recent_wait (struct rq_wb *rwb) { -struct bdi_writeback *wb = &rwb->rqos.disk->bdi->wb; +struct backing_dev_info *bdi = rwb->rqos.disk->bdi; -return time_before (jiffies, wb->dirty_sleep +HZ ); +return time_before (jiffies, bdi->last_bdp_sleep +HZ ); } static inline struct rq_wait *get_rq_wait(struct rq_wb *rwb,
include/linux/backing-dev-defs.h +5 -2
@@ -141,8 +141,6 @@ struct bdi_writeback {struct delayed_work dwork;/* work item used for writeback */ struct delayed_work bw_dwork;/* work item used for bandwidth estimate */ -unsigned long dirty_sleep;/* last wait */ -struct list_head bdi_node;/* anchored at bdi->wb_list */ #ifdef CONFIG_CGROUP_WRITEBACK
@@ -179,6 +177,11 @@ struct backing_dev_info {* any dirty wbs, which is depended upon by bdi_has_dirty(). */ atomic_long_t tot_write_bandwidth; +/* +* Jiffies when last process was dirty throttled on this bdi. Used by +* blk-wbt. +*/ +unsigned long last_bdp_sleep;struct bdi_writeback wb;/* the root writeback info for this bdi */ struct list_head wb_list;/* list of all wbs */
mm/backing-dev.c +1 -1
@@ -436,7 +436,6 @@ static int wb_init(struct bdi_writebackINIT_LIST_HEAD (&wb->work_list);INIT_DELAYED_WORK (&wb->dwork, wb_workfn);INIT_DELAYED_WORK (&wb->bw_dwork, wb_update_bandwidth_workfn); - wb->dirty_sleep = jiffies; err =fprop_local_init_percpu (&wb->completions, gfp);if (err)
@@ -921,6 +920,7 @@ int bdi_init(struct backing_dev_info *bdINIT_LIST_HEAD (&bdi->bdi_list);INIT_LIST_HEAD (&bdi->wb_list);init_waitqueue_head (&bdi->wb_waitq); + bdi->last_bdp_sleep = jiffies;return cgwb_bdi_init (bdi); }
mm/page-writeback.c +1 -1
@@ -1921,7 +1921,7 @@ pause:break ; }__set_current_state (TASK_KILLABLE ); - wb->dirty_sleep = now; + bdi->last_bdp_sleep = jiffies;io_schedule_timeout (pause); current->dirty_paused_when = now + pause;
Greg Kroah-Hartman
maintainerPATCH 293/309 docs: kernel_feat.py: fix build error for missing files
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vegard Nossum <[email protected]>
commit c23de7ceae59e4ca5894c3ecf4f785c50c0fa428 upstream.
If the directory passed to the '.. kernel-feat::' directive does not exist or the get_feat.pl script does not find any files to extract features from, Sphinx will report the following error:
Sphinx parallel build error:
UnboundLocalError: local variable 'fname' referenced before assignment make[2]: *** [Documentation/Makefile:102: htmldocs] Error 2
This is due to how I changed the script in c48a7c44a1d0 ("docs:kernel_feat.py: fix potential command injection"). Before that, the filename passed along to self.nestedParse() in this case was weirdly just the whole get_feat.pl invocation.
We can fix it by doing what kernel_abi.py does -- just pass self.arguments[0] as 'fname'.
--- Documentation/sphinx/kernel_feat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/sphinx/kernel_feat.py +1 -1
@@ -109,7 +109,7 @@ class KernelFeat(Directive): else: out_lines += line + "\n" - nodeList = self.nestedParse(out_lines, fname) + nodeList = self.nestedParse(out_lines, self.arguments[0]) return nodeList def nestedParse(self, lines, fname):
Greg Kroah-Hartman
maintainerPATCH 294/309 of: property: fix typo in io-channels
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nuno Sa <[email protected]>
commit 8f7e917907385e112a845d668ae2832f41e64bf5 upstream.
The property is io-channels and not io-channel. This was effectively preventing the devlink creation.
--- drivers/of/property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/property.c +1 -1
@@ -1213,7 +1213,7 @@ DEFINE_SIMPLE_PROP(clocks, "clocks", "#c DEFINE_SIMPLE_PROP(interconnects, "interconnects", "#interconnect-cells") DEFINE_SIMPLE_PROP(iommus, "iommus", "#iommu-cells") DEFINE_SIMPLE_PROP(mboxes, "mboxes", "#mbox-cells") -DEFINE_SIMPLE_PROP(io_channels, "io-channel", "#io-channel-cells") +DEFINE_SIMPLE_PROP(io_channels, "io-channels", "#io-channel-cells") DEFINE_SIMPLE_PROP(interrupt_parent, "interrupt-parent", NULL) DEFINE_SIMPLE_PROP(dmas, "dmas", "#dma-cells")DEFINE_SIMPLE_PROP (power_domains,"power-domains" ,"#power-domain-cells" )
Greg Kroah-Hartman
maintainerPATCH 295/309 xen/events: close evtchn after mapping cleanup
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maximilian Heyne <[email protected]>
commit fa765c4b4aed2d64266b694520ecb025c862c5a9 upstream.
shutdown_pirq and startup_pirq are not taking the irq_mapping_update_lock because they can't due to lock inversion. Both are called with the irq_desc->lock being taking. The lock order, however, is first irq_mapping_update_lock and then irq_desc->lock.
This opens multiple races:
- shutdown_pirq can be interrupted by a function that allocates an event channel:
CPU0 CPU1
shutdown_pirq {
xen_evtchn_close(e)
__startup_pirq {
EVTCHNOP_bind_pirq
-> returns just freed evtchn e
set_evtchn_to_irq(e, irq)
}
xen_irq_info_cleanup() {
set_evtchn_to_irq(e, -1)
}
} Assume here event channel e refers here to the same event channel number.
After this race the evtchn_to_irq mapping for e is invalid (-1).
- __startup_pirq races with __unbind_from_irq in a similar way. Because __startup_pirq doesn't take irq_mapping_update_lock it can grab the evtchn that __unbind_from_irq is currently freeing and cleaning up. In this case even though the event channel is allocated, its mapping can be unset in evtchn_to_irq.
The fix is to first cleanup the mappings and then close the event channel. In this way, when an event channel gets allocated it's potential previous evtchn_to_irq mappings are guaranteed to be unset already. This is also the reverse order of the allocation where first the event channel is allocated and then the mappings are setup.
On a 5.10 kernel prior to commit 3fcdaf3d7634 ("xen/events: modify internal [un]bind interfaces"), we hit a BUG like the following during probing of NVMe devices. The issue is that during nvme_setup_io_queues, pci_free_irq is called for every device which results in a call to shutdown_pirq. With many nvme devices it's therefore likely to hit this race during boot because there will be multiple calls to shutdown_pirq and startup_pirq are running potentially in parallel.
------------[ cut here ]------------ blkfront: xvda: barrier or flush: disabled; persistent grants: enabled; indirect descriptors: enabled; bounce buffer: enabled kernel BUG at drivers/xen/events/events_base.c:499! invalid opcode: 0000 [#1] SMP PTI CPU: 44 PID: 375 Comm: kworker/u257:23 Not tainted 5.10.201-191.748.amzn2.x86_64 #1 Hardware name: Xen HVM domU, BIOS 4.11.amazon 08/24/2006 Workqueue: nvme-reset-wq nvme_reset_work RIP: 0010:bind_evtchn_to_cpu+0xdf/0xf0 Code: 5d 41 5e c3 cc cc cc cc 44 89 f7 e8 2b 55 ad ff 49 89 c5 48 85 c0 0f 84 64 ff ff ff 4c 8b 68 30 41 83 fe ff 0f 85 60 ff ff ff <0f> 0b 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 0f 1f 44 00 00 RSP: 0000:ffffc9000d533b08 EFLAGS: 00010046 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000006 RDX: 0000000000000028 RSI: 00000000ffffffff RDI: 00000000ffffffff RBP: ffff888107419680 R08: 0000000000000000 R09: ffffffff82d72b00 R10: 0000000000000000 R11: 0000000000000000 R12: 00000000000001ed R13: 0000000000000000 R14: 00000000ffffffff R15: 0000000000000002 FS: 0000000000000000(0000) GS:ffff88bc8b500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000002610001 CR4: 00000000001706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? show_trace_log_lvl+0x1c1/0x2d9 ? show_trace_log_lvl+0x1c1/0x2d9 ? set_affinity_irq+0xdc/0x1c0 ? __die_body.cold+0x8/0xd ? die+0x2b/0x50 ? do_trap+0x90/0x110 ? bind_evtchn_to_cpu+0xdf/0xf0 ? do_error_trap+0x65/0x80 ? bind_evtchn_to_cpu+0xdf/0xf0 ? exc_invalid_op+0x4e/0x70 ? bind_evtchn_to_cpu+0xdf/0xf0 ? asm_exc_invalid_op+0x12/0x20 ? bind_evtchn_to_cpu+0xdf/0xf0 ? bind_evtchn_to_cpu+0xc5/0xf0 set_affinity_irq+0xdc/0x1c0 irq_do_set_affinity+0x1d7/0x1f0 irq_setup_affinity+0xd6/0x1a0 irq_startup+0x8a/0xf0 __setup_irq+0x639/0x6d0 ? nvme_suspend+0x150/0x150 request_threaded_irq+0x10c/0x180 ? nvme_suspend+0x150/0x150 pci_request_irq+0xa8/0xf0 ? __blk_mq_free_request+0x74/0xa0 queue_request_irq+0x6f/0x80 nvme_create_queue+0x1af/0x200 nvme_create_io_queues+0xbd/0xf0 nvme_setup_io_queues+0x246/0x320 ? nvme_irq_check+0x30/0x30 nvme_reset_work+0x1c8/0x400 process_one_work+0x1b0/0x350 worker_thread+0x49/0x310 ? process_one_work+0x350/0x350 kthread+0x11b/0x140 ? __kthread_bind_mask+0x60/0x60 ret_from_fork+0x22/0x30 Modules linked in: ---[ end trace a11715de1eee1873 ]---
--- drivers/xen/events/events_base.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/xen/events/events_base.c +6 -2
@@ -923,8 +923,8 @@ static void shutdown_pirq(struct irq_datreturn ;do_mask (info,EVT_MASK_REASON_EXPLICIT ); -xen_evtchn_close (evtchn);xen_irq_info_cleanup (info); +xen_evtchn_close (evtchn); }static void enable_pirq (struct irq_data *data)
@@ -956,6 +956,7 @@ EXPORT_SYMBOL_GPL(xen_irq_from_gsi);static void __unbind_from_irq (struct irq_info *info,unsigned int irq) {evtchn_port_t evtchn; +bool close_evtchn = false;if (!info) {xen_irq_free_desc (irq);
@@ -975,7 +976,7 @@ static void __unbind_from_irq(struct irqstruct xenbus_device *dev;if (!info->is_static) -xen_evtchn_close (evtchn); + close_evtchn = true;switch (info->type) {case IRQT_VIRQ :
@@ -995,6 +996,9 @@ static void __unbind_from_irq(struct irq }xen_irq_info_cleanup (info); + +if (close_evtchn) +xen_evtchn_close (evtchn); }xen_free_irq (info);
Greg Kroah-Hartman
maintainerPATCH 296/309 can: netlink: Fix TDCO calculation using the old data bittiming
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maxime Jayat <[email protected]>
commit 2aa0a5e65eae27dbd96faca92c84ecbf6f492d42 upstream.
The TDCO calculation was done using the currently applied data bittiming, instead of the newly computed data bittiming, which means that the TDCO had an invalid value unless setting the same data bittiming twice.
--- drivers/net/can/dev/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/dev/netlink.c +1 -1
@@ -346,7 +346,7 @@ static int can_changelink(struct net_dev/* Neither of TDC parameters nor TDC flags are * provided: do calculation */ -can_calc_tdco (&priv->tdc, priv->tdc_const, &priv->data_bittiming, +can_calc_tdco (&priv->tdc, priv->tdc_const, &dbt, &priv->ctrlmode, priv->ctrlmode_supported); }/* else: both CAN_CTRLMODE_TDC_{AUTO,MANUAL} are explicitly * turned off. TDC is disabled: do nothing
Greg Kroah-Hartman
maintainerPATCH 297/309 can: j1939: prevent deadlock by changing j1939_socks_lock to rwlock
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ziqi Zhao <[email protected]>
commit 6cdedc18ba7b9dacc36466e27e3267d201948c8d upstream.
The following 3 locks would race against each other, causing the deadlock situation in the Syzbot bug report:
- j1939_socks_lock
- active_session_list_lock
- sk_session_queue_lock
A reasonable fix is to change j1939_socks_lock to an rwlock, since in the rare situations where a write lock is required for the linked list that j1939_socks_lock is protecting, the code does not attempt to acquire any more locks. This would break the circular lock dependency, where, for example, the current thread already locks j1939_socks_lock and attempts to acquire sk_session_queue_lock, and at the same time, another thread attempts to acquire j1939_socks_lock while holding sk_session_queue_lock.
NOTE: This patch along does not fix the unregister_netdevice bug reported by Syzbot; instead, it solves a deadlock situation to prepare for one or more further patches to actually fix the Syzbot bug, which appears to be a reference counting problem within the j1939 codebase.
--- net/can/j1939/j1939-priv.h | 2 +- net/can/j1939/main.c | 2 +- net/can/j1939/socket.c | 24 ++++++++++++------------ 3 files changed, 14 insertions(+), 14 deletions(-)
net/can/j1939/j1939-priv.h +1 -1
@@ -86,7 +86,7 @@ struct j1939_priv {unsigned int tp_max_packet_size;/* lock for j1939_socks list */ -spinlock_t j1939_socks_lock; +rwlock_t j1939_socks_lock;struct list_head j1939_socks;struct kref rx_kref;
net/can/j1939/main.c +1 -1
@@ -274,7 +274,7 @@ struct j1939_priv *j1939_netdev_start(streturn ERR_PTR (-ENOMEM );j1939_tp_init (priv); -spin_lock_init (&priv->j1939_socks_lock); +rwlock_init (&priv->j1939_socks_lock);INIT_LIST_HEAD (&priv->j1939_socks);mutex_lock (&j1939_netdev_lock);
net/can/j1939/socket.c +12 -12
@@ -80,16 +80,16 @@ static void j1939_jsk_add(struct j1939_p jsk->state |=J1939_SOCK_BOUND ;j1939_priv_get (priv); -spin_lock_bh (&priv->j1939_socks_lock); +write_lock_bh (&priv->j1939_socks_lock);list_add_tail (&jsk->list, &priv->j1939_socks); -spin_unlock_bh (&priv->j1939_socks_lock); +write_unlock_bh (&priv->j1939_socks_lock); }static void j1939_jsk_del (struct j1939_priv *priv,struct j1939_sock *jsk) { -spin_lock_bh (&priv->j1939_socks_lock); +write_lock_bh (&priv->j1939_socks_lock);list_del_init (&jsk->list); -spin_unlock_bh (&priv->j1939_socks_lock); +write_unlock_bh (&priv->j1939_socks_lock);j1939_priv_put (priv); jsk->state &= ~J1939_SOCK_BOUND ;
@@ -329,13 +329,13 @@ bool j1939_sk_recv_match(struct j1939_prstruct j1939_sock *jsk;bool match = false; -spin_lock_bh (&priv->j1939_socks_lock); +read_lock_bh (&priv->j1939_socks_lock);list_for_each_entry (jsk, &priv->j1939_socks, list) { match =j1939_sk_recv_match_one (jsk, skcb);if (match)break ; } -spin_unlock_bh (&priv->j1939_socks_lock); +read_unlock_bh (&priv->j1939_socks_lock);return match; }
@@ -344,11 +344,11 @@ void j1939_sk_recv(struct j1939_priv *pr {struct j1939_sock *jsk; -spin_lock_bh (&priv->j1939_socks_lock); +read_lock_bh (&priv->j1939_socks_lock);list_for_each_entry (jsk, &priv->j1939_socks, list) {j1939_sk_recv_one (jsk, skb); } -spin_unlock_bh (&priv->j1939_socks_lock); +read_unlock_bh (&priv->j1939_socks_lock); }static void j1939_sk_sock_destruct (struct sock *sk)
@@ -1080,12 +1080,12 @@ void j1939_sk_errqueue(struct j1939_sess }/* spread RX notifications to all sockets subscribed to this session */ -spin_lock_bh (&priv->j1939_socks_lock); +read_lock_bh (&priv->j1939_socks_lock);list_for_each_entry (jsk, &priv->j1939_socks, list) {if (j1939_sk_recv_match_one (jsk, &session->skcb))__j1939_sk_errqueue (session, &jsk->sk, type); } -spin_unlock_bh (&priv->j1939_socks_lock); +read_unlock_bh (&priv->j1939_socks_lock); };void j1939_sk_send_loop_abort (struct sock *sk,int err)
@@ -1273,7 +1273,7 @@ void j1939_sk_netdev_event_netdown(strucstruct j1939_sock *jsk;int error_code =ENETDOWN ; -spin_lock_bh (&priv->j1939_socks_lock); +read_lock_bh (&priv->j1939_socks_lock);list_for_each_entry (jsk, &priv->j1939_socks, list) { jsk->sk.sk_err = error_code;if (!sock_flag (&jsk->sk,SOCK_DEAD ))
@@ -1281,7 +1281,7 @@ void j1939_sk_netdev_event_netdown(strucj1939_sk_queue_drop_all (priv, jsk, error_code); } -spin_unlock_bh (&priv->j1939_socks_lock); +read_unlock_bh (&priv->j1939_socks_lock); } static int j1939_sk_no_ioctlcmd(struct socket *sock, unsigned int cmd,
Greg Kroah-Hartman
maintainerPATCH 298/309 can: j1939: Fix UAF in j1939_sk_match_filter during setsockopt(SO_J1939_FILTER)
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oleksij Rempel <[email protected]>
commit efe7cf828039aedb297c1f9920b638fffee6aabc upstream.
Lock jsk->sk to prevent UAF when setsockopt(..., SO_J1939_FILTER, ...) modifies jsk->filters while receiving packets.
Following trace was seen on affected system:
==================================================================
BUG: KASAN: slab-use-after-free in j1939_sk_recv_match_one+0x1af/0x2d0 [can_j1939] Read of size 4 at addr ffff888012144014 by task j1939/350 CPU: 0 PID: 350 Comm: j1939 Tainted: G W OE 6.5.0-rc5 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: print_report+0xd3/0x620 ? kasan_complete_mode_report_info+0x7d/0x200 ? j1939_sk_recv_match_one+0x1af/0x2d0 [can_j1939] kasan_report+0xc2/0x100 ? j1939_sk_recv_match_one+0x1af/0x2d0 [can_j1939] __asan_load4+0x84/0xb0 j1939_sk_recv_match_one+0x1af/0x2d0 [can_j1939] j1939_sk_recv+0x20b/0x320 [can_j1939] ? __kasan_check_write+0x18/0x20 ? __pfx_j1939_sk_recv+0x10/0x10 [can_j1939] ? j1939_simple_recv+0x69/0x280 [can_j1939] ? j1939_ac_recv+0x5e/0x310 [can_j1939] j1939_can_recv+0x43f/0x580 [can_j1939] ? __pfx_j1939_can_recv+0x10/0x10 [can_j1939] ? raw_rcv+0x42/0x3c0 [can_raw] ? __pfx_j1939_can_recv+0x10/0x10 [can_j1939] can_rcv_filter+0x11f/0x350 [can] can_receive+0x12f/0x190 [can] ? __pfx_can_rcv+0x10/0x10 [can] can_rcv+0xdd/0x130 [can] ? __pfx_can_rcv+0x10/0x10 [can] __netif_receive_skb_one_core+0x13d/0x150 ? __pfx___netif_receive_skb_one_core+0x10/0x10 ? __kasan_check_write+0x18/0x20 ? _raw_spin_lock_irq+0x8c/0xe0 __netif_receive_skb+0x23/0xb0 process_backlog+0x107/0x260 __napi_poll+0x69/0x310 net_rx_action+0x2a1/0x580 ? __pfx_net_rx_action+0x10/0x10 ? __pfx__raw_spin_lock+0x10/0x10 ? handle_irq_event+0x7d/0xa0 __do_softirq+0xf3/0x3f8 do_softirq+0x53/0x80 </IRQ> <TASK> __local_bh_enable_ip+0x6e/0x70 netif_rx+0x16b/0x180 can_send+0x32b/0x520 [can] ? __pfx_can_send+0x10/0x10 [can] ? __check_object_size+0x299/0x410 raw_sendmsg+0x572/0x6d0 [can_raw] ? __pfx_raw_sendmsg+0x10/0x10 [can_raw] ? apparmor_socket_sendmsg+0x2f/0x40 ? __pfx_raw_sendmsg+0x10/0x10 [can_raw] sock_sendmsg+0xef/0x100 sock_write_iter+0x162/0x220 ? __pfx_sock_write_iter+0x10/0x10 ? __rtnl_unlock+0x47/0x80 ? security_file_permission+0x54/0x320 vfs_write+0x6ba/0x750 ? __pfx_vfs_write+0x10/0x10 ? __fget_light+0x1ca/0x1f0 ? __rcu_read_unlock+0x5b/0x280 ksys_write+0x143/0x170 ? __pfx_ksys_write+0x10/0x10 ? __kasan_check_read+0x15/0x20 ? fpregs_assert_state_consistent+0x62/0x70 __x64_sys_write+0x47/0x60 do_syscall_64+0x60/0x90 ? do_syscall_64+0x6d/0x90 ? irqentry_exit+0x3f/0x50 ? exc_page_fault+0x79/0xf0 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Allocated by task 348: kasan_save_stack+0x2a/0x50 kasan_set_track+0x29/0x40 kasan_save_alloc_info+0x1f/0x30 __kasan_kmalloc+0xb5/0xc0 __kmalloc_node_track_caller+0x67/0x160 j1939_sk_setsockopt+0x284/0x450 [can_j1939] __sys_setsockopt+0x15c/0x2f0 __x64_sys_setsockopt+0x6b/0x80 do_syscall_64+0x60/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Freed by task 349: kasan_save_stack+0x2a/0x50 kasan_set_track+0x29/0x40 kasan_save_free_info+0x2f/0x50 __kasan_slab_free+0x12e/0x1c0 __kmem_cache_free+0x1b9/0x380 kfree+0x7a/0x120 j1939_sk_setsockopt+0x3b2/0x450 [can_j1939] __sys_setsockopt+0x15c/0x2f0 __x64_sys_setsockopt+0x6b/0x80 do_syscall_64+0x60/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8
--- net/can/j1939/j1939-priv.h | 1 + net/can/j1939/socket.c | 22 ++++++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-)
net/can/j1939/j1939-priv.h +1 -0
@@ -301,6 +301,7 @@ struct j1939_sock {int ifindex;struct j1939_addr addr; +spinlock_t filters_lock;struct j1939_filter *filters;int nfilters;pgn_t pgn_rx_filter;
net/can/j1939/socket.c +18 -4
@@ -262,12 +262,17 @@ static bool j1939_sk_match_dst(struct j1static bool j1939_sk_match_filter (struct j1939_sock *jsk,const struct j1939_sk_buff_cb *skcb) { -const struct j1939_filter *f = jsk->filters; -int nfilter = jsk->nfilters; +const struct j1939_filter *f; +int nfilter; + +spin_lock_bh (&jsk->filters_lock); + + f = jsk->filters; + nfilter = jsk->nfilters;if (!nfilter)/* receive all when no filters are assigned */ -return true; + goto filter_match_found;for (; nfilter; ++f, --nfilter) {if ((skcb->addr.pgn & f->pgn_mask) != f->pgn)
@@ -276,9 +281,15 @@ static bool j1939_sk_match_filter(structcontinue ;if ((skcb->addr.src_name & f->name_mask) != f->name)continue ; -return true; + goto filter_match_found; } + +spin_unlock_bh (&jsk->filters_lock);return false; + +filter_match_found: +spin_unlock_bh (&jsk->filters_lock); +return true; } static bool j1939_sk_recv_match_one(struct j1939_sock *jsk,
@@ -401,6 +412,7 @@ static int j1939_sk_init(struct sock *skatomic_set (&jsk->skb_pending,0 );spin_lock_init (&jsk->sk_session_queue_lock);INIT_LIST_HEAD (&jsk->sk_session_queue); +spin_lock_init (&jsk->filters_lock);/* j1939_sk_sock_destruct() depends on SOCK_RCU_FREE flag */ sock_set_flag (sk,SOCK_RCU_FREE );
@@ -703,9 +715,11 @@ static int j1939_sk_setsockopt(struct so }lock_sock (&jsk->sk); +spin_lock_bh (&jsk->filters_lock); ofilters = jsk->filters; jsk->filters = filters; jsk->nfilters = count; +spin_unlock_bh (&jsk->filters_lock);release_sock (&jsk->sk);kfree (ofilters);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 299/309 pmdomain: core: Move the unused cleanup to a _sync initcall
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
commit 741ba0134fa7822fcf4e4a0a537a5c4cfd706b20 upstream.
The unused clock cleanup uses the _sync initcall to give all users at earlier initcalls time to probe. Do the same to avoid leaving some PDs dangling at "on" (which actually happened on qcom!).
--- drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/power/domain.c +1 -1
@@ -1111,7 +1111,7 @@ static int __init genpd_power_off_unusedreturn 0 ; } -late_initcall (genpd_power_off_unused); +late_initcall_sync (genpd_power_off_unused);#ifdef CONFIG_PM_SLEEP
Greg Kroah-Hartman
maintainerPATCH 300/309 fs/proc: do_task_stat: move thread_group_cputime_adjusted() outside of lock_task_sighand()
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oleg Nesterov <[email protected]>
commit 60f92acb60a989b14e4b744501a0df0f82ef30a3 upstream.
Patch series "fs/proc: do_task_stat: use sig->stats_".
do_task_stat() has the same problem as getrusage() had before "getrusage:
use sig->stats_lock rather than lock_task_sighand()": a hard lockup. If NR_CPUS threads call lock_task_sighand() at the same time and the process has NR_THREADS, spin_lock_irq will spin with irqs disabled O(NR_CPUS * NR_THREADS) time.
This patch (of 3):
thread_group_cputime() does its own locking, we can safely shift thread_group_cputime_adjusted() which does another for_each_thread loop outside of ->siglock protected section.
Not only this removes for_each_thread() from the critical section with irqs disabled, this removes another case when stats_lock is taken with siglock held. We want to remove this dependency, then we can change the users of stats_lock to not disable irqs.
--- fs/proc/array.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
fs/proc/array.c +6 -4
@@ -511,7 +511,7 @@ static int do_task_stat(struct seq_filesigemptyset (&sigign);sigemptyset (&sigcatch); - cutime = cstime = utime = stime =0 ; + cutime = cstime =0 ; cgtime = gtime =0 ;if (lock_task_sighand (task, &flags)) {
@@ -546,7 +546,6 @@ static int do_task_stat(struct seq_file min_flt += sig->min_flt; maj_flt += sig->maj_flt; -thread_group_cputime_adjusted (task, &utime, &stime); gtime += sig->gtime;if (sig->flags & (SIGNAL_GROUP_EXIT |SIGNAL_STOP_STOPPED ))
@@ -562,10 +561,13 @@ static int do_task_stat(struct seq_fileif (permitted && (!whole || num_threads <2 )) wchan = !task_is_running (task); -if (!whole) { + +if (whole) { +thread_group_cputime_adjusted (task, &utime, &stime); + }else { +task_cputime_adjusted (task, &utime, &stime); min_flt = task->min_flt; maj_flt = task->maj_flt; -task_cputime_adjusted (task, &utime, &stime); gtime =task_gtime (task); }
Greg Kroah-Hartman
maintainerPATCH 301/309 fs/proc: do_task_stat: use sig->stats_lock to gather the threads/children stats
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oleg Nesterov <[email protected]>
commit 7601df8031fd67310af891897ef6cc0df4209305 upstream.
lock_task_sighand() can trigger a hard lockup. If NR_CPUS threads call do_task_stat() at the same time and the process has NR_THREADS, it will spin with irqs disabled O(NR_CPUS * NR_THREADS) time.
Change do_task_stat() to use sig->stats_lock to gather the statistics outside of ->siglock protected section, in the likely case this code will run lockless.
--- fs/proc/array.c | 58 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 26 deletions(-)
fs/proc/array.c +32 -26
@@ -477,13 +477,13 @@ static int do_task_stat(struct seq_fileint permitted;struct mm_struct *mm;unsigned long long start_time; -unsigned long cmin_flt =0 , cmaj_flt =0 ; -unsigned long min_flt =0 , maj_flt =0 ; -u64 cutime, cstime, utime, stime; -u64 cgtime, gtime; +unsigned long cmin_flt, cmaj_flt, min_flt, maj_flt; +u64 cutime, cstime, cgtime, utime, stime, gtime;unsigned long rsslim =0 ;unsigned long flags;int exit_code = task->exit_code; +struct signal_struct *sig = task->signal; +unsigned int seq =1 ; state = *get_task_state (task); vsize = eip = esp =0 ;
@@ -511,12 +511,8 @@ static int do_task_stat(struct seq_filesigemptyset (&sigign);sigemptyset (&sigcatch); - cutime = cstime =0 ; - cgtime = gtime =0 ;if (lock_task_sighand (task, &flags)) { -struct signal_struct *sig = task->signal; -if (sig->tty) {struct pid *pgrp =tty_get_pgrp (sig->tty); tty_pgrp =pid_nr_ns (pgrp, ns);
@@ -527,27 +523,9 @@ static int do_task_stat(struct seq_file num_threads =get_nr_threads (task);collect_sigign_sigcatch (task, &sigign, &sigcatch); - cmin_flt = sig->cmin_flt; - cmaj_flt = sig->cmaj_flt; - cutime = sig->cutime; - cstime = sig->cstime; - cgtime = sig->cgtime; rsslim =READ_ONCE (sig->rlim[RLIMIT_RSS ].rlim_cur); -/* add up live thread stats at the group level */ if (whole) { -struct task_struct *t; - -__for_each_thread (sig, t) { - min_flt += t->min_flt; - maj_flt += t->maj_flt; - gtime +=task_gtime (t); - } - - min_flt += sig->min_flt; - maj_flt += sig->maj_flt; - gtime += sig->gtime; -if (sig->flags & (SIGNAL_GROUP_EXIT |SIGNAL_STOP_STOPPED )) exit_code = sig->group_exit_code; }
@@ -562,6 +540,34 @@ static int do_task_stat(struct seq_fileif (permitted && (!whole || num_threads <2 )) wchan = !task_is_running (task); +do { + seq++;/* 2 on the 1st/lockless path, otherwise odd */ + flags =read_seqbegin_or_lock_irqsave (&sig->stats_lock, &seq); + + cmin_flt = sig->cmin_flt; + cmaj_flt = sig->cmaj_flt; + cutime = sig->cutime; + cstime = sig->cstime; + cgtime = sig->cgtime; + +if (whole) { +struct task_struct *t; + + min_flt = sig->min_flt; + maj_flt = sig->maj_flt; + gtime = sig->gtime; + +rcu_read_lock (); +__for_each_thread (sig, t) { + min_flt += t->min_flt; + maj_flt += t->maj_flt; + gtime +=task_gtime (t); + } +rcu_read_unlock (); + } + }while (need_seqretry (&sig->stats_lock, seq)); +done_seqretry_irqrestore (&sig->stats_lock, seq, flags); +if (whole) {thread_group_cputime_adjusted (task, &utime, &stime); }else {
Greg Kroah-Hartman
maintainerPATCH 302/309 tracing: Fix HAVE_DYNAMIC_FTRACE_WITH_REGS ifdef
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Petr Pavlu <[email protected]>
commit bdbddb109c75365d22ec4826f480c5e75869e1cb upstream.
Commit a8b9cf62ade1 ("ftrace: Fix DIRECT_CALLS to use SAVE_REGS by default") attempted to fix an issue with direct trampolines on x86, see its description for details. However, it wrongly referenced the HAVE_DYNAMIC_FTRACE_WITH_REGS config option and the problem is still present.
Add the missing "CONFIG_" prefix for the logic to work as intended.
--- kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/ftrace.c +1 -1
@@ -5331,7 +5331,7 @@ static int register_ftrace_function_nolo* not support ftrace_regs_caller but direct_call, use SAVE_ARGS so that it * jumps from ftrace_caller for multiple ftrace_ops. */ -#ifndef HAVE_DYNAMIC_FTRACE_WITH_REGS +#ifndef CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS #define MULTI_FLAGS (FTRACE_OPS_FL_DIRECT | FTRACE_OPS_FL_SAVE_ARGS)#else #define MULTI_FLAGS (FTRACE_OPS_FL_DIRECT | FTRACE_OPS_FL_SAVE_REGS)
Greg Kroah-Hartman
maintainerPATCH 303/309 tracing: Inform kmemleak of saved_cmdlines allocation
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steven Rostedt (Google) <[email protected]>
commit 2394ac4145ea91b92271e675a09af2a9ea6840b7 upstream.
The allocation of the struct saved_cmdlines_buffer structure changed from:
s = kmalloc(sizeof(*s), GFP_KERNEL); s->saved_cmdlines = kmalloc_array(TASK_COMM_LEN, val, GFP_KERNEL);
to:
orig_size = sizeof(*s) + val * TASK_COMM_LEN; order = get_order(orig_size); size = 1 << (order + PAGE_SHIFT); page = alloc_pages(GFP_KERNEL, order); if (!page) return NULL; s = page_address(page); memset(s, 0, sizeof(*s)); s->saved_cmdlines = kmalloc_array(TASK_COMM_LEN, val, GFP_KERNEL);
Where that s->saved_cmdlines allocation looks to be a dangling allocation to kmemleak. That's because kmemleak only keeps track of kmalloc() allocations. For allocations that use page_alloc() directly, the kmemleak needs to be explicitly informed about it.
Add kmemleak_alloc() and kmemleak_free() around the page allocation so that it doesn't give the following false positive:
unreferenced object 0xffff8881010c8000 (size 32760):
comm "swapper", pid 0, jiffies 4294667296
hex dump (first 32 bytes):
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
backtrace (crc ae6ec1b9):
[<ffffffff86722405>] kmemleak_alloc+0x45/0x80
[<ffffffff8414028d>] __kmalloc_large_node+0x10d/0x190
[<ffffffff84146ab1>] __kmalloc+0x3b1/0x4c0
[<ffffffff83ed7103>] allocate_cmdlines_buffer+0x113/0x230
[<ffffffff88649c34>] tracer_alloc_buffers.isra.0+0x124/0x460
[<ffffffff8864a174>] early_trace_init+0x14/0xa0
[<ffffffff885dd5ae>] start_kernel+0x12e/0x3c0
[<ffffffff885f5758>] x86_64_start_reservations+0x18/0x30
[<ffffffff885f582b>] x86_64_start_kernel+0x7b/0x80
[<ffffffff83a001c3>] secondary_startup_64_no_verify+0x15e/0x16b--- kernel/trace/trace.c | 3 +++ 1 file changed, 3 insertions(+)
kernel/trace/trace.c +3 -0
@@ -39,6 +39,7 @@#include <linux/ctype.h> #include <linux/init.h> #include <linux/panic_notifier.h> +#include <linux/kmemleak.h> #include <linux/poll.h> #include <linux/nmi.h> #include <linux/fs.h>
@@ -2331,6 +2332,7 @@ static void free_saved_cmdlines_buffer(sint order =get_order (sizeof (*s) + s->cmdline_num *TASK_COMM_LEN );kfree (s->map_cmdline_to_pid); +kmemleak_free (s);free_pages ((unsigned long )s, order); }
@@ -2350,6 +2352,7 @@ static struct saved_cmdlines_buffer *allreturn NULL ; s =page_address (page); +kmemleak_alloc (s, size,1 ,GFP_KERNEL );memset (s,0 ,sizeof (*s));/* Round up to actual allocation */
Greg Kroah-Hartman
maintainerPATCH 304/309 md: bypass block throttle for superblock update
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Junxiao Bi <[email protected]>
[ Upstream commit d6e035aad6c09991da1c667fb83419329a3baed8 ]
commit 5e2cf333b7bd ("md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d") introduced a hung bug and will be reverted in next patch, since the issue that commit is fixing is due to md superblock write is throttled by wbt, to fix it, we can have superblock write bypass block layer throttle.
--- drivers/md/md.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/md/md.c +4 -3
@@ -1037,9 +1037,10 @@ void md_super_write(struct mddev *mddev, struct md_rdev *rdev,return ; bio =bio_alloc_bioset (rdev->meta_bdev ? rdev->meta_bdev : rdev->bdev, -1 , -REQ_OP_WRITE |REQ_SYNC |REQ_PREFLUSH |REQ_FUA , -GFP_NOIO , &mddev->sync_set); +1 , +REQ_OP_WRITE |REQ_SYNC |REQ_IDLE |REQ_META + |REQ_PREFLUSH |REQ_FUA , +GFP_NOIO , &mddev->sync_set);atomic_inc (&rdev->nr_pending);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 305/309 block: fix partial zone append completion handling in req_bio_endio()
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Damien Le Moal <[email protected]>
[ Upstream commit 748dc0b65ec2b4b7b3dbd7befcc4a54fdcac7988 ]
Partial completions of zone append request is not allowed but if a zone append completion indicates a number of completed bytes different from the original BIO size, only the BIO status is set to error. This leads to bio_advance() not setting the BIO size to 0 and thus to not call bio_endio() at the end of req_bio_endio().
Make sure a partially completed zone append is failed and completed immediately by forcing the completed number of bytes (nbytes) to be equal to the BIO size, thus ensuring that bio_endio() is called.
--- block/blk-mq.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
block/blk-mq.c +7 -2
@@ -772,11 +772,16 @@ static void req_bio_endio(struct request *rq, struct bio *bio,/* * Partial zone append completions cannot be supported as the * BIO fragments may end up not being written sequentially. +* For such case, force the completed nbytes to be equal to +* the BIO size so that bio_advance() sets the BIO remaining +* size to 0 and we end up calling bio_endio() before returning. */ -if (bio->bi_iter.bi_size != nbytes) +if (bio->bi_iter.bi_size != nbytes) { bio->bi_status =BLK_STS_IOERR ; -else + nbytes = bio->bi_iter.bi_size; + }else { bio->bi_iter.bi_sector = rq->__sector; + } }bio_advance (bio, nbytes);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 306/309 usb: typec: tpcm: Fix issues with power being removed during reset
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Brown <[email protected]>
commit 69f89168b310878be82d7d97bc0d22068ad858c0 upstream.
Since the merge of b717dfbf73e8 ("Revert "usb: typec: tcpm: fix cc role at port reset"") into mainline the LibreTech Renegade Elite/Firefly has died during boot, the main symptom observed in testing is a sudden stop in console output. Gábor Stefanik identified in review that the patch would cause power to be removed from devices without batteries (like this board), observing that while the patch is correct according to the spec this appears to be an oversight in the spec.
Given that the change makes previously working systems unusable let's revert it, there was some discussion of identifying systems that have alternative power and implementing the standards conforming behaviour in only that case.
--- drivers/usb/typec/tcpm/tcpm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/typec/tcpm/tcpm.c +2 -1
@@ -4862,7 +4862,8 @@ static void run_state_machine(struct tcpbreak ;case PORT_RESET :tcpm_reset_port (port); -tcpm_set_cc (port,TYPEC_CC_OPEN ); +tcpm_set_cc (port,tcpm_default_state (port) ==SNK_UNATTACHED ? +TYPEC_CC_RD :tcpm_rp_cc (port));tcpm_set_state (port,PORT_RESET_WAIT_OFF ,PD_T_ERROR_RECOVERY );break ;
Greg Kroah-Hartman
maintainerPATCH 307/309 netfilter: ipset: fix performance regression in swap operation
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jozsef Kadlecsik <[email protected]>
commit 97f7cf1cd80eeed3b7c808b7c12463295c751001 upstream.
The patch "netfilter: ipset: fix race condition between swap/destroy and kernel side add/del/test", commit 28628fa9 fixes a race condition. But the synchronize_rcu() added to the swap function unnecessarily slows it down: it can safely be moved to destroy and use call_rcu() instead.
Eric Dumazet pointed out that simply calling the destroy functions as rcu callback does not work: sets with timeout use garbage collectors which need cancelling at destroy which can wait. Therefore the destroy functions are split into two: cancelling garbage collectors safely at executing the command received by netlink and moving the remaining part only into the rcu callback.
--- include/linux/netfilter/ipset/ip_set.h | 4 +++ net/netfilter/ipset/ip_set_bitmap_gen.h | 14 +++++++++--- net/netfilter/ipset/ip_set_core.c | 37 ++++++++++++++++++++++++-------- net/netfilter/ipset/ip_set_hash_gen.h | 15 ++++++++++-- net/netfilter/ipset/ip_set_list_set.c | 13 ++++++++--- 5 files changed, 65 insertions(+), 18 deletions(-)
include/linux/netfilter/ipset/ip_set.h +4 -0
@@ -186,6 +186,8 @@ struct ip_set_type_variant {/* Return true if "b" set is the same as "a" * according to the create set parameters */ bool (*same_set)(const struct ip_set *a,const struct ip_set *b); +/* Cancel ongoing garbage collectors before destroying the set*/ +void (*cancel_gc)(struct ip_set *set);/* Region-locking is used */ bool region_lock; };
@@ -242,6 +244,8 @@ extern void ip_set_type_unregister(struc/* A generic IP set */ struct ip_set { +/* For call_cru in destroy */ +struct rcu_head rcu;/* The name of the set */ char name[IPSET_MAXNAMELEN ];/* Lock protecting the set data */
net/netfilter/ipset/ip_set_bitmap_gen.h +11 -3
@@ -28,6 +28,7 @@#define mtype_del IPSET_TOKEN(MTYPE, _del)#define mtype_list IPSET_TOKEN(MTYPE, _list)#define mtype_gc IPSET_TOKEN(MTYPE, _gc) +#define mtype_cancel_gc IPSET_TOKEN(MTYPE, _cancel_gc)#define mtype MTYPE#define get_ext (set, map, id) ((map)->extensions + ((set)->dsize * (id)))
@@ -57,9 +58,6 @@ mtype_destroy(struct ip_set *set) {struct mtype *map = set->data; -if (SET_WITH_TIMEOUT (set)) -del_timer_sync (&map->gc); -if (set->dsize && set->extensions &IPSET_EXT_DESTROY )mtype_ext_cleanup (set);ip_set_free (map->members);
@@ -288,6 +286,15 @@ mtype_gc(struct timer_list *t)add_timer (&map->gc); } +static void +mtype_cancel_gc (struct ip_set *set) +{ +struct mtype *map = set->data; + +if (SET_WITH_TIMEOUT (set)) +del_timer_sync (&map->gc); +} +static const struct ip_set_type_variant mtype = { .kadt = mtype_kadt, .uadt = mtype_uadt,
@@ -301,6 +308,7 @@ static const struct ip_set_type_variant .head = mtype_head, .list = mtype_list, .same_set = mtype_same_set, + .cancel_gc = mtype_cancel_gc, };#endif /* __IP_SET_BITMAP_IP_GEN_H */
net/netfilter/ipset/ip_set_core.c +28 -9
@@ -1182,6 +1182,14 @@ ip_set_destroy_set(struct ip_set *set)kfree (set); } +static void +ip_set_destroy_set_rcu (struct rcu_head *head) +{ + struct ip_set *set = container_of(head, struct ip_set, rcu); + +ip_set_destroy_set (set); +} +static int ip_set_destroy (struct sk_buff *skb,const struct nfnl_info *info,const struct nlattr *const attr[]) {
@@ -1193,8 +1201,6 @@ static int ip_set_destroy(struct sk_buffif (unlikely (protocol_min_failed (attr)))return -IPSET_ERR_PROTOCOL ; -/* Must wait for flush to be really finished in list:set */ -rcu_barrier ();/* Commands are serialized and references are * protected by the ip_set_ref_lock.
@@ -1206,8 +1212,10 @@ static int ip_set_destroy(struct sk_buff* counter, so if it's already zero, we can proceed * without holding the lock. */ -read_lock_bh (&ip_set_ref_lock);if (!attr[IPSET_ATTR_SETNAME ]) { +/* Must wait for flush to be really finished in list:set */ +rcu_barrier (); +read_lock_bh (&ip_set_ref_lock);for (i =0 ; i < inst->ip_set_max; i++) { s =ip_set (inst, i);if (s && (s->ref || s->ref_netlink)) {
@@ -1221,6 +1229,8 @@ static int ip_set_destroy(struct sk_buff s =ip_set (inst, i);if (s) {ip_set (inst, i) =NULL ; +/* Must cancel garbage collectors */ + s->variant->cancel_gc (s);ip_set_destroy_set (s); } }
@@ -1228,6 +1238,9 @@ static int ip_set_destroy(struct sk_buff inst->is_destroyed = false; }else {u32 flags =flag_exist (info->nlh); +u16 features =0 ; + +read_lock_bh (&ip_set_ref_lock); s =find_set_and_id (inst,nla_data (attr[IPSET_ATTR_SETNAME ]), &i);if (!s) {
@@ -1238,10 +1251,16 @@ static int ip_set_destroy(struct sk_buff ret = -IPSET_ERR_BUSY ; goto out; } + features = s->type->features;ip_set (inst, i) =NULL ;read_unlock_bh (&ip_set_ref_lock); - -ip_set_destroy_set (s); +if (features &IPSET_TYPE_NAME ) { +/* Must wait for flush to be really finished */ +rcu_barrier (); + } +/* Must cancel garbage collectors */ + s->variant->cancel_gc (s); +call_rcu (&s->rcu, ip_set_destroy_set_rcu); }return 0 ; out:
@@ -1394,9 +1413,6 @@ static int ip_set_swap(struct sk_buff *sip_set (inst, to_id) = from;write_unlock_bh (&ip_set_ref_lock); -/* Make sure all readers of the old set pointers are completed. */ -synchronize_rcu (); -return 0 ; }
@@ -2409,8 +2425,11 @@ ip_set_fini(void) {nf_unregister_sockopt (&so_set);nfnetlink_subsys_unregister (&ip_set_netlink_subsys); -unregister_pernet_subsys (&ip_set_net_ops); + +/* Wait for call_rcu() in destroy */ +rcu_barrier (); +pr_debug ("these are the famous last words\n" ); }
net/netfilter/ipset/ip_set_hash_gen.h +12 -3
@@ -221,6 +221,7 @@ static const union nf_inet_addr zeromask#undef mtype_gc_do#undef mtype_gc#undef mtype_gc_init +#undef mtype_cancel_gc#undef mtype_variant#undef mtype_data_match
@@ -265,6 +266,7 @@ static const union nf_inet_addr zeromask#define mtype_gc_do IPSET_TOKEN(MTYPE, _gc_do)#define mtype_gc IPSET_TOKEN(MTYPE, _gc)#define mtype_gc_init IPSET_TOKEN(MTYPE, _gc_init) +#define mtype_cancel_gc IPSET_TOKEN(MTYPE, _cancel_gc)#define mtype_variant IPSET_TOKEN(MTYPE, _variant)#define mtype_data_match IPSET_TOKEN(MTYPE, _data_match)
@@ -449,9 +451,6 @@ mtype_destroy(struct ip_set *set)struct htype *h = set->data;struct list_head *l, *lt; -if (SET_WITH_TIMEOUT (set)) -cancel_delayed_work_sync (&h->gc.dwork); -mtype_ahash_destroy (set,ipset_dereference_nfnl (h->table), true);list_for_each_safe (l, lt, &h->ad) {list_del (l);
@@ -598,6 +597,15 @@ mtype_gc_init(struct htable_gc *gc)queue_delayed_work (system_power_efficient_wq, &gc->dwork,HZ ); } +static void +mtype_cancel_gc (struct ip_set *set) +{ +struct htype *h = set->data; + +if (SET_WITH_TIMEOUT (set)) +cancel_delayed_work_sync (&h->gc.dwork); +} +static int mtype_add (struct ip_set *set,void *value,const struct ip_set_ext *ext,struct ip_set_ext *mext,u32 flags);
@@ -1440,6 +1448,7 @@ static const struct ip_set_type_variant .uref = mtype_uref, .resize = mtype_resize, .same_set = mtype_same_set, + .cancel_gc = mtype_cancel_gc, .region_lock = true, };
net/netfilter/ipset/ip_set_list_set.c +10 -3
@@ -426,9 +426,6 @@ list_set_destroy(struct ip_set *set)struct list_set *map = set->data;struct set_elem *e, *n; -if (SET_WITH_TIMEOUT (set)) -timer_shutdown_sync (&map->gc); -list_for_each_entry_safe (e, n, &map->members, list) {list_del (&e->list);ip_set_put_byindex (map->net, e->id);
@@ -545,6 +542,15 @@ list_set_same_set(const struct ip_set *a a->extensions == b->extensions; } +static void +list_set_cancel_gc (struct ip_set *set) +{ +struct list_set *map = set->data; + +if (SET_WITH_TIMEOUT (set)) +timer_shutdown_sync (&map->gc); +} +static const struct ip_set_type_variant set_variant = { .kadt = list_set_kadt, .uadt = list_set_uadt,
@@ -558,6 +564,7 @@ static const struct ip_set_type_variant .head = list_set_head, .list = list_set_list, .same_set = list_set_same_set, + .cancel_gc = list_set_cancel_gc, }; static void
Greg Kroah-Hartman
maintainerPATCH 308/309 netfilter: ipset: Missing gc cancellations fixed
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jozsef Kadlecsik <[email protected]>
commit 27c5a095e2518975e20a10102908ae8231699879 upstream.
The patch fdb8e12cc2cc ("netfilter: ipset: fix performance regression in swap operation") missed to add the calls to gc cancellations at the error path of create operations and at module unload. Also, because the half of the destroy operations now executed by a function registered by call_rcu(), neither NFNL_SUBSYS_IPSET mutex or rcu read lock is held and therefore the checking of them results false warnings.
--- net/netfilter/ipset/ip_set_core.c | 2 ++ net/netfilter/ipset/ip_set_hash_gen.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
net/netfilter/ipset/ip_set_core.c +2 -0
@@ -1154,6 +1154,7 @@ static int ip_set_create(struct sk_buffreturn ret; cleanup: + set->variant->cancel_gc (set); set->variant->destroy (set); put_out:module_put (set->type->me);
@@ -2378,6 +2379,7 @@ ip_set_net_exit(struct net *net) set =ip_set (inst, i);if (set) {ip_set (inst, i) =NULL ; + set->variant->cancel_gc (set);ip_set_destroy_set (set); } }
net/netfilter/ipset/ip_set_hash_gen.h +2 -2
@@ -431,7 +431,7 @@ mtype_ahash_destroy(struct ip_set *set,u32 i;for (i =0 ; i <jhash_size (t->htable_bits); i++) { - n =__ipset_dereference (hbucket (t, i)); + n = (__force struct hbucket *)hbucket (t, i);if (!n)continue ;if (set->extensions &IPSET_EXT_DESTROY && ext_destroy)
@@ -451,7 +451,7 @@ mtype_destroy(struct ip_set *set)struct htype *h = set->data;struct list_head *l, *lt; -mtype_ahash_destroy (set,ipset_dereference_nfnl (h->table), true); +mtype_ahash_destroy (set, (__force struct htable *)h->table, true);list_for_each_safe (l, lt, &h->ad) {list_del (l);kfree (l);
Greg Kroah-Hartman
maintainerPATCH 309/309 nfsd: dont take fi_lock in nfsd_break_deleg_cb()
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <[email protected]>
commit 5ea9a7c5fe4149f165f0e3b624fe08df02b6c301 upstream.
A recent change to check_for_locks() changed it to take ->flc_lock while holding ->fi_lock. This creates a lock inversion (reported by lockdep) because there is a case where ->fi_lock is taken while holding ->flc_lock.
->flc_lock is held across ->fl_lmops callbacks, and nfsd_break_deleg_cb() is one of those and does take ->fi_lock. However it doesn't need to.
Prior to v4.17-rc1~110^2~22 ("nfsd: create a separate lease for each delegation") nfsd_break_deleg_cb() would walk the ->fi_delegations list and so needed the lock. Since then it doesn't walk the list and doesn't need the lock.
Two actions are performed under the lock. One is to call nfsd_break_one_deleg which calls nfsd4_run_cb(). These doesn't act on the nfs4_file at all, so don't need the lock.
The other is to set ->fi_had_conflict which is in the nfs4_file. This field is only ever set here (except when initialised to false) so there is no possible problem will multiple threads racing when setting it.
The field is tested twice in nfs4_set_delegation(). The first test does not hold a lock and is documented as an opportunistic optimisation, so it doesn't impose any need to hold ->fi_lock while setting ->fi_had_conflict.
The second test in nfs4_set_delegation() *is* make under ->fi_lock, so removing the locking when ->fi_had_conflict is set could make a change. The change could only be interesting if ->fi_had_conflict tested as false even though nfsd_break_one_deleg() ran before ->fi_lock was unlocked. i.e. while hash_delegation_locked() was running. As hash_delegation_lock() doesn't interact in any way with nfs4_run_cb() there can be no importance to this interaction.
So this patch removes the locking from nfsd_break_one_deleg() and moves the final test on ->fi_had_conflict out of the locked region to make it clear that locking isn't important to the test. It is still tested *after* vfs_setlease() has succeeded. This might be significant and as vfs_setlease() takes ->flc_lock, and nfsd_break_one_deleg() is called under ->flc_lock this "after" is a true ordering provided by a spinlock.
--- fs/nfsd/nfs4state.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
fs/nfsd/nfs4state.c +5 -6
@@ -4945,10 +4945,8 @@ nfsd_break_deleg_cb(struct file_lock *fl*/ fl->fl_break_time =0 ; -spin_lock (&fp->fi_lock); fp->fi_had_conflict = true;nfsd_break_one_deleg (dp); -spin_unlock (&fp->fi_lock);return false; }
@@ -5557,12 +5555,13 @@ nfs4_set_delegation(struct nfsd4_open *oif (status) goto out_unlock; + status = -EAGAIN ; +if (fp->fi_had_conflict) + goto out_unlock; +spin_lock (&state_lock);spin_lock (&fp->fi_lock); -if (fp->fi_had_conflict) - status = -EAGAIN ; -else - status =hash_delegation_locked (dp, fp); + status =hash_delegation_locked (dp, fp);spin_unlock (&fp->fi_lock);spin_unlock (&state_lock);
Works fine on my desktop with model name : AMD Ryzen 5 5600 6-Core
Processor and Arch Linux
Den tis 20 feb. 2024 kl 22:27 skrev Greg Kroah-Hartman <[email protected]>:
Quoted 1,301 lines
This is the start of the stable review cycle for the 6.7.6 release. There are 309 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, 22 Feb 2024 20:55:42 +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.7.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:Greg Kroah-Hartman <[email protected]>
Linux 6.7.6-rc1NeilBrown <[email protected]>
nfsd: don't takefi_lockinnfsd_break_deleg_cb()Jozsef Kadlecsik <[email protected]>
netfilter: ipset: Missing gc cancellations fixedJozsef Kadlecsik <[email protected]>
netfilter: ipset: fix performance regression in swap operationMark Brown <[email protected]>
usb: typec: tpcm: Fix issues with power being removed during resetDamien Le Moal <[email protected]>
block: fix partial zone append completion handling inreq_bio_endio()Junxiao Bi <[email protected]>
md: bypass block throttle for superblock updateSteven Rostedt (Google) <[email protected]>
tracing: Inform kmemleak ofsaved_cmdlinesallocationPetr Pavlu <[email protected]>
tracing: FixHAVE_DYNAMIC_FTRACE_WITH_REGSifdefOleg Nesterov <[email protected]>
fs/proc: do_task_stat: use sig->stats_lock to gather the threads/children statsOleg Nesterov <[email protected]>
fs/proc:do_task_stat: movethread_group_cputime_adjusted()outside oflock_task_sighand()Konrad Dybcio <[email protected]>
pmdomain: core: Move the unused cleanup to a_syncinitcallOleksij Rempel <[email protected]>
can: j1939: Fix UAF in j1939_sk_match_filter during setsockopt(SO_J1939_FILTER)Ziqi Zhao <[email protected]>
can: j1939: prevent deadlock by changingj1939_socks_lockto rwlockMaxime Jayat <[email protected]>
can: netlink: Fix TDCO calculation using the old data bittimingMaximilian Heyne <[email protected]>
xen/events: close evtchn after mapping cleanupNuno Sa <[email protected]>
of: property: fix typo in io-channelsVegard Nossum <[email protected]>
docs:kernel_feat.py: fix build error for missing filesJan Kara <[email protected]>
blk-wbt: Fix detection of dirty-throttled tasksHuacai Chen <[email protected]>
LoongArch: Fix earlycon parameter if KASAN enabledPrakash Sangappa <[email protected]>
mm: hugetlb pages should not be reserved byshmat()ifSHM_NORESERVEOscar Salvador <[email protected]>
fs,hugetlb: fix NULL pointer dereference inhugetlbs_fill_superDave Airlie <[email protected]>
nouveau/gsp: use correct size for registry rpc.Rishabh Dave <[email protected]>
ceph: prevent use-after-free inencode_cap_msg()Shradha Gupta <[email protected]>
hv_netvsc: Register VF innetvsc_probeifNET_DEVICE_REGISTERmissedPetr Tesarik <[email protected]>
net: stmmac: protect updates of 64-bit statistics countersJan Kiszka <[email protected]>
riscv/efistub: Ensure GP-relative addressing is not usedGeert Uytterhoeven <[email protected]>
pmdomain: renesas: r8a77980-sysc: CR7 must be always onSinthu Raja <[email protected]>
net: ethernet: ti:cpsw_new: enablemac_managed_pmto fix mdioSeongJae Park <[email protected]>
mm/damon/sysfs-schemes: fix wrong DAMOS tried regions update timeout setupAlexandra Winter <[email protected]>
s390/qeth: Fix potential loss of L3-IP@ in case of network issuesSinthu Raja <[email protected]>
net: ethernet: ti: cpsw: enablemac_managed_pmto fix mdioChristian Brauner <[email protected]>
fs: relaxmount_setattr()permission checksDaniel Bristot de Oliveira <[email protected]>
tools/rtla: FixMakefilecompiler options for clangDaniel Bristot de Oliveira <[email protected]>
tools/rtla: Fix uninitialized bucket/data->bucket_size warningJohn Kacur <[email protected]>
tools/rtla: Exit withEXIT_SUCCESSwhen help is invokedDaniel Bristot de Oliveira <[email protected]>
tools/rtla: Fix clang warning aboutmount_pointvar sizelimingming3 <[email protected]>
tools/rtla: Replace setting prio with nice forSCHED_OTHERDaniel Bristot de Oliveira <[email protected]>
tools/rtla: Remove unusedsched_getattr()functionDaniel Bristot de Oliveira <[email protected]>
tools/rv: FixMakefilecompiler options for clangDaniel Bristot de Oliveira <[email protected]>
tools/rv: Fixcurr_reactoruninitialized variableMario Limonciello <[email protected]>
ASoC: amd: yc: Add DMI quirk for Lenovo Ideapad Pro 5 16ARP8Gergo Koteles <[email protected]>
ASoC: tas2781: add module parameter totascodec_init()Curtis Malainey <[email protected]>
ASoC: SOF: IPC3: fix message bounds on ipc opsEaswar Hariharan <[email protected]>
arm64: Subscribe Microsoft Azure Cobalt 100 to ARM Neoverse N2 errataMark Brown <[email protected]>
arm64/signal: Don't assume thatTIF_SVEmeans we saved SVE stateFred Ai <[email protected]>
mmc: sdhci-pci-o2micro: Fix a warm reboot issue that disk can't be detected by BIOSDamien Le Moal <[email protected]>
zonefs: Improve error handlingSebastian Ene <[email protected]>
KVM: arm64: Fix circular locking dependencyChristian Borntraeger <[email protected]>
KVM: s390: vsie: fix race during shadow creationSteve French <[email protected]>
smb: Fix regression in writes when non-standard maximum write size negotiatedPaulo Alcantara <[email protected]>
smb: client: set correct id, uid and cruid for multiuser automountsMohammad Rahimi <[email protected]>
thunderbolt: Fix setting the CNS bit inROUTER_CS_5Marc Zyngier <[email protected]>
irqchip/gic-v3-its: Fix GICv4.1 VPE affinity updateMarc Zyngier <[email protected]>
irqchip/gic-v3-its: Restore quirk probing for ACPI-based systemsDoug Berger <[email protected]>
irqchip/irq-brcmstb-l2: Add write memory barrier before exitDan Carpenter <[email protected]>
PCI: dwc: Fix a 64bit bug indw_pcie_ep_raise_msix_irq()Emmanuel Grumbach <[email protected]>
wifi: iwlwifi: mvm: fix a crash when we run out of stationsJohannes Berg <[email protected]>
wifi: mac80211: reload info pointer in ieee80211_tx_dequeue()Johannes Berg <[email protected]>
wifi: cfg80211: fix wiphy delayed work queueingJohannes Berg <[email protected]>
wifi: iwlwifi: fix double-free bugDaniel de Villiers <[email protected]>
nfp: flower: prevent re-adding mac index for bonded portJames Hershaw <[email protected]>
nfp: enableNETDEV_XDP_ACT_REDIRECTfeature flagDaniel Basilio <[email protected]>
nfp: use correct macro for LengthSelect in BAR configHerbert Xu <[email protected]>
crypto:algif_hash- Remove bogus SGL free on zero-length error pathKim Phillips <[email protected]>
crypto: ccp - Fix null pointer dereference in__sev_platform_shutdown_lockedRyusuke Konishi <[email protected]>
nilfs2: fix hang innilfs_lookup_dirty_data_buffers()Ryusuke Konishi <[email protected]>
nilfs2: fix data corruption in dsync block recovery for small block sizesShuming Fan <[email protected]>
ALSA: hda/realtek: add IDs for Dell dual spk platformbo liu <[email protected]>
ALSA: hda/conexant: Add quirk for SWS JS201DEniac Zhang <[email protected]>
ALSA: hda/realtek: fix mute/micmute LED For HP mt645Krzysztof Kozlowski <[email protected]>
gpiolib: addgpiod_to_gpio_device()stub for !GPIOLIBKrzysztof Kozlowski <[email protected]>
gpiolib: addgpio_device_get_base()stub for !GPIOLIBAlexander Stein <[email protected]>
mmc: slot-gpio: Allow non-sleeping GPIO roJens Axboe <[email protected]>
io_uring/net: fix multishot accept overflow handlingSteve Wahl <[email protected]>
x86/mm/ident_map: Use gbpages only where full GB page should be mapped.Mingwei Zhang <[email protected]>
KVM: x86/pmu: Fix type length error when reading pmu->fixed_ctr_ctrlPrasad Pandit <[email protected]>
KVM: x86: makeKVM_REQ_NMIrequest iff NMI pending for vcpuAndrei Vagin <[email protected]>
x86/fpu: Stop relying on userspace for info to fault in xsave bufferAleksander Mazur <[email protected]>
x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6Jiri Slaby (SUSE) <[email protected]>
serial: mxs-auart: fix txJiri Slaby (SUSE) <[email protected]>
serial: core: introduceuart_port_tx_flags()Shrikanth Hegde <[email protected]>
powerpc/pseries: fix accuracy of stolen timeDavid Engraf <[email protected]>
powerpc/cputable: Add missingPPC_FEATURE_BOOKEon PPC64 Book-ENaveen N Rao <[email protected]>
powerpc/64: Set task pt_regs->link to the LR value on scv entryMasami Hiramatsu (Google) <[email protected]>
ftrace: FixDIRECT_CALLSto useSAVE_REGSby defaultHugo Villeneuve <[email protected]>
serial: max310x: prevent infinite while() loop in port startupHugo Villeneuve <[email protected]>
serial: max310x: fail probe if clock crystal is unstableHugo Villeneuve <[email protected]>
serial: max310x: improve crystal stable clock detectionHugo Villeneuve <[email protected]>
serial: max310x: set default value when reading clock ready bitGui-Dong Han <[email protected]>
serial: core: Fix atomicity violation inuart_tiocmgetHui Zhou <[email protected]>
nfp: flower: fix hardware offload for the transfer layer portHui Zhou <[email protected]>
nfp: flower: add hardware offload check for post ct entryAndrew Lunn <[email protected]>
net: dsa: mv88e6xxx: Fix failed probe due to unsupported C45 readsVincent Donnefort <[email protected]>
ring-buffer: Cleanring_buffer_poll_wait()error returnSouradeep Chakrabarti <[email protected]>
hv_netvsc: Fix race condition betweennetvsc_probeandnetvsc_removeLijo Lazar <[email protected]>
drm/amdgpu: Avoid fetching VRAM vendor infoTom Chung <[email protected]>
drm/amd/display: Preserve original aspect ratio in create streamRoman Li <[email protected]>
drm/amd/display: Fix array-index-out-of-bounds indcn35_clkmgrNathan Chancellor <[email protected]>
drm/amd/display: Increase frame-larger-than for alldisplay_mode_vbafilesFangzhi Zuo <[email protected]>
drm/amd/display: Fix MST Null Ptr for RVThong <[email protected]>
drm/amdgpu/soc21: update VCN 4 max HEVC encoding resolutionPhilip Yang <[email protected]>
drm/prime: Support page array >= 4GBVille Syrjälä <[email protected]>
drm/i915/dp: Limit SST link rate to <=8.1GbpsZhikai Zhai <[email protected]>
drm/amd/display: Add align done checkRob Clark <[email protected]>
drm/msm: Wire up tlb opsArunpravin Paneer Selvam <[email protected]>
drm/buddy: Fixalloc_range()error handling codeTimur Tabi <[email protected]>
drm/nouveau: fix several DMA buffer leaksFedor Pchelkin <[email protected]>
ksmbd: free aux buffer ifksmbd_iov_pin_rsp_readfailsOleg Nesterov <[email protected]>
getrusage: use sig->stats_lock rather than lock_task_sighand()Oleg Nesterov <[email protected]>
getrusage: movethread_group_cputime_adjusted()outside oflock_task_sighand()Steven Rostedt (Google) <[email protected]>
eventfs: Keep all directory links at 1Steven Rostedt (Google) <[email protected]>
eventfs: Remove fsnotify*() functions fromlookup()Steven Rostedt (Google) <[email protected]>
eventfs: Restructureeventfs_inodestructure to be more condensedSteven Rostedt (Google) <[email protected]>
eventfs: Warn if aneventfs_inodeis freed withoutis_freedbeing setLinus Torvalds <[email protected]>
eventfs: Get rid of dentry pointers without refcountsLinus Torvalds <[email protected]>
eventfs: Clean up dentry ops and add revalidate functionLinus Torvalds <[email protected]>
eventfs: Remove unusedd_parentpointer fieldLinus Torvalds <[email protected]>
tracefs: dentry lookup crapectomyLinus Torvalds <[email protected]>
tracefs: Avoid using the ei->dentry pointer unnecessarilyLinus Torvalds <[email protected]>
eventfs: Initialize the tracefs inode properlySteven Rostedt (Google) <[email protected]>
tracefs: Zero out thetracefs_inodewhen allocating itSteven Rostedt (Google) <[email protected]>
eventfs: Save directory inodes in theeventfs_inodestructureErick Archer <[email protected]>
eventfs: Usekcalloc()instead ofkzalloc()Steven Rostedt (Google) <[email protected]>
eventfs: Do not create dentries nor inodes initerate_sharedSteven Rostedt (Google) <[email protected]>
eventfs: Have the inodes all for files and directories all be the sameSteven Rostedt (Google) <[email protected]>
eventfs: Shortcuteventfs_iterate()by skipping entries already readSteven Rostedt (Google) <[email protected]>
eventfs: Read ei->entries before ei->children in eventfs_iterate()Steven Rostedt (Google) <[email protected]>
eventfs: Do ctx->pos update for all iterations in eventfs_iterate()Steven Rostedt (Google) <[email protected]>
eventfs: Have eventfs_iterate() stop immediately if ei->is_freed is setSteven Rostedt (Google) <[email protected]>
eventfs: Stop usingdcache_readdir()forgetdents()Steven Rostedt (Google) <[email protected]>
eventfs: Remove "lookup" parameter from create_dir/file_dentry()Sean Young <[email protected]>
media: rc: bpf attach/detach requires write permissionEugen Hristev <[email protected]>
pmdomain: mediatek: fix race conditions with genpdSam Protsenko <[email protected]>
iio: pressure: bmp280: Add missing bmp085 to SPI id tableRandy Dunlap <[email protected]>
iio: imu: bno055: serdev requires REGMAPNuno Sa <[email protected]>
iio: imu: adis: ensure proper DMA alignmentNuno Sa <[email protected]>
iio: adc:ad_sigma_delta: ensure proper DMA alignmentMario Limonciello <[email protected]>
iio: accel: bma400: Fix a compilation problemNuno Sa <[email protected]>
iio: commom:st_sensors: ensure proper DMA alignmentDinghao Liu <[email protected]>
iio: core: fix memleak iniio_device_register_sysfszhili.liu <[email protected]>
iio: magnetometer: rm3100: add boundary check for the value read fromRM3100_REG_TMRCDavid Schiller <[email protected]>
staging: iio: ad5933: fix type mismatch regressionTejun Heo <[email protected]>
Revert "workqueue: Override implicit ordered attribute inworkqueue_apply_unbound_cpumask()"Masami Hiramatsu (Google) <[email protected]>
tracing/probes: Fix to search structure fields correctlyMasami Hiramatsu (Google) <[email protected]>
tracing/probes: Fix to set arg size and fmt after setting type from BTFMasami Hiramatsu (Google) <[email protected]>
tracing/probes: Fix to show a parse error for bad type for $commThorsten Blum <[email protected]>
tracing/synthetic: Fixtrace_string()return valueSteven Rostedt (Google) <[email protected]>
tracing: Fix wasted memory insaved_cmdlineslogicDaniel Bristot de Oliveira <[email protected]>
tracing/timerlat: Movehrtimer_inittotimerlat_fdopen()Baokun Li <[email protected]>
ext4: avoidbb_freeandbb_fragmentsinconsistency inmb_free_blocks()Baokun Li <[email protected]>
ext4: fix double-free of blocks due to wrong extentsmoved_lenEkansh Gupta <[email protected]>
misc: fastrpc: Mark all sessions as invalid incb_removeCarlos Llamas <[email protected]>
binder: signal epoll threads of self-workAndy Chi <[email protected]>
ALSA: hda/realtek: fix mute/micmute LEDs for HP ZBook PowerVitaly Rodionov <[email protected]>
ALSA: hda/cs8409: Suppress vmaster control for Dolphin modelsKrzysztof Kozlowski <[email protected]>
ASoC: codecs: wcd938x: handle deferred probeKailang Yang <[email protected]>
ALSA: hda/realtek - Add speaker pin verbtable for Dell dual speaker platformEdson Juliano Drosdeck <[email protected]>
ALSA: hda/realtek: Enable headset mic on Vaio VJFE-ADLNathan Chancellor <[email protected]>
modpost: Add '.ltext' and '.ltext.*' toTEXT_SECTIONSNathan Chancellor <[email protected]>
um: Fix adding '-no-pie' for clangJan Beulich <[email protected]>
xen-netback: properly sync TX responsesHelge Deller <[email protected]>
parisc: BTLB: Fix crash when setting up BTLB at CPU bringupHelge Deller <[email protected]>
parisc: Fix random data corruption from exception handlerEsben Haabendal <[email protected]>
net: stmmac: do not clear TBS enable bit on link up/downNikita Zhandarovich <[email protected]>
net: hsr: removeWARN_ONCE()insend_hsr_supervision_frame()Fedor Pchelkin <[email protected]>
nfc: nci: freerx_data_reassemblyskb on NCI device cleanupNathan Chancellor <[email protected]>
kbuild: Fix changing ELF file type for output ofgen_btffor big endianJosé Relvas <[email protected]>
ALSA: hda/realtek: Apply headset jack quirk for non-bass alc287 thinkpadsTakashi Sakamoto <[email protected]>
firewire: core: correct documentation offw_csr_string()kernel APIOndrej Mosnacek <[email protected]>
lsm: fix the logic insecurity_inode_getsecctx()Ondrej Mosnacek <[email protected]>
lsm: fix default return value of the socket_getpeersec_*() hooksFangzhi Zuo <[email protected]>
drm/amd/display: Fix dcn35 8k30 Underflow/Corruption IssueWenjing Liu <[email protected]>
drm/amd/display: fix incorrectmpc_combinearray sizeDavid McFarland <[email protected]>
drm/amd: Don't init MEC2 firmware when it fails to loadFriedrich Vock <[email protected]>
drm/amdgpu: Reset IHOVERFLOW_CLEARbitSebastian Ott <[email protected]>
drm/virtio: Set segment size forvirtio_gpudeviceVaishnav Achath <[email protected]>
spi: omap2-mcspi: Revert FIFO support without DMAKeqi Wang <[email protected]>
connector/cn_proc: revert "connector: Fixproc_event_num_listenerscount not cleared"Rob Clark <[email protected]>
Revert "drm/msm/gpu: Push gpu lock down past runpm"Mario Limonciello <[email protected]>
Revert "drm/amd: flush any delayed gfxoff on suspend entry"Lee Duncan <[email protected]>
scsi: Revert "scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock"Tomi Valkeinen <[email protected]>
media: Revert "media: rkisp1: DropIRQF_SHARED"Michael Ellerman <[email protected]>
Revert "powerpc/pseries/iommu: Fix iommu initialisation during DLPAR add"Paolo Abeni <[email protected]>
mptcp: really cope with fastopen raceGeliang Tang <[email protected]>
mptcp: check addrs list inuserspace_pm_get_local_idPaolo Abeni <[email protected]>
mptcp: fix rcv space initializationPaolo Abeni <[email protected]>
mptcp: drop thepush_pendingfieldGeliang Tang <[email protected]>
selftests: mptcp: addmptcp_lib_kill_waitMatthieu Baerts (NGI0) <[email protected]>
selftests: mptcp: allow changing subtests prefixMatthieu Baerts (NGI0) <[email protected]>
selftests: mptcp: increase timeout to 30 minMatthieu Baerts (NGI0) <[email protected]>
selftests: mptcp: add missing kconfig for NF MangleMatthieu Baerts (NGI0) <[email protected]>
selftests: mptcp: add missing kconfig for NF Filter in v6Matthieu Baerts (NGI0) <[email protected]>
selftests: mptcp: add missing kconfig for NF FilterPaolo Abeni <[email protected]>
mptcp: fix data re-injection from stale subflowArnd Bergmann <[email protected]>
kallsyms: ignore ARMv4 thunks along with othersRadek Krejci <[email protected]>
modpost: trim leading spaces when processing source files listJean Delvare <[email protected]>
i2c: i801: Fix block process call transactionsArnd Bergmann <[email protected]>
i2c: pasemi: split driver into two separate modulesShivaprasad G Bhat <[email protected]>
powerpc/iommu: Fix the missingiommu_group_put()during platform domain attachMichael Ellerman <[email protected]>
powerpc/kasan: Limit KASAN thread size increase to 32KBMarc Zyngier <[email protected]>
irqchip/gic-v3-its: Handle non-coherent GICv4 redistributorsBibo Mao <[email protected]>
irqchip/loongson-eiointc: Use correct struct type ineiointc_domain_alloc()Viken Dadhaniya <[email protected]>
i2c: qcom-geni: Correct I2C TRE sequenceDan Carpenter <[email protected]>
cifs: fix underflow inparse_server_interfaces()Cosmin Tanislav <[email protected]>
iio: adc: ad4130: only setGPIO_CTRLif pin is unusedCosmin Tanislav <[email protected]>
iio: adc: ad4130: zero-initialize clock init dataAlex Williamson <[email protected]>
PCI: Fix active state requirement in PME pollingGreg Kroah-Hartman <[email protected]>
Revert "kobject: Remove redundant checks for whether ktype is NULL"Jiangfeng Xiao <[email protected]>
powerpc/kasan: Fix addr error caused by page alignmentMatthias Schiffer <[email protected]>
powerpc/6xx: set High BAT Enable flag onG2_LEcoresGaurav Batra <[email protected]>
powerpc/pseries/iommu: Fix iommu initialisation during DLPAR addSaravana Kannan <[email protected]>
driver core:fw_devlink: Improve detection of overlapping cyclesZhipeng Lu <[email protected]>
media:ir_toy: fix a memleak inirtoy_txKonrad Dybcio <[email protected]>
interconnect: qcom: sm8550: Enablesync_stateKonrad Dybcio <[email protected]>
interconnect: qcom: sc8180x: Mark CO0 BCM keepaliveUttkarsh Aggarwal <[email protected]>
usb: dwc3: gadget: Fix NULL pointer dereference indwc3_gadget_suspendUdipto Goswami <[email protected]>
usb: core: Prevent null pointer dereference inupdate_port_device_stateXu Yang <[email protected]>
usb: chipidea: core: handle power lost in workqueueyuan linyu <[email protected]>
usb:f_mass_storage: forbid async queue when shutdown happenOliver Neukum <[email protected]>
USB: hub: check for alternate port before enablingA_ALT_HNP_SUPPORTChristian A. Ehrhardt <[email protected]>
usb:ucsi_acpi: Fix command completion handlingSean Anderson <[email protected]>
usb: ulpi: Fix debugfs directory leakChristian A. Ehrhardt <[email protected]>
usb: ucsi: Add missingppm_lockSrinivas Pandruvada <[email protected]>
iio: hid-sensor-als: Return 0 forHID_USAGE_SENSOR_TIME_TIMESTAMPJason Gerecke <[email protected]>
HID: wacom: Do not register input devices until afterhid_hw_startTatsunosuke Tobita <[email protected]>
HID: wacom: generic: Avoid reporting a serial of '0' to userspaceJohan Hovold <[email protected]>
HID: i2c-hid-of: fix NULL-deref on failed power upBenjamin Tissoires <[email protected]>
HID: bpf: actually free hdev memory after attaching a HID-BPF programBenjamin Tissoires <[email protected]>
HID: bpf: remove doublefdget()Luka Guzenko <[email protected]>
ALSA: hda/realtek: Enable Mute LED on HP Laptop 14-fq0xxxDavid Senoner <[email protected]>
ALSA: hda/realtek: Fix the external mic not being recognised for Acer Swift 1 SF114-32Helge Deller <[email protected]>
parisc: Prevent hung tasks when printing inventory on serial consoleTechno Mooney <[email protected]>
ASoC: amd: yc: Add DMI quirk for MSI Bravo 15 C7VFMikulas Patocka <[email protected]>
dm-crypt, dm-verity: disable taskletsDave Airlie <[email protected]>
nouveau: offload fence uevents work to workqueueMichael Kelley <[email protected]>
scsi: storvsc: Fix ring buffer size calculationNico Pache <[email protected]>
selftests: mm: fixmap_hugetlbfailure on 64K page size systemsAudra Mitchell <[email protected]>
selftests/mm: Updateva_high_addr_switch.shto check CPU for la57 flagZach O'Keefe <[email protected]>
mm/writeback: fix possible divide-by-zero inwb_dirty_limits(), againJan Kara <[email protected]>
readahead: avoid multiple marked readahead pagesMuhammad Usama Anjum <[email protected]>
selftests/mm: switch to bash from shSidhartha Kumar <[email protected]>
fs/hugetlbfs/inode.c:mm/memory-failure.c: fix hugetlbfs hwpoison handlingMasami Hiramatsu (Google) <[email protected]>
tracing/trigger: Fix to return error if failed to alloc snapshotSamuel Holland <[email protected]>
scs: addCONFIG_MMUdependency forvfree_atomic()Ryan Roberts <[email protected]>
selftests/mm:ksm_testsshould onlyMADV_HUGEPAGEvalid memoryLokesh Gidra <[email protected]>
userfaultfd: fixmmap_changingchecking inmfill_atomic_hugetlbRyan Roberts <[email protected]>
mm:thp_get_unmapped_areamust honour topdown preferenceIvan Vecera <[email protected]>
i40e: Fix waiting for queues of all VSIs to be disabledIvan Vecera <[email protected]>
i40e: Do not allow untrusted VF to remove administratively set MACJiaxun Yang <[email protected]>
mm/memory: Use exception ip to search exception tablesJiaxun Yang <[email protected]>
ptrace: Introduceexception_iparch hookGuenter Roeck <[email protected]>
MIPS: Add 'memory' clobber tocsum_ipv6_magic()inline assemblerArnd Bergmann <[email protected]>
nouveau/svm: fixkvcalloc()argument orderBreno Leitao <[email protected]>
net: sysfs: Fix /sys/class/net/<iface> path for statisticsManasi Navare <[email protected]>
drm/i915/dsc: Fix the macro that calculates DSCC_/DSCA_ PPS reg addressAlexey Khoroshilov <[email protected]>
ASoC: rt5645: Fix deadlock in rt5645_jack_detect_work()Uwe Kleine-König <[email protected]>
spi: ppc4xx: Drop write-only variableJakub Kicinski <[email protected]>
net: tls: fix returned read length with async decryptSabrina Dubroca <[email protected]>
net: tls: fix use-after-free with partial reads and async decryptJakub Kicinski <[email protected]>
net: tls: handle backlogging of crypto requestsJakub Kicinski <[email protected]>
tls: fix race between tx work scheduling and socket closeJakub Kicinski <[email protected]>
tls: fix race between async notify and socket closeJakub Kicinski <[email protected]>
net: tls: factor out tls_*crypt_async_wait()Horatiu Vultur <[email protected]>
lan966x: Fix crash when adding interface under a lagAaron Conole <[email protected]>
net: openvswitch: limit the number of recursions from action setsIdo Schimmel <[email protected]>
selftests: forwarding: Fix bridge locked port test flakinessIdo Schimmel <[email protected]>
selftests: forwarding: Suppress grep warningsIdo Schimmel <[email protected]>
selftests: forwarding: Fix bridge MDB test flakinessIdo Schimmel <[email protected]>
selftests: forwarding: Fix layer 2 miss test flakinessIdo Schimmel <[email protected]>
selftests: net: Fix bridge backup port test flakinessHangbin Liu <[email protected]>
selftests/net: converttest_bridge_backup_port.shto run it in unique namespaceHojin Nam <[email protected]>
perf: CXL: fix mismatched cpmu event opcodeLukas Bulwahn <[email protected]>
ALSA: hda/cs35l56: select intended configFW_CS_DSPSaravana Kannan <[email protected]>
of: property: Improve finding the supplier of a remote-endpoint propertySaravana Kannan <[email protected]>
of: property: Improve finding the consumer of a remote-endpoint propertyParav Pandit <[email protected]>
devlink: Fix command annotation documentationMagnus Karlsson <[email protected]>
bonding: do not reportNETDEV_XDP_ACT_XSK_ZEROCOPYChuck Lever <[email protected]>
net/handshake: Fixhandshake_req_destroy_test1Jiri Pirko <[email protected]>
net/mlx5: DPLL, Fix possible use after free after delayed work timer triggersJiri Pirko <[email protected]>
dpll: fix possible deadlock during netlink dump operationRanjani Sridharan <[email protected]>
ASoC: SOF: ipc3-topology: Fix pipeline tear down logicDan Carpenter <[email protected]>
wifi: iwlwifi: uninitialized variable iniwl_acpi_get_ppag_table()Dan Carpenter <[email protected]>
wifi: iwlwifi: Fix some error codesMiri Korenblit <[email protected]>
wifi: iwlwifi: clearlink_idintime_eventAmadeusz Sławiński <[email protected]>
ASoC: Intel: avs: Fix dynamic port assignment when TDM is setCarlos Song <[email protected]>
spi: imx: fix the burst length at DMA mode and CPU modeCezary Rojewski <[email protected]>
ASoC: Intel: avs: Fixpci_probe()error pathMickaël Salaün <[email protected]>
selftests/landlock: Fix capability fornet_testRob Clark <[email protected]>
drm/msm/gem: Fix double resv lock aquireChristian A. Ehrhardt <[email protected]>
of: unittest: Fix compile in the non-dynamic caseHu Yadi <[email protected]>
selftests/landlock: Fixfs_testbuild with old libcHu Yadi <[email protected]>
selftests/landlock: Fixnet_testbuild with old libcNícolas F. R. A. Prado <[email protected]>
kselftest: dt: Stop relying on dirname to improve performanceSaravana Kannan <[email protected]>
driver core: Fixdevice_link_flag_is_sync_state_only()Josef Bacik <[email protected]>
btrfs: don't dropextent_mapfor free space inode on write errorFilipe Manana <[email protected]>
btrfs: reject encoded write if inode has nodatasum flag setFilipe Manana <[email protected]>
btrfs: don't reserve space for checksums when writing to nocow filesDavid Sterba <[email protected]>
btrfs: send: return EOPNOTSUPP on unknown flagsBoris Burkov <[email protected]>
btrfs: forbid deleting live subvol qgroupQu Wenruo <[email protected]>
btrfs: do notASSERT()if the newly created subvolume already got readBoris Burkov <[email protected]>
btrfs: forbid creating subvol qgroupsFilipe Manana <[email protected]>
btrfs: don't refill whole delayed refs block reserve when starting transactionFilipe Manana <[email protected]>
btrfs: add new unused block groups to the list of unused block groupsFilipe Manana <[email protected]>
btrfs: do not delete unused block group if it may be used soonFilipe Manana <[email protected]>
btrfs: add and use helper to check if block group is usedYang Shi <[email protected]>
mm: mmap: mapMAP_STACKtoVM_NOHUGEPAGEYang Shi <[email protected]>
mm:huge_memory: don't force huge page alignment on 32 bitLinus Torvalds <[email protected]>
update workarounds for gcc "asm goto" issueLinus Torvalds <[email protected]>
work around gcc bugs with 'asm goto' with outputs-------------
Diffstat:
.../ABI/testing/sysfs-class-net-statistics | 48 +- Documentation/arch/arm64/silicon-errata.rst | 7 + Documentation/netlink/specs/dpll.yaml | 4 - Documentation/networking/devlink/devlink-port.rst | 2 +- Documentation/sphinx/kernel_feat.py | 2 +- Makefile | 4 +- arch/Kconfig | 1 + arch/arc/include/asm/jump_label.h | 4 +- arch/arm/include/asm/jump_label.h | 4 +- arch/arm64/include/asm/alternative-macros.h | 4 +- arch/arm64/include/asm/cputype.h | 4 + arch/arm64/include/asm/jump_label.h | 4 +- arch/arm64/kernel/cpu_errata.c | 3 + arch/arm64/kernel/fpsimd.c | 2 +- arch/arm64/kernel/signal.c | 4 +- arch/arm64/kvm/pkvm.c | 27 +- arch/csky/include/asm/jump_label.h | 4 +- arch/loongarch/include/asm/jump_label.h | 4 +- arch/loongarch/mm/kasan_init.c | 3 + arch/mips/include/asm/checksum.h | 3 +- arch/mips/include/asm/jump_label.h | 4 +- arch/mips/include/asm/ptrace.h | 2 + arch/mips/kernel/ptrace.c | 7 + arch/parisc/Kconfig | 1 - arch/parisc/include/asm/assembly.h | 1 + arch/parisc/include/asm/extable.h | 64 ++ arch/parisc/include/asm/jump_label.h | 4 +- arch/parisc/include/asm/special_insns.h | 6 +- arch/parisc/include/asm/uaccess.h | 48 +- arch/parisc/kernel/cache.c | 6 +- arch/parisc/kernel/drivers.c | 3 + arch/parisc/kernel/unaligned.c | 44 +- arch/parisc/mm/fault.c | 11 +- arch/powerpc/include/asm/jump_label.h | 4 +- arch/powerpc/include/asm/reg.h | 2 + arch/powerpc/include/asm/thread_info.h | 2 +- arch/powerpc/include/asm/uaccess.h | 12 +- arch/powerpc/kernel/cpu_setup_6xx.S | 20 +- arch/powerpc/kernel/cpu_specs_e500mc.h | 3 +- arch/powerpc/kernel/interrupt_64.S | 4 +- arch/powerpc/kernel/iommu.c | 4 +- arch/powerpc/kernel/irq_64.c | 2 +- arch/powerpc/mm/kasan/init_32.c | 1 + arch/powerpc/platforms/pseries/lpar.c | 8 +- arch/riscv/include/asm/bitops.h | 8 +- arch/riscv/include/asm/cpufeature.h | 4 +- arch/riscv/include/asm/jump_label.h | 4 +- arch/s390/include/asm/jump_label.h | 4 +- arch/s390/kvm/vsie.c | 1 - arch/s390/mm/gmap.c | 1 + arch/sparc/include/asm/jump_label.h | 4 +- arch/um/Makefile | 4 +- arch/um/include/asm/cpufeature.h | 2 +- arch/x86/Kconfig.cpu | 2 +- arch/x86/include/asm/cpufeature.h | 2 +- arch/x86/include/asm/jump_label.h | 6 +- arch/x86/include/asm/rmwcc.h | 2 +- arch/x86/include/asm/special_insns.h | 2 +- arch/x86/include/asm/uaccess.h | 10 +- arch/x86/kernel/fpu/signal.c | 13 +- arch/x86/kvm/svm/svm_ops.h | 6 +- arch/x86/kvm/vmx/pmu_intel.c | 2 +- arch/x86/kvm/vmx/vmx.c | 4 +- arch/x86/kvm/vmx/vmx_ops.h | 6 +- arch/x86/kvm/x86.c | 3 +- arch/x86/mm/ident_map.c | 23 +- arch/xtensa/include/asm/jump_label.h | 4 +- block/blk-mq.c | 9 +- block/blk-wbt.c | 4 +- crypto/algif_hash.c | 5 +- drivers/android/binder.c | 10 + drivers/base/core.c | 15 +- drivers/base/power/domain.c | 2 +- drivers/connector/cn_proc.c | 5 +- drivers/crypto/ccp/sev-dev.c | 10 +- drivers/dpll/dpll_netlink.c | 20 +- drivers/dpll/dpll_nl.c | 4 - drivers/dpll/dpll_nl.h | 2 - drivers/firewire/core-device.c | 7 +- drivers/firmware/efi/libstub/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 9 +- drivers/gpu/drm/amd/amdgpu/cik_ih.c | 6 + drivers/gpu/drm/amd/amdgpu/cz_ih.c | 5 + drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 - drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 - drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 5 + drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 6 + drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 7 + drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 6 + drivers/gpu/drm/amd/amdgpu/si_ih.c | 6 + drivers/gpu/drm/amd/amdgpu/soc21.c | 4 +- drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 6 + drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 6 + drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 6 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 +- .../amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 15 +- drivers/gpu/drm/amd/display/dc/dml/Makefile | 6 +- .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 2 +- .../amd/display/dc/dml2/dml2_translation_helper.c | 27 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 + .../display/dc/link/protocols/link_dp_training.c | 5 +- drivers/gpu/drm/drm_buddy.c | 6 + drivers/gpu/drm/drm_prime.c | 2 +- drivers/gpu/drm/i915/display/intel_dp.c | 3 + drivers/gpu/drm/i915/display/intel_vdsc_regs.h | 4 +- drivers/gpu/drm/msm/msm_gem_prime.c | 4 +- drivers/gpu/drm/msm/msm_gpu.c | 11 +- drivers/gpu/drm/msm/msm_iommu.c | 32 +- drivers/gpu/drm/msm/msm_ringbuffer.c | 7 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 2 +- drivers/gpu/drm/nouveau/nouveau_fence.c | 26 +- drivers/gpu/drm/nouveau/nouveau_fence.h | 1 + drivers/gpu/drm/nouveau/nouveau_svm.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 61 +- drivers/gpu/drm/virtio/virtgpu_drv.c | 1 + drivers/hid/bpf/hid_bpf_dispatch.c | 83 ++- drivers/hid/bpf/hid_bpf_dispatch.h | 4 +- drivers/hid/bpf/hid_bpf_jmp_table.c | 40 +- drivers/hid/i2c-hid/i2c-hid-of.c | 1 + drivers/hid/wacom_sys.c | 63 +- drivers/hid/wacom_wac.c | 9 +- drivers/i2c/busses/Makefile | 6 +- drivers/i2c/busses/i2c-i801.c | 4 +- drivers/i2c/busses/i2c-pasemi-core.c | 6 + drivers/i2c/busses/i2c-qcom-geni.c | 16 +- drivers/iio/accel/Kconfig | 2 + drivers/iio/adc/ad4130.c | 12 +- drivers/iio/imu/bno055/Kconfig | 1 + drivers/iio/industrialio-core.c | 5 +- drivers/iio/light/hid-sensor-als.c | 1 + drivers/iio/magnetometer/rm3100-core.c | 10 +- drivers/iio/pressure/bmp280-spi.c | 1 + drivers/interconnect/qcom/sc8180x.c | 1 + drivers/interconnect/qcom/sm8550.c | 1 + drivers/irqchip/irq-brcmstb-l2.c | 5 +- drivers/irqchip/irq-gic-v3-its.c | 62 +- drivers/irqchip/irq-loongson-eiointc.c | 2 +- drivers/md/dm-crypt.c | 38 +- drivers/md/dm-verity-target.c | 26 +- drivers/md/dm-verity.h | 1 - drivers/md/md.c | 7 +- .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 2 +- drivers/media/rc/bpf-lirc.c | 6 +- drivers/media/rc/ir_toy.c | 2 + drivers/media/rc/lirc_dev.c | 5 +- drivers/media/rc/rc-core-priv.h | 2 +- drivers/misc/fastrpc.c | 2 +- drivers/mmc/core/slot-gpio.c | 6 +- drivers/mmc/host/sdhci-pci-o2micro.c | 30 + drivers/net/bonding/bond_main.c | 5 +- drivers/net/can/dev/netlink.c | 2 +- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 38 +- drivers/net/ethernet/mellanox/mlx5/core/dpll.c | 2 +- .../net/ethernet/microchip/lan966x/lan966x_lag.c | 9 +- .../net/ethernet/netronome/nfp/flower/conntrack.c | 46 +- .../ethernet/netronome/nfp/flower/tunnel_conf.c | 2 +- .../net/ethernet/netronome/nfp/nfp_net_common.c | 1 + .../ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c | 6 +- drivers/net/ethernet/stmicro/stmmac/common.h | 56 +- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 15 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c | 15 +- drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 15 +- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 15 +- .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 125 +++- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 136 ++-- drivers/net/ethernet/ti/cpsw.c | 2 + drivers/net/ethernet/ti/cpsw_new.c | 3 + drivers/net/hyperv/netvsc.c | 5 +- drivers/net/hyperv/netvsc_drv.c | 82 ++- drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 15 +- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 3 + drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 4 + .../net/wireless/intel/iwlwifi/mvm/time-event.c | 3 +- drivers/net/xen-netback/netback.c | 100 ++- drivers/of/property.c | 61 +- drivers/of/unittest.c | 12 +- drivers/pci/controller/dwc/pcie-designware-ep.c | 3 +- drivers/pci/pci.c | 37 +- drivers/perf/cxl_pmu.c | 2 +- drivers/pmdomain/mediatek/mtk-pm-domains.c | 15 +- drivers/pmdomain/renesas/r8a77980-sysc.c | 3 +- drivers/s390/net/qeth_l3_main.c | 9 +- drivers/scsi/fcoe/fcoe_ctlr.c | 20 +- drivers/scsi/storvsc_drv.c | 12 +- drivers/spi/spi-imx.c | 9 +- drivers/spi/spi-omap2-mcspi.c | 137 +--- drivers/spi/spi-ppc4xx.c | 5 - drivers/staging/iio/impedance-analyzer/ad5933.c | 2 +- drivers/thunderbolt/tb_regs.h | 2 +- drivers/thunderbolt/usb4.c | 2 +- drivers/tty/serial/max310x.c | 53 +- drivers/tty/serial/mxs-auart.c | 5 +- drivers/tty/serial/serial_core.c | 2 +- drivers/usb/chipidea/ci.h | 2 + drivers/usb/chipidea/core.c | 44 +- drivers/usb/common/ulpi.c | 2 +- drivers/usb/core/hub.c | 46 +- drivers/usb/dwc3/gadget.c | 6 +- drivers/usb/gadget/function/f_mass_storage.c | 20 +- drivers/usb/typec/tcpm/tcpm.c | 3 +- drivers/usb/typec/ucsi/ucsi.c | 2 + drivers/usb/typec/ucsi/ucsi_acpi.c | 17 +- drivers/xen/events/events_base.c | 8 +- fs/btrfs/block-group.c | 80 +- fs/btrfs/block-group.h | 7 + fs/btrfs/delalloc-space.c | 29 +- fs/btrfs/disk-io.c | 13 +- fs/btrfs/inode.c | 26 +- fs/btrfs/ioctl.c | 5 + fs/btrfs/qgroup.c | 14 + fs/btrfs/send.c | 2 +- fs/btrfs/transaction.c | 38 +- fs/ceph/caps.c | 3 +- fs/ext4/mballoc.c | 39 +- fs/ext4/move_extent.c | 6 +- fs/hugetlbfs/inode.c | 21 +- fs/namespace.c | 11 +- fs/nfsd/nfs4state.c | 11 +- fs/nilfs2/file.c | 8 +- fs/nilfs2/recovery.c | 7 +- fs/proc/array.c | 66 +- fs/smb/client/connect.c | 14 +- fs/smb/client/fs_context.c | 11 + fs/smb/client/namespace.c | 16 + fs/smb/client/smb2ops.c | 2 +- fs/smb/server/smb2pdu.c | 8 +- fs/tracefs/event_inode.c | 814 ++++++--------------- fs/tracefs/inode.c | 102 +-- fs/tracefs/internal.h | 46 +- fs/zonefs/file.c | 42 +- fs/zonefs/super.c | 66 +- include/linux/backing-dev-defs.h | 7 +- include/linux/compiler-gcc.h | 20 + include/linux/compiler_types.h | 11 +- include/linux/gpio/driver.h | 12 + include/linux/iio/adc/ad_sigma_delta.h | 4 +- include/linux/iio/common/st_sensors.h | 4 +- include/linux/iio/imu/adis.h | 3 +- include/linux/lsm_hook_defs.h | 4 +- include/linux/mman.h | 1 + include/linux/netfilter/ipset/ip_set.h | 4 + include/linux/ptrace.h | 4 + include/linux/serial_core.h | 32 +- include/net/tls.h | 5 - include/sound/tas2781.h | 1 + init/Kconfig | 9 + io_uring/net.c | 5 +- kernel/sys.c | 54 +- kernel/trace/ftrace.c | 10 + kernel/trace/ring_buffer.c | 2 +- kernel/trace/trace.c | 78 +- kernel/trace/trace_btf.c | 4 +- kernel/trace/trace_events_synth.c | 3 +- kernel/trace/trace_events_trigger.c | 6 +- kernel/trace/trace_osnoise.c | 6 +- kernel/trace/trace_probe.c | 32 +- kernel/trace/trace_probe.h | 3 +- kernel/workqueue.c | 8 +- lib/kobject.c | 24 +- mm/backing-dev.c | 2 +- mm/damon/sysfs-schemes.c | 2 +- mm/huge_memory.c | 14 +- mm/memory-failure.c | 2 +- mm/memory.c | 4 +- mm/mmap.c | 6 +- mm/page-writeback.c | 4 +- mm/readahead.c | 4 +- mm/userfaultfd.c | 15 +- net/can/j1939/j1939-priv.h | 3 +- net/can/j1939/main.c | 2 +- net/can/j1939/socket.c | 46 +- net/handshake/handshake-test.c | 5 +- net/hsr/hsr_device.c | 4 +- net/mac80211/tx.c | 5 +- net/mptcp/pm_userspace.c | 13 +- net/mptcp/protocol.c | 25 +- net/mptcp/protocol.h | 7 +- net/mptcp/subflow.c | 4 +- net/netfilter/ipset/ip_set_bitmap_gen.h | 14 +- net/netfilter/ipset/ip_set_core.c | 39 +- net/netfilter/ipset/ip_set_hash_gen.h | 19 +- net/netfilter/ipset/ip_set_list_set.c | 13 +- net/netfilter/nft_set_pipapo_avx2.c | 2 +- net/nfc/nci/core.c | 4 + net/openvswitch/flow_netlink.c | 49 +- net/tls/tls_sw.c | 135 ++-- net/wireless/core.c | 3 +- samples/bpf/asm_goto_workaround.h | 8 +- scripts/link-vmlinux.sh | 9 +- scripts/mksysmap | 13 +- scripts/mod/modpost.c | 3 +- scripts/mod/sumversion.c | 7 +- security/security.c | 45 +- sound/pci/hda/Kconfig | 4 +- sound/pci/hda/patch_conexant.c | 18 + sound/pci/hda/patch_cs8409.c | 1 + sound/pci/hda/patch_realtek.c | 20 +- sound/pci/hda/tas2781_hda_i2c.c | 2 +- sound/soc/amd/yc/acp6x-mach.c | 14 + sound/soc/codecs/rt5645.c | 1 + sound/soc/codecs/tas2781-comlib.c | 3 +- sound/soc/codecs/tas2781-i2c.c | 2 +- sound/soc/codecs/wcd938x.c | 2 +- sound/soc/intel/avs/core.c | 3 + sound/soc/intel/avs/topology.c | 2 +- sound/soc/sof/ipc3-topology.c | 69 +- sound/soc/sof/ipc3.c | 2 +- tools/arch/x86/include/asm/rmwcc.h | 2 +- tools/include/linux/compiler_types.h | 4 +- .../testing/selftests/dt/test_unprobed_devices.sh | 13 +- tools/testing/selftests/landlock/common.h | 48 +- tools/testing/selftests/landlock/fs_test.c | 11 +- tools/testing/selftests/landlock/net_test.c | 13 +- .../selftests/mm/charge_reserved_hugetlb.sh | 2 +- tools/testing/selftests/mm/ksm_tests.c | 2 +- tools/testing/selftests/mm/map_hugetlb.c | 7 + tools/testing/selftests/mm/va_high_addr_switch.sh | 6 + tools/testing/selftests/mm/write_hugetlb_memory.sh | 2 +- .../selftests/net/forwarding/bridge_locked_port.sh | 4 +- .../testing/selftests/net/forwarding/bridge_mdb.sh | 14 +- .../selftests/net/forwarding/tc_flower_l2_miss.sh | 8 +- tools/testing/selftests/net/mptcp/config | 3 + tools/testing/selftests/net/mptcp/mptcp_join.sh | 10 +- tools/testing/selftests/net/mptcp/mptcp_lib.sh | 11 +- tools/testing/selftests/net/mptcp/settings | 2 +- tools/testing/selftests/net/mptcp/userspace_pm.sh | 31 +- .../selftests/net/test_bridge_backup_port.sh | 394 +++++----- tools/tracing/rtla/Makefile | 7 +- tools/tracing/rtla/src/osnoise_hist.c | 9 +- tools/tracing/rtla/src/osnoise_top.c | 6 +- tools/tracing/rtla/src/timerlat_hist.c | 9 +- tools/tracing/rtla/src/timerlat_top.c | 6 +- tools/tracing/rtla/src/utils.c | 14 +- tools/tracing/rtla/src/utils.h | 2 + tools/verification/rv/Makefile | 7 +- tools/verification/rv/src/in_kernel.c | 2 +- 340 files changed, 3297 insertions(+), 2530 deletions(-)
Hello,
Quoted 5 lines · On Tue, 20 Feb 2024 21:52:39 +0100 Greg Kroah-Hartman…
This is the start of the stable review cycle for the 6.7.6 release. There are 309 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.
Quoted 8 lines
Responses should be made by Thu, 22 Feb 2024 20:55:42 +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.7.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.
This rc kernel passes DAMON functionality test[1] on my test machine. Attaching the test results summary below. Please note that I retrieved the kernel from linux-stable-rc tree[2].
[1] https://github.com/awslabs/damon-tests/tree/next/corr
[2] c40c992a3e2e ("Linux 6.7.6-rc1")
Thanks,
SJ
[...]
---
ok 1 selftests: damon: debugfs_attrs.sh
ok 2 selftests: damon: debugfs_schemes.sh
ok 3 selftests: damon: debugfs_target_ids.sh
ok 4 selftests: damon: debugfs_empty_targets.sh
ok 5 selftests: damon: debugfs_huge_count_read_write.sh
ok 6 selftests: damon: debugfs_duplicate_context_creation.sh
ok 7 selftests: damon: debugfs_rm_non_contexts.sh
ok 8 selftests: damon: sysfs.sh
ok 9 selftests: damon: sysfs_update_removed_scheme_dir.sh
ok 10 selftests: damon: reclaim.sh
ok 11 selftests: damon: lru_sort.sh
ok 1 selftests: damon-tests: kunit.sh
ok 2 selftests: damon-tests: huge_count_read_write.sh
ok 3 selftests: damon-tests: buffer_overflow.sh
ok 4 selftests: damon-tests: rm_contexts.sh
ok 5 selftests: damon-tests: record_null_deref.sh
ok 6 selftests: damon-tests: dbgfs_target_ids_read_before_terminate_race.sh ok 7 selftests: damon-tests: dbgfs_target_ids_pid_leak.sh
ok 8 selftests: damon-tests: damo_tests.sh
ok 9 selftests: damon-tests: masim-record.sh
ok 10 selftests: damon-tests: build_i386.sh
ok 11 selftests: damon-tests: build_arm64.sh
ok 12 selftests: damon-tests: build_m68k.sh
ok 13 selftests: damon-tests: build_i386_idle_flag.sh
ok 14 selftests: damon-tests: build_i386_highpte.sh
ok 15 selftests: damon-tests: build_nomemcg.sh
[33m
[92mPASS [39m
Quoted 9 lines
This is the start of the stable review cycle for the 6.7.6 release. There are 309 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, 22 Feb 2024 20:55:42 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my x86_64 and ARM64 test systems. No errors or regressions.
Thanks.
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.7.6 release. There are 309 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.
Successfully compiled and installed the kernel on my computer (Acer Aspire E15, Intel Core i3 Haswell). No noticeable regressions.
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.7.6 release. There are 309 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, 22 Feb 2024 20:55:42 +0000. Anything received after that time might be too late.
Hi Greg,
no noticeable regressions in my system.
Thanks,
- Ricardo.
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.7.6 release. There are 309 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, 22 Feb 2024 20:55:42 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
## Build
* kernel: 6.7.6-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.7.y
* git commit: c40c992a3e2ef2cd425dd1628140a318e9ec9b23
* git describe: v6.7.4-439-gc40c992a3e2e
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.7.y/build/v6.7.4-439-gc40c992a3e2e
## Test Regressions (compared to v6.7.4)
## Metric Regressions (compared to v6.7.4)
## Test Fixes (compared to v6.7.4)
## Metric Fixes (compared to v6.7.4)
## Test result summary
total: 252994, pass: 220458, fail: 2893, skip: 29351, xfail: 292
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 145 total, 143 passed, 2 failed
* arm64: 51 total, 50 passed, 1 failed
* i386: 41 total, 40 passed, 1 failed
* mips: 26 total, 26 passed, 0 failed
* parisc: 4 total, 4 passed, 0 failed
* powerpc: 36 total, 34 passed, 2 failed
* riscv: 18 total, 18 passed, 0 failed
* s390: 13 total, 13 passed, 0 failed
* sh: 10 total, 10 passed, 0 failed
* sparc: 8 total, 8 passed, 0 failed
* x86_64: 46 total, 45 passed, 1 failed
## Test suites summary
* boot
* kselftest-android
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers-dma-buf
* kselftest-efivarfs
* kselftest-exec
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-filesystems-epoll
* kselftest-firmware
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-membarrier
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-net-forwarding
* kselftest-net-mptcp
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-user_events
* kselftest-vDSO
* kselftest-vm
* kselftest-watchdog
* kselftest-x86
* kselftest-zram
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-fsx
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-smoke
* ltp-smoketest
* ltp-syscalls
* ltp-tracing
* perf
* rcutorture
--
Linaro LKFT
https://lkft.linaro.org
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.7.6 release. There are 309 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, 22 Feb 2024 20:55:42 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.thanks,
greg k-h
No new regressions for Tegra ...
Test results for stable-v6.7:
10 builds: 10 pass, 0 fail
26 boots: 26 pass, 0 fail
116 tests: 115 pass, 1 failLinux version: 6.7.6-rc1-gc40c992a3e2e
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Test failures: tegra186-p2771-0000: pm-system-suspend.sh
Jon
Signature · 1 line
nvpublic
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.7.6 release. There are 309 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, 22 Feb 2024 20:55:42 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.7.6 release. There are 309 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, 22 Feb 2024 20:55:42 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah