id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
ff2998f29f390d963299103f0b247cc79106ced5 | Analyze and fix the following issue in the Linux kernel code: net: sched: introduce qdisc-specific drop reason tracing | Problem Details:
Create new enum qdisc_drop_reason and trace_qdisc_drop tracepoint
for qdisc layer drop diagnostics with direct qdisc context visibility.
The new tracepoint includes qdisc handle, parent, kind (name), and
device information. Existing SKB_DROP_REASON_QDISC_DROP is retained
for backwards compatibility vi... | ```diff
diff --git a/include/net/dropreason-core.h b/include/net/dropreason-core.h
index a7b7abd66e21..3d8d284e05c8 100644
--- a/include/net/dropreason-core.h
+++ b/include/net/dropreason-core.h
@@ -68,12 +68,6 @@
FN(SECURITY_HOOK) \
FN(QDISC_DROP) \
FN(QDISC_BURST_DROP) \
- FN(QDISC_OVERLIMIT) \
- FN(QDISC_... |
80bf3b28d32b431f84f244a8469488eb6d96afbb | Analyze and fix the following issue in the Linux kernel code: scsi: devinfo: Add BLIST_SKIP_IO_HINTS for Iomega ZIP | Problem Details:
The Iomega ZIP 100 (Z100P2) can't process IO Advice Hints Grouping mode
page query. It immediately switches to the status phase 0xb8 after
receiving the subpage code 0x05 of MODE_SENSE_10 command, which fails
imm_out() and turns into DID_ERROR of this command, which leads to unusable
device. This was t... | ```diff
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
index 0dada89d8d99..68a992494b12 100644
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@ -190,7 +190,7 @@ static struct {
{"IBM", "2076", NULL, BLIST_NO_VPD_SIZE},
{"IBM", "2105", NULL, BLIST_RETRY_HWERROR},
{"iom... |
595da751c8222ca957cfdc0161d9845a75c67046 | Analyze and fix the following issue in the Linux kernel code: icmp: fix ICMP error source address when xfrm policy matches | Problem Details:
When an IPsec gateway generates an ICMP error (e.g., Destination Host
Unreachable), the source address incorrectly shows the unreachable
destination instead of the gateway's address. IPv6 behaves correctly.
Before fix:
ping 10.1.6.3
From 10.1.6.3 icmp_seq=1 Destination Host Unreachable
(wrong - ... | ```diff
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 1cf9e391aa0c..ac6d2ffc1963 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -591,7 +591,6 @@ static struct rtable *icmp_route_lookup(struct net *net, struct flowi4 *fl4,
rt2 = dst_rtable(dst2);
if (!IS_ERR(dst2)) {
dst_release(&rt->dst);
- memcpy... |
5e0d4fdb98f3ab4c25aabda00b31dd5d4a806638 | Analyze and fix the following issue in the Linux kernel code: scsi: lpfc: ELIMINATE kernel-doc warnings in lpfc.h | Problem Details:
Avoid all kernel-doc warnings in lpfc.h:
- Use the correct function parameter name
- Add a '*' to a kernel-doc line
- Repair the function Returns: comments
Fixes these warnings:
Warning: drivers/scsi/lpfc/lpfc.h:1674 No description found for return
value of 'lpfc_next_online_cpu'
Warning: driv... | ```diff
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index 689793d03c20..240ae6216c7c 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -1667,8 +1667,9 @@ lpfc_phba_elsring(struct lpfc_hba *phba)
* @mask: Pointer to phba's cpumask member.
* @start: starting cpu index
*
- ... |
1ac22c8eae81366101597d48360718dff9b9d980 | Analyze and fix the following issue in the Linux kernel code: scsi: core: Fix refcount leak for tagset_refcnt | Problem Details:
This leak will cause a hang when tearing down the SCSI host. For example,
iscsid hangs with the following call trace:
[130120.652718] scsi_alloc_sdev: Allocation failure during SCSI scanning, some SCSI devices might not be configured
PID: 2528 TASK: ffff9d0408974e00 CPU: 3 COMMAND: "iscsid"
... | ```diff
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 60c06fa4ec32..2cfcf1f5d6a4 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -361,6 +361,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,
* since we use this queue depth most of times.
... |
9439a661c2e80485406ce2c90b107ca17858382d | Analyze and fix the following issue in the Linux kernel code: amd-xgbe: fix MAC_TCR_SS register width for 2.5G and 10M speeds | Problem Details:
Extend the MAC_TCR_SS (Speed Select) register field width from 2 bits
to 3 bits to properly support all speed settings.
The MAC_TCR register's SS field encoding requires 3 bits to represent
all supported speeds:
- 0x00: 10Gbps (XGMII)
- 0x02: 2.5Gbps (GMII) / 100Mbps
- 0x03: 1Gbps / 10Mbps
- 0... | ```diff
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-common.h b/drivers/net/ethernet/amd/xgbe/xgbe-common.h
index 711f295eb777..80c2c27ac9dc 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-common.h
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-common.h
@@ -431,7 +431,7 @@
#define MAC_SSIR_SSINC_INDEX 16
#define MAC_SS... |
147792c395db870756a0dc87ce656c75ae7ab7e8 | Analyze and fix the following issue in the Linux kernel code: net: ti: icssg-prueth: Fix ping failure after offload mode setup when link speed is not 1G | Problem Details:
When both eth interfaces with links up are added to a bridge or hsr
interface, ping fails if the link speed is not 1Gbps (e.g., 100Mbps).
The issue is seen because when switching to offload (bridge/hsr) mode,
prueth_emac_restart() restarts the firmware and clears DRAM with
memset_io(), setting all mem... | ```diff
diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
index 0939994c932f..42a881bee109 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c
+++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
@@ -273,6 +273,14 @@ static int prueth_emac_common_start(struct p... |
dff8e3c025862001956b8edb29c1287c9efcd902 | Analyze and fix the following issue in the Linux kernel code: cpupower: fix swapped power/energy unit labels | Problem Details:
Fix error where microWatts and microJoules units were interchanged.
Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> | ```diff
diff --git a/tools/power/cpupower/utils/powercap-info.c b/tools/power/cpupower/utils/powercap-info.c
index 3ea4486f1a0e..e53033488218 100644
--- a/tools/power/cpupower/utils/powercap-info.c
+++ b/tools/power/cpupower/utils/powercap-info.c
@@ -38,11 +38,11 @@ static int powercap_print_one_zone(struct powercap_zo... |
9197e5949a41cfb5d44a6b8a860766266340d558 | Analyze and fix the following issue in the Linux kernel code: firewire: ohci: initialize page array to use alloc_pages_bulk() correctly | Problem Details:
The call of alloc_pages_bulk() skips to fill entries of page array when
the entries already have values. While, 1394 OHCI PCI driver passes the
page array without initializing. It could cause invalid state at PFN
validation in vmap().
Fixes: f2ae92780ab9 ("firewire: ohci: split page allocation from dm... | ```diff
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index 1c868c1e4a49..8153d62c58f0 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -848,7 +848,7 @@ static int ar_context_init(struct ar_context *ctx, struct fw_ohci *ohci,
{
struct device *dev = ohci->card.device;
unsigned ... |
ded4a02e7d0497c91ec8665e904c7dc817922993 | Analyze and fix the following issue in the Linux kernel code: ipv6: sit: Replace deprecated strcpy with strscpy | Problem Details:
strcpy() has been deprecated [1] because it performs no bounds checking
on the destination buffer, which can lead to buffer overflows. Replace
it with the safer strscpy(). Use the two-argument version of strscpy()
to copy 'parms->name' in ipip6_tunnel_locate().
Link: https://www.kernel.org/doc/html/l... | ```diff
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 6a7b8abb0477..ef2e5111fb3a 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -21,6 +21,7 @@
#include <linux/types.h>
#include <linux/socket.h>
#include <linux/sockios.h>
+#include <linux/string.h>
#include <linux/net.h>
#include <linux/in6.h>
#include <... |
101bacb303e89dc2e0640ae6a5e0fb97c4eb45bb | Analyze and fix the following issue in the Linux kernel code: atm: lec: fix null-ptr-deref in lec_arp_clear_vccs | Problem Details:
syzkaller reported a null-ptr-deref in lec_arp_clear_vccs().
This issue can be easily reproduced using the syzkaller reproducer.
In the ATM LANE (LAN Emulation) module, the same atm_vcc can be shared by
multiple lec_arp_table entries (e.g., via entry->vcc or entry->recv_vcc).
When the underlying VCC i... | ```diff
diff --git a/net/atm/lec.c b/net/atm/lec.c
index a107375c0629..fb93c6e1c329 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -1260,24 +1260,28 @@ static void lec_arp_clear_vccs(struct lec_arp_table *entry)
struct lec_vcc_priv *vpriv = LEC_VCC_PRIV(vcc);
struct net_device *dev = (struct net_device *)vcc->... |
74badb9c20b1a9c02a95c735c6d3cd6121679c93 | Analyze and fix the following issue in the Linux kernel code: dpaa2-switch: Fix interrupt storm after receiving bad if_id in IRQ handler | Problem Details:
Commit 31a7a0bbeb00 ("dpaa2-switch: add bounds check for if_id in IRQ
handler") introduces a range check for if_id to avoid an out-of-bounds
access. If an out-of-bounds if_id is detected, the interrupt status is
not cleared. This may result in an interrupt storm.
Clear the interrupt status after detec... | ```diff
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
index fc0e0f36186e..52c1cb9cb7e0 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
@@ -1533,7 +1533,7 @@ static irqretur... |
f7387d6579d65efd490a864254101cb665f2e7a7 | Analyze and fix the following issue in the Linux kernel code: xsk: Fix zero-copy AF_XDP fragment drop | Problem Details:
AF_XDP should ensure that only a complete packet is sent to application.
In the zero-copy case, if the Rx queue gets full as fragments are being
enqueued, the remaining fragments are dropped.
For the multi-buffer case, add a check to ensure that the Rx queue has
enough space for all fragments of a pac... | ```diff
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index be882a8d473c..6149f6a79897 100644
--- a/net/xdp/xsk.c
+++ b/net/xdp/xsk.c
@@ -167,25 +167,31 @@ static int xsk_rcv_zc(struct xdp_sock *xs, struct xdp_buff *xdp, u32 len)
struct xdp_buff_xsk *pos, *tmp;
struct list_head *xskb_list;
u32 contd = 0;
+ u32 num_d... |
60abb0ac11dccd6b98fd9182bc5f85b621688861 | Analyze and fix the following issue in the Linux kernel code: xsk: Fix fragment node deletion to prevent buffer leak | Problem Details:
After commit b692bf9a7543 ("xsk: Get rid of xdp_buff_xsk::xskb_list_node"),
the list_node field is reused for both the xskb pool list and the buffer
free list, this causes a buffer leak as described below.
xp_free() checks if a buffer is already on the free list using
list_empty(&xskb->list_node). Whe... | ```diff
diff --git a/include/net/xdp_sock_drv.h b/include/net/xdp_sock_drv.h
index 242e34f771cc..aefc368449d5 100644
--- a/include/net/xdp_sock_drv.h
+++ b/include/net/xdp_sock_drv.h
@@ -122,7 +122,7 @@ static inline void xsk_buff_free(struct xdp_buff *xdp)
goto out;
list_for_each_entry_safe(pos, tmp, xskb_list,... |
026dfef287c07f37d4d4eef7a0b5a4bfdb29b32d | Analyze and fix the following issue in the Linux kernel code: tcp: give up on stronger sk_rcvbuf checks (for now) | Problem Details:
We hit another corner case which leads to TcpExtTCPRcvQDrop
Connections which send RPCs in the 20-80kB range over loopback
experience spurious drops. The exact conditions for most of
the drops I investigated are that:
- socket exchanged >1MB of data so its not completely fresh
- rcvbuf is around 128... | ```diff
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 6404e53382ca..7b03f2460751 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5374,25 +5374,11 @@ static void tcp_ofo_queue(struct sock *sk)
static bool tcp_prune_ofo_queue(struct sock *sk, const struct sk_buff *in_skb);
static int t... |
6996a2d2d0a64808c19c98002aeb5d9d1b2df6a4 | Analyze and fix the following issue in the Linux kernel code: udp: Unhash auto-bound connected sk from 4-tuple hash table when disconnected. | Problem Details:
Let's say we bind() an UDP socket to the wildcard address with a
non-zero port, connect() it to an address, and disconnect it from
the address.
bind() sets SOCK_BINDPORT_LOCK on sk->sk_userlocks (but not
SOCK_BINDADDR_LOCK), and connect() calls udp_lib_hash4() to put
the socket into the 4-tuple hash t... | ```diff
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 014fdfdd331b..b60fad393e18 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -2287,7 +2287,6 @@ void udp_lib_rehash(struct sock *sk, u16 newhash, u16 newhash4)
udp_sk(sk)->udp_port_hash);
hslot2 = udp_hashslot2(udptable, udp_sk(sk)->udp_portaddr_... |
58e443b773ef054ae069cf777ba19adb99d73829 | Analyze and fix the following issue in the Linux kernel code: net: fix sock compilation error under CONFIG_PREEMPT_RT | Problem Details:
When CONFIG_PREEMPT_RT is enabled, __SPIN_LOCK_UNLOCKED() expands to a
brace-enclosed initializer rather than a compound literal, which cannot
be used in assignment expressions. This causes a build failure:
net/core/sock.c:3787:29: error: expected expression before '{' token
3787 | ... | ```diff
diff --git a/net/core/sock.c b/net/core/sock.c
index 9d841975a7a1..fba4d5b8553c 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3782,12 +3782,15 @@ void noinline lock_sock_nested(struct sock *sk, int subclass)
might_sleep();
#ifdef CONFIG_64BIT
if (sizeof(struct slock_owned) == sizeof(long)) {
- so... |
ba75d4dde8ca9f457c224968121239d7e05d7121 | Analyze and fix the following issue in the Linux kernel code: clk: samsung: Use %pe format to simplify | Problem Details:
Make code printing pointer error value a bit simpler and fix coccinelle
suggestion:
clk.c:363:16-23: WARNING: Consider using %pe to print PTR_ERR()
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226205445.336839-4-krzysztof.kozlowski@os... | ```diff
diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
index 94b2bccc7d02..91e5cdbc79d7 100644
--- a/drivers/clk/samsung/clk.c
+++ b/drivers/clk/samsung/clk.c
@@ -359,8 +359,8 @@ void __init samsung_clk_register_gate(struct samsung_clk_provider *ctx,
ctx->reg_base + list->offset, list->bit_idx,... |
b8d1706ab3d99c1f96d0c9ed7d16d29b8a178d4c | Analyze and fix the following issue in the Linux kernel code: clk: samsung: pll: Fix possible truncation in a9fraco recalc rate | Problem Details:
samsung_a9fraco_recalc_rate(), unlike other functions in the unit, is
the first case dividing u64 by u64, thus it should rather use div64_u64
to avoid possible truncation. Note that the original code did not
use remainder.
This fixes Coccinelle warning:
clk-pll.c:1489:1-7: WARNING: do_div() does a... | ```diff
diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c
index 0d0494927e59..fdb84bcec912 100644
--- a/drivers/clk/samsung/clk-pll.c
+++ b/drivers/clk/samsung/clk-pll.c
@@ -1485,7 +1485,7 @@ static unsigned long samsung_a9fraco_recalc_rate(struct clk_hw *hw,
/* fvco = fref * (M + K/2^24) / p... |
a2be37eedb52ea26938fa4cc9de1ff84963c57ad | Analyze and fix the following issue in the Linux kernel code: firmware: exynos-acpm: Drop fake 'const' on handle pointer | Problem Details:
All the functions operating on the 'handle' pointer are claiming it is a
pointer to const thus they should not modify the handle. In fact that's
a false statement, because first thing these functions do is drop the
cast to const with container_of:
struct acpm_info *acpm = handle_to_acpm_info(handle... | ```diff
diff --git a/drivers/clk/samsung/clk-acpm.c b/drivers/clk/samsung/clk-acpm.c
index b90809ce3f88..d8944160793a 100644
--- a/drivers/clk/samsung/clk-acpm.c
+++ b/drivers/clk/samsung/clk-acpm.c
@@ -20,7 +20,7 @@ struct acpm_clk {
u32 id;
struct clk_hw hw;
unsigned int mbox_chan_id;
- const struct acpm_handle... |
8021729acf21f4bf3c43866b8919b68968028478 | Analyze and fix the following issue in the Linux kernel code: iio: tsl2772: fix all kernel-doc warnings | Problem Details:
Use the correct kernel-doc notation for struct members to eliminate
kernel-doc warnings:
Warning: include/linux/platform_data/tsl2772.h:88 struct member
'prox_diode' not described in 'tsl2772_settings'
Warning: include/linux/platform_data/tsl2772.h:88 struct member
'prox_power' not described in 'tsl... | ```diff
diff --git a/include/linux/platform_data/tsl2772.h b/include/linux/platform_data/tsl2772.h
index f8ade15a35e2..f042e82b39c3 100644
--- a/include/linux/platform_data/tsl2772.h
+++ b/include/linux/platform_data/tsl2772.h
@@ -61,9 +61,9 @@ struct tsl2772_lux {
* @prox_pulse_count: Number if proximity emitt... |
787c9a9cdc5156d6465129caa9f9276911901f56 | Analyze and fix the following issue in the Linux kernel code: iio: frequency: ad9523: fix multi-line dereferences | Problem Details:
Platform data pointer dereferences for pll1_charge_pump_current_nA and
pll2_charge_pump_current_nA were split across multiple lines. Bring the
dereference chains onto a single line.
This resolves the following checkpatch.pl warnings:
WARNING: Avoid multiple line dereference - prefer 'pdata->pll1_charg... | ```diff
diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c
index 5725ab62e0fd..6daa2ea354a8 100644
--- a/drivers/iio/frequency/ad9523.c
+++ b/drivers/iio/frequency/ad9523.c
@@ -797,8 +797,7 @@ static int ad9523_setup(struct iio_dev *indio_dev)
return ret;
ret = ad9523_write(indio_dev, A... |
e830a8894ecbacd20bc8bcff9a726682ca5ef6f9 | Analyze and fix the following issue in the Linux kernel code: iio: frequency: ad9523: fix implicit variable macros | Problem Details:
The macros AD9523_CLK_DIST_DIV_PHASE_REV(x) and
AD9523_CLK_DIST_DIV_REV(x) implicitly relied on the variable named 'ret'
instead of using passed argument '(x)'. Update the macros to explicitly
use the argument '(x)' for their operations.
This also resolves the following checkpatch.pl warning: Argument... | ```diff
diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c
index 63c485e9e44c..5725ab62e0fd 100644
--- a/drivers/iio/frequency/ad9523.c
+++ b/drivers/iio/frequency/ad9523.c
@@ -167,9 +167,9 @@
/* AD9523_CHANNEL_CLOCK_DIST */
#define AD9523_CLK_DIST_DIV_PHASE(x) (((x) & 0x3F) << 18)
-#defi... |
aac15061093d14b216179b66adfff4af53dd19ab | Analyze and fix the following issue in the Linux kernel code: iio: adc: ade9000: remove unused AD9000_CHANNELS_PER_PHASE macro | Problem Details:
Remove the AD9000_CHANNELS_PER_PHASE macro which is unused, has a
misspelled prefix (AD9000 instead of ADE9000), and has an incorrect
value (10 instead of 11, there are 33 total channels and 3 phases, so 11
per phase).
Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
Signed-off-... | ```diff
diff --git a/drivers/iio/adc/ade9000.c b/drivers/iio/adc/ade9000.c
index 5dcc26a08970..4be8df34428d 100644
--- a/drivers/iio/adc/ade9000.c
+++ b/drivers/iio/adc/ade9000.c
@@ -283,7 +283,6 @@ enum ade9000_wfb_cfg {
#define ADE9000_PHASE_C_POS_BIT BIT(6)
#define ADE9000_MAX_PHASE_NR 3
-#define AD9000_CHANNE... |
0ed2e8bf61d6d5df1d78f4e24b682dff4c394e17 | Analyze and fix the following issue in the Linux kernel code: io_uring: correct comment for IORING_SETUP_TASKRUN_FLAG | Problem Details:
Sync with a recent liburing fix, which corrects the comment explaining
when the IORING_SETUP_TASKRUN_FLAG setup flag is valid to use. May be
use with COOP_TASKRUN or DEFER_TASKRUN, not useful without either of
this task_work mechanisms being used.
Link: https://github.com/axboe/liburing/pull/1543
Sign... | ```diff
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index 6750c383a2ab..1ff16141c8a5 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -188,7 +188,8 @@ enum io_uring_sqe_flags_bit {
/*
* If COOP_TASKRUN is set, get notified if task work is available for
... |
84446536f63d471ab16b2faa25eeab1df21ace0a | Analyze and fix the following issue in the Linux kernel code: ALSA: control: Verify put() result when in debug mode | Problem Details:
The put() operation is expected to return:
1) 0 on success if no changes were made
2) 1 on success if changes were made
3) error code otherwise
Currently 2) is usually ignored when writing control-operations. While
forcing compliance is not an option right now, make it easier for
developers to adhere ... | ```diff
diff --git a/include/sound/core.h b/include/sound/core.h
index 64327e971122..4093ec82a0a1 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -133,6 +133,9 @@ struct snd_card {
#ifdef CONFIG_SND_DEBUG
struct dentry *debugfs_root; /* debugfs root for card */
#endif
+#ifdef CONFIG_SND_CTL_DEBUG... |
d4d5633d8b19b0e745a7910aea49956b3b47900d | Analyze and fix the following issue in the Linux kernel code: ALSA: firewire: dice: Fix printf warning with W=1 | Problem Details:
The use of snprintf() may cause a warning with W=1 due to the possibly
truncated string. As the truncation doesn't really matter (and won't
happen practically) in the case of dice driver, just shut it up by
replacing with scnprintf().
Link: https://patch.msgid.link/20260227155705.1557224-1-tiwai@suse... | ```diff
diff --git a/sound/firewire/dice/dice.c b/sound/firewire/dice/dice.c
index 85d265c7d544..f7a50bae4b55 100644
--- a/sound/firewire/dice/dice.c
+++ b/sound/firewire/dice/dice.c
@@ -122,7 +122,7 @@ static void dice_card_strings(struct snd_dice *dice)
fw_csr_string(dev->config_rom + 5, CSR_VENDOR, vendor, sizeof(... |
05ac3846ffe53fc63e454eb195ce8a6bab7a6a88 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda/tas2781: A workaround solution to lower-vol issue among lower calibrated-impedance micro-speaker on TAS2781 | Problem Details:
On TAS2781, if the Speaker calibrated impedance is lower than default
value hard-coded inside the TAS2781, it will cuase vol lower than
normal. In order to fix this issue, the parameter of SineGainI need
updating.
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Tested-by: Matthew Schwartz <matthew... | ```diff
diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h
index 7c03bdc951bb..e847cf51878c 100644
--- a/include/sound/tas2781.h
+++ b/include/sound/tas2781.h
@@ -151,6 +151,7 @@ struct tasdevice {
struct bulk_reg_val *cali_data_backup;
struct bulk_reg_val alp_cali_bckp;
struct tasdevice_fw *cali_data... |
068641bc9dc3d680d1ec4f6ee9199d4812041dff | Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Add quirk for HP Pavilion 15-eh1xxx to enable mute LED | Problem Details:
The HP Pavilion 15-eh1xxx series uses the HP mainboard 88D1 with ALC245
and needs the ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT quirk to make the
mute led working.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215978
Cc: <stable@vger.kernel.org>
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Link: htt... | ```diff
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 86bb22d19629..4c49f1195e1b 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -6904,6 +6904,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8898, "H... |
89ff45359abbf9d8d3c4aa3f5a57ed0be82b5a12 | Analyze and fix the following issue in the Linux kernel code: accel/amdxdna: Fill invalid payload for failed command | Problem Details:
Newer userspace applications may read the payload of a failed command
to obtain detailed error information. However, the driver and old firmware
versions may not support returning advanced error information.
In this case, initialize the command payload with an invalid value so
userspace can detect that... | ```diff
diff --git a/drivers/accel/amdxdna/aie2_ctx.c b/drivers/accel/amdxdna/aie2_ctx.c
index 25845bd5e507..afee5e667f77 100644
--- a/drivers/accel/amdxdna/aie2_ctx.c
+++ b/drivers/accel/amdxdna/aie2_ctx.c
@@ -186,13 +186,13 @@ aie2_sched_resp_handler(void *handle, void __iomem *data, size_t size)
cmd_abo = job->cmd... |
635c3a757a567b2479639237f5f0d4d9439015f1 | Analyze and fix the following issue in the Linux kernel code: crypto: atmel-sha204a - Fix OTP sysfs read and error handling | Problem Details:
Fix otp_show() to read and print all 64 bytes of the OTP zone.
Previously, the loop only printed half of the OTP (32 bytes), and
partial output was returned on read errors.
Propagate the actual error from atmel_sha204a_otp_read() instead of
producing partial output.
Replace sprintf() with sysfs_emit_... | ```diff
diff --git a/drivers/crypto/atmel-sha204a.c b/drivers/crypto/atmel-sha204a.c
index 8f422ed223d3..72c9d74d3062 100644
--- a/drivers/crypto/atmel-sha204a.c
+++ b/drivers/crypto/atmel-sha204a.c
@@ -15,6 +15,7 @@
#include <linux/module.h>
#include <linux/scatterlist.h>
#include <linux/slab.h>
+#include <linux/sy... |
094c276da6a0d4971c3faae09a36b51d096659b2 | Analyze and fix the following issue in the Linux kernel code: crypto: atmel-sha204a - Fix error codes in OTP reads | Problem Details:
Return -EINVAL from atmel_i2c_init_read_otp_cmd() on invalid addresses
instead of -1. Since the OTP zone is accessed in 4-byte blocks, valid
addresses range from 0 to OTP_ZONE_SIZE / 4 - 1. Fix the bounds check
accordingly.
In atmel_sha204a_otp_read(), propagate the actual error code from
atmel_i2c_in... | ```diff
diff --git a/drivers/crypto/atmel-i2c.c b/drivers/crypto/atmel-i2c.c
index da3cd986b1eb..59d11fa5caeb 100644
--- a/drivers/crypto/atmel-i2c.c
+++ b/drivers/crypto/atmel-i2c.c
@@ -72,8 +72,8 @@ EXPORT_SYMBOL(atmel_i2c_init_read_config_cmd);
int atmel_i2c_init_read_otp_cmd(struct atmel_i2c_cmd *cmd, u16 addr)
... |
b7abbc8c7acaeb60c114b038f1fa91bbedb3d16a | Analyze and fix the following issue in the Linux kernel code: crypto: inside-secure/eip93 - fix register definition | Problem Details:
Checked the register definitions with the documentation[1]. Turns out
that the PKTE_INBUF_CNT register has a bad offset. It's used in Direct
Host Mode (DHM). The driver uses Autonomous Ring Mode (ARM), so it
causes no harm.
1. ADSP-SC58x/ADSP-2158x SHARC+ Processor Hardware Reference
Fixes: 9739f5f93b... | ```diff
diff --git a/drivers/crypto/inside-secure/eip93/eip93-regs.h b/drivers/crypto/inside-secure/eip93/eip93-regs.h
index 0490b8d15131..116b3fbb6ad7 100644
--- a/drivers/crypto/inside-secure/eip93/eip93-regs.h
+++ b/drivers/crypto/inside-secure/eip93/eip93-regs.h
@@ -109,7 +109,7 @@
#define EIP93_REG_PE_BUF_THRESH ... |
2127a1bf8940ea76b4fc604fa6b5e4d734ca22ed | Analyze and fix the following issue in the Linux kernel code: crypto: virtio - Convert from tasklet to BH workqueue | Problem Details:
The only generic interface to execute asynchronously in the BH context
is tasklet; however, it's marked deprecated and has some design flaws
such as the execution code accessing the tasklet item after the
execution is complete which can lead to subtle use-after-free in certain
usage scenarios and less-... | ```diff
diff --git a/drivers/crypto/virtio/virtio_crypto_common.h b/drivers/crypto/virtio/virtio_crypto_common.h
index e559bdadf4f9..0c2efdc83257 100644
--- a/drivers/crypto/virtio/virtio_crypto_common.h
+++ b/drivers/crypto/virtio/virtio_crypto_common.h
@@ -11,6 +11,7 @@
#include <linux/crypto.h>
#include <linux/spi... |
d240b079a37e90af03fd7dfec94930eb6c83936e | Analyze and fix the following issue in the Linux kernel code: crypto: atmel-sha204a - Fix OOM ->tfm_count leak | Problem Details:
If memory allocation fails, decrement ->tfm_count to avoid blocking
future reads.
Cc: stable@vger.kernel.org
Fixes: da001fb651b0 ("crypto: atmel-i2c - add support for SHA204A random number generator")
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apan... | ```diff
diff --git a/drivers/crypto/atmel-sha204a.c b/drivers/crypto/atmel-sha204a.c
index 8adc7fe71c04..98d1023007e3 100644
--- a/drivers/crypto/atmel-sha204a.c
+++ b/drivers/crypto/atmel-sha204a.c
@@ -52,9 +52,10 @@ static int atmel_sha204a_rng_read_nonblocking(struct hwrng *rng, void *data,
rng->priv = 0;
} els... |
889b0e2721e793eb46cf7d17b965aa3252af3ec8 | Analyze and fix the following issue in the Linux kernel code: crypto: ccp - Fix use-after-free on error path | Problem Details:
In the error path of sev_tsm_init_locked(), the code dereferences 't'
after it has been freed with kfree(). The pr_err() statement attempts
to access t->tio_en and t->tio_init_done after the memory has been
released.
Move the pr_err() call before kfree(t) to access the fields while the
memory is still... | ```diff
diff --git a/drivers/crypto/ccp/sev-dev-tsm.c b/drivers/crypto/ccp/sev-dev-tsm.c
index adc9542ae806..b07ae529b591 100644
--- a/drivers/crypto/ccp/sev-dev-tsm.c
+++ b/drivers/crypto/ccp/sev-dev-tsm.c
@@ -378,9 +378,9 @@ void sev_tsm_init_locked(struct sev_device *sev, void *tio_status_page)
return;
error_ex... |
8168a7b72bdee3790b126f63bd30306759206b15 | Analyze and fix the following issue in the Linux kernel code: crypto: ccp - allow callers to use HV-Fixed page API when SEV is disabled | Problem Details:
When SEV is disabled, the HV-Fixed page allocation call fails, which in
turn causes SFS initialization to fail.
Fix the HV-Fixed API so callers (for example, SFS) can use it even when
SEV is disabled by performing normal page allocation and freeing.
Fixes: e09701dcdd9c ("crypto: ccp - Add new HV-Fixe... | ```diff
diff --git a/drivers/crypto/ccp/sev-dev.c b/drivers/crypto/ccp/sev-dev.c
index 096f993974d1..8b2dfc11289b 100644
--- a/drivers/crypto/ccp/sev-dev.c
+++ b/drivers/crypto/ccp/sev-dev.c
@@ -1105,15 +1105,12 @@ struct page *snp_alloc_hv_fixed_pages(unsigned int num_2mb_pages)
{
struct psp_device *psp_master = ps... |
dabffd08545ffa1d7183bc45e387860984025291 | Analyze and fix the following issue in the Linux kernel code: net: mana: Ring doorbell at 4 CQ wraparounds | Problem Details:
MANA hardware requires at least one doorbell ring every 8 wraparounds
of the CQ. The driver rings the doorbell as a form of flow control to
inform hardware that CQEs have been consumed.
The NAPI poll functions mana_poll_tx_cq() and mana_poll_rx_cq() can
poll up to CQE_POLLING_BUFFER (512) completions ... | ```diff
diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
index 933e9d681ded..9017e806ecda 100644
--- a/drivers/net/ethernet/microsoft/mana/mana_en.c
+++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
@@ -1770,8 +1770,14 @@ static void mana_poll_tx_cq(struct man... |
2164242c50084bd5b359b7d554d3a124e2c19074 | Analyze and fix the following issue in the Linux kernel code: NFC: fix header file kernel-doc warnings | Problem Details:
Repair some of the comments:
- use the correct enum names
- don't use "/**" for a non-kernel-doc comment
to fix these warnings:
Warning: include/uapi/linux/nfc.h:127 Excess enum value
'@NFC_EVENT_DEVICE_DEACTIVATED' description in 'nfc_commands'
Warning: include/uapi/linux/nfc.h:204 Excess enum valu... | ```diff
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h
index 2f5b4be25261..82805eee4357 100644
--- a/include/uapi/linux/nfc.h
+++ b/include/uapi/linux/nfc.h
@@ -55,7 +55,7 @@
* (it sends %NFC_ATTR_DEVICE_INDEX)
* @NFC_EVENT_TM_ACTIVATED: event emitted when the adapter is activated in
* targ... |
11cb63b0d1a0685e0831ae3c77223e002ef18189 | Analyze and fix the following issue in the Linux kernel code: net/sched: Only allow act_ct to bind to clsact/ingress qdiscs and shared blocks | Problem Details:
As Paolo said earlier [1]:
"Since the blamed commit below, classify can return TC_ACT_CONSUMED while
the current skb being held by the defragmentation engine. As reported by
GangMin Kim, if such packet is that may cause a UaF when the defrag engine
later on tries to tuch again such packet."
act_ct wa... | ```diff
diff --git a/include/net/act_api.h b/include/net/act_api.h
index e1e8f0f7dacb..d11b79107930 100644
--- a/include/net/act_api.h
+++ b/include/net/act_api.h
@@ -70,6 +70,7 @@ struct tc_action {
#define TCA_ACT_FLAGS_REPLACE (1U << (TCA_ACT_FLAGS_USER_BITS + 2))
#define TCA_ACT_FLAGS_NO_RTNL (1U << (TCA_ACT_FLAG... |
e6eb3a0584628f84e6f3fcf258fba8fd11f42d2e | Analyze and fix the following issue in the Linux kernel code: ntfs: Fix spelling mistake "initiailized" -> "initialized" | Problem Details:
There is a spelling mistake in an ntfs_debug message. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> | ```diff
diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c
index 56012477d3f0..6d88922ddba9 100644
--- a/fs/ntfs/mft.c
+++ b/fs/ntfs/mft.c
@@ -1442,7 +1442,7 @@ static int ntfs_mft_bitmap_extend_initialized_nolock(struct ntfs_volume *vol)
struct attr_record *a;
int ret;
- ntfs_debug("Extending mft bitmap initiailized (an... |
ba14798653bb815b4dcd116c5265a9f748bc0c7f | Analyze and fix the following issue in the Linux kernel code: selftests: netfilter: nft_queue.sh: avoid flakes on debug kernels | Problem Details:
Jakub reports test flakes on debug kernels:
FAIL: test_udp_gro_ct: Expected software segmentation to occur, had 23 and 17
This test assumes that the kernels nfnetlink_queue module sees N GSO
packets, segments them into M skbs and queues them to userspace for
reinjection.
Hence, if M >= N, no segment... | ```diff
diff --git a/tools/testing/selftests/net/netfilter/nf_queue.c b/tools/testing/selftests/net/netfilter/nf_queue.c
index 9e56b9d47037..116c0ca0eabb 100644
--- a/tools/testing/selftests/net/netfilter/nf_queue.c
+++ b/tools/testing/selftests/net/netfilter/nf_queue.c
@@ -18,6 +18,7 @@
struct options {
bool count_... |
15c2715a52645fd8e6e18b7abc3449292d118c7c | Analyze and fix the following issue in the Linux kernel code: net/sched: sch_cake: fixup cake_mq rate adjustment for diffserv config | Problem Details:
cake_mq's rate adjustment during the sync periods did not adjust the
rates for every tin in a diffserv config. This lead to inconsistencies
of rates between the tins. Fix this by setting the rates for all tins
during synchronization.
Fixes: 1bddd758bac2 ("net/sched: sch_cake: share shaper state across... | ```diff
diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c
index b23fc7d9fafe..9efe23f8371b 100644
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -391,8 +391,8 @@ static const u32 inv_sqrt_cache[REC_INV_SQRT_CACHE] = {
1239850263, 1191209601, 1147878294, 1108955788
};
-static void cake_set_rate(str... |
0b3cd139be565b85f4a3579e376152b9def6256a | Analyze and fix the following issue in the Linux kernel code: net/sched: sch_cake: avoid sync overhead when unlimited | Problem Details:
Skip inter-instance sync when no rate limit is configured, as it serves
no purpose and only adds overhead.
Fixes: 1bddd758bac2 ("net/sched: sch_cake: share shaper state across sub-instances of cake_mq")
Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
Acked-by: Toke Høiland-Jørgensen <toke@tok... | ```diff
diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c
index a01f14b1c216..b23fc7d9fafe 100644
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -2013,7 +2013,8 @@ static struct sk_buff *cake_dequeue(struct Qdisc *sch)
u64 delay;
u32 len;
- if (q->config->is_shared && now - q->last_checked_active... |
29252397bcc1e0a1f85e5c3bee59c325f5c26341 | Analyze and fix the following issue in the Linux kernel code: inet: annotate data-races around isk->inet_num | Problem Details:
UDP/TCP lookups are using RCU, thus isk->inet_num accesses
should use READ_ONCE() and WRITE_ONCE() where needed.
Fixes: 3ab5aee7fe84 ("net: Convert TCP & DCCP hash tables to use RCU / hlist_nulls")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Lin... | ```diff
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h
index 282e29237d93..c16de5b7963f 100644
--- a/include/net/inet6_hashtables.h
+++ b/include/net/inet6_hashtables.h
@@ -175,7 +175,7 @@ static inline bool inet6_match(const struct net *net, const struct sock *sk,
{
if (!net_eq(sock_ne... |
efc11a667878a1d655ff034a93a539debbfedb12 | Analyze and fix the following issue in the Linux kernel code: bpf: Improve bounds when tnum has a single possible value | Problem Details:
We're hitting an invariant violation in Cilium that sometimes leads to
BPF programs being rejected and Cilium failing to start [1]. The
following extract from verifier logs shows what's happening:
from 201 to 236: R1=0 R6=ctx() R7=1 R9=scalar(smin=umin=smin32=umin32=3584,smax=umax=smax32=umax32=3840... | ```diff
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index bb12ba020649..401d6c4960ec 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -2379,6 +2379,9 @@ static void __update_reg32_bounds(struct bpf_reg_state *reg)
static void __update_reg64_bounds(struct bpf_reg_state *reg)
{
+ u64 t... |
62413a9c3cb183afb9bb6e94dd68caf4e4145f4c | Analyze and fix the following issue in the Linux kernel code: net/sched: act_gate: snapshot parameters with RCU on replace | Problem Details:
The gate action can be replaced while the hrtimer callback or dump path is
walking the schedule list.
Convert the parameters to an RCU-protected snapshot and swap updates under
tcf_lock, freeing the previous snapshot via call_rcu(). When REPLACE omits
the entry list, preserve the existing schedule so ... | ```diff
diff --git a/include/net/tc_act/tc_gate.h b/include/net/tc_act/tc_gate.h
index b147a3bb1a46..e0fded18e18c 100644
--- a/include/net/tc_act/tc_gate.h
+++ b/include/net/tc_act/tc_gate.h
@@ -32,6 +32,7 @@ struct tcf_gate_params {
s32 tcfg_clockid;
size_t num_entries;
struct list_head entries;
+ struct rcu... |
1872e75375c40add4a35990de3be77b5741c252c | Analyze and fix the following issue in the Linux kernel code: bpf: Fix race in devmap on PREEMPT_RT | Problem Details:
On PREEMPT_RT kernels, the per-CPU xdp_dev_bulk_queue (bq) can be
accessed concurrently by multiple preemptible tasks on the same CPU.
The original code assumes bq_enqueue() and __dev_flush() run atomically
with respect to each other on the same CPU, relying on
local_bh_disable() to prevent preemption... | ```diff
diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
index 2984e938f94d..3d619d01088e 100644
--- a/kernel/bpf/devmap.c
+++ b/kernel/bpf/devmap.c
@@ -45,6 +45,7 @@
* types of devmap; only the lookup and insertion is different.
*/
#include <linux/bpf.h>
+#include <linux/local_lock.h>
#include <net/xdp.h>
... |
869c63d5975d55e97f6b168e885452b3da20ea47 | Analyze and fix the following issue in the Linux kernel code: bpf: Fix race in cpumap on PREEMPT_RT | Problem Details:
On PREEMPT_RT kernels, the per-CPU xdp_bulk_queue (bq) can be accessed
concurrently by multiple preemptible tasks on the same CPU.
The original code assumes bq_enqueue() and __cpu_map_flush() run
atomically with respect to each other on the same CPU, relying on
local_bh_disable() to prevent preemption... | ```diff
diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c
index 04171fbc39cb..32b43cb9061b 100644
--- a/kernel/bpf/cpumap.c
+++ b/kernel/bpf/cpumap.c
@@ -29,6 +29,7 @@
#include <linux/sched.h>
#include <linux/workqueue.h>
#include <linux/kthread.h>
+#include <linux/local_lock.h>
#include <linux/completion.h>
... |
60477d78971342c476e221b643e56ed0dce8e888 | Analyze and fix the following issue in the Linux kernel code: of: property: fix typo in kernel-doc return description | Problem Details:
Fix the spelling of "success" in the return value description
of the kernel-doc comment to improve documentation quality.
Signed-off-by: Song Hongyi <szpcq123@gmail.com>
Link: https://patch.msgid.link/20260225093814.124735-1-szpcq123@gmail.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org> | ```diff
diff --git a/drivers/of/property.c b/drivers/of/property.c
index 50d95d512bf5..457e628ff9db 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -88,7 +88,7 @@ EXPORT_SYMBOL(of_graph_is_present);
* Search for a property in a device node and count the number of elements of
* size elem_size in it... |
28f060c4b0667a7fbed9818ef19b6974d53ad708 | Analyze and fix the following issue in the Linux kernel code: of: fix incorrect device creation for reserved memory nodes | Problem Details:
The current global search for nodes in reserved_mem_matches can find
nodes outside "/reserved-memory". These nodes might not have actual
memory reserved (via memblock), leading to drivers (e.g., ramoops)
accessing unreserved memory and causing memory corruption.
Restrict the scan to the "/reserved-mem... | ```diff
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index ba591fbceb56..2a7111e8354d 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -500,7 +500,7 @@ static const struct of_device_id reserved_mem_matches[] = {
static int __init of_platform_default_populate_init(void)
{
- struct devi... |
2939d7b3b0e5f35359ce8f69dbbad0bfc4e920b6 | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Add tests for special fields races | Problem Details:
Add a couple of tests to ensure that the refcount drops to zero when we
exercise the race where creation of a special field succeeds the logical
bpf_obj_free_fields done when deleting an element. Prior to previous
changes, the fields would be freed eagerly and repopulate and end up
leaking, causing the... | ```diff
diff --git a/tools/testing/selftests/bpf/prog_tests/map_kptr_race.c b/tools/testing/selftests/bpf/prog_tests/map_kptr_race.c
new file mode 100644
index 000000000000..506ed55e8528
--- /dev/null
+++ b/tools/testing/selftests/bpf/prog_tests/map_kptr_race.c
@@ -0,0 +1,218 @@
+// SPDX-License-Identifier: GPL-2.0
+/*... |
f41deee082dc7b1c198de21710cb5cb9c604cae0 | Analyze and fix the following issue in the Linux kernel code: bpf: Delay freeing fields in local storage | Problem Details:
Currently, when use_kmalloc_nolock is false, the freeing of fields for a
local storage selem is done eagerly before waiting for the RCU or RCU
tasks trace grace period to elapse. This opens up a window where the
program which has access to the selem can recreate the fields after the
freeing of fields i... | ```diff
diff --git a/kernel/bpf/bpf_local_storage.c b/kernel/bpf/bpf_local_storage.c
index 2bf5ca5ae0df..d7db1ada2dad 100644
--- a/kernel/bpf/bpf_local_storage.c
+++ b/kernel/bpf/bpf_local_storage.c
@@ -164,16 +164,28 @@ static void bpf_local_storage_free(struct bpf_local_storage *local_storage,
bpf_local_stor... |
1df97a7453eec80c1912c2d0360290a3970a7671 | Analyze and fix the following issue in the Linux kernel code: bpf: Register dtor for freeing special fields | Problem Details:
There is a race window where BPF hash map elements can leak special
fields if the program with access to the map value recreates these
special fields between the check_and_free_fields done on the map value
and its eventual return to the memory allocator.
Several ways were explored prior to this patch,... | ```diff
diff --git a/include/linux/bpf_mem_alloc.h b/include/linux/bpf_mem_alloc.h
index e45162ef59bb..4ce0d27f8ea2 100644
--- a/include/linux/bpf_mem_alloc.h
+++ b/include/linux/bpf_mem_alloc.h
@@ -14,6 +14,8 @@ struct bpf_mem_alloc {
struct obj_cgroup *objcg;
bool percpu;
struct work_struct work;
+ void (*dtor_... |
4c7b2ec23cc5d880e3ffe35e8c2aad686b67723a | Analyze and fix the following issue in the Linux kernel code: selftests: fix mntns iteration selftests | Problem Details:
Now that we changed permission checking make sure that we reflect that
in the selftests.
Link: https://patch.msgid.link/20260226-work-visibility-fixes-v1-4-d2c2853313bd@kernel.org
Fixes: 9d87b1067382 ("selftests: add tests for mntns iteration")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Cc: stable@... | ```diff
diff --git a/tools/testing/selftests/filesystems/nsfs/iterate_mntns.c b/tools/testing/selftests/filesystems/nsfs/iterate_mntns.c
index 61e55dfbf121..e19ff8168baf 100644
--- a/tools/testing/selftests/filesystems/nsfs/iterate_mntns.c
+++ b/tools/testing/selftests/filesystems/nsfs/iterate_mntns.c
@@ -37,17 +37,20 ... |
8d76afe84fa2babf604b3c173730d4d2b067e361 | Analyze and fix the following issue in the Linux kernel code: nstree: tighten permission checks for listing | Problem Details:
Even privileged services should not necessarily be able to see other
privileged service's namespaces so they can't leak information to each
other. Use may_see_all_namespaces() helper that centralizes this policy
until the nstree adapts.
Link: https://patch.msgid.link/20260226-work-visibility-fixes-v1-... | ```diff
diff --git a/kernel/nstree.c b/kernel/nstree.c
index f36c59e6951d..6d12e5900ac0 100644
--- a/kernel/nstree.c
+++ b/kernel/nstree.c
@@ -515,32 +515,11 @@ static inline bool __must_check ns_requested(const struct klistns *kls,
static inline bool __must_check may_list_ns(const struct klistns *kls,
struc... |
d2324a9317f00013facb0ba00b00440e19d2af5e | Analyze and fix the following issue in the Linux kernel code: nsfs: tighten permission checks for handle opening | Problem Details:
Even privileged services should not necessarily be able to see other
privileged service's namespaces so they can't leak information to each
other. Use may_see_all_namespaces() helper that centralizes this policy
until the nstree adapts.
Link: https://patch.msgid.link/20260226-work-visibility-fixes-v1-... | ```diff
diff --git a/fs/nsfs.c b/fs/nsfs.c
index be36c10c38cf..c215878d55e8 100644
--- a/fs/nsfs.c
+++ b/fs/nsfs.c
@@ -627,7 +627,7 @@ static struct dentry *nsfs_fh_to_dentry(struct super_block *sb, struct fid *fh,
return ERR_PTR(-EOPNOTSUPP);
}
- if (owning_ns && !ns_capable(owning_ns, CAP_SYS_ADMIN)) {
+ if (o... |
e6b899f08066e744f89df16ceb782e06868bd148 | Analyze and fix the following issue in the Linux kernel code: nsfs: tighten permission checks for ns iteration ioctls | Problem Details:
Even privileged services should not necessarily be able to see other
privileged service's namespaces so they can't leak information to each
other. Use may_see_all_namespaces() helper that centralizes this policy
until the nstree adapts.
Link: https://patch.msgid.link/20260226-work-visibility-fixes-v1-... | ```diff
diff --git a/fs/nsfs.c b/fs/nsfs.c
index db91de208645..be36c10c38cf 100644
--- a/fs/nsfs.c
+++ b/fs/nsfs.c
@@ -199,6 +199,17 @@ static bool nsfs_ioctl_valid(unsigned int cmd)
return false;
}
+static bool may_use_nsfs_ioctl(unsigned int cmd)
+{
+ switch (_IOC_NR(cmd)) {
+ case _IOC_NR(NS_MNT_GET_NEXT):
+ f... |
4529e0015432977af3ecc3b9f940fc2a1ef1b265 | Analyze and fix the following issue in the Linux kernel code: NFS: Fix NFS KConfig typos | Problem Details:
Two issues were noticed after the NFS v4.0 KConfig changes were merged
upstream. First, the text of CONFIG_NFS_V4 should not encourage people
to select it if they are unsure. Second, the new CONFIG_NFS_V4_0 option
should default to "on" instead of "off" to avoid breaking people's
setups if they are usi... | ```diff
diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
index 12cb0ca738af..6bb30543eff0 100644
--- a/fs/nfs/Kconfig
+++ b/fs/nfs/Kconfig
@@ -87,7 +87,7 @@ config NFS_V4
space programs which can be found in the Linux nfs-utils package,
available from http://linux-nfs.org/.
- If unsure, say Y.
+ If unsure, sa... |
7b6275c80a0c81c5f8943272292dfe67730ce849 | Analyze and fix the following issue in the Linux kernel code: xprtrdma: Decrement re_receiving on the early exit paths | Problem Details:
In the event that rpcrdma_post_recvs() fails to create a work request
(due to memory allocation failure, say) or otherwise exits early, we
should decrement ep->re_receiving before returning. Otherwise we will
hang in rpcrdma_xprt_drain() as re_receiving will never reach zero and
the completion will nev... | ```diff
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 15bbf953dfad..b51a162885bb 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -1362,7 +1362,7 @@ void rpcrdma_post_recvs(struct rpcrdma_xprt *r_xprt, int needed)
needed += RPCRDMA_MAX_RECV_BATCH;
if (at... |
3d17d76d1ffb139a7492317b196ee03c8eabc9dc | Analyze and fix the following issue in the Linux kernel code: io_uring/zcrx: don't set rx_page_size when not requested | Problem Details:
The rx_buf_len parameter was recently added to the Rx zero-copy
implementation. The expectation is that when not set system will
maintain previous behavior and use the default buffer size (PAGE_SIZE).
This works correctly at the iouring level, but we don't preserve
the same "zero means default" semant... | ```diff
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index 97984a73a95d..19b287d21f4b 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -837,7 +837,8 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx,
if (ret)
goto netdev_put_unlock;
- mp_param.rx_page_size = 1U << ifq->niov_shift;
+ if (reg.rx_buf_len)
... |
032e084f0d43fda78c33abfc704ac13a0891a6e7 | Analyze and fix the following issue in the Linux kernel code: tools/sched_ext: fix strtoul() misuse in scx_hotplug_seq() | Problem Details:
scx_hotplug_seq() uses strtoul() but validates the result with a
negative check (val < 0), which can never be true for an unsigned
return value.
Use the endptr mechanism to verify the entire string was consumed,
and check errno == ERANGE for overflow detection.
Signed-off-by: David Carlier <devnexen@... | ```diff
diff --git a/tools/sched_ext/include/scx/compat.h b/tools/sched_ext/include/scx/compat.h
index 8b4897fc8b99..edccc99c7294 100644
--- a/tools/sched_ext/include/scx/compat.h
+++ b/tools/sched_ext/include/scx/compat.h
@@ -125,6 +125,7 @@ static inline long scx_hotplug_seq(void)
{
int fd;
char buf[32];
+ char ... |
e31b556c0ba21f20c298aa61181b96541140b7b9 | Analyze and fix the following issue in the Linux kernel code: HID: mcp2221: cancel last I2C command on read error | Problem Details:
When an I2C SMBus read operation fails, the MCP2221 internal state machine
may not reset correctly, causing subsequent transactions to fail.
By adding a short delay and explicitly cancelling the last command,
we ensure the device is ready for the next operation.
Fix an issue where i2cdetect was not a... | ```diff
diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index 33603b019f97..ef3b5c77c38e 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -353,6 +353,8 @@ static int mcp_i2c_smbus_read(struct mcp2221 *mcp,
usleep_range(90, 100);
retries++;
} else {
+ usleep_r... |
4a91a33f15c634fb3477d122bdf1eef098d77ee3 | Analyze and fix the following issue in the Linux kernel code: workqueue: Update documentation as per system_percpu_wq naming | Problem Details:
Update documentation to use "per-CPU workqueue" instead of
"global workqueue" to match the system_wq to system_percpu_wq
rename. The workqueue behavior remains unchanged; this just
aligns terminology with the clearer naming.
Fixes: a2be943b46b4 ("workqueue: replace use of system_wq with system_percpu_... | ```diff
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index a4749f56398f..fc5744402a66 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -712,14 +712,14 @@ static inline bool schedule_work_on(int cpu, struct work_struct *work)
}
/**
- * schedule_work - put work task in g... |
550bae2c0931dbb664a61b08c21cf156f0a5362a | Analyze and fix the following issue in the Linux kernel code: pmdomain: bcm: bcm2835-power: Fix broken reset status read | Problem Details:
bcm2835_reset_status() has a misplaced parenthesis on every PM_READ()
call. Since PM_READ(reg) expands to readl(power->base + (reg)), the
expression:
PM_READ(PM_GRAFX & PM_V3DRSTN)
computes the bitwise AND of the register offset PM_GRAFX with the
bitmask PM_V3DRSTN before using the result as a re... | ```diff
diff --git a/drivers/pmdomain/bcm/bcm2835-power.c b/drivers/pmdomain/bcm/bcm2835-power.c
index 1d29addfe036..0450202bbee2 100644
--- a/drivers/pmdomain/bcm/bcm2835-power.c
+++ b/drivers/pmdomain/bcm/bcm2835-power.c
@@ -580,11 +580,11 @@ static int bcm2835_reset_status(struct reset_controller_dev *rcdev,
swi... |
c692ae39e9fd33d0e58ac24bf3d98b352b5064da | Analyze and fix the following issue in the Linux kernel code: drm/xe/vf: Redo LRC creation while in VF fixups | Problem Details:
If the xe module within a VM was creating a new LRC during save/
restore, this LRC will be invalid. The fixups procedure may not
be able to reach it, as there will be a race to add the new LRC
reference to an exec queue.
Even if the new LRC which was being created during VM migration is
added to EQ in... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index 0e46cbed9006..bb273ca02d28 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -368,17 +368,28 @@ static int __xe_exec_queue_init(struct xe_exec_queue *q, u32 exec_queue_flags)
*... |
f3fb5f1ebbf39e685dd2885c9dbc8bb0a80be7c6 | Analyze and fix the following issue in the Linux kernel code: drm/xe/vf: Wait for all fixups before using default LRCs | Problem Details:
When a context is being created during save/restore, the LRC creation
needs to wait for GGTT address space to be shifted. But it also needs
to have fixed default LRCs. This is mandatory to avoid the situation
where LRC will be created based on data from before the fixups, but
reference within exec queu... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
index 527ded3c9c22..7f83c0d3b099 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
@@ -536,12 +536,6 @@ static int vf_get_ggtt_info(struct xe_gt *gt)
*/
xe_ggtt_shift_nodes(tile->... |
ec172c7befc4a48ea7d6afe6f0fa23c533222233 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Wrappers for setting and getting LRC references | Problem Details:
There is a small but non-zero chance that VF post migration fixups
are running on an exec queue during teardown. The chances are
decreased by starting the teardown by releasing guc_id, but remain
non-zero. On the other hand the sync between fixups and EQ creation
(wait_valid_ggtt) drastically increases... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index a1075755e3d2..0e46cbed9006 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -231,6 +231,7 @@ static struct xe_exec_queue *__xe_exec_queue_alloc(struct xe_device *xe,
INIT_LIST_... |
393e5fea6f7d7054abc2c3d97a4cfe8306cd6079 | Analyze and fix the following issue in the Linux kernel code: drm/xe/queue: Call fini on exec queue creation fail | Problem Details:
Every call to queue init should have a corresponding fini call.
Skipping this would mean skipping removal of the queue from GuC list
(which is part of guc_id allocation). A damaged queue stored in
exec_queue_lookup list would lead to invalid memory reference,
sooner or later.
Call fini to free guc_id.... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index 5abb29454d1f..a1075755e3d2 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -270,6 +270,16 @@ static struct xe_exec_queue *__xe_exec_queue_alloc(struct xe_device *xe,
return q;... |
39195990e4c093c9eecf88f29811c6de29265214 | Analyze and fix the following issue in the Linux kernel code: PCI: Correct PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 value | Problem Details:
fb82437fdd8c ("PCI: Change capability register offsets to hex") incorrectly
converted the PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 value from decimal 52 to hex
0x32:
-#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 52 /* v2 endpoints with link end here */
+#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x32 /* end o... | ```diff
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
index ec1c54b5a310..14f634ab9350 100644
--- a/include/uapi/linux/pci_regs.h
+++ b/include/uapi/linux/pci_regs.h
@@ -712,7 +712,7 @@
#define PCI_EXP_LNKCTL2_HASD 0x0020 /* HW Autonomous Speed Disable */
#define PCI_EXP_LNKSTA2 0x32 /... |
b0a09142622a994c4f4088c3f61db5da87cfc711 | Analyze and fix the following issue in the Linux kernel code: perf/amd/ibs: Avoid calling perf_allow_kernel() from the IBS NMI handler | Problem Details:
Calling perf_allow_kernel() from the NMI context is unsafe and could be
fatal. Capture the permission at event-initialization time by storing it
in event->hw.flags, and have the NMI handler rely on that cached flag
instead of making the call directly.
Fixes: 50a53b60e141d ("perf/amd/ibs: Prevent leaki... | ```diff
diff --git a/arch/x86/events/amd/ibs.c b/arch/x86/events/amd/ibs.c
index 05b7c9f2ec33..004226b52ac7 100644
--- a/arch/x86/events/amd/ibs.c
+++ b/arch/x86/events/amd/ibs.c
@@ -313,6 +313,9 @@ static int perf_ibs_init(struct perf_event *event)
if (ret)
return ret;
+ if (perf_allow_kernel())
+ hwc->flags |... |
723a290326e015b07931eabc603d3735999377be | Analyze and fix the following issue in the Linux kernel code: perf/amd/ibs: Preserve PhyAddrVal bit when clearing PhyAddr MSR | Problem Details:
Commit 50a53b60e141 ("perf/amd/ibs: Prevent leaking sensitive data to
userspace") zeroed the physical address and also cleared the PhyAddrVal
flag before copying the value into a perf sample to avoid exposing
physical addresses to unprivileged users.
Clearing PhyAddrVal, however, has an unintended sid... | ```diff
diff --git a/arch/x86/events/amd/ibs.c b/arch/x86/events/amd/ibs.c
index e0b64cb13bf9..05b7c9f2ec33 100644
--- a/arch/x86/events/amd/ibs.c
+++ b/arch/x86/events/amd/ibs.c
@@ -1217,12 +1217,10 @@ static void perf_ibs_phyaddr_clear(struct perf_ibs *perf_ibs,
struct perf_ibs_data *ibs_data)
{
if (perf_i... |
01336b5559785a136de1cac49705f63a70a755bc | Analyze and fix the following issue in the Linux kernel code: perf/amd/ibs: Account interrupt for discarded samples | Problem Details:
Add interrupt throttling accounting for below cases:
o IBS Op PMU: A software filter (in addition to the hardware filter)
drops samples whose load latency is below the user-specified
threshold.
o IBS Fetch PMU: Samples discarded due to the zero-RIP erratum (#1197).
Although these samples... | ```diff
diff --git a/arch/x86/events/amd/ibs.c b/arch/x86/events/amd/ibs.c
index aca89f23d2e0..705ef43325be 100644
--- a/arch/x86/events/amd/ibs.c
+++ b/arch/x86/events/amd/ibs.c
@@ -1293,8 +1293,10 @@ fail:
* within [128, 2048] range.
*/
if (!op_data3.ld_op || !op_data3.dc_miss ||
- op_data3.dc_miss_la... |
3dcef70e41ab13483803c536ddea8d5f1803ee25 | Analyze and fix the following issue in the Linux kernel code: ww-mutex: Fix the ww_acquire_ctx function annotations | Problem Details:
The ww_acquire_done() call is optional. Reflect this in the annotations of
ww_acquire_done().
Fixes: 47907461e4f6 ("locking/ww_mutex: Support Clang's context analysis")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Maarten La... | ```diff
diff --git a/include/linux/ww_mutex.h b/include/linux/ww_mutex.h
index 85b1fff02fde..0c95ead5a297 100644
--- a/include/linux/ww_mutex.h
+++ b/include/linux/ww_mutex.h
@@ -181,7 +181,7 @@ static inline void ww_acquire_init(struct ww_acquire_ctx *ctx,
* data structures.
*/
static inline void ww_acquire_done(... |
39be7b21af24d1d2ed3b18caac57dd219fef226e | Analyze and fix the following issue in the Linux kernel code: signal: Fix the lock_task_sighand() annotation | Problem Details:
lock_task_sighand() may return NULL. Make this clear in its lock context
annotation.
Fixes: 04e49d926f43 ("sched: Enable context analysis for core.c and fair.c")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Marco Elver <elve... | ```diff
diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h
index a22248aebcf9..a4835a7de07e 100644
--- a/include/linux/sched/signal.h
+++ b/include/linux/sched/signal.h
@@ -739,7 +739,7 @@ static inline int thread_group_empty(struct task_struct *p)
extern struct sighand_struct *lock_task_sighan... |
38e18d825f7281fdc16d3241df5115ce6eaeaf79 | Analyze and fix the following issue in the Linux kernel code: locking: Fix rwlock and spinlock lock context annotations | Problem Details:
Fix two incorrect rwlock_t lock context annotations. Add the raw_spinlock_t
lock context annotations that are missing.
Fixes: f16a802d402d ("locking/rwlock, spinlock: Support Clang's context analysis")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@in... | ```diff
diff --git a/include/linux/rwlock.h b/include/linux/rwlock.h
index 3390d21c95dd..21ceefc4a49f 100644
--- a/include/linux/rwlock.h
+++ b/include/linux/rwlock.h
@@ -30,10 +30,10 @@ do { \
#ifdef CONFIG_DEBUG_SPINLOCK
extern void do_raw_read_lock(rwlock_t *lock) __acquires_shared(lock);
- extern int do... |
8e10f6b81afbf60e48bb4a71676ede4c7e374e79 | Analyze and fix the following issue in the Linux kernel code: hrtimer: Add hrtimer_rearm tracepoint | Problem Details:
Analyzing the reprogramming of the clock event device is essential to debug
the behaviour of the hrtimer subsystem especially with the upcoming
deferred rearming scheme.
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.ms... | ```diff
diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h
index ab9a9386f7b6..a54613f59e55 100644
--- a/include/trace/events/timer.h
+++ b/include/trace/events/timer.h
@@ -324,6 +324,30 @@ DEFINE_EVENT(hrtimer_class, hrtimer_cancel,
TP_ARGS(hrtimer)
);
+/**
+ * hrtimer_rearm - Invoked when t... |
f2e388a019e4cf83a15883a3d1f1384298e9a6aa | Analyze and fix the following issue in the Linux kernel code: hrtimer: Reduce trace noise in hrtimer_start() | Problem Details:
hrtimer_start() when invoked with an already armed timer traces like:
<comm>-.. [032] d.h2. 5.002263: hrtimer_cancel: hrtimer= ....
<comm>-.. [032] d.h1. 5.002263: hrtimer_start: hrtimer= ....
Which is incorrect as the timer doesn't get canceled. Just the expiry time
changes. The internal deque... | ```diff
diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h
index 1641ae3e6ca0..ab9a9386f7b6 100644
--- a/include/trace/events/timer.h
+++ b/include/trace/events/timer.h
@@ -218,12 +218,13 @@ TRACE_EVENT(hrtimer_setup,
* hrtimer_start - called when the hrtimer is started
* @hrtimer: pointer to ... |
513e744a0a4a70ebdb155611b897e9ed4d83831c | Analyze and fix the following issue in the Linux kernel code: hrtimer: Add debug object init assertion | Problem Details:
The debug object coverage in hrtimer_start_range_ns() happens too late to
do anything useful. Implement the init assert assertion part and invoke
that early in hrtimer_start_range_ns().
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: ... | ```diff
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index e54f8b59f6b4..fa63e0b20455 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -441,12 +441,37 @@ static bool hrtimer_fixup_free(void *addr, enum debug_obj_state state)
}
}
+/* Stub timer callback for improperly used timers. */
... |
558c18d3fbb6c5b9c0b42629d7fe34476363ac00 | Analyze and fix the following issue in the Linux kernel code: sched/eevdf: Fix HRTICK duration | Problem Details:
The nominal duration for an EEVDF task to run is until its deadline. At
which point the deadline is moved ahead and a new task selection is done.
Try and predict the time 'lost' to higher scheduling classes. Since this is
an estimate, the timer can be both early or late. In case it is early
task_tick_... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index eea99ec01a3f..247fecd1ac41 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6735,21 +6735,37 @@ static inline void sched_fair_update_stop_tick(struct rq *rq, struct task_struct
static void hrtick_start_fair(struct rq *rq, struct task_st... |
0f5197ea9a73a4c406c75e6d8af3a13f7f96ae89 | Analyze and fix the following issue in the Linux kernel code: nvme-multipath: fix leak on try_module_get failure | Problem Details:
We need to fall back to the synchronous removal if we can't get a
reference on the module needed for the deferred removal.
Fixes: 62188639ec16 ("nvme-multipath: introduce delayed removal of the multipath head node")
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
Reviewed-by: John Garry <john.g.garry@... | ```diff
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index bfcc5904e6a2..fc6800a9f7f9 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -1310,13 +1310,11 @@ void nvme_mpath_remove_disk(struct nvme_ns_head *head)
if (!list_empty(&head->list))
goto out;
... |
e9217ca77dc35b4978db0fe901685ddb3f1e223a | Analyze and fix the following issue in the Linux kernel code: mm/slab: initialize slab->stride early to avoid memory ordering issues | Problem Details:
When alloc_slab_obj_exts() is called later (instead of during slab
allocation and initialization), slab->stride and slab->obj_exts are
updated after the slab is already accessible by multiple CPUs.
The current implementation does not enforce memory ordering between
slab->stride and slab->obj_exts. For... | ```diff
diff --git a/mm/slub.c b/mm/slub.c
index 52f021711744..0c906fefc31b 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2196,7 +2196,6 @@ int alloc_slab_obj_exts(struct slab *slab, struct kmem_cache *s,
retry:
old_exts = READ_ONCE(slab->obj_exts);
handle_failed_objexts_alloc(old_exts, vec, objects);
- slab_set_stri... |
81af9e40e2e4e1aa95f09fb34811760be6742c58 | Analyze and fix the following issue in the Linux kernel code: phy: qcom: qmp-ufs: Fix SM8650 PCS table for Gear 4 | Problem Details:
According to internal documentation, on SM8650, when the PHY is configured
in Gear 4, the QPHY_V6_PCS_UFS_PLL_CNTL register needs to have the same
value as for Gear 5.
At the moment, there is no board that comes with a UFS 3.x device, so
this issue doesn't show up, but with the new Eliza SoC, which us... | ```diff
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
index df138a5442eb..771bc7c2ab50 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
@@ -990,6 +990,7 @@ static const struct qmp_phy_init_tbl sm8650_ufsphy_pcs[] = {
QM... |
520a98bdf7ae0130e22d8adced3d69a2e211b41f | Analyze and fix the following issue in the Linux kernel code: phy: qcom: m31-eusb2: clear PLL_EN during init | Problem Details:
The driver currently sets bit 0 of USB_PHY_CFG1 (PLL_EN) during PHY
initialization. According to the M31 EUSB2 PHY hardware documentation,
this bit is intended only for test/debug scenarios and does not control
mission mode operation. Keeping PLL_EN asserted causes the PHY to draw
additional current du... | ```diff
diff --git a/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c b/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c
index 95cd3175926d..68f1ba8fec4a 100644
--- a/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c
+++ b/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c
@@ -83,7 +83,7 @@ static const struct m31_phy_tbl_entry m31_eusb2_setup_tbl[]... |
584b457f4166293bdfa50f930228e9fb91a38392 | Analyze and fix the following issue in the Linux kernel code: phy: ti: j721e-wiz: Fix device node reference leak in wiz_get_lane_phy_types() | Problem Details:
The serdes device_node is obtained using of_get_child_by_name(),
which increments the reference count. However, it is never put,
leading to a reference leak.
Add the missing of_node_put() calls to ensure the reference count is
properly balanced.
Fixes: 7ae14cf581f2 ("phy: ti: j721e-wiz: Implement Dis... | ```diff
diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c
index 6e9ecb88dc8b..6b584706b913 100644
--- a/drivers/phy/ti/phy-j721e-wiz.c
+++ b/drivers/phy/ti/phy-j721e-wiz.c
@@ -1425,6 +1425,7 @@ static int wiz_get_lane_phy_types(struct device *dev, struct wiz *wiz)
dev_err(dev,
"%s: R... |
290a35756aaef85bbe0527eaf451f533a61b5f6c | Analyze and fix the following issue in the Linux kernel code: phy: apple: apple: Use local variable for ioremap return value | Problem Details:
The indirection through the resources array is unnecessarily complicated
and resuling in using IS_ERR() and PTR_ERR() on a valid address. A local
variable for the devm_ioremap_resource() return value is both easier to
read and matches expectations when reading code.
Reported-by: Dan Carpenter <dan.car... | ```diff
diff --git a/drivers/phy/apple/atc.c b/drivers/phy/apple/atc.c
index 32d97226e926..e9d106f135c5 100644
--- a/drivers/phy/apple/atc.c
+++ b/drivers/phy/apple/atc.c
@@ -2202,14 +2202,16 @@ static int atcphy_map_resources(struct platform_device *pdev, struct apple_atcph
{ "pipehandler", &atcphy->regs.pipehandle... |
f0cf0a882a02dcf28547f32264f6fd37e9a7b147 | Analyze and fix the following issue in the Linux kernel code: phy: k1-usb: add disconnect function support | Problem Details:
A disconnect status BIT of USB2 PHY need to be cleared, otherwise
it will fail to work properly during next connection when devices
connect to roothub directly.
Fixes: fe4bc1a08638 ("phy: spacemit: support K1 USB2.0 PHY controller")
Signed-off-by: Yixun Lan <dlan@kernel.org>
Reviewed-by: Vladimir Olte... | ```diff
diff --git a/drivers/phy/spacemit/phy-k1-usb2.c b/drivers/phy/spacemit/phy-k1-usb2.c
index 342061380012..9215d0b223b2 100644
--- a/drivers/phy/spacemit/phy-k1-usb2.c
+++ b/drivers/phy/spacemit/phy-k1-usb2.c
@@ -48,6 +48,9 @@
#define PHY_CLK_HSTXP_EN BIT(3) /* clock hstxp enable */
#define PHY_HSTXP_MODE ... |
6e3f4514e3b432871ac81717d24f56b441857f77 | Analyze and fix the following issue in the Linux kernel code: drm/ttm: Fix ttm_pool_beneficial_order() return type | Problem Details:
Fix a nasty copy and paste bug, where the incorrect boolean return type of
the ttm_pool_beneficial_order() helper had a consequence of avoiding
direct reclaim too eagerly for drivers which use this feature (currently
amdgpu).
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Fixes: 7e9c548d370... | ```diff
diff --git a/drivers/gpu/drm/ttm/ttm_pool_internal.h b/drivers/gpu/drm/ttm/ttm_pool_internal.h
index 82c4b7e56a99..24c179fd69d1 100644
--- a/drivers/gpu/drm/ttm/ttm_pool_internal.h
+++ b/drivers/gpu/drm/ttm/ttm_pool_internal.h
@@ -17,7 +17,7 @@ static inline bool ttm_pool_uses_dma32(struct ttm_pool *pool)
ret... |
b6b7d1ae0653dcaa356be31c0de221311e922ccd | Analyze and fix the following issue in the Linux kernel code: phy: qcom: qmp-usbc: Simplify check for non-NULL pointer | Problem Details:
Pointers should not use explicit '0' comparison, so just use standard
evaluation as non-NULL:
phy-qcom-qmp-usbc.c:1682:31: warning: Using plain integer as NULL pointer
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Revie... | ```diff
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
index 14feb77789b3..c342479a3798 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
@@ -1679,7 +1679,7 @@ static int qmp_usbc_register_clocks(struct qmp_usbc *qmp, s... |
42fbb31310b2c145308d3cdcb32d8f05998cfd6c | Analyze and fix the following issue in the Linux kernel code: fuse: mark DAX inode releases as blocking | Problem Details:
Commit 26e5c67deb2e ("fuse: fix livelock in synchronous file put from
fuseblk workers") made fputs on closing files always asynchronous.
As cleaning up DAX inodes may require issuing a number of synchronous
request for releasing the mappings, completing the release request from
the worker thread may l... | ```diff
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index b1bb7153cb78..30a74f61caf0 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -117,6 +117,12 @@ static void fuse_file_put(struct fuse_file *ff, bool sync)
fuse_simple_request(ff->fm, args);
fuse_release_end(ff->fm, args, 0);
} else {
+ /*
+ * D... |
a258d843a3e4cb687da19437f8f81fee55ad7d35 | Analyze and fix the following issue in the Linux kernel code: phy: lynx-28g: skip CDR lock workaround for lanes disabled in the device tree | Problem Details:
The blamed commit introduced support for specifying individual lanes as
OF nodes in the device, and these can have status = "disabled".
When that happens, for_each_available_child_of_node() skips them and
lynx_28g_probe_lane() -> devm_phy_create() is not called, so lane->phy
will be NULL. Yet it will ... | ```diff
diff --git a/drivers/phy/freescale/phy-fsl-lynx-28g.c b/drivers/phy/freescale/phy-fsl-lynx-28g.c
index 2b0fd95ba62f..63427fc34e26 100644
--- a/drivers/phy/freescale/phy-fsl-lynx-28g.c
+++ b/drivers/phy/freescale/phy-fsl-lynx-28g.c
@@ -1069,6 +1069,8 @@ static void lynx_28g_cdr_lock_check(struct work_struct *wor... |
48fafffcf29bb968c9dee6bf507c1e57d0ccb6b5 | Analyze and fix the following issue in the Linux kernel code: phy: make PHY_COMMON_PROPS Kconfig symbol conditionally user-selectable | Problem Details:
Geert reports that enabling CONFIG_KUNIT_ALL_TESTS shouldn't enable
features that aren't enabled without it. That isn't what "*all* tests"
means, but as the prompt puts it, "All KUnit tests with satisfied
dependencies".
The impact is that enabling CONFIG_KUNIT_ALL_TESTS brings features which
cannot be... | ```diff
diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index 02467dfd4fb0..1875d5b784f6 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -6,7 +6,7 @@
menu "PHY Subsystem"
config PHY_COMMON_PROPS
- bool
+ bool "PHY common properties" if KUNIT_ALL_TESTS
help
This parses properties common be... |
ad0e9663f0f5b0ed8e27d3690c5ac9de72243fba | Analyze and fix the following issue in the Linux kernel code: ext2: guard reservation window dump with EXT2FS_DEBUG | Problem Details:
The function __rsv_window_dump() is a heavyweight debug tool that walks
the reservation red-black tree. It is currently guarded by #if 1,
forcing it to be compiled into all kernels, even production ones.
Match the rest of the file by guarding it with #ifdef EXT2FS_DEBUG,
so it is only included when ex... | ```diff
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index 007eee794bd1..adf0f31fbddd 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -201,7 +201,7 @@ static void group_adjust_blocks(struct super_block *sb, int group_no,
* windows(start, end). Otherwise, it will only print out the "bad" windows,
* those... |
3350c2b3f2b8a3b985a020a4ef4f2f050a4b6a1d | Analyze and fix the following issue in the Linux kernel code: platform_data/mlxreg: mlxreg.h: fix all kernel-doc warnings | Problem Details:
Use the correct kernel-doc format & notation to eliminate
kernel-doc warnings:
Warning: include/linux/platform_data/mlxreg.h:24 Enum value
'MLX_WDT_TYPE1' not described in enum 'mlxreg_wdt_type'
Warning: include/linux/platform_data/mlxreg.h:24 Enum value
'MLX_WDT_TYPE2' not described in enum 'mlxreg... | ```diff
diff --git a/include/linux/platform_data/mlxreg.h b/include/linux/platform_data/mlxreg.h
index f6cca7a035c7..50b6be57da66 100644
--- a/include/linux/platform_data/mlxreg.h
+++ b/include/linux/platform_data/mlxreg.h
@@ -13,10 +13,10 @@
/**
* enum mlxreg_wdt_type - type of HW watchdog
*
- * TYPE1 HW watchdog... |
916727cfdb72cd01fef3fa6746e648f8cb70e713 | Analyze and fix the following issue in the Linux kernel code: platform/x86: hp-bioscfg: Support allocations of larger data | Problem Details:
Some systems have much larger amounts of enumeration attributes
than have been previously encountered. This can lead to page allocation
failures when using kcalloc(). Switch over to using kvcalloc() to
allow larger allocations.
Fixes: 6b2770bfd6f92 ("platform/x86: hp-bioscfg: enum-attributes")
Cc: st... | ```diff
diff --git a/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c
index 470b9f44ed7a..af4d1920d488 100644
--- a/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c
+++ b/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c
@@ -94,8 +94,11 @@ int hp_alloc_e... |
24d87712727a5017ad142d63940589a36cd25647 | Analyze and fix the following issue in the Linux kernel code: media: dvb-net: fix OOB access in ULE extension header tables | Problem Details:
The ule_mandatory_ext_handlers[] and ule_optional_ext_handlers[] tables
in handle_one_ule_extension() are declared with 255 elements (valid
indices 0-254), but the index htype is derived from network-controlled
data as (ule_sndu_type & 0x00FF), giving a range of 0-255. When
htype equals 255, an out-of-... | ```diff
diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c
index 8bb8dd34c223..a2159b2bc176 100644
--- a/drivers/media/dvb-core/dvb_net.c
+++ b/drivers/media/dvb-core/dvb_net.c
@@ -228,6 +228,9 @@ static int handle_one_ule_extension( struct dvb_net_priv *p )
unsigned char hlen = (p->ule_... |
ac9ccb6e75c5af84095bece1019f22cb45ab43e5 | Analyze and fix the following issue in the Linux kernel code: ntfs: Fix possible deadlock | Problem Details:
In the error path for ntfs_attr_map_whole_runlist() the lock is not
released.
Add release for lock.
Detected by Smatch:
fs/ntfs/attrib.c:5197 ntfs_non_resident_attr_collapse_range() warn:
inconsistent returns '&ni->runlist.lock'.
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
Reviewed-by: H... | ```diff
diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c
index 71ad870eceac..2af45df2aab1 100644
--- a/fs/ntfs/attrib.c
+++ b/fs/ntfs/attrib.c
@@ -5124,8 +5124,10 @@ int ntfs_non_resident_attr_collapse_range(struct ntfs_inode *ni, s64 start_vcn,
down_write(&ni->runlist.lock);
ret = ntfs_attr_map_whole_runlist(ni)... |
16fdabe143fce2cbf89139677728e17e21b46c28 | Analyze and fix the following issue in the Linux kernel code: gpio: Fix resource leaks on errors in gpiochip_add_data_with_key() | Problem Details:
Since commit aab5c6f20023 ("gpio: set device type for GPIO chips"),
`gdev->dev.release` is unset. As a result, the reference count to
`gdev->dev` isn't dropped on the error handling paths.
Drop the reference on errors.
Also reorder the instructions to make the error handling simpler.
Now gpiochip_ad... | ```diff
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 86a171e96b0e..f77d5121a8a8 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -892,13 +892,15 @@ static const struct device_type gpio_dev_type = {
#define gcdev_unregister(gdev) device_del(&(gdev)->dev)
#endif
+/*
+ * An in... |
21f424e22023aab1f1757dedd1520a7e3a98f78a | Analyze and fix the following issue in the Linux kernel code: drm/i915/overlay: Adjust i915 specific interfaces | Problem Details:
Adjust the names ("i915_overlay_" prefix) and calling
convention (pass the driver agnostic 'struct drm_device'()
of the functions that will provide the remainder of the
parent driver interface to be used by the overlay display
code.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_overlay.c b/drivers/gpu/drm/i915/display/intel_overlay.c
index 906948397d21..a516fc28f093 100644
--- a/drivers/gpu/drm/i915/display/intel_overlay.c
+++ b/drivers/gpu/drm/i915/display/intel_overlay.c
@@ -263,14 +263,15 @@ static bool i915_overlay_is_active(struct d... |
cf8e9203cc653f0a82639f7ce8089fa92afe6739 | Analyze and fix the following issue in the Linux kernel code: virt: fsl_hypervisor: fix header kernel-doc warnings | Problem Details:
Correct struct member names to placate kernel-doc warnings:
Warning: include/uapi/linux/fsl_hypervisor.h:148 struct member
'local_vaddr' not described in 'fsl_hv_ioctl_memcpy'
Warning: include/uapi/linux/fsl_hypervisor.h:148 struct member
'remote_paddr' not described in 'fsl_hv_ioctl_memcpy'
Fixes:... | ```diff
diff --git a/include/uapi/linux/fsl_hypervisor.h b/include/uapi/linux/fsl_hypervisor.h
index 1e237fba951f..ab4388441e80 100644
--- a/include/uapi/linux/fsl_hypervisor.h
+++ b/include/uapi/linux/fsl_hypervisor.h
@@ -114,9 +114,9 @@ struct fsl_hv_ioctl_stop {
* @target: the partition ID of the target partition,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.