id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
79d458c13056559d49b5e41fbc4b6890e68cf65b | Analyze and fix the following issue in the Linux kernel code: rxrpc, afs: Fix peer hash locking vs RCU callback | Problem Details:
In its address list, afs now retains pointers to and refs on one or more
rxrpc_peer objects. The address list is freed under RCU and at this time,
it puts the refs on those peers.
Now, when an rxrpc_peer object runs out of refs, it gets removed from the
peer hash table and, for that, rxrpc has to tak... | ```diff
diff --git a/net/rxrpc/peer_event.c b/net/rxrpc/peer_event.c
index d82e44a3901b..e874c31fa901 100644
--- a/net/rxrpc/peer_event.c
+++ b/net/rxrpc/peer_event.c
@@ -246,7 +246,7 @@ static void rxrpc_peer_keepalive_dispatch(struct rxrpc_net *rxnet,
bool use;
int slot;
- spin_lock(&rxnet->peer_hash_lock);
+ s... |
9b06d5b956131bde535f5c045cf8c1ff6bfba76c | Analyze and fix the following issue in the Linux kernel code: selftests: net/{lib,openvswitch}: extend CFLAGS to keep options from environment | Problem Details:
Package build environments like Fedora rpmbuild introduced hardening
options (e.g. -pie -Wl,-z,now) by passing a -spec option to CFLAGS
and LDFLAGS.
Some Makefiles currently override CFLAGS but not LDFLAGS, which leads
to a mismatch and build failure, for example:
/usr/bin/ld: /tmp/ccd2apay.o: reloc... | ```diff
diff --git a/tools/testing/selftests/net/lib/Makefile b/tools/testing/selftests/net/lib/Makefile
index 18b9443454a9..bc6b6762baf3 100644
--- a/tools/testing/selftests/net/lib/Makefile
+++ b/tools/testing/selftests/net/lib/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
-CFLAGS = -Wall -Wl,--no-a... |
23b3a7c4a7583eac9e3976355928a832c87caa0f | Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: extend CFLAGS to keep options from environment | Problem Details:
Package build environments like Fedora rpmbuild introduced hardening
options (e.g. -pie -Wl,-z,now) by passing a -spec option to CFLAGS
and LDFLAGS.
mptcp Makefile currently overrides CFLAGS but not LDFLAGS, which leads
to a mismatch and build failure, for example:
make[1]: *** [../../lib.mk:222: to... | ```diff
diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile
index 8e3fc05a5397..c76525fe2b84 100644
--- a/tools/testing/selftests/net/mptcp/Makefile
+++ b/tools/testing/selftests/net/mptcp/Makefile
@@ -2,7 +2,7 @@
top_srcdir = ../../../../..
-CFLAGS = -Wall -Wl,--n... |
1626e5ef0b00386a4fd083fa7c46c8edbd75f9b4 | Analyze and fix the following issue in the Linux kernel code: sched_ext: Fix lock imbalance in dispatch_to_local_dsq() | Problem Details:
While performing the rq locking dance in dispatch_to_local_dsq(), we may
trigger the following lock imbalance condition, in particular when
multiple tasks are rapidly changing CPU affinity (i.e., running a
`stress-ng --race-sched 0`):
[ 13.413579] =====================================
[ 13.413660]... | ```diff
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index c7b159f48834..a6d6d6dadde5 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -2575,6 +2575,9 @@ static void dispatch_to_local_dsq(struct rq *rq, struct scx_dispatch_q *dst_dsq,
{
struct rq *src_rq = task_rq(p);
struct rq *dst_rq = contain... |
67e4bb2ced0f2d8fbd414f932daea94ba63ae4c4 | Analyze and fix the following issue in the Linux kernel code: net: page_pool: don't try to stash the napi id | Problem Details:
Page ppol tried to cache the NAPI ID in page pool info to avoid
having a dependency on the life cycle of the NAPI instance.
Since commit under Fixes the NAPI ID is not populated until
napi_enable() and there's a good chance that page pool is
created before NAPI gets enabled.
Protect the NAPI pointer w... | ```diff
diff --git a/include/net/page_pool/types.h b/include/net/page_pool/types.h
index ed4cd114180a..7f405672b089 100644
--- a/include/net/page_pool/types.h
+++ b/include/net/page_pool/types.h
@@ -237,7 +237,6 @@ struct page_pool {
struct {
struct hlist_node list;
u64 detach_time;
- u32 napi_id;
u32 id;
... |
6db9d3a536cd638e2ee17cf880e14026cec19d26 | Analyze and fix the following issue in the Linux kernel code: netdevsim: don't assume core pre-populates HDS params on GET | Problem Details:
Syzbot reports:
BUG: KMSAN: uninit-value in nsim_get_ringparam+0xa8/0xe0 drivers/net/netdevsim/ethtool.c:77
nsim_get_ringparam+0xa8/0xe0 drivers/net/netdevsim/ethtool.c:77
ethtool_set_ringparam+0x268/0x570 net/ethtool/ioctl.c:2072
__dev_ethtool net/ethtool/ioctl.c:3209 [inline]
dev_ethto... | ```diff
diff --git a/drivers/net/netdevsim/ethtool.c b/drivers/net/netdevsim/ethtool.c
index 3b23f3d3ca2b..5c80fbee7913 100644
--- a/drivers/net/netdevsim/ethtool.c
+++ b/drivers/net/netdevsim/ethtool.c
@@ -74,7 +74,7 @@ static void nsim_get_ringparam(struct net_device *dev,
memcpy(ring, &ns->ethtool.ring, sizeof(ns-... |
a60558644e20d036cae0e63d0e3a37f46b7789c0 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: move napi_enable() from under BH | Problem Details:
mt76 does a lot of:
local_bh_disable();
napi_enable(...napi);
napi_schedule(...napi);
local_bh_enable();
local_bh_disable() is not a real lock, its most likely taken
because napi_schedule() requires that we invoke softirqs at
some point. napi_enable() needs to take a mutex, so move it
from un... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
index a259f4dd9540..413973d05b43 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
@@ -1479,14 +1479,13 @@ static void mt7603_mac_watchd... |
09a939487fc8b2a437a8f1df20fe95e2857523d9 | Analyze and fix the following issue in the Linux kernel code: eth: via-rhine: fix calling napi_enable() in atomic context | Problem Details:
napi_enable() may sleep now, take netdev_lock() before rp->lock.
napi_enable() is hidden inside init_registers().
Note that this patch orders netdev_lock after rp->task_lock,
to avoid having to take the netdev_lock() around disable path.
Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_... | ```diff
diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
index 894911f3d560..e56ebbdd428d 100644
--- a/drivers/net/ethernet/via/via-rhine.c
+++ b/drivers/net/ethernet/via/via-rhine.c
@@ -1568,7 +1568,7 @@ static void init_registers(struct net_device *dev)
if (rp->quirks & rqMgm... |
f1d12bc7a596fce1df6a02cab1fdb797cc4d1642 | Analyze and fix the following issue in the Linux kernel code: eth: niu: fix calling napi_enable() in atomic context | Problem Details:
napi_enable() may sleep now, take netdev_lock() before np->lock.
Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/dcfd56bc-de32-4b11-9e19-d8bd1543745d@stanley.mountain
Reviewed-by: Eric Dumazet <... | ```diff
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index d7459866d24c..72177fea1cfb 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -6086,7 +6086,7 @@ static void niu_enable_napi(struct niu *np)
int i;
for (i = 0; i < np->num_ldg; i++)
- napi_... |
d19e612c47f4cf9da07105d95ac7233fe27e5f48 | Analyze and fix the following issue in the Linux kernel code: eth: 8139too: fix calling napi_enable() in atomic context | Problem Details:
napi_enable() may sleep now, take netdev_lock() before tp->lock and
tp->rx_lock.
Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/dcfd56bc-de32-4b11-9e19-d8bd1543745d@stanley.mountain
Reviewed-by... | ```diff
diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/ethernet/realtek/8139too.c
index 9ce0e8a64ba8..a73dcaffa8c5 100644
--- a/drivers/net/ethernet/realtek/8139too.c
+++ b/drivers/net/ethernet/realtek/8139too.c
@@ -1684,6 +1684,7 @@ static void rtl8139_tx_timeout_task (struct work_struct *work)
if... |
5c4470a1719c664d3b9aaa03619a49d74d6e6345 | Analyze and fix the following issue in the Linux kernel code: eth: forcedeth: fix calling napi_enable() in atomic context | Problem Details:
napi_enable() may sleep now, take netdev_lock() before np->lock.
Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/dcfd56bc-de32-4b11-9e19-d8bd1543745d@stanley.mountain
Acked-by: Zhu Yanjun <zyjzy... | ```diff
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index b00df57f2ca3..499e5e39d513 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -5562,6 +5562,7 @@ static int nv_open(struct net_device *dev)
/* ask for interru... |
a878f3e4ace7c042852747c2cd34c15872d59cd2 | Analyze and fix the following issue in the Linux kernel code: eth: forcedeth: remove local wrappers for napi enable/disable | Problem Details:
The local helpers for calling napi_enable() and napi_disable()
don't serve much purpose and they will complicate the fix in
the subsequent patch. Remove them, call the core functions
directly.
Acked-by: Zhu Yanjun <zyjzyj2000@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://pat... | ```diff
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index 720f577929db..b00df57f2ca3 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -1120,20 +1120,6 @@ static void nv_disable_hw_interrupts(struct net_device *dev, u... |
8ed47e4e0b428424e4c43704f12e9c1085f5425c | Analyze and fix the following issue in the Linux kernel code: eth: tg3: fix calling napi_enable() in atomic context | Problem Details:
tg3 has a spin lock protecting most of the config,
switch to taking netdev_lock() explicitly on enable/start
paths. Disable/stop paths seem to not be under the spin
lock (since napi_disable() already needs to sleep),
so leave that side as is.
tg3_restart_hw() releases and re-takes the spin lock,
we ne... | ```diff
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 9cc8db10a8d6..1c94bf1db718 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -7424,7 +7424,7 @@ static void tg3_napi_enable(struct tg3 *tp)
for (i = 0; i < tp->irq_cnt; i+... |
964417a5d4a06614ef7fb3ae69bb17c91a2dc016 | Analyze and fix the following issue in the Linux kernel code: tools: ynl: c: correct reverse decode of empty attrs | Problem Details:
netlink reports which attribute was incorrect by sending back
an attribute offset. Offset points to the address of struct nlattr,
but to interpret the type we also need the nesting path.
Attribute IDs have different meaning in different nests
of the same message.
Correct the condition for "is the offs... | ```diff
diff --git a/tools/net/ynl/lib/ynl.c b/tools/net/ynl/lib/ynl.c
index e16cef160bc2..ce32cb35007d 100644
--- a/tools/net/ynl/lib/ynl.c
+++ b/tools/net/ynl/lib/ynl.c
@@ -95,7 +95,7 @@ ynl_err_walk(struct ynl_sock *ys, void *start, void *end, unsigned int off,
ynl_attr_for_each_payload(start, data_len, attr) {
... |
fd53aa40e65f518453115b6f56183b0c201db26b | Analyze and fix the following issue in the Linux kernel code: ptp: Ensure info->enable callback is always set | Problem Details:
The ioctl and sysfs handlers unconditionally call the ->enable callback.
Not all drivers implement that callback, leading to NULL dereferences.
Example of affected drivers: ptp_s390.c, ptp_vclock.c and ptp_mock.c.
Instead use a dummy callback if no better was specified by the driver.
Fixes: d94ba80eb... | ```diff
diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index b932425ddc6a..35a5994bf64f 100644
--- a/drivers/ptp/ptp_clock.c
+++ b/drivers/ptp/ptp_clock.c
@@ -217,6 +217,11 @@ static int ptp_getcycles64(struct ptp_clock_info *info, struct timespec64 *ts)
return info->gettime64(info, ts);
}
+static... |
cde5959913b713eecee44451c9bb3141e625a8d8 | Analyze and fix the following issue in the Linux kernel code: documentation: networking: fix spelling mistakes | Problem Details:
Fix a couple of typos/spelling mistakes in the documentation.
Signed-off-by: Khaled Elnaggar <khaledelnaggarlinux@gmail.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Bagas Sa... | ```diff
diff --git a/Documentation/networking/can.rst b/Documentation/networking/can.rst
index 62519d38c58b..b018ce346392 100644
--- a/Documentation/networking/can.rst
+++ b/Documentation/networking/can.rst
@@ -699,10 +699,10 @@ RAW socket option CAN_RAW_JOIN_FILTERS
The CAN_RAW socket can set multiple CAN identifie... |
979284535aaf12a287a2f43d9d5dfcbdc1dc4cac | Analyze and fix the following issue in the Linux kernel code: net/mlx5e: add missing cpu_to_node to kvzalloc_node in mlx5e_open_xdpredirect_sq | Problem Details:
kvzalloc_node is not doing a runtime check on the node argument
(__alloc_pages_node_noprof does have a VM_BUG_ON, but it expands to
nothing on !CONFIG_DEBUG_VM builds), so doing any ethtool/netlink
operation that calls mlx5e_open on a CPU that's larger that MAX_NUMNODES
triggers OOB access and panic (s... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index bd41b75d246e..a814b63ed97e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -2087,7 +2087,7 @@ static struct mlx5e_xdp... |
50bf398e1ceacb9a7f85bd3bdca065ebe5cb6159 | Analyze and fix the following issue in the Linux kernel code: net: netdevsim: try to close UDP port harness races | Problem Details:
syzbot discovered that we remove the debugfs files after we free
the netdev. Try to clean up the relevant dir while the device
is still around.
Reported-by: syzbot+2e5de9e3ab986b71d2bf@syzkaller.appspotmail.com
Fixes: 424be63ad831 ("netdevsim: add UDP tunnel port offload support")
Reviewed-by: Michal ... | ```diff
diff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h
index dcf073bc4802..96d54c08043d 100644
--- a/drivers/net/netdevsim/netdevsim.h
+++ b/drivers/net/netdevsim/netdevsim.h
@@ -134,6 +134,7 @@ struct netdevsim {
u32 sleep;
u32 __ports[2][NSIM_UDP_TUNNEL_N_PORTS];
u32 (*por... |
5de7665e0a0746b5ad7943554b34db8f8614a196 | Analyze and fix the following issue in the Linux kernel code: net: rose: fix timer races against user threads | Problem Details:
Rose timers only acquire the socket spinlock, without
checking if the socket is owned by one user thread.
Add a check and rearm the timers if needed.
BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x31d/0x360 net/rose/rose_timer.c:174
Read of size 2 at addr ffff88802f09b82a by task swapper/0/0
... | ```diff
diff --git a/net/rose/rose_timer.c b/net/rose/rose_timer.c
index f06ddbed3fed..1525773e94aa 100644
--- a/net/rose/rose_timer.c
+++ b/net/rose/rose_timer.c
@@ -122,6 +122,10 @@ static void rose_heartbeat_expiry(struct timer_list *t)
struct rose_sock *rose = rose_sk(sk);
bh_lock_sock(sk);
+ if (sock_owned_b... |
431b742e2bfc9f6dd713f261629741980996d001 | Analyze and fix the following issue in the Linux kernel code: drm/i915/pmu: Fix zero delta busyness issue | Problem Details:
When running igt@gem_exec_balancer@individual for multiple iterations,
it is seen that the delta busyness returned by PMU is 0. The issue stems
from a combination of 2 implementation specific details:
1) gt_park is throttling __update_guc_busyness_stats() so that it does
not hog PCI bandwidth for some... | ```diff
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index a2812621625b..9be6764d3cd3 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -1469,6 +1469,19 @@ static void __reset_gu... |
ef34861098c081a6222dbbe84439b571fa35c8a0 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Upgrade complaint about missing slice info | Problem Details:
The steering code needs to know slice/subslice counts and this
information should be retrieved from the hwconfig table. However,
earlier platforms don't have it, hence the KMD has a fallback path.
Newer platforms really should have the entries and if they are missing
that is a bug that needs to be fixe... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c
index a1676b787fdc..605aad3554e7 100644
--- a/drivers/gpu/drm/xe/xe_gt_mcr.c
+++ b/drivers/gpu/drm/xe/xe_gt_mcr.c
@@ -341,7 +341,13 @@ static unsigned int dss_per_group(struct xe_gt *gt)
return DIV_ROUND_UP(max_subslices, max_slices)... |
38567b972a22706e9a1a52b2c4bc9ea4b5ed00ed | Analyze and fix the following issue in the Linux kernel code: selftests: Handle old glibc without execveat(2) | Problem Details:
Add an execveat(2) wrapper because glibc < 2.34 does not have one. This
fixes the check-exec tests and samples.
Cc: Günther Noack <gnoack@google.com>
Cc: Jeff Xu <jeffxu@chromium.org>
Cc: Kees Cook <kees@kernel.org>
Cc: Mimi Zohar <zohar@linux.ibm.com>
Cc: Paul Moore <paul@paul-moore.com>
Cc: Roberto... | ```diff
diff --git a/samples/check-exec/inc.c b/samples/check-exec/inc.c
index 94b87569d2a2..7f6ef06a2f06 100644
--- a/samples/check-exec/inc.c
+++ b/samples/check-exec/inc.c
@@ -21,8 +21,15 @@
#include <stdlib.h>
#include <string.h>
#include <sys/prctl.h>
+#include <sys/syscall.h>
#include <unistd.h>
+static int... |
3c7d51b0d29954c40ea3a097e0ec7884b4344331 | Analyze and fix the following issue in the Linux kernel code: sched_ext: selftests/dsp_local_on: Fix selftest on UP systems | Problem Details:
In UP systems p->migration_disabled is not available. Fix this by using
the portable helper is_migration_disabled(p).
Fixes: e9fe182772dc ("sched_ext: selftests/dsp_local_on: Fix sporadic failures")
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org> | ```diff
diff --git a/tools/testing/selftests/sched_ext/dsp_local_on.bpf.c b/tools/testing/selftests/sched_ext/dsp_local_on.bpf.c
index 758b479bd1ee..c02b2aa6fc64 100644
--- a/tools/testing/selftests/sched_ext/dsp_local_on.bpf.c
+++ b/tools/testing/selftests/sched_ext/dsp_local_on.bpf.c
@@ -43,7 +43,7 @@ void BPF_STRUCT... |
5f52bbf2f6e0997394cf9c449d44e1c80ff4282c | Analyze and fix the following issue in the Linux kernel code: tools/sched_ext: Add helper to check task migration state | Problem Details:
Introduce a new helper for BPF schedulers to determine whether a task
can migrate or not (supporting both SMP and UP systems).
Fixes: e9fe182772dc ("sched_ext: selftests/dsp_local_on: Fix sporadic failures")
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org> | ```diff
diff --git a/tools/sched_ext/include/scx/common.bpf.h b/tools/sched_ext/include/scx/common.bpf.h
index f3e15e9efa76..f254a39b86a5 100644
--- a/tools/sched_ext/include/scx/common.bpf.h
+++ b/tools/sched_ext/include/scx/common.bpf.h
@@ -404,6 +404,17 @@ static __always_inline const struct cpumask *cast_mask(struc... |
d555ed45a5a10a813528c7685f432369d536ae3d | Analyze and fix the following issue in the Linux kernel code: PCI: Restore original INTX_DISABLE bit by pcim_intx() | Problem Details:
pcim_intx() tries to restore the INTx bit at removal via devres, but there
is a chance that it restores a wrong value.
Because the value to be restored is blindly assumed to be the negative of
the enable argument, when a driver calls pcim_intx() unnecessarily for the
already enabled state, it'll resto... | ```diff
diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c
index d1d97a4bb36d..3431a7df3e0d 100644
--- a/drivers/pci/devres.c
+++ b/drivers/pci/devres.c
@@ -419,19 +419,12 @@ static void pcim_intx_restore(struct device *dev, void *data)
pci_intx(pdev, res->orig_intx);
}
-static struct pcim_intx_devres *get_o... |
d6f3e7d564b2309e1f17e709a70eca78d7ca2bb8 | Analyze and fix the following issue in the Linux kernel code: sched_ext: Fix incorrect autogroup migration detection | Problem Details:
scx_move_task() is called from sched_move_task() and tells the BPF scheduler
that cgroup migration is being committed. sched_move_task() is used by both
cgroup and autogroup migrations and scx_move_task() tried to filter out
autogroup migrations by testing the destination cgroup and PF_EXITING but
this... | ```diff
diff --git a/kernel/sched/autogroup.c b/kernel/sched/autogroup.c
index db68a964e34e..c4a3ccf6a8ac 100644
--- a/kernel/sched/autogroup.c
+++ b/kernel/sched/autogroup.c
@@ -150,7 +150,7 @@ void sched_autogroup_exit_task(struct task_struct *p)
* see this thread after that: we can no longer use signal->autogroup... |
698244bbb3bfd32ddf9a0b70a12b1c7d69056497 | Analyze and fix the following issue in the Linux kernel code: irqchip/apple-aic: Only handle PMC interrupt as FIQ when configured so | Problem Details:
The CPU PMU in Apple SoCs can be configured to fire its interrupt in one of
several ways, and since Apple A11 one of the methods is FIQ, but the check
of the configuration register fails to test explicitely for FIQ mode. It
tests whether the IMODE bitfield is zero or not and the PMCRO_IACT bit is
set. ... | ```diff
diff --git a/drivers/irqchip/irq-apple-aic.c b/drivers/irqchip/irq-apple-aic.c
index da5250f0155c..2b1684c60e3c 100644
--- a/drivers/irqchip/irq-apple-aic.c
+++ b/drivers/irqchip/irq-apple-aic.c
@@ -577,7 +577,8 @@ static void __exception_irq_entry aic_handle_fiq(struct pt_regs *regs)
AIC_FIQ_HWIRQ(AIC... |
a80e53472209b1c749e02e91ac62c053ac457099 | Analyze and fix the following issue in the Linux kernel code: tools/power turbostat: version 2025.01.14 | Problem Details:
Fix checkpatch whitespace issues since 2024.11.30
Summary of Changes since 2024.11.30:
Enable SysWatt by default.
Add initial PTL, CWF platform support.
Refuse to run on unsupported platforms without --force
to avoid not-so-useful measurements mistakenly made
using obsolete versions.
Harden ... | ```diff
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 0f2475fa9fa4..76d2632e60ac 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -3,7 +3,7 @@
* turbostat -- show CPU frequency and C-state residency
* on modern Intel... |
2d4fde59fd502a65c1698b61ad4d0f10a9ab665a | Analyze and fix the following issue in the Linux kernel code: fuse: prevent disabling io-uring on active connections | Problem Details:
The enable_uring module parameter allows administrators to enable/disable
io-uring support for FUSE at runtime. However, disabling io-uring while
connections already have it enabled can lead to an inconsistent state.
Fix this by keeping io-uring enabled on connections that were already using
it, even ... | ```diff
diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c
index 3bdc75518e5b..ebd2931b4f2a 100644
--- a/fs/fuse/dev_uring.c
+++ b/fs/fuse/dev_uring.c
@@ -1091,11 +1091,6 @@ int fuse_uring_cmd(struct io_uring_cmd *cmd, unsigned int issue_flags)
u32 cmd_op = cmd->cmd_op;
int err;
- if (!enable_uring) {
- pr_i... |
bd53764a60ad586ad5b6ed339423ad5e67824464 | Analyze and fix the following issue in the Linux kernel code: vfio/nvgrace-gpu: Read dvsec register to determine need for uncached resmem | Problem Details:
NVIDIA's recently introduced Grace Blackwell (GB) Superchip is a
continuation with the Grace Hopper (GH) superchip that provides a
cache coherent access to CPU and GPU to each other's memory with
an internal proprietary chip-to-chip cache coherent interconnect.
There is a HW defect on GH systems to su... | ```diff
diff --git a/drivers/vfio/pci/nvgrace-gpu/main.c b/drivers/vfio/pci/nvgrace-gpu/main.c
index a467085038f0..b76368958d1c 100644
--- a/drivers/vfio/pci/nvgrace-gpu/main.c
+++ b/drivers/vfio/pci/nvgrace-gpu/main.c
@@ -23,6 +23,11 @@
/* A hardwired and constant ABI value between the GPU FW and VFIO driver. */
#de... |
5aa21b0495df1fac6d39f45011c1572bb431c44c | Analyze and fix the following issue in the Linux kernel code: loop: don't clear LO_FLAGS_PARTSCAN on LOOP_SET_STATUS{,64} | Problem Details:
LOOP_SET_STATUS{,64} can set a lot more flags than it is supposed to
clear (the LOOP_SET_STATUS_CLEARABLE_FLAGS vs
LOOP_SET_STATUS_SETTABLE_FLAGS defines should have been a hint..).
Fix this by only clearing the bits in LOOP_SET_STATUS_CLEARABLE_FLAGS.
Fixes: ae074d07a0e5 ("loop: move updating lo_fla... | ```diff
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 1ec7417c7f00..d1f1d6bef2e6 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1281,8 +1281,7 @@ loop_set_status(struct loop_device *lo, const struct loop_info64 *info)
partscan = !(lo->lo_flags & LO_FLAGS_PARTSCAN) &&
(info->lo_fl... |
a3b9c053d82a9e524746f5473ad1bd18e9894bfa | Analyze and fix the following issue in the Linux kernel code: vhost/net: Set num_buffers for virtio 1.0 | Problem Details:
The specification says the device MUST set num_buffers to 1 if
VIRTIO_NET_F_MRG_RXBUF has not been negotiated.
Fixes: 41e3e42108bc ("vhost/net: enable virtio 1.0")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240915-v1-v1-1-f10d2cb5e759@daynix.com>
Signed-off-by: Michael S. T... | ```diff
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 9ad37c012189..b9b9e9d40951 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -1107,6 +1107,7 @@ static void handle_rx(struct vhost_net *net)
size_t vhost_hlen, sock_hlen;
size_t vhost_len, sock_len;
bool busyloop_intr = false;
+ bool... |
8e386957cc2d1fb67b65937c771140c1c47445b1 | Analyze and fix the following issue in the Linux kernel code: fs/proc/vmcore: prefix all pr_* with "vmcore:" | Problem Details:
Let's use "vmcore: " as a prefix, converting the single "Kdump:
vmcore not initialized" one to effectively be "vmcore: not initialized".
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20241204125444.1734652-5-david@redhat.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signe... | ```diff
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 4a7bfdf03738..7511837d81a2 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -8,6 +8,8 @@
*
*/
+#define pr_fmt(fmt) "vmcore: " fmt
+
#include <linux/mm.h>
#include <linux/kcore.h>
#include <linux/user.h>
@@ -1580,7 +1582,7 @@ static int __ini... |
cdbc69716ff3a126cef43154742858e1caffa858 | Analyze and fix the following issue in the Linux kernel code: fs/proc/vmcore: convert vmcore_cb_lock into vmcore_mutex | Problem Details:
We want to protect vmcore modifications from concurrent opening of
the vmcore, and also serialize vmcore modification.
(a) We can currently modify the vmcore after it was opened. This can happen
if a vmcoredd is added after the vmcore module was initialized and
already opened by user space. We... | ```diff
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 3d8a82cee63e..6f2800021e95 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -62,7 +62,8 @@ core_param(novmcoredd, vmcoredd_disabled, bool, 0);
/* Device Dump Size */
static size_t vmcoredd_orig_sz;
-static DEFINE_SPINLOCK(vmcore_cb_lock);
+static... |
cc77e2ce187d26cc66af3577bf896d7410eb25ab | Analyze and fix the following issue in the Linux kernel code: ata: libata-core: Add ATA_QUIRK_NOLPM for Samsung SSD 870 QVO drives | Problem Details:
Disabling link power management on Samsung SSD 870 QVO drives
to make them work again after the switch of the default LPM
policy to low.
Testing so far has shown that regular Samsung SSD 870
(the non QVO variants) do not need it and work fine with
the default LPM policy.
Cc: stable@vger.kernel.org
Fi... | ```diff
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index c085dd81ebe7..63ec2f218431 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4143,6 +4143,10 @@ static const struct ata_dev_quirks_entry __ata_dev_quirks[] = {
{ "Samsung SSD 860*", NULL, ATA_QUIRK_NO_NCQ_TRIM |... |
3ff53862c322aa7bb115d84348d5a641dc905d87 | Analyze and fix the following issue in the Linux kernel code: ASoC: amd: acp: Fix possible deadlock | Problem Details:
On error path, function acp_i2s_set_tdm_slot returns without releasing
the lock and this could result in potential deadlocks in the future.
Error reported by sparse:
sound/soc/amd/acp/acp-i2s.c:95:12: error: context imbalance in
'acp_i2s_set_tdm_slot' - different lock contexts for basic block
Fixes: ... | ```diff
diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c
index 1f59ee248771..89e99ed4275a 100644
--- a/sound/soc/amd/acp/acp-i2s.c
+++ b/sound/soc/amd/acp/acp-i2s.c
@@ -181,6 +181,7 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas
break;
default:
dev_e... |
eb5c79828cfa72e8dbdf2db842a781ad6806cdaf | Analyze and fix the following issue in the Linux kernel code: firmware: cs_dsp: FW_CS_DSP_KUNIT_TEST should not select REGMAP | Problem Details:
Enabling a (modular) test should not silently enable additional kernel
functionality, as that may increase the attack vector of a product.
Fix this by making FW_CS_DSP_KUNIT_TEST (and FW_CS_DSP_KUNIT_TEST_UTILS)
depend on REGMAP instead of selecting it.
After this, one can safely enable CONFIG_KUNIT_... | ```diff
diff --git a/drivers/firmware/cirrus/Kconfig b/drivers/firmware/cirrus/Kconfig
index ee09269c63b5..0a883091259a 100644
--- a/drivers/firmware/cirrus/Kconfig
+++ b/drivers/firmware/cirrus/Kconfig
@@ -6,15 +6,13 @@ config FW_CS_DSP
config FW_CS_DSP_KUNIT_TEST_UTILS
tristate
- depends on KUNIT
- select REGMAP... |
26b63bee2f6e711c5a169997fd126fddcfb90848 | Analyze and fix the following issue in the Linux kernel code: xfs: Add error handling for xfs_reflink_cancel_cow_range | Problem Details:
In xfs_inactive(), xfs_reflink_cancel_cow_range() is called
without error handling, risking unnoticed failures and
inconsistent behavior compared to other parts of the code.
Fix this issue by adding an error handling for the
xfs_reflink_cancel_cow_range(), improving code robustness.
Fixes: 6231848c3a... | ```diff
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index c95fe1b1de4e..b1f9f156ec88 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1404,8 +1404,11 @@ xfs_inactive(
goto out;
/* Try to clean out the cow blocks if there are any. */
- if (xfs_inode_has_cow_data(ip))
- xfs_reflink_cancel_cow... |
fb95897b8c60653805aa09daec575ca30983f768 | Analyze and fix the following issue in the Linux kernel code: xfs: Propagate errors from xfs_reflink_cancel_cow_range in xfs_dax_write_iomap_end | Problem Details:
In xfs_dax_write_iomap_end(), directly return the result of
xfs_reflink_cancel_cow_range() when !written, ensuring proper
error propagation and improving code robustness.
Fixes: ea6c49b784f0 ("xfs: support CoW in fsdax mode")
Cc: stable@vger.kernel.org # v6.0
Reviewed-by: Darrick J. Wong <djwong@kerne... | ```diff
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index 50fa3ef89f6c..d61460309a78 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -976,10 +976,8 @@ xfs_dax_write_iomap_end(
if (!xfs_is_cow_inode(ip))
return 0;
- if (!written) {
- xfs_reflink_cancel_cow_range(ip, pos, length, true);
- re... |
987f379b54091cc1b1db986bde71cee1081350b3 | Analyze and fix the following issue in the Linux kernel code: irqchip/irq-mvebu-icu: Fix access to msi_data from irq_domain::host_data | Problem Details:
mvebu_icu_translate() incorrectly casts irq_domain::host_data directly to
mvebu_icu_msi_data. However, host_data actually points to a structure of
type msi_domain_info.
This incorrect cast causes issues such as the thermal sensors of the
CP110 platform malfunctioning. Specifically, the translation of ... | ```diff
diff --git a/drivers/irqchip/irq-mvebu-icu.c b/drivers/irqchip/irq-mvebu-icu.c
index b337f6c05f18..4eebed39880a 100644
--- a/drivers/irqchip/irq-mvebu-icu.c
+++ b/drivers/irqchip/irq-mvebu-icu.c
@@ -68,7 +68,8 @@ static int mvebu_icu_translate(struct irq_domain *d, struct irq_fwspec *fwspec,
unsigned... |
825c78e6a60c309a59d18d5ac5968aa79cef0bd6 | Analyze and fix the following issue in the Linux kernel code: irqchip/riscv: Ensure ordering of memory writes and IPI writes | Problem Details:
RISC-V distinguishes between memory accesses and device I/O and uses FENCE
instruction to order them as viewed by other RISC-V harts and external
devices or coprocessors. The FENCE instruction can order any combination of
device input(I), device output(O), memory reads(R) and memory
writes(W). For exam... | ```diff
diff --git a/drivers/irqchip/irq-riscv-imsic-early.c b/drivers/irqchip/irq-riscv-imsic-early.c
index c5c2e6929a2f..275df5005705 100644
--- a/drivers/irqchip/irq-riscv-imsic-early.c
+++ b/drivers/irqchip/irq-riscv-imsic-early.c
@@ -27,7 +27,7 @@ static void imsic_ipi_send(unsigned int cpu)
{
struct imsic_loca... |
05d91cdb1f9108426b14975ef4eeddf15875ca05 | Analyze and fix the following issue in the Linux kernel code: net/ncsi: use dev_set_mac_address() for Get MC MAC Address handling | Problem Details:
Copy of the rationale from 790071347a0a1a89e618eedcd51c687ea783aeb3:
Change ndo_set_mac_address to dev_set_mac_address because
dev_set_mac_address provides a way to notify network layer about MAC
change. In other case, services may not aware about MAC change and keep
using old one which set from netwo... | ```diff
diff --git a/net/ncsi/ncsi-rsp.c b/net/ncsi/ncsi-rsp.c
index 14bd66909ca4..4a8ce2949fae 100644
--- a/net/ncsi/ncsi-rsp.c
+++ b/net/ncsi/ncsi-rsp.c
@@ -1089,14 +1089,12 @@ static int ncsi_rsp_handler_netlink(struct ncsi_request *nr)
static int ncsi_rsp_handler_gmcma(struct ncsi_request *nr)
{
struct ncsi_dev... |
0e458a616f680837d0ba9c3c8ba9f66993db4225 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix trace_copygc | Problem Details:
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/movinggc.c b/fs/bcachefs/movinggc.c
index 85c361e78ba5..21805509ab9e 100644
--- a/fs/bcachefs/movinggc.c
+++ b/fs/bcachefs/movinggc.c
@@ -215,7 +215,8 @@ static int bch2_copygc(struct moving_context *ctxt,
};
move_buckets buckets = { 0 };
struct move_bucket_in_flight *f;
- u64 mov... |
a23d4c2f5b80a8dc5f1e40658abbe5983af1a0e9 | Analyze and fix the following issue in the Linux kernel code: genksyms: fix syntax error for attribute before init-declarator | Problem Details:
A longstanding issue with genksyms is that it has hidden syntax errors.
For example, genksyms fails to parse the following valid code:
int x, __attribute__((__section__(".init.data")))y;
Here, only 'y' is annotated by the attribute, although I am not aware
of actual uses of this pattern in the k... | ```diff
diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y
index a2cd035a78c9..ee600a804fa1 100644
--- a/scripts/genksyms/parse.y
+++ b/scripts/genksyms/parse.y
@@ -173,9 +173,9 @@ init_declarator_list:
$$ = $1;
dont_want_type_specifier = true;
}
- | init_declarator_list ',' init_declarator
-... |
c825840527813582385edca3ddeee46886527258 | Analyze and fix the following issue in the Linux kernel code: genksyms: fix syntax error for builtin (u)int*x*_t types | Problem Details:
A longstanding issue with genksyms is that it has hidden syntax errors.
When a syntax error occurs, yyerror() is called. However,
error_with_pos() is a no-op unless the -w option is provided.
You can observe syntax errors by manually passing the -w option.
For example, genksyms fails to parse the fo... | ```diff
diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l
index a1f969dcf24f..22aeb57649d9 100644
--- a/scripts/genksyms/lex.l
+++ b/scripts/genksyms/lex.l
@@ -51,6 +51,7 @@ MC_TOKEN ([~%^&*+=|<>/-]=)|(&&)|("||")|(->)|(<<)|(>>)
%%
+u?int(8|16|32|64)x(1|2|4|8|16)_t return BUILTIN_INT_KEYW;
/* Keep t... |
6494bd2d05f927fc0395c2ea11461517a9e0bb80 | Analyze and fix the following issue in the Linux kernel code: genksyms: fix syntax error for attribute after 'union' | Problem Details:
A longstanding issue with genksyms is that it has hidden syntax errors.
When a syntax error occurs, yyerror() is called. However,
error_with_pos() is a no-op unless the -w option is provided.
You can observe syntax errors by manually passing the -w option.
For example, with CONFIG_MODVERSIONS=y on v... | ```diff
diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y
index 33639232a709..a2cd035a78c9 100644
--- a/scripts/genksyms/parse.y
+++ b/scripts/genksyms/parse.y
@@ -236,16 +236,16 @@ type_specifier:
so that it is easier to expand the definition fully later. */
| STRUCT_KEYW attribute_opt IDENT
... |
3bcc4e830e05ed604bbba89c5415926df4ccabae | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Handle monitor drop TLVs scenario | Problem Details:
During monitor destination ring back-pressure, hardware failed to send
HAL_RX_PPDU_END_STATUS_DONE TLV. But driver uses this TLV as a delimiter
to complete one PPDU worth of data parsing. This causes driver to overwrite
the existing PPDU information with the new PPDU information.
Fix it by recording t... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
index 3d20a6b3b473..28db100cfac0 100644
--- a/drivers/net/wireless/ath/ath12k/core.h
+++ b/drivers/net/wireless/ath/ath12k/core.h
@@ -142,6 +142,7 @@ struct ath12k_skb_rxcb {
u8 is_frag;
u8 tid;
u16 peer_id;
+ boo... |
ecfc131389923405be8e7a6f4408fd9321e4d19b | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Avoid memory leak while enabling statistics | Problem Details:
Driver uses monitor destination rings for extended statistics mode and
standalone monitor mode. In extended statistics mode, TLVs are parsed from
the buffer received from the monitor destination ring and assigned to the
ppdu_info structure to update per-packet statistics. In standalone monitor
mode, al... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index 4b35dfcbdfe1..23b1a41c6fd2 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -567,7 +567,6 @@ ath12k_dp_mon_rx_parse_status_tlv(struct ath12k *ar,
s... |
67434640e52256efd14260cb8edbea41c1faef0b | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Handle PPDU spread across multiple buffers | Problem Details:
Each PPDU contains numerous TLV tags. HAL_RX_PPDU_START marks the start
of the PPDU, and HAL_RX_PPDU_END_STATUS_DONE marks the end. From the
monitor destination rings, the driver retrieves skb containing these
TLV tags and their corresponding data. Sometimes, one PPDU’s information
spreads across multi... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index a11b39ae3774..4b35dfcbdfe1 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -2419,9 +2419,17 @@ move_next:
if (!num_buffs_reaped)
return 0;
+ /* In... |
8520ba9bb8f43ce9d540d9be6a5711ceeb1651cf | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Handle end reason for the monitor destination ring | Problem Details:
Currently, the monitor destination ring's descriptor includes a 2-bit
field for the end reason. Out of all the end reason values, hardware uses
HAL_MON_FLUSH_DETECTED and HAL_MON_PPDU_TRUNCATED to indicate buffers that
should not be processed due to system level errors. Driver should not
process entrie... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index bf43ef2b6b39..dbf5afd88ad5 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -2329,7 +2329,7 @@ int ath12k_dp_mon_srng_process(struct ath12k *ar, int *budg... |
51ad34a47e9f261d03894b49a734174c170b326f | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Add drop descriptor handling for monitor ring | Problem Details:
When monitor block in Hardware experiences internal backpressure, a ring
entry with the EMPTY_DESC reason is received in the monitor destination
ring descriptor. The cookie field for this corresponding entry is invalid.
Currently driver attempts to process this cookie resulting in invalid
buf_id warnin... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index 236456b02198..bf43ef2b6b39 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -2347,6 +2347,14 @@ int ath12k_dp_mon_srng_process(struct ath12k *ar, int *bud... |
6788a666000d600bd8f2e9f991cad9cc805e7f01 | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Fix end offset bit definition in monitor ring descriptor | Problem Details:
End offset for the monitor destination ring descriptor is defined as
16 bits, while the firmware definition specifies only 12 bits.
The remaining bits (bit 12 to bit 15) are reserved and may contain
junk values, leading to invalid information retrieval. Fix this issue
by updating the correct genmask va... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/hal_desc.h b/drivers/net/wireless/ath/ath12k/hal_desc.h
index 7b0403d245e5..a102d27e5785 100644
--- a/drivers/net/wireless/ath/ath12k/hal_desc.h
+++ b/drivers/net/wireless/ath/ath12k/hal_desc.h
@@ -2968,7 +2968,7 @@ struct hal_mon_buf_ring {
#define HAL_MON_DEST_C... |
63fdc4509bcf483e79548de6bc08bf3c8e504bb3 | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Fix invalid entry fetch in ath12k_dp_mon_srng_process | Problem Details:
Currently, ath12k_dp_mon_srng_process uses ath12k_hal_srng_src_get_next_entry
to fetch the next entry from the destination ring. This is incorrect because
ath12k_hal_srng_src_get_next_entry is intended for source rings, not destination
rings. This leads to invalid entry fetches, causing potential data ... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index f9fd28ce801a..236456b02198 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -2379,7 +2379,7 @@ int ath12k_dp_mon_srng_process(struct ath12k *ar, int *budg... |
cf544270c7392af1dc3a3bf405b902f3b9d3f925 | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Restructure the code for monitor ring processing | Problem Details:
Currently, monitor ring reaping and processing occur in the same loop,
which requires holding ring locks until skb processing is complete.
However, only the ring reaping part requires the ring lock; the skb
processing part does not need it. This approach is problematic because it
unnecessarily extends ... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/dp.h b/drivers/net/wireless/ath/ath12k/dp.h
index 6946fb4f5c25..f68bb78d4a11 100644
--- a/drivers/net/wireless/ath/ath12k/dp.h
+++ b/drivers/net/wireless/ath/ath12k/dp.h
@@ -125,7 +125,6 @@ struct ath12k_mon_data {
struct sk_buff_head rx_status_q;
struct dp_mon_m... |
4e635b81db9d69bbb836afae8cb402978ff966a4 | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Fix pdev lookup in WBM error processing | Problem Details:
Currently in ath12k_dp_rx_process_wbm_err(), when processing packets
received on the WBM error ring, pdev validation is done based upon the
hw_link_id. But hw_link_id corresponds to link id of a given partner pdev
in a MLO hardware group, and is not the correct index to use to lookup a
pdev in an SoC(a... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index 09e35dd757e0..95c9056642cf 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -4050,7 +4050,7 @@ int ath12k_dp_rx_process_wbm_err(struct ath12k_base *ab,
... |
b826ad94d89615e222a3682b02adcbe45ecbde0e | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Request pdev stats from firmware | Problem Details:
Add support to request pdev stats from firmware through WMI and
print the information
Sample Output:
-------------
cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/fw_stats/pdev_stats
ath12k PDEV stats
=================
Channel noise floor -85
... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
index 7159343113d6..3d20a6b3b473 100644
--- a/drivers/net/wireless/ath/ath12k/core.h
+++ b/drivers/net/wireless/ath/ath12k/core.h
@@ -1107,6 +1107,66 @@ struct ath12k_fw_stats_bcn {
u32 tx_bcn_outage_cnt;
};
+struc... |
9fe4669ae9193b27d1d4add9a26c82dca9d59da0 | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Request beacon stats from firmware | Problem Details:
Add support to request and dump beacon statistics from firmware
Sample output:
-------------
cat /sys/kernel/debug/ath12k/pci-0000:06:00.0/mac0/fw_stats/beacon_stats
ath12k Beacon stats (1)
===================
VDEV ID 0
VDEV MAC address 00:0... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
index 97939ddb3cd7..7159343113d6 100644
--- a/drivers/net/wireless/ath/ath12k/core.h
+++ b/drivers/net/wireless/ath/ath12k/core.h
@@ -1099,6 +1099,14 @@ struct ath12k_fw_stats_vdev {
u32 beacon_rssi_history[MAX_TX_RAT... |
e367c924768b11d28727efbf2a6426c7aef66f0f | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Request vdev stats from firmware | Problem Details:
Add support to request and print vdev stats from firmware through WMI.
Sample output:
-------------
cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/fw_stats/vdev_stats
ath12k VDEV stats
=================
VDEV ID 0
VDEV MAC address 0... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
index e036f2e00eb7..97939ddb3cd7 100644
--- a/drivers/net/wireless/ath/ath12k/core.h
+++ b/drivers/net/wireless/ath/ath12k/core.h
@@ -557,6 +557,7 @@ struct ath12k_fw_stats {
struct list_head pdevs;
struct list_head... |
1b24394ed5c8a8d8f7b9e3aa9044c31495d46f2e | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: fix memory leak in ath12k_pci_remove() | Problem Details:
Kmemleak reported this error:
unreferenced object 0xffff1c165cec3060 (size 32):
comm "insmod", pid 560, jiffies 4296964570 (age 235.596s)
backtrace:
[<000000005434db68>] __kmem_cache_alloc_node+0x1f4/0x2c0
[<000000001203b155>] kmalloc_trace+0x40/0x88
[<0000000028adc9c8>] _r... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/pci.c b/drivers/net/wireless/ath/ath12k/pci.c
index 4a50d7118b3e..6c6a3cabab32 100644
--- a/drivers/net/wireless/ath/ath12k/pci.c
+++ b/drivers/net/wireless/ath/ath12k/pci.c
@@ -1735,9 +1735,9 @@ static void ath12k_pci_remove(struct pci_dev *pdev)
cancel_work_sync(... |
07c34cad10ab0ac8b06ede8a7fbc55ecf2efa3e6 | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: encode max Tx power in scan channel list command | Problem Details:
Currently, when sending the scan channel list command to the firmware, the
maximum Tx power is not encoded in the reg2 member. This omission causes
the firmware to be unaware of the host's maximum Tx power, leading to
incorrect Tx power derivation at firmware level.
To resolve this issue, encode the m... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index 57132c269aad..c7d128d41a92 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -2832,6 +2832,8 @@ int ath12k_wmi_send_scan_chan_list_cmd(struct ath12k *ar,
WMI_... |
efb24b1f0d29537714dd3cc46fb335ac27855251 | Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: fix memory leak in ath11k_xxx_remove() | Problem Details:
The firmware memory was allocated in ath11k_pci_probe() or
ath11k_ahb_probe(), but not freed in ath11k_xxx_remove() in case
ATH11K_FLAG_QMI_FAIL bit is set. So call ath11k_fw_destroy() to
free the memory.
Found while fixing the same problem in ath12k:
https://lore.kernel.org/linux-wireless/20240314012... | ```diff
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index f2fc04596d48..eedba3766ba2 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2018-20... |
5e73276c814fc1a5a1bce6be743e1a07baa6d4bc | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: report station mode receive rate for IEEE 802.11be | Problem Details:
Currently, the receive rate of EHT of "iw dev xxx station dump" command
always show an invalid value.
This is because ath12k does not pass information about the rx_status of EHT
to mac80211. So, mac80211 not calculate the receive rate.
To address this issue, add logic for handling rx_status of EHT to... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index dad35bfd83f6..09e35dd757e0 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c)... |
8a9c06b40882ebea45563059ddc5d57acdec9dda | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: report station mode transmit rate | Problem Details:
Currently, the transmit rate of "iw dev xxx station dump" command
always show an invalid value.
To address this issue, ath12k parse the info of transmit complete
report from firmware and indicate the transmit rate to mac80211.
This patch affects the station mode of WCN7850 and QCN9274.
After that, "... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
index 86a1eeec64a6..95c2ff6a9ae2 100644
--- a/drivers/net/wireless/ath/ath12k/core.h
+++ b/drivers/net/wireless/ath/ath12k/core.h
@@ -87,6 +87,7 @@ enum wme_ac {
#define ATH12K_HT_MCS_MAX 7
#define ATH12K_VHT_MCS_MAX ... |
0a89123deec34698720ccb1a2aba2d7df49076b3 | Analyze and fix the following issue in the Linux kernel code: s390/bitops: Use correct constraint for arch_test_bit() inline assembly | Problem Details:
Use the "Q" instead of "R" constraint to correctly reflect the instruction
format of the tm instruction: the first operand is a memory reference
without index register and short displacement. The "R" constraint indicates
a memory reference with index register instead.
This may lead to compile errors l... | ```diff
diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h
index 15aa64e3020e..d5125296ade2 100644
--- a/arch/s390/include/asm/bitops.h
+++ b/arch/s390/include/asm/bitops.h
@@ -60,7 +60,7 @@ static __always_inline bool arch_test_bit(unsigned long nr, const volatile unsig
asm volatile(
"... |
dc287e4c9149ab54a5003b4d4da007818b5fda3d | Analyze and fix the following issue in the Linux kernel code: s390/pci: Fix SR-IOV for PFs initially in standby | Problem Details:
Since commit 25f39d3dcb48 ("s390/pci: Ignore RID for isolated VFs") PFs
which are not initially configured but in standby are considered
isolated. That is they create only a single function PCI domain. Due to
the PCI domains being created on discovery, this means that even if they
are configured later ... | ```diff
diff --git a/arch/s390/pci/pci_bus.c b/arch/s390/pci/pci_bus.c
index d5ace00d10f0..857afbc4828f 100644
--- a/arch/s390/pci/pci_bus.c
+++ b/arch/s390/pci/pci_bus.c
@@ -171,7 +171,6 @@ void zpci_bus_scan_busses(void)
static bool zpci_bus_is_multifunction_root(struct zpci_dev *zdev)
{
return !s390_pci_no_rid &... |
579a6633b8f720ed2c17e3445012e3834a8535a0 | Analyze and fix the following issue in the Linux kernel code: s390: Rename GCC_ASM_FLAG_OUTPUT_BROKEN to CC_ASM_FLAG_OUTPUT_BROKEN | Problem Details:
Config options which can be used to check for compiler bugs and features
have the compiler independent CC prefix in order to avoid duplicating and
having to check config options for multiple compilers. Therefore rename the
config option accordingly.
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.c... | ```diff
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index e4931a32b896..621d70ec4bd0 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -52,7 +52,7 @@ config KASAN_SHADOW_OFFSET
depends on KASAN
default 0x1C000000000000
-config GCC_ASM_FLAG_OUTPUT_BROKEN
+config CC_ASM_FLAG_OUTPUT_BROKEN
def_bool ... |
ae02615b7fcea9ce9a4ec40b3c5b5dafd322b179 | Analyze and fix the following issue in the Linux kernel code: s390/fpu: Add fpc exception handler / remove fixup section again | Problem Details:
The fixup section was added again by mistake when test_fp_ctl() was
removed. The reason for the removal of the fixup section is described in
commit 484a8ed8b7d1 ("s390/extable: add dedicated uaccess handler").
Remove it again for the same reason.
Add an exception handler which handles exceptions when ... | ```diff
diff --git a/arch/s390/include/asm/asm-extable.h b/arch/s390/include/asm/asm-extable.h
index 4a6b0a8b6412..00a67464c445 100644
--- a/arch/s390/include/asm/asm-extable.h
+++ b/arch/s390/include/asm/asm-extable.h
@@ -14,6 +14,7 @@
#define EX_TYPE_UA_LOAD_REG 5
#define EX_TYPE_UA_LOAD_REGPAIR 6
#define EX_TYPE_... |
9af310ef10dedc2f8d400d26fdc99d771537b2fd | Analyze and fix the following issue in the Linux kernel code: s390/boot: Improve decompression error reporting | Problem Details:
Currently, decompression error messages can be very uninformative:
[ 0.029853] startup: read error
[ 0.040507] startup: -- System halted
Improve these messages to make it clear that the error originates from
the decompression code. Additionally, on decompression failures, if
bootdebug is enable... | ```diff
diff --git a/arch/s390/boot/decompressor.c b/arch/s390/boot/decompressor.c
index f478e8e9cbda..03500b9d9fb9 100644
--- a/arch/s390/boot/decompressor.c
+++ b/arch/s390/boot/decompressor.c
@@ -9,6 +9,7 @@
#include <linux/kernel.h>
#include <linux/string.h>
+#include <asm/boot_data.h>
#include <asm/page.h>
#... |
ec6f9f7e5bbf983323d53b66e8a76d699d26736c | Analyze and fix the following issue in the Linux kernel code: s390/boot: Add startup debugging support | Problem Details:
Add boot_debug() calls to log various memory layout decisions and
randomization details during early startup, improving debugging
capabilities.
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> | ```diff
diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c
index 89f1d12f1c10..807594cf246c 100644
--- a/arch/s390/boot/startup.c
+++ b/arch/s390/boot/startup.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
+#define boot_fmt(fmt) "startup: " fmt
#include <linux/string.h>
#include <linux/elf.h>
#... |
418b4d5e617ad0a4c532496ea86f7fb28de9fd95 | Analyze and fix the following issue in the Linux kernel code: s390/boot: Add vmem debugging support | Problem Details:
Introduce boot_debug() calls in vmem code to log page table mappings
including KASAN shadow mappings for improved early boot debugging.
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> | ```diff
diff --git a/arch/s390/boot/vmem.c b/arch/s390/boot/vmem.c
index 47011b5a9e3d..c8a2d5175114 100644
--- a/arch/s390/boot/vmem.c
+++ b/arch/s390/boot/vmem.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
+#define boot_fmt(fmt) "vmem: " fmt
#include <linux/sched/task.h>
#include <linux/pgtable.h>
#include... |
a56827e5a5fa02a5241eab7342f51c840d99ee15 | Analyze and fix the following issue in the Linux kernel code: s390/boot: Move command line parsing earlier | Problem Details:
Reorder the store_ipl_parmblock(), uv_query_info(), and command line
setup calls to occur earlier. This ensures debug printing covers all
memory tracking activities from the start.
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Go... | ```diff
diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c
index 86693d838e97..89f1d12f1c10 100644
--- a/arch/s390/boot/startup.c
+++ b/arch/s390/boot/startup.c
@@ -411,6 +411,10 @@ void startup_kernel(void)
psw_t psw;
setup_lpp();
+ store_ipl_parmblock();
+ uv_query_info();
+ setup_boot_command_lin... |
9688b17b4a3e608c35b22028e37641d3512faafe | Analyze and fix the following issue in the Linux kernel code: s390/boot: Add physmem tracking debug support | Problem Details:
Introduce boot_debug() calls to track memory detection, online ranges,
reserved areas, and allocations (except for VMEM allocations, which are
too frequent). Instead introduce dump_physmem_reserved() function which
prints out full memory tracking information. This helps in debugging
early boot memory h... | ```diff
diff --git a/arch/s390/boot/boot.h b/arch/s390/boot/boot.h
index 0cfa84a42ec1..69f261566a64 100644
--- a/arch/s390/boot/boot.h
+++ b/arch/s390/boot/boot.h
@@ -57,6 +57,7 @@ unsigned long physmem_alloc_range(enum reserved_range_type type, unsigned long s
unsigned long align, unsigned long min, unsigned lo... |
d2ebe06bf5a18714b74cda0eea60bbb10553477e | Analyze and fix the following issue in the Linux kernel code: s390: Use pr_info for "KernelAddressSanitizer initialized" message | Problem Details:
sclp_early_printk() ignores boot console debug settings and prints
unconditionally. It also prints message without any timestamp
or formatting. Convert it to pr_info().
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agord... | ```diff
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index 4cdf3bf33052..2fa25164df7d 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -59,7 +59,7 @@ static void __init kasan_early_init(void)
{
#ifdef CONFIG_KASAN
init_task.kasan_depth = 0;
- sclp_early_printk("KernelAddre... |
b2a992a55fb60395d1ab9a4d4b2ea3783e3b7ad9 | Analyze and fix the following issue in the Linux kernel code: s390/boot: Dump message ring buffer on crash with bootdebug | Problem Details:
Dump the boot message ring buffer when a crash occurs during boot, but
only if bootdebug is enabled. This helps assist in analyzing boot-time
issues by providing additional debugging information.
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-b... | ```diff
diff --git a/arch/s390/boot/boot.h b/arch/s390/boot/boot.h
index 688fa75f8651..0cfa84a42ec1 100644
--- a/arch/s390/boot/boot.h
+++ b/arch/s390/boot/boot.h
@@ -76,6 +76,7 @@ int __printf(1, 2) boot_printk(const char *fmt, ...);
void print_stacktrace(unsigned long sp);
void error(char *m);
int get_random(unsig... |
b79015ae63d3c91f06ab78b6f06abba94fd88e12 | Analyze and fix the following issue in the Linux kernel code: s390/boot: Add prefix filtering to bootdebug messages | Problem Details:
Enhance boot debugging by allowing the "bootdebug" kernel parameter to
accept an optional comma-separated list of prefixes. Only debug messages
starting with these prefixes will be printed during boot. For example:
bootdebug=startup,vmem
Not specifying a filter for the "bootdebug" parameter print... | ```diff
diff --git a/arch/s390/boot/boot.h b/arch/s390/boot/boot.h
index dbfba6822d6f..688fa75f8651 100644
--- a/arch/s390/boot/boot.h
+++ b/arch/s390/boot/boot.h
@@ -77,14 +77,18 @@ void print_stacktrace(unsigned long sp);
void error(char *m);
int get_random(unsigned long limit, unsigned long *value);
-#define boo... |
d20d8e51338fc39aedf98786a4e9b71d4af4bda7 | Analyze and fix the following issue in the Linux kernel code: s390/boot: Add bootdebug option to control debug messages | Problem Details:
Suppress decompressor debug messages by default, similar to regular
kernel debug messages that require 'DEBUG' or 'dyndbg' to be enabled
(depending on CONFIG_DYNAMIC_DEBUG). Introduce a 'bootdebug' option to
enable printing these messages when needed.
All messages are still stored in the boot ring buf... | ```diff
diff --git a/arch/s390/boot/ipl_parm.c b/arch/s390/boot/ipl_parm.c
index fd4874ab30cb..397046f0c1df 100644
--- a/arch/s390/boot/ipl_parm.c
+++ b/arch/s390/boot/ipl_parm.c
@@ -317,6 +317,8 @@ void parse_boot_command_line(void)
boot_earlyprintk = true;
if (!strcmp(param, "debug"))
boot_console_loglevel... |
42fc158c7e789ccb8f9d42e5b18d00ca00d93cfe | Analyze and fix the following issue in the Linux kernel code: s390/boot: Replace boot_printk() with loglevel-specific helpers | Problem Details:
Replaces boot_printk() calls with appropriate loglevel-specific helpers
such as boot_emerg(), boot_warn(), and boot_debug().
Using functions with explicit log levels improves log clarity and aligns
the boot code with standard kernel logging practices. This makes it
easier to filter and manage boot-tim... | ```diff
diff --git a/arch/s390/boot/als.c b/arch/s390/boot/als.c
index 11e0c3d5dbc8..79afb5fa7f1f 100644
--- a/arch/s390/boot/als.c
+++ b/arch/s390/boot/als.c
@@ -46,7 +46,7 @@ void print_missing_facilities(void)
* z/VM adds a four character prefix.
*/
if (strlen(als_str) > 70) {
- boot_printk("%s\n", ... |
d538fdc49a7d7dd068fc29bcc6093e8dd45abbd9 | Analyze and fix the following issue in the Linux kernel code: s390/boot: Add support for boot messages loglevels | Problem Details:
Add message severity levels for boot messages, similar to the main
kernel. Support command-line options that control console output
verbosity, including "loglevel," "ignore_loglevel," "debug," and "quiet".
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Si... | ```diff
diff --git a/arch/s390/boot/boot.h b/arch/s390/boot/boot.h
index ce8422d8f9a8..80e86387bee5 100644
--- a/arch/s390/boot/boot.h
+++ b/arch/s390/boot/boot.h
@@ -8,6 +8,7 @@
#ifndef __ASSEMBLY__
+#include <linux/printk.h>
#include <asm/physmem_info.h>
struct machine_info {
@@ -76,7 +77,18 @@ void print_st... |
e70452c4ba2ce1e24a3fdc18bd623edb7b56013c | Analyze and fix the following issue in the Linux kernel code: s390/mm: Allow large pages for KASAN shadow mapping | Problem Details:
Commit c98d2ecae08f ("s390/mm: Uncouple physical vs virtual address
spaces") introduced a large_allowed() helper that restricts which mapping
modes can use large pages. This change unintentionally prevented KASAN
shadow mappings from using large pages, despite there being no reason
to avoid them. In fa... | ```diff
diff --git a/arch/s390/boot/vmem.c b/arch/s390/boot/vmem.c
index a0c97cde5146..d755e5340fcd 100644
--- a/arch/s390/boot/vmem.c
+++ b/arch/s390/boot/vmem.c
@@ -13,6 +13,7 @@
#include "decompressor.h"
#include "boot.h"
+#define INVALID_PHYS_ADDR (~(phys_addr_t)0)
struct ctlreg __bootdata_preserved(s390_inval... |
531936dee53e471a3ec668de3c94ca357f54b7e8 | Analyze and fix the following issue in the Linux kernel code: LoongArch: Extend the maximum number of watchpoints | Problem Details:
The maximum number of load/store watchpoints and fetch instruction
watchpoints is 14 each according to LoongArch Reference Manual, so
extend the maximum number of watchpoints from 8 to 14 for ptrace.
By the way, just simply change 8 to 14 for the definition in struct
user_watch_state at the beginning,... | ```diff
diff --git a/arch/loongarch/include/uapi/asm/ptrace.h b/arch/loongarch/include/uapi/asm/ptrace.h
index ac915f841650..aafb3cd9e943 100644
--- a/arch/loongarch/include/uapi/asm/ptrace.h
+++ b/arch/loongarch/include/uapi/asm/ptrace.h
@@ -72,6 +72,16 @@ struct user_watch_state {
} dbg_regs[8];
};
+struct user_... |
f502ea618bf16d615d7dc6138c8988d3118fe750 | Analyze and fix the following issue in the Linux kernel code: LoongArch: Change 8 to 14 for LOONGARCH_MAX_{BRP,WRP} | Problem Details:
The maximum number of load/store watchpoints and fetch instruction
watchpoints is 14 each according to LoongArch Reference Manual, so
change 8 to 14 for the related code.
Link: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#control-and-status-registers-related-to-watchpoints... | ```diff
diff --git a/arch/loongarch/include/asm/hw_breakpoint.h b/arch/loongarch/include/asm/hw_breakpoint.h
index d78330916bd1..13b2462f3d8c 100644
--- a/arch/loongarch/include/asm/hw_breakpoint.h
+++ b/arch/loongarch/include/asm/hw_breakpoint.h
@@ -38,8 +38,8 @@ struct arch_hw_breakpoint {
* Limits.
* Changing th... |
04816c1507b46baccd17a4bc948440b3634d5d13 | Analyze and fix the following issue in the Linux kernel code: LoongArch: Add debugfs entries to switch SFB/TSO state | Problem Details:
We need to switch SFB (Store Fill Buffer) and TSO (Total Store Order)
state at runtime to debug memory management and KVM virtualization, so
add two debugfs entries "sfb_state" and "tso_state" under the directory
/sys/kernel/debug/loongarch.
Query SFB:
cat /sys/kernel/debug/loongarch/sfb_state
Enable... | ```diff
diff --git a/arch/loongarch/include/asm/loongarch.h b/arch/loongarch/include/asm/loongarch.h
index a3cc4f8d4c4a..15c245636176 100644
--- a/arch/loongarch/include/asm/loongarch.h
+++ b/arch/loongarch/include/asm/loongarch.h
@@ -108,6 +108,12 @@
#define CPUCFG3_SPW_HG_HF BIT(11)
#define CPUCFG3_RVA BIT(12)... |
26c0a2d93af55d30a46d5f45d3e9c42cde730168 | Analyze and fix the following issue in the Linux kernel code: LoongArch: Fix warnings during S3 suspend | Problem Details:
The enable_gpe_wakeup() function calls acpi_enable_all_wakeup_gpes(),
and the later one may call the preempt_schedule_common() function,
resulting in a thread switch and causing the CPU to be in an interrupt
enabled state after the enable_gpe_wakeup() function returns, leading
to the warnings as follow... | ```diff
diff --git a/arch/loongarch/power/platform.c b/arch/loongarch/power/platform.c
index 0909729dc2e1..5bbdb9fd76e5 100644
--- a/arch/loongarch/power/platform.c
+++ b/arch/loongarch/power/platform.c
@@ -17,7 +17,7 @@ void enable_gpe_wakeup(void)
if (acpi_gbl_reduced_hardware)
return;
- acpi_enable_all_... |
110b1e070f1d50f5217bd2c758db094998bb7b77 | Analyze and fix the following issue in the Linux kernel code: module: Don't fail module loading when setting ro_after_init section RO failed | Problem Details:
Once module init has succeded it is too late to cancel loading.
If setting ro_after_init data section to read-only fails, all we
can do is to inform the user through a warning.
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Closes: https://lore.kernel.org/all/20230915082126.4187913-1-ruanjinjie@hua... | ```diff
diff --git a/kernel/module/main.c b/kernel/module/main.c
index 8acec43e97dc..8808b6906d5a 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -2955,7 +2955,10 @@ static noinline int do_init_module(struct module *mod)
#endif
ret = module_enable_rodata_ro_after_init(mod);
if (ret)
- goto fail_mu... |
a145c848d69f9c6f32008d8319edaa133360dd74 | Analyze and fix the following issue in the Linux kernel code: module: Extend the preempt disabled section in dereference_symbol_descriptor(). | Problem Details:
dereference_symbol_descriptor() needs to obtain the module pointer
belonging to pointer in order to resolve that pointer.
The returned mod pointer is obtained under RCU-sched/ preempt_disable()
guarantees and needs to be used within this section to ensure that the
module is not removed in the meantime.... | ```diff
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
index c3f075e8f60c..1c6a6c1704d8 100644
--- a/include/linux/kallsyms.h
+++ b/include/linux/kallsyms.h
@@ -57,10 +57,10 @@ static inline void *dereference_symbol_descriptor(void *ptr)
preempt_disable();
mod = __module_address((unsigned long)p... |
6250ebe666e425e173df5e11e8a612d57921f48d | Analyze and fix the following issue in the Linux kernel code: i2c: Fix core-managed per-client debugfs handling | Problem Details:
The debugfs directory should be created when a device
is probed, not when it is registered. It should be removed
when the device is removed, not when it is unregistered.
Fixes: d06905d68610 ("i2c: add core-managed per-client directory in debugfs")
Signed-off-by: Guenter Roeck <linux@roeck-us.net> | ```diff
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index c24ccefb015e..d4bbf6827d1a 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -583,6 +583,9 @@ static int i2c_device_probe(struct device *dev)
goto err_detach_pm_domain;
}
+ client->debugfs = debugfs_c... |
5851a88dac1501353659690343b936d6fcb5d509 | Analyze and fix the following issue in the Linux kernel code: i2c: imx-lpi2c: select CONFIG_I2C_SLAVE | Problem Details:
The addition of target mode causes a build failure when CONFIG_I2C_SLAVE
is turned off:
drivers/i2c/busses/i2c-imx-lpi2c.c:1273:10: error: 'const struct i2c_algorithm' has no member named 'reg_target'
1273 | .reg_target = lpi2c_imx_register_target,
| ^~~~~~~~~~
drivers/i2c/... | ```diff
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index eec95c724b25..fc438f445771 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -756,6 +756,7 @@ config I2C_IMX
config I2C_IMX_LPI2C
tristate "IMX Low Power I2C interface"
depends on ARCH_MXC || COMPILE_TEST
+... |
691a1f3f180133965d01e0ab0f332248d0345554 | Analyze and fix the following issue in the Linux kernel code: tomoyo: fix spelling errors | Problem Details:
No functional changes.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | ```diff
diff --git a/security/tomoyo/securityfs_if.c b/security/tomoyo/securityfs_if.c
index a2705798476f..7e69747b2f77 100644
--- a/security/tomoyo/securityfs_if.c
+++ b/security/tomoyo/securityfs_if.c
@@ -229,11 +229,11 @@ static void __init tomoyo_create_entry(const char *name, const umode_t mode,
}
/**
- * tomo... |
41f198d58b6f2b36f9f8a4481d517369b324e773 | Analyze and fix the following issue in the Linux kernel code: tomoyo: fix spelling error | Problem Details:
Fix spelling error in security/tomoyo module comments that were
identified using the codespell tool.
No functional changes - documentation only.
Signed-off-by: Tanya Agarwal <tanyaagarwal25699@gmail.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.S... | ```diff
diff --git a/security/tomoyo/domain.c b/security/tomoyo/domain.c
index 3a7b0874cf44..5f9ccab26e9a 100644
--- a/security/tomoyo/domain.c
+++ b/security/tomoyo/domain.c
@@ -920,7 +920,7 @@ bool tomoyo_dump_page(struct linux_binprm *bprm, unsigned long pos,
#ifdef CONFIG_MMU
/*
* This is called at execve() t... |
d1366e74342e75555af2648a2964deb2d5c92200 | Analyze and fix the following issue in the Linux kernel code: mm/compaction: fix UBSAN shift-out-of-bounds warning | Problem Details:
syzkaller reported a UBSAN shift-out-of-bounds warning of (1UL << order)
in isolate_freepages_block(). The bogus compound_order can be any value
because it is union with flags. Add back the MAX_PAGE_ORDER check to fix
the warning.
Link: https://lkml.kernel.org/r/20250123021029.2826736-1-liushixin2@h... | ```diff
diff --git a/mm/compaction.c b/mm/compaction.c
index 07bd22789f07..0f49f060d251 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -631,7 +631,8 @@ static unsigned long isolate_freepages_block(struct compact_control *cc,
if (PageCompound(page)) {
const unsigned int order = compound_order(page);
- ... |
502269ab98b5b31428be23aa3871d297d916a90b | Analyze and fix the following issue in the Linux kernel code: s390/mm: add missing ctor/dtor on page table upgrade | Problem Details:
Commit 78966b550289 ("s390: pgtable: add statistics for PUD and P4D level
page table") misses the call to pagetable_p4d_ctor() against a newly
allocated P4D table in crst_table_upgrade();
Commit 68c601de75d8 ("mm: introduce ctor/dtor at PGD level") misses the
call to pagetable_pgd_ctor() against a new... | ```diff
diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c
index a4e761902093..d33f55b7ee98 100644
--- a/arch/s390/mm/pgalloc.c
+++ b/arch/s390/mm/pgalloc.c
@@ -88,12 +88,14 @@ int crst_table_upgrade(struct mm_struct *mm, unsigned long end)
if (unlikely(!p4d))
goto err_p4d;
crst_table_init(p4d, _REG... |
cf929a2863bff58608ab30a88b8c7a5fc93ff437 | Analyze and fix the following issue in the Linux kernel code: tools: add VM_WARN_ON_VMG definition | Problem Details:
vma tests compilation yields the following error:
vma.c:732:9: error: implicit declaration of function ‘VM_WARN_ON_VMG’
Fix it by adding missing VM_WARN_ON_VMG() definition.
Link: https://lkml.kernel.org/r/20250116181538.759469-1-surenb@google.com
Fixes: e3a7ae85f87c ("mm/debug: prefer VM_WARN_ON_VM... | ```diff
diff --git a/tools/testing/vma/vma_internal.h b/tools/testing/vma/vma_internal.h
index 2404347fa2c7..1eae23039854 100644
--- a/tools/testing/vma/vma_internal.h
+++ b/tools/testing/vma/vma_internal.h
@@ -38,6 +38,7 @@ extern unsigned long dac_mmap_min_addr;
#define VM_WARN_ON(_expr) (WARN_ON(_expr))
#define ... |
3c7fd94205f86ad89f1d1d01dbfbc4b139860d8f | Analyze and fix the following issue in the Linux kernel code: seqlock: add missing parameter documentation for raw_seqcount_try_begin() | Problem Details:
Add missing documentation for raw_seqcount_try_begin() start parameter.
Link: https://lkml.kernel.org/r/20250116182730.801497-1-surenb@google.com
Fixes: dba4761a3e40 ("seqlock: add raw_seqcount_try_begin")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/2025011... | ```diff
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index 22c2c48b4265..b783a3a7ed62 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -322,6 +322,7 @@ SEQCOUNT_LOCKNAME(mutex, struct mutex, true, mutex)
* raw_seqcount_try_begin() - begin a seqcount_t read critical... |
81f804c3df8661c12ae5eaa1ae605694017c7349 | Analyze and fix the following issue in the Linux kernel code: zram: remove zcomp_stream_put() from write_incompressible_page() | Problem Details:
We cannot and should not put per-CPU compression stream in
write_incompressible_page() because that function never gets any
per-CPU streams in the first place. It's zram_write_page() that
puts the stream before it calls write_incompressible_page().
Link: https://lkml.kernel.org/r/20250115072003.38056... | ```diff
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 70ecaee25c20..9f5020b077c5 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1683,7 +1683,6 @@ static int write_incompressible_page(struct zram *zram, struct page *page,
return PTR_ERR((void *)ha... |
7882d8fc8fe0c2b2a01f09e56edf82df6b3013fd | Analyze and fix the following issue in the Linux kernel code: selftests/mm/mkdirty: fix memory leak in test_uffdio_copy() | Problem Details:
Release memory before exception branch returns to prevent memory leaks
Checking tools/testing/selftests/mm/mkdirty.c ...
tools/testing/selftests/mm/mkdirty.c:283:3: error: Memory leak: src [memleak]
return;
^
Link: https://lkml.kernel.org/r/20250114023838.48589-1-liuye@kylinos.cn
Signed-off-by: l... | ```diff
diff --git a/tools/testing/selftests/mm/mkdirty.c b/tools/testing/selftests/mm/mkdirty.c
index 1db134063c38..af2fce496912 100644
--- a/tools/testing/selftests/mm/mkdirty.c
+++ b/tools/testing/selftests/mm/mkdirty.c
@@ -280,6 +280,7 @@ static void test_uffdio_copy(void)
dst = mmap(NULL, pagesize, PROT_READ, MA... |
3bd6137220bb5cf4114d038cf90cb20375b31124 | Analyze and fix the following issue in the Linux kernel code: selftests/mm: virtual_address_range: avoid reading from VM_IO mappings | Problem Details:
The virtual_address_range selftest reads from the start of each mapping
listed in /proc/self/maps. However not all mappings are valid to be
arbitrarily accessed.
For example the vvar data used for virtual clocks on x86 [vvar_vclock] can
only be accessed if 1) the kernel configuration enables virtual ... | ```diff
diff --git a/tools/testing/selftests/mm/virtual_address_range.c b/tools/testing/selftests/mm/virtual_address_range.c
index 386e4e46fa65..b380e102b22f 100644
--- a/tools/testing/selftests/mm/virtual_address_range.c
+++ b/tools/testing/selftests/mm/virtual_address_range.c
@@ -15,6 +15,7 @@
#include <sys/time.h>
... |
b2a79f62133aa687d8d966dd524192d9706bf3de | Analyze and fix the following issue in the Linux kernel code: selftests/mm: virtual_address_range: unmap chunks after validation | Problem Details:
For each accessed chunk a PTE is created. More than 1GiB of PTEs is used
in this way. Remove each PTE after validating a chunk to reduce peak
memory usage.
It is important to only unmap memory that previously mmap()ed, as
unmapping other mappings like the stack, heap or executable mappings will
cras... | ```diff
diff --git a/tools/testing/selftests/mm/config b/tools/testing/selftests/mm/config
index 4309916f629e..a28baa536332 100644
--- a/tools/testing/selftests/mm/config
+++ b/tools/testing/selftests/mm/config
@@ -7,3 +7,4 @@ CONFIG_TEST_HMM=m
CONFIG_GUP_TEST=y
CONFIG_TRANSPARENT_HUGEPAGE=y
CONFIG_MEM_SOFT_DIRTY=y
... |
a005145b9c969651a8997725e1df35c81040f76b | Analyze and fix the following issue in the Linux kernel code: selftests/mm: virtual_address_range: mmap() without PROT_WRITE | Problem Details:
Patch series "selftests/mm: virtual_address_range: Reduce memory", v4.
The selftest started failing since commit e93d2521b27f ("x86/vdso: Split
virtual clock pages into dedicated mapping") was merged. While debugging
I stumbled upon some memory usage optimizations.
With these test now runs on a VM w... | ```diff
diff --git a/tools/testing/selftests/mm/virtual_address_range.c b/tools/testing/selftests/mm/virtual_address_range.c
index 2a2b69e91950..ea6ccf49ef4c 100644
--- a/tools/testing/selftests/mm/virtual_address_range.c
+++ b/tools/testing/selftests/mm/virtual_address_range.c
@@ -166,7 +166,7 @@ int main(int argc, ch... |
73519ded992fc9dda2807450d6931002bb93cb16 | Analyze and fix the following issue in the Linux kernel code: selftests/memfd/memfd_test: fix possible NULL pointer dereference | Problem Details:
If `name' is NULL, a NULL pointer may be accessed in printf.
Link: https://lkml.kernel.org/r/20250114032115.58638-1-liuye@kylinos.cn
Signed-off-by: liuye <liuye@kylinos.cn>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: "Isaac J. Manjarres" <isaacman... | ```diff
diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c
index c0c53451a16d..5b993924cc3f 100644
--- a/tools/testing/selftests/memfd/memfd_test.c
+++ b/tools/testing/selftests/memfd/memfd_test.c
@@ -171,7 +171,7 @@ static void mfd_fail_new(const char *name, unsigned i... |
bf069012df19cf80b460a03c92bfe6320dc268b0 | Analyze and fix the following issue in the Linux kernel code: selftests/mm/cow: modify the incorrect checking parameters | Problem Details:
In run_with_memfd_hugetlb(), some error handle have passed incorrect
parameters. It should be "smem", but it was mistakenly written as "mem".
Let's fix it.
[gehao@kylinos.cn: fix other errant sites, per Anshuman]
Link: https://lkml.kernel.org/r/20250113050908.93638-1-hao.ge@linux.dev
Link: https:/... | ```diff
diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c
index 1238e1c5aae1..9446673645eb 100644
--- a/tools/testing/selftests/mm/cow.c
+++ b/tools/testing/selftests/mm/cow.c
@@ -1482,7 +1482,7 @@ static void run_with_zeropage(non_anon_test_fn fn, const char *desc)
}
smem = mmap(NU... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.