id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
80bb50e2d459213cccff3111d5ef98ed4238c0d5 | Analyze and fix the following issue in the Linux kernel code: ALSA: caiaq: take a reference on the USB device in create_card() | Problem Details:
The caiaq driver stores a pointer to the parent USB device in
cdev->chip.dev but never takes a reference on it. The card's
private_free callback, snd_usb_caiaq_card_free(), can run
asynchronously via snd_card_free_when_closed() after the USB
device has already been disconnected and freed, so any access... | ```diff
diff --git a/sound/usb/caiaq/device.c b/sound/usb/caiaq/device.c
index 3a71bab8a477..51177ebfb8c6 100644
--- a/sound/usb/caiaq/device.c
+++ b/sound/usb/caiaq/device.c
@@ -384,7 +384,7 @@ static void card_free(struct snd_card *card)
snd_usb_caiaq_input_free(cdev);
#endif
snd_usb_caiaq_audio_free(cdev);
- us... |
5f183b0588eb508ab49022e26923d91698447226 | Analyze and fix the following issue in the Linux kernel code: drm/pagemap: Fix drm_pagemap_migrate_unmap_pages kerneldoc | Problem Details:
Replace @dma_addr with @pagemap_addr in the function documentation,
as @pagemap_addr is the actual name of the function argument.
Suggested-by: Francois Dugast <francois.dugast@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Francois Dugast <francois.dugast@intel.com>
Li... | ```diff
diff --git a/drivers/gpu/drm/drm_pagemap.c b/drivers/gpu/drm/drm_pagemap.c
index bd2037c77c92..d82ea7ccb8da 100644
--- a/drivers/gpu/drm/drm_pagemap.c
+++ b/drivers/gpu/drm/drm_pagemap.c
@@ -397,8 +397,9 @@ next:
* @state: DMA IOVA state for mapping.
*
* This function unmaps previously mapped pages of mem... |
c02053a9055d5fdfd32432287cca8958db1d5bc5 | Analyze and fix the following issue in the Linux kernel code: mailbox: mailbox-test: free channels on probe error | Problem Details:
On probe error, free the previously obtained channels. This not only
prevents a leak, but also UAF scenarios because the client structure
will be removed nonetheless because it was allocated with devm.
Link: https://sashiko.dev/#/patchset/20260327151217.5327-2-wsa%2Brenesas%40sang-engineering.com
Fixe... | ```diff
diff --git a/drivers/mailbox/mailbox-test.c b/drivers/mailbox/mailbox-test.c
index 058c0fe4b9c2..5e68f708205c 100644
--- a/drivers/mailbox/mailbox-test.c
+++ b/drivers/mailbox/mailbox-test.c
@@ -409,18 +409,27 @@ static int mbox_test_probe(struct platform_device *pdev)
if (tdev->rx_channel) {
tdev->rx_buff... |
0bd75b7abafb3ed199df830c539c57ef9b62c2a2 | Analyze and fix the following issue in the Linux kernel code: mailbox: prefix new constants with MBOX_ | Problem Details:
Commit 89e5d7d61600 ("mailbox: remove superfluous internal header")
moved some constants to a public header but forgot to add a mailbox
specific prefix. Add this now to prevent future collisions on a too
generic naming.
Link: https://sashiko.dev/#/patchset/20260327151112.5202-2-wsa%2Brenesas%40sang-en... | ```diff
diff --git a/drivers/mailbox/cix-mailbox.c b/drivers/mailbox/cix-mailbox.c
index 8cfaa91b75bd..43c76cdab24a 100644
--- a/drivers/mailbox/cix-mailbox.c
+++ b/drivers/mailbox/cix-mailbox.c
@@ -413,7 +413,7 @@ static int cix_mbox_startup(struct mbox_chan *chan)
switch (cp->type) {
case CIX_MBOX_TYPE_DB:
/* ... |
84ff995ae826aa6bbcc6c7b9ea569ff67c021d72 | Analyze and fix the following issue in the Linux kernel code: smb: server: avoid double-free in smb_direct_free_sendmsg after smb_direct_flush_send_list() | Problem Details:
smb_direct_flush_send_list() already calls smb_direct_free_sendmsg(),
so we should not call it again after post_sendmsg()
moved it to the batch list.
Reported-by: Ruikai Peng <ruikai@pwno.io>
Closes: https://lore.kernel.org/linux-cifs/CAFD3drNOSJ05y3A+jNXSDxW-2w09KHQ0DivhxQ_pcc7immVVOQ@mail.gmail.com/... | ```diff
diff --git a/fs/smb/server/transport_rdma.c b/fs/smb/server/transport_rdma.c
index 188572491d53..dbc8dedb85dc 100644
--- a/fs/smb/server/transport_rdma.c
+++ b/fs/smb/server/transport_rdma.c
@@ -1588,15 +1588,21 @@ static int smb_direct_post_send_data(struct smbdirect_socket *sc,
if (ret)
goto err;
+ /*
... |
27b7c3e916218b5eb2ee350211140e961bfc49be | Analyze and fix the following issue in the Linux kernel code: smb: client: avoid double-free in smbd_free_send_io() after smbd_send_batch_flush() | Problem Details:
smbd_send_batch_flush() already calls smbd_free_send_io(),
so we should not call it again after smbd_post_send()
moved it to the batch list.
Reported-by: Ruikai Peng <ruikai@pwno.io>
Closes: https://lore.kernel.org/linux-cifs/CAFD3drNOSJ05y3A+jNXSDxW-2w09KHQ0DivhxQ_pcc7immVVOQ@mail.gmail.com/
Fixes: 2... | ```diff
diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c
index c79304012b08..461658105013 100644
--- a/fs/smb/client/smbdirect.c
+++ b/fs/smb/client/smbdirect.c
@@ -1551,17 +1551,25 @@ static int smbd_post_send_iter(struct smbdirect_socket *sc,
rc = smbd_post_send(sc, batch, request);
if (!rc) {... |
3e298897f41c61450c2e7a4f457e8b2485eb35b3 | Analyze and fix the following issue in the Linux kernel code: ksmbd: fix use-after-free from async crypto on Qualcomm crypto engine | Problem Details:
ksmbd_crypt_message() sets a NULL completion callback on AEAD requests
and does not handle the -EINPROGRESS return code from async hardware
crypto engines like the Qualcomm Crypto Engine (QCE). When QCE returns
-EINPROGRESS, ksmbd treats it as an error and immediately frees the
request while the hardwa... | ```diff
diff --git a/fs/smb/server/auth.c b/fs/smb/server/auth.c
index af5f40304331..7d0691f7263f 100644
--- a/fs/smb/server/auth.c
+++ b/fs/smb/server/auth.c
@@ -827,6 +827,7 @@ int ksmbd_crypt_message(struct ksmbd_work *work, struct kvec *iov,
struct smb2_transform_hdr *tr_hdr = smb_get_msg(iov[0].iov_base);
unsi... |
ad0057fb91218914d6c98268718ceb9d59b388e1 | Analyze and fix the following issue in the Linux kernel code: ksmbd: fix mechToken leak when SPNEGO decode fails after token alloc | Problem Details:
The kernel ASN.1 BER decoder calls action callbacks incrementally as it
walks the input. When ksmbd_decode_negTokenInit() reaches the mechToken
[2] OCTET STRING element, ksmbd_neg_token_alloc() allocates
conn->mechToken immediately via kmemdup_nul(). If a later element in
the same blob is malformed, ... | ```diff
diff --git a/fs/smb/server/connection.c b/fs/smb/server/connection.c
index 1bb2081c492c..26cfce344861 100644
--- a/fs/smb/server/connection.c
+++ b/fs/smb/server/connection.c
@@ -96,6 +96,7 @@ void ksmbd_conn_free(struct ksmbd_conn *conn)
xa_destroy(&conn->sessions);
kvfree(conn->request_buf);
kfree(conn-... |
53370cf9090777774e07fd9a8ebce67c6cc333ab | Analyze and fix the following issue in the Linux kernel code: ksmbd: require 3 sub-authorities before reading sub_auth[2] | Problem Details:
parse_dacl() compares each ACE SID against sid_unix_NFS_mode and on
match reads sid.sub_auth[2] as the file mode. If sid_unix_NFS_mode is
the prefix S-1-5-88-3 with num_subauth = 2 then compare_sids() compares
only min(num_subauth, 2) sub-authorities so a client SID with
num_subauth = 2 and sub_auth =... | ```diff
diff --git a/fs/smb/server/smbacl.c b/fs/smb/server/smbacl.c
index c30d01877c41..061a305bf9c8 100644
--- a/fs/smb/server/smbacl.c
+++ b/fs/smb/server/smbacl.c
@@ -451,7 +451,8 @@ static void parse_dacl(struct mnt_idmap *idmap,
ppace[i]->access_req =
smb_map_generic_desired_access(ppace[i]->access_req);
... |
66751841212c2cc196577453c37f7774ff363f02 | Analyze and fix the following issue in the Linux kernel code: ksmbd: validate EaNameLength in smb2_get_ea() | Problem Details:
smb2_get_ea() reads ea_req->EaNameLength from the client request and
passes it directly to strncmp() as the comparison length without
verifying that the length of the name really is the size of the input
buffer received.
Fix this up by properly checking the size of the name based on the value
received... | ```diff
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index d0b05878757e..c61fcc88d6f2 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -4717,6 +4717,11 @@ static int smb2_get_ea(struct ksmbd_work *work, struct ksmbd_file *fp,
ea_req = (struct smb2_ea_info_req *)((char *)req +... |
49110a8ce654bbe56bef7c5e44cce31f4b102b8a | Analyze and fix the following issue in the Linux kernel code: ksmbd: validate owner of durable handle on reconnect | Problem Details:
Currently, ksmbd does not verify if the user attempting to reconnect
to a durable handle is the same user who originally opened the file.
This allows any authenticated user to hijack an orphaned durable handle
by predicting or brute-forcing the persistent ID.
According to MS-SMB2, the server MUST veri... | ```diff
diff --git a/fs/smb/server/mgmt/user_session.c b/fs/smb/server/mgmt/user_session.c
index 39be2d2be86c..a86589408835 100644
--- a/fs/smb/server/mgmt/user_session.c
+++ b/fs/smb/server/mgmt/user_session.c
@@ -382,12 +382,10 @@ void ksmbd_session_destroy(struct ksmbd_session *sess)
return;
delete_proc_sessi... |
235e32320a470fcd3998fb3774f2290a0eb302a1 | Analyze and fix the following issue in the Linux kernel code: ksmbd: fix use-after-free in __ksmbd_close_fd() via durable scavenger | Problem Details:
When a durable file handle survives session disconnect (TCP close without
SMB2_LOGOFF), session_fd_check() sets fp->conn = NULL to preserve the
handle for later reconnection. However, it did not clean up the byte-range
locks on fp->lock_list.
Later, when the durable scavenger thread times out and call... | ```diff
diff --git a/fs/smb/server/vfs_cache.c b/fs/smb/server/vfs_cache.c
index 168f2dd7e200..87f63525062b 100644
--- a/fs/smb/server/vfs_cache.c
+++ b/fs/smb/server/vfs_cache.c
@@ -463,9 +463,11 @@ static void __ksmbd_close_fd(struct ksmbd_file_table *ft, struct ksmbd_file *fp)
* there are not accesses to fp->lock... |
12bec2bd4b76d81c5d3996bd14ec1b7f4d983747 | Analyze and fix the following issue in the Linux kernel code: bpf: reject short IPv4/IPv6 inputs in bpf_prog_test_run_skb | Problem Details:
bpf_prog_test_run_skb() calls eth_type_trans() first and then uses
skb->protocol to initialize sk family and address fields for the test
run.
For IPv4 and IPv6 packets, it may access ip_hdr(skb) or ipv6_hdr(skb)
even when the provided test input only contains an Ethernet header.
Reject the input earl... | ```diff
diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c
index 4cd6b3ea1815..2bc04feadfab 100644
--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -1137,19 +1137,23 @@ int bpf_prog_test_run_skb(struct bpf_prog *prog, const union bpf_attr *kattr,
switch (skb->protocol) {
case htons(ETH_P_IP):
- sk->sk_fami... |
c0b4382c86e3d92f79b71c9ed55654db520d7b36 | Analyze and fix the following issue in the Linux kernel code: net: fix skb_ext_total_length() BUILD_BUG_ON with CONFIG_GCOV_PROFILE_ALL | Problem Details:
When CONFIG_GCOV_PROFILE_ALL=y is enabled, the kernel fails to build:
In file included from <command-line>:
In function 'skb_extensions_init',
inlined from 'skb_init' at net/core/skbuff.c:5214:2:
././include/linux/compiler_types.h:706:45: error: call to
'__compiletime_assert_1490' decl... | ```diff
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index c5441154795c..87e7d689ab25 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -5118,7 +5118,7 @@ static const u8 skb_ext_type_len[] = {
#endif
};
-static __always_inline unsigned int skb_ext_total_length(void)
+static __always_inline __no_profi... |
2dddb34dd0d07b01fa770eca89480a4da4f13153 | Analyze and fix the following issue in the Linux kernel code: net: ethernet: mtk_eth_soc: initialize PPE per-tag-layer MTU registers | Problem Details:
The PPE enforces output frame size limits via per-tag-layer VLAN_MTU
registers that the driver never initializes. The hardware defaults do
not account for PPPoE overhead, causing the PPE to punt encapsulated
frames back to the CPU instead of forwarding them.
Initialize the registers at PPE start and o... | ```diff
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index ddc321a02fda..796f79088f36 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3566,12 +3566,23 @@ found:
return NOTIFY_DONE;
}
+static int... |
0fedce7244e4b85c049ce579c87e298a1b0b811d | Analyze and fix the following issue in the Linux kernel code: rtc: abx80x: Disable alarm feature if no interrupt attached | Problem Details:
Commit 795cda8338ea ("rtc: interface: Fix long-standing race when setting
alarm") exposed an issue where the rtc-abx80x driver does not clear the
alarm feature bit, but instead relies on the set_alarm operation to return
invalid.
For example, when a RTC_UIE_ON ioctl is handled, it should abort at the
... | ```diff
diff --git a/drivers/rtc/rtc-abx80x.c b/drivers/rtc/rtc-abx80x.c
index eca09872ea97..00d7de64ed3e 100644
--- a/drivers/rtc/rtc-abx80x.c
+++ b/drivers/rtc/rtc-abx80x.c
@@ -932,6 +932,8 @@ static int abx80x_probe(struct i2c_client *client)
client->irq = 0;
}
}
+ if (client->irq <= 0)
+ clear_bit(RTC_FEA... |
edccdd1eb94712da97a6ce71123ec27890add754 | Analyze and fix the following issue in the Linux kernel code: net/mlx5e: IPsec, fix ASO poll timeout with read_poll_timeout_atomic() | Problem Details:
The do-while poll loop uses jiffies for its timeout:
expires = jiffies + msecs_to_jiffies(10);
jiffies is sampled at an arbitrary point within the current tick, so the
first partial tick contributes anywhere from a full tick down to nearly
zero real time. For small msecs_to_jiffies() results this is... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c
index 05faad5083d9..145677ce9640 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/i... |
9994ad4df82d64e57135c0f0906897685f5a9e87 | Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Fix features not applied during netdev registration | Problem Details:
mlx5e_fix_features() returns early when the netdevice is not present.
This is correct during profile transitions where priv is cleared, but it
also incorrectly blocks feature fixups during register_netdev(), when
the device is also not yet present.
It is not trivial to distinguish between both cases a... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index b6c12460b54a..0b8b44bbcb9e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -6756,6 +6756,14 @@ static int _mlx5e_prob... |
d114bfdc9b76bf93b881e195b7ec957c14227bab | Analyze and fix the following issue in the Linux kernel code: vsock: fix buffer size clamping order | Problem Details:
In vsock_update_buffer_size(), the buffer size was being clamped to the
maximum first, and then to the minimum. If a user sets a minimum buffer
size larger than the maximum, the minimum check overrides the maximum
check, inverting the constraint.
This breaks the intended socket memory boundaries by al... | ```diff
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index d912ed2f012a..08f4dfb9782c 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -1951,12 +1951,12 @@ static void vsock_update_buffer_size(struct vsock_sock *vsk,
const struct vsock_transport *transport,
... |
96aefe3afe0e122a1472967224ffe21c3d51b67b | Analyze and fix the following issue in the Linux kernel code: net: phy: add a PHY write barrier when disabling interrupts | Problem Details:
MDIO bus controllers are not required to wait for write transactions to
complete before returning as synchronization is often achieved by polling
status bits.
This can cause issues when disabling interrupts since an interrupt could
fire before the interrupt handler is unregistered and there's no statu... | ```diff
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 1f1039084f51..fce9bc7be330 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -1368,14 +1368,37 @@ void phy_error(struct phy_device *phydev)
}
EXPORT_SYMBOL(phy_error);
+/**
+ * phy_write_barrier - ensure the last write complete... |
6f533abe7bbad2eef1e42c639b6bb9dad2b02362 | Analyze and fix the following issue in the Linux kernel code: net: phy: fix a return path in get_phy_c45_ids() | Problem Details:
The return value of phy_c45_probe_present() is stored in "ret", not
"phy_reg", fix this. "phy_reg" always has a positive value if we reach
this return path (since it would have returned earlier otherwise), which
means that the original goal of the patch of not considering -ENODEV
fatal wasn't achieved.... | ```diff
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 3bd415710bf3..f3696d9819d3 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -927,8 +927,8 @@ static int get_phy_c45_ids(struct mii_bus *bus, int addr,
/* returning -ENODEV doesn't stop bus
* ... |
30c4d2f26bb3538c328035cea2e6265c8320539e | Analyze and fix the following issue in the Linux kernel code: rtc: ntxec: fix OF node reference imbalance | Problem Details:
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.
Fix this by using the intended helper for reusing OF nodes.
Fixes: 435af89786c6 ("rtc: ... | ```diff
diff --git a/drivers/rtc/rtc-ntxec.c b/drivers/rtc/rtc-ntxec.c
index 850ca49186fd..d28ddb34e19e 100644
--- a/drivers/rtc/rtc-ntxec.c
+++ b/drivers/rtc/rtc-ntxec.c
@@ -110,7 +110,7 @@ static int ntxec_rtc_probe(struct platform_device *pdev)
struct rtc_device *dev;
struct ntxec_rtc *rtc;
- pdev->dev.of_node... |
600f01dc4bd0c736b3ffea9f7976136d8bf1b136 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: net: dsa: nxp,sja1105: make spi-cpol optional for sja1110 | Problem Details:
Currently, the binding requires 'spi-cpha' for SJA1105 and 'spi-cpol'
for SJA1110.
However, the SJA1110 supports both SPI modes 0 and 2. Mode 2
(cpha=0, cpol=1) is used by the NXP LX2160 Bluebox 3.
On the SolidRun i.MX8DXL HummingBoard Telematics, mode 0 is stable,
while forcing mode 2 introduces CRC... | ```diff
diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
index 607b7fe8d28e..0486489114cd 100644
--- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
@@ -143,8... |
1335b903cf2e8aeaca87fd665683384c731ec941 | Analyze and fix the following issue in the Linux kernel code: net: ipa: Fix decoding EV_PER_EE for IPA v5.0+ | Problem Details:
Initially 'reg' and 'val' are assigned from HW_PARAM_2.
But since IPA v5.0+ takes EV_PER_EE from HW_PARAM_4 (instead of
NUM_EV_PER_EE from HW_PARAM_2), we not only need to re-assign 'reg' but
also read the register value of that register into 'val' so that
reg_decode() works on the correct value.
Fix... | ```diff
diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c
index 4c3227e77898..624649484d62 100644
--- a/drivers/net/ipa/gsi.c
+++ b/drivers/net/ipa/gsi.c
@@ -2044,6 +2044,7 @@ static int gsi_ring_setup(struct gsi *gsi)
count = reg_decode(reg, NUM_EV_PER_EE, val);
} else {
reg = gsi_reg(gsi, HW_PARAM_4)... |
de08f9585692813bd41ee654fca0487664c4de30 | Analyze and fix the following issue in the Linux kernel code: net: ipa: Fix programming of QTIME_TIMESTAMP_CFG | Problem Details:
The 'val' variable gets overwritten multiple times, discarding previous
values. Looking at the git log shows these should be combined with |=
instead.
Fixes: 9265a4f0f0b4 ("net: ipa: define even more IPA register fields")
Link: https://sashiko.dev/#/patchset/20260403-milos-ipa-v1-0-01e9e4e03d3e%40fair... | ```diff
diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c
index edead9c48d1f..216506eeef1f 100644
--- a/drivers/net/ipa/ipa_main.c
+++ b/drivers/net/ipa/ipa_main.c
@@ -361,7 +361,7 @@ static void ipa_qtime_config(struct ipa *ipa)
{
const struct reg *reg;
u32 offset;
- u32 val;
+ u32 val = 0;
... |
2bb6379416fd19f44c3423a00bfd8626259f6067 | Analyze and fix the following issue in the Linux kernel code: ppp: require CAP_NET_ADMIN in target netns for unattached ioctls | Problem Details:
/dev/ppp open is currently authorized against file->f_cred->user_ns,
while unattached administrative ioctls operate on current->nsproxy->net_ns.
As a result, a local unprivileged user can create a new user namespace
with CLONE_NEWUSER, gain CAP_NET_ADMIN only in that new user namespace,
and still issu... | ```diff
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index e9b41777be80..c2024684b10d 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -1057,6 +1057,9 @@ static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf,
struct ppp_net *pn;
int __use... |
171609f047552b51b8ed78f338cbffb84b7f5e8f | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Add test for cgroup storage OOB read | Problem Details:
Add a test case to reproduce the out-of-bounds read issue when copying
from a cgroup storage map to a pcpu map with a value_size not rounded
up to 8 bytes.
The test creates:
1. A CGROUP_STORAGE map with 4-byte value (not 8-byte aligned)
2. A LRU_PERCPU_HASH map with 4-byte value (same size)
When a so... | ```diff
diff --git a/tools/testing/selftests/bpf/prog_tests/cgroup_storage.c b/tools/testing/selftests/bpf/prog_tests/cgroup_storage.c
index cf395715ced4..5b56dc893e73 100644
--- a/tools/testing/selftests/bpf/prog_tests/cgroup_storage.c
+++ b/tools/testing/selftests/bpf/prog_tests/cgroup_storage.c
@@ -1,5 +1,7 @@
// S... |
576afddfee8d1108ee299bf10f581593540d1a36 | Analyze and fix the following issue in the Linux kernel code: bpf: Fix OOB in pcpu_init_value | Problem Details:
An out-of-bounds read occurs when copying element from a
BPF_MAP_TYPE_CGROUP_STORAGE map to another pcpu map with the
same value_size that is not rounded up to 8 bytes.
The issue happens when:
1. A CGROUP_STORAGE map is created with value_size not aligned to
8 bytes (e.g., 4 bytes)
2. A pcpu map is... | ```diff
diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c
index bc6bc8bb871d..fb8123cfa5ec 100644
--- a/kernel/bpf/hashtab.c
+++ b/kernel/bpf/hashtab.c
@@ -1056,7 +1056,7 @@ static void pcpu_init_value(struct bpf_htab *htab, void __percpu *pptr,
for_each_possible_cpu(cpu) {
if (cpu == current_cpu)
- ... |
ebf71dd4aff46e8e421d455db3e231ba43d2fa8a | Analyze and fix the following issue in the Linux kernel code: net/rds: Restrict use of RDS/IB to the initial network namespace | Problem Details:
Prevent using RDS/IB in network namespaces other than the initial one.
The existing RDS/IB code will not work properly in non-initial network
namespaces.
Fixes: d5a8ac28a7ff ("RDS-TCP: Make RDS-TCP work correctly when it is set up in a netns other than init_net")
Reported-by: syzbot+da8e060735ae02c8f3... | ```diff
diff --git a/net/rds/af_rds.c b/net/rds/af_rds.c
index b396c673dfaf..76f625986a7f 100644
--- a/net/rds/af_rds.c
+++ b/net/rds/af_rds.c
@@ -357,7 +357,8 @@ static int rds_cong_monitor(struct rds_sock *rs, sockptr_t optval, int optlen)
return ret;
}
-static int rds_set_transport(struct rds_sock *rs, sockptr_... |
2fefa9c81a25534464911447d51ddb44b04a8e5b | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix reg_bounds to match new tnum-based refinement | Problem Details:
Commit efc11a667878 ("bpf: Improve bounds when tnum has a single
possible value") improved the bounds refinement to detect when the tnum
and u64 range overlap in a single value (and the bounds can thus be set
to that value).
Eduard then noticed that it broke the slow-mode reg_bounds selftests
because ... | ```diff
diff --git a/tools/testing/selftests/bpf/prog_tests/reg_bounds.c b/tools/testing/selftests/bpf/prog_tests/reg_bounds.c
index 569ae09bdd76..71f5240cc5b7 100644
--- a/tools/testing/selftests/bpf/prog_tests/reg_bounds.c
+++ b/tools/testing/selftests/bpf/prog_tests/reg_bounds.c
@@ -500,6 +500,39 @@ static struct ra... |
2835750dd6475a5ddc116be0b4c81fee8ce1a902 | Analyze and fix the following issue in the Linux kernel code: net: rose: reject truncated CLEAR_REQUEST frames in state machines | Problem Details:
All five ROSE state machines (states 1-5) handle ROSE_CLEAR_REQUEST
by reading the cause and diagnostic bytes directly from skb->data[3]
and skb->data[4] without verifying that the frame is long enough:
rose_disconnect(sk, ..., skb->data[3], skb->data[4]);
The entry-point check in rose_route_frame(... | ```diff
diff --git a/net/rose/rose_in.c b/net/rose/rose_in.c
index 0276b393f0e5..e26800581962 100644
--- a/net/rose/rose_in.c
+++ b/net/rose/rose_in.c
@@ -271,6 +271,13 @@ int rose_process_rx_frame(struct sock *sk, struct sk_buff *skb)
frametype = rose_decode(skb, &ns, &nr, &q, &d, &m);
+ /*
+ * ROSE_CLEAR_REQUE... |
d35a6db887eeae7c57b719521e39d64f929c6dc3 | Analyze and fix the following issue in the Linux kernel code: i3c: mipi-i3c-hci: fix IBI payload length calculation for final status | Problem Details:
In DMA mode, the IBI status descriptor encodes the payload using
CHUNKS (number of chunks) and DATA_LENGTH (valid bytes in the last
chunk). All preceding chunks are implicitly full-sized.
The current code accumulates full chunk sizes for non-final status
descriptors, but for the final status descripto... | ```diff
diff --git a/drivers/i3c/master/mipi-i3c-hci/dma.c b/drivers/i3c/master/mipi-i3c-hci/dma.c
index e487ef52f6b4..e4daaa612055 100644
--- a/drivers/i3c/master/mipi-i3c-hci/dma.c
+++ b/drivers/i3c/master/mipi-i3c-hci/dma.c
@@ -754,7 +754,10 @@ static void hci_dma_process_ibi(struct i3c_hci *hci, struct hci_rh_data ... |
ac61bffe91d4bda08806e12957c6d64756d042db | Analyze and fix the following issue in the Linux kernel code: bpf: Allow instructions with arena source and non-arena dest registers | Problem Details:
The compiler sometimes stores the result of a PTR_TO_ARENA and SCALAR
operation into the scalar register rather than the pointer register.
Relax the verifier to allow operations between a source arena register
and a destination non-arena register, marking the destination's value
as a PTR_TO_ARENA.
Sig... | ```diff
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 4fa9d2bc07f6..9e4980128151 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -15051,11 +15051,20 @@ static int adjust_reg_min_max_vals(struct bpf_verifier_env *env,
int err;
dst_reg = ®s[insn->dst_reg];
- src_reg = NULL;
+... |
10f86a2a5c91fc4c4d001960f1c21abe52545ef6 | Analyze and fix the following issue in the Linux kernel code: bpf: Fix same-register dst/src OOB read and pointer leak in sock_ops | Problem Details:
When a BPF sock_ops program accesses ctx fields with dst_reg == src_reg,
the SOCK_OPS_GET_SK() and SOCK_OPS_GET_FIELD() macros fail to zero the
destination register in the !fullsock / !locked_tcp_sock path.
Both macros borrow a temporary register to check is_fullsock /
is_locked_tcp_sock when dst_reg ... | ```diff
diff --git a/net/core/filter.c b/net/core/filter.c
index 78b548158fb0..53ce06ed4a88 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -10581,10 +10581,11 @@ static u32 sock_ops_convert_ctx_access(enum bpf_access_type type,
si->dst_reg, si->dst_reg, \
offsetof(OBJ, OBJ_FIELD)... |
fab205e49286ab01cbc6fa8debd65a5a6e6cca71 | Analyze and fix the following issue in the Linux kernel code: perf sample: Fix documentation typo | Problem Details:
s/PEF/PERF/
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org> | ```diff
diff --git a/tools/perf/util/sample.h b/tools/perf/util/sample.h
index ca0c407c4423..e556c9b656ea 100644
--- a/tools/perf/util/sample.h
+++ b/tools/perf/util/sample.h
@@ -126,7 +126,7 @@ struct perf_sample {
u64 time;
/** @addr: The sample event PERF_SAMPLE_ADDR value. */
u64 addr;
- /** @id: The sample e... |
40a3f6c5e2604ff7c007da6628120529569e950c | Analyze and fix the following issue in the Linux kernel code: Documentation: core-api: real-time: correct spelling | Problem Details:
Fix typo "excpetion" with "exception".
Signed-off-by: Sukrut Heroorkar <hsukrut3@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260411155120.233357-1-hsukrut3@gmail.com> | ```diff
diff --git a/Documentation/core-api/real-time/architecture-porting.rst b/Documentation/core-api/real-time/architecture-porting.rst
index c90a426d8062..c9a39d708866 100644
--- a/Documentation/core-api/real-time/architecture-porting.rst
+++ b/Documentation/core-api/real-time/architecture-porting.rst
@@ -74,7 +74,... |
46ce8be2ced389bccd84bcc04a12cf2f4d0c22d1 | Analyze and fix the following issue in the Linux kernel code: NFC: digital: Bounds check NFC-A cascade depth in SDD response handler | Problem Details:
The NFC-A anti-collision cascade in digital_in_recv_sdd_res() appends 3
or 4 bytes to target->nfcid1 on each round, but the number of cascade
rounds is controlled entirely by the peer device. The peer sets the
cascade tag in the SDD_RES (deciding 3 vs 4 bytes) and the
cascade-incomplete bit in the SEL... | ```diff
diff --git a/net/nfc/digital_technology.c b/net/nfc/digital_technology.c
index 63f1b721c71d..ae63c5eb06fa 100644
--- a/net/nfc/digital_technology.c
+++ b/net/nfc/digital_technology.c
@@ -424,6 +424,12 @@ static void digital_in_recv_sdd_res(struct nfc_digital_dev *ddev, void *arg,
size = 4;
}
+ if (target... |
a6bd339dbb3514bce690fdcf252e788dfab4ee76 | Analyze and fix the following issue in the Linux kernel code: net_sched: fix skb memory leak in deferred qdisc drops | Problem Details:
When the network stack cleans up the deferred list via qdisc_run_end(),
it operates on the root qdisc. If the root qdisc do not implement the
TCQ_F_DEQUEUE_DROPS flag the packets queue to free are never freed and
gets stranded on the child's local to_free list.
Fix this by making qdisc_dequeue_drop() ... | ```diff
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index c3d657359a3d..5fc0b1ebaf25 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -1170,12 +1170,22 @@ static inline void tcf_kfree_skb_list(struct sk_buff *skb)
static inline void qdisc_dequeue_drop(struct Qdisc *q, st... |
656121b155030086b01cfce9bd31b0c925ee6860 | Analyze and fix the following issue in the Linux kernel code: net: airoha: Add missing RX_CPU_IDX() configuration in airoha_qdma_cleanup_rx_queue() | Problem Details:
When the descriptor index written in REG_RX_CPU_IDX() is equal to the one
stored in REG_RX_DMA_IDX(), the hw will stop since the QDMA RX ring is
empty.
Add missing REG_RX_CPU_IDX() configuration in airoha_qdma_cleanup_rx_queue
routine during QDMA RX ring cleanup.
Fixes: 514aac359987 ("net: airoha: Add... | ```diff
diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c
index c14cdce588a7..9e995094c32a 100644
--- a/drivers/net/ethernet/airoha/airoha_eth.c
+++ b/drivers/net/ethernet/airoha/airoha_eth.c
@@ -825,6 +825,11 @@ static void airoha_qdma_cleanup_rx_queue(struct airoha_queue... |
b2fb1a336383f1fb4667a9cc930c70f52ae1e20e | Analyze and fix the following issue in the Linux kernel code: ethtool: strset: check nla_len overflow | Problem Details:
The netlink attribute length field nla_len is a __u16, which can only
represent values up to 65535 bytes. NICs with a large number of
statistics strings (e.g. mlx5_core with thousands of ETH_SS_STATS
entries) can produce a ETHTOOL_A_STRINGSET_STRINGS nest that exceeds
this limit.
When nla_nest_end() w... | ```diff
diff --git a/net/ethtool/strset.c b/net/ethtool/strset.c
index 9271aba8255e..bb1e829ba099 100644
--- a/net/ethtool/strset.c
+++ b/net/ethtool/strset.c
@@ -443,7 +443,8 @@ static int strset_fill_set(struct sk_buff *skb,
if (strset_fill_string(skb, set_info, i) < 0)
goto nla_put_failure;
}
- nla_nest... |
594ba4477164af58c9703039b63b8b07a3a55f18 | Analyze and fix the following issue in the Linux kernel code: tools: ynl: ethtool: add --dbg-small-recv option | Problem Details:
Add a --dbg-small-recv debug option to control the recv() buffer size
used by YNL, matching the same option already present in cli.py. This
is useful if user need to get large netlink message.
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://patch.msgid.link/20260408-b4-ynl_ethtool-v2-3... | ```diff
diff --git a/tools/net/ynl/tests/ethtool.py b/tools/net/ynl/tests/ethtool.py
index 63854d21818c..db3b62c652e7 100755
--- a/tools/net/ynl/tests/ethtool.py
+++ b/tools/net/ynl/tests/ethtool.py
@@ -166,12 +166,19 @@ def main():
parser.add_argument('device', metavar='device', type=str)
parser.add_argument... |
3b7c7fc97aea7b4048001d12f45777201c74a17f | Analyze and fix the following issue in the Linux kernel code: net: mana: Move current_speed debugfs file to mana_init_port() | Problem Details:
Move the current_speed debugfs file creation from mana_probe_port() to
mana_init_port(). The file was previously created only during initial
probe, but mana_cleanup_port_context() removes the entire vPort debugfs
directory during detach/attach cycles. Since mana_init_port() recreates
the directory on r... | ```diff
diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
index 09a53c977545..a9f5efc5af37 100644
--- a/drivers/net/ethernet/microsoft/mana/mana_en.c
+++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
@@ -3117,6 +3117,8 @@ static int mana_init_port(struct net_de... |
c116f07ab9d22bb6f355f3cf9e44c1e6a47fe559 | Analyze and fix the following issue in the Linux kernel code: net: mana: Use pci_name() for debugfs directory naming | Problem Details:
Use pci_name(pdev) for the per-device debugfs directory instead of
hardcoded "0" for PFs and pci_slot_name(pdev->slot) for VFs. The
previous approach had two issues:
1. pci_slot_name() dereferences pdev->slot, which can be NULL for VFs
in environments like generic VFIO passthrough or nested KVM,
... | ```diff
diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c
index 786186c9a115..c2e855ff3ca9 100644
--- a/drivers/net/ethernet/microsoft/mana/gdma_main.c
+++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c
@@ -2007,11 +2007,8 @@ static int mana_gd_probe(struc... |
2b5dd4632966c39da6ba74dbc8689b309065e82c | Analyze and fix the following issue in the Linux kernel code: nfc: llcp: add missing return after LLCP_CLOSED checks | Problem Details:
In nfc_llcp_recv_hdlc() and nfc_llcp_recv_disc(), when the socket
state is LLCP_CLOSED, the code correctly calls release_sock() and
nfc_llcp_sock_put() but fails to return. Execution falls through to
the remainder of the function, which calls release_sock() and
nfc_llcp_sock_put() again. This results i... | ```diff
diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c
index 366d7566308c..db5bc6a878dd 100644
--- a/net/nfc/llcp_core.c
+++ b/net/nfc/llcp_core.c
@@ -1091,6 +1091,7 @@ static void nfc_llcp_recv_hdlc(struct nfc_llcp_local *local,
if (sk->sk_state == LLCP_CLOSED) {
release_sock(sk);
nfc_llcp_sock_put(llc... |
8ebf408e7d463eee02c348a3c8277b95587b710d | Analyze and fix the following issue in the Linux kernel code: ata: libata-scsi: fix requeue of deferred ATA PASS-THROUGH commands | Problem Details:
Commit 0ea84089dbf6 ("ata: libata-scsi: avoid Non-NCQ command starvation")
introduced ata_scsi_requeue_deferred_qc() to handle commands deferred
during resets or NCQ failures. This deferral logic completed commands
with DID_SOFT_ERROR to trigger a retry in the SCSI mid-layer.
However, DID_SOFT_ERROR i... | ```diff
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index b15830bedd3a..f44612e269a4 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -1695,12 +1695,12 @@ void ata_scsi_requeue_deferred_qc(struct ata_port *ap)
/*
* If we have a deferred qc when a reset occurs or NCQ ... |
55b22075f7840ef48254886758976531fe146609 | Analyze and fix the following issue in the Linux kernel code: alpha: add support for SECCOMP and SECCOMP_FILTER | Problem Details:
Add SECCOMP and SECCOMP_FILTER support to the Alpha architecture and fix
syscall entry and ptrace issues uncovered by the seccomp-bpf selftests.
The syscall entry path is reworked to consistently track syscall state
using r0, r1 and r2:
- r1 holds the active syscall number
- r2 preserves the origi... | ```diff
diff --git a/Documentation/features/seccomp/seccomp-filter/arch-support.txt b/Documentation/features/seccomp/seccomp-filter/arch-support.txt
index 13feb679649e..9336bdfc125c 100644
--- a/Documentation/features/seccomp/seccomp-filter/arch-support.txt
+++ b/Documentation/features/seccomp/seccomp-filter/arch-suppo... |
5758be283ff8b37beed49e270b908a251d5ca2d7 | Analyze and fix the following issue in the Linux kernel code: net: skb: clean up dead code after skb_kfree_head() simplification | Problem Details:
Since commit 0f42e3f4fe2a ("net: skb: fix cross-cache free of
KFENCE-allocated skb head"), skb_kfree_head() always calls kfree()
and no longer uses end_offset to distinguish between skb_small_head_cache
and generic kmalloc caches.
Clean up the leftovers:
- Remove the unused end_offset parameter from ... | ```diff
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index e50f2d4867c1..c5441154795c 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -106,10 +106,9 @@ static struct kmem_cache *skbuff_ext_cache __ro_after_init;
#define SKB_SMALL_HEAD_SIZE SKB_HEAD_ALIGN(max(MAX_TCP_HEADER, \
GRO_MAX_HEAD_... |
e530b484b70552d6222e2327e311f364724ce616 | Analyze and fix the following issue in the Linux kernel code: netkit: Don't emit scrub attribute for single device mode | Problem Details:
When userspace reads a single mode netkit device via RTM_GETLINK,
it receives IFLA_NETKIT_SCRUB=NETKIT_SCRUB_DEFAULT attribute from
netkit_fill_info(). If that attribute is echoed back to recreate
the device, the seen_scrub presence check in netkit_new_link()
causes creation to fail with -EOPNOTSUPP. S... | ```diff
diff --git a/drivers/net/netkit.c b/drivers/net/netkit.c
index 5619209329d5..7b56a7ad7a49 100644
--- a/drivers/net/netkit.c
+++ b/drivers/net/netkit.c
@@ -1214,7 +1214,8 @@ static int netkit_fill_info(struct sk_buff *skb, const struct net_device *dev)
return -EMSGSIZE;
if (nla_put_u32(skb, IFLA_NETKIT_MODE... |
61119542663cac70898aef532eb57ee41ea9b477 | Analyze and fix the following issue in the Linux kernel code: selftests: netfilter: nft_tproxy.sh: adjust to socat changes | Problem Details:
Like e65d8b6f3092 ("selftests: drv-net: adjust to socat changes") we
need to add shut-none for this test too.
The extra 0-packet can trigger a second (unexpected) reply from the server.
Fixes: 7e37e0eacd22 ("selftests: netfilter: nft_tproxy.sh: add tcp tests")
Reported-by: Jakub Kicinski <kuba@kernel... | ```diff
diff --git a/tools/testing/selftests/net/netfilter/nft_tproxy_udp.sh b/tools/testing/selftests/net/netfilter/nft_tproxy_udp.sh
index d16de13fe5a7..1dc7b0450145 100755
--- a/tools/testing/selftests/net/netfilter/nft_tproxy_udp.sh
+++ b/tools/testing/selftests/net/netfilter/nft_tproxy_udp.sh
@@ -190,13 +190,13 @@... |
f462dca0c8415bf0058d0ffa476354c4476d0f09 | Analyze and fix the following issue in the Linux kernel code: net/sched: act_ct: Only release RCU read lock after ct_ft | Problem Details:
When looking up a flow table in act_ct in tcf_ct_flow_table_get(),
rhashtable_lookup_fast() internally opens and closes an RCU read critical
section before returning ct_ft.
The tcf_ct_flow_table_cleanup_work() can complete before refcount_inc_not_zero()
is invoked on the returned ct_ft resulting in a U... | ```diff
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c
index 7d5e50c921a0..6158e13c98d3 100644
--- a/net/sched/act_ct.c
+++ b/net/sched/act_ct.c
@@ -328,9 +328,13 @@ static int tcf_ct_flow_table_get(struct net *net, struct tcf_ct_params *params)
int err = -ENOMEM;
mutex_lock(&zones_mutex);
- ct_ft = rhashta... |
0aa72fc37e15974827ceb72c5cf8e57085a29301 | Analyze and fix the following issue in the Linux kernel code: net: fix reference tracker mismanagement in netdev_put_lock() | Problem Details:
dev_put() releases a reference which didn't have a tracker.
References without a tracker are accounted in the tracking
code as "no_tracker". We can't free the tracker and then
call dev_put(). The references themselves will be fine
but the tracking code will think it's a double-release:
refcount_t: d... | ```diff
diff --git a/net/core/dev.c b/net/core/dev.c
index ccc4418b3163..e59f6025067c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1060,16 +1060,18 @@ struct net_device *dev_get_by_napi_id(unsigned int napi_id)
* This helper is intended for locking net_device after it has been looked up
* using a lockless l... |
82f37bd9a4d779495479c0c13152208d5400c8a4 | Analyze and fix the following issue in the Linux kernel code: net: dsa: tag_rtl8_4: set KEEP flag | Problem Details:
KEEP=1 is needed because we should respect the format of the packet as
the kernel sends it to us. Unless tx forward offloading is used, the
kernel is giving us the packet exactly as it should leave the specified
port on the wire. Until now this was not needed because the ports were
always functioning i... | ```diff
diff --git a/net/dsa/tag_rtl8_4.c b/net/dsa/tag_rtl8_4.c
index b7ed39c5419f..852c6b88079a 100644
--- a/net/dsa/tag_rtl8_4.c
+++ b/net/dsa/tag_rtl8_4.c
@@ -99,6 +99,7 @@
#define RTL8_4_REASON_TRAP 80
#define RTL8_4_LEARN_DIS BIT(5)
+#define RTL8_4_KEEP BIT(7)
#define RTL8_4_TX GENMASK(3, 0)
#defi... |
297e1f411ed4927a912c7e207ba6f978cb1f9f0e | Analyze and fix the following issue in the Linux kernel code: net: dsa: tag_rtl8_4: update format description | Problem Details:
Document the updated tag layout fields (EFID, VSEL/VIDX) and clarify
which bits are set/cleared when emitting tags.
Co-developed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Reviewed-by: Linus... | ```diff
diff --git a/net/dsa/tag_rtl8_4.c b/net/dsa/tag_rtl8_4.c
index 2464545da4d2..b7ed39c5419f 100644
--- a/net/dsa/tag_rtl8_4.c
+++ b/net/dsa/tag_rtl8_4.c
@@ -17,8 +17,8 @@
* | (8-bit) | (8-bit) |
* | Protocol [0x04] | REASON ... |
65782b2db7321d5f97c16718c4c7f6c7205a56be | Analyze and fix the following issue in the Linux kernel code: net/sched: cls_fw: fix NULL dereference of "old" filters before change() | Problem Details:
Like pointed out by Sashiko [1], since commit ed76f5edccc9 ("net: sched:
protect filter_chain list with filter_chain_lock mutex") TC filters are
added to a shared block and published to datapath before their ->change()
function is called. This is a problem for cls_fw: an invalid filter
created with the... | ```diff
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c
index 23884ef8b80c..646a730dca93 100644
--- a/net/sched/cls_fw.c
+++ b/net/sched/cls_fw.c
@@ -74,9 +74,13 @@ TC_INDIRECT_SCOPE int fw_classify(struct sk_buff *skb,
}
}
} else {
- struct Qdisc *q = tcf_block_q(tp->chain->block);
+ struct Qdisc *q;
... |
dc33e52b8ce6f2d42dce18da12dc47d6c21f2e8b | Analyze and fix the following issue in the Linux kernel code: net: wangxun: schedule hardware stats update in watchdog | Problem Details:
Hardware statistics should be updated periodically in the watchdog to
prevent 32-bit registers from overflowing. This is also required for the
upcoming pause frame accounting logic, which relies on regular statistics
sampling.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Link: https://patch.msgi... | ```diff
diff --git a/drivers/net/ethernet/wangxun/libwx/wx_hw.c b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
index 05731a50d85f..31259f69c0e2 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_hw.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
@@ -2513,6 +2513,7 @@ int wx_sw_init(struct wx *wx)
return -ENOMEM;
... |
0b73da96b6eb6b9354654f96a9d423ab22cb222d | Analyze and fix the following issue in the Linux kernel code: i3c: master: adi: Fix error propagation for CCCs | Problem Details:
adi_i3c_master_send_ccc_cmd() always returned 0, ignoring the transfer
result populated in the completion path. As a consequence, CCC command
errors were silently dropped, including the default -ETIMEDOUT and
later overwritten by adi_i3c_master_end_xfer_locked().
Fix this by returning xfer->ret so tha... | ```diff
diff --git a/drivers/i3c/master/adi-i3c-master.c b/drivers/i3c/master/adi-i3c-master.c
index fb9a48830446..047081c9f064 100644
--- a/drivers/i3c/master/adi-i3c-master.c
+++ b/drivers/i3c/master/adi-i3c-master.c
@@ -361,7 +361,7 @@ static int adi_i3c_master_send_ccc_cmd(struct i3c_master_controller *m,
cmd->... |
ef8b5229348f0719aca557c4ca5530630ae4d134 | Analyze and fix the following issue in the Linux kernel code: i3c: master: Fix error codes at send_ccc_cmd | Problem Details:
i3c_master_send_ccc_cmd_locked() would propagate cmd->err (positive,
Mx codes) to the ret variable, cascading down multiple methods until
reaching methods that explicitly stated they would return 0 on success
or negative error code. For example, the call chain:
i3c_device_enable_ibi <- i3c_dev_enabl... | ```diff
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index d0ae27a680bc..5cd4e5da2233 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -925,11 +925,17 @@ static void i3c_ccc_cmd_init(struct i3c_ccc_cmd *cmd, bool rnw, u8 id,
cmd->err = I3C_ERROR_UNKNOWN;
}
+/**
+ * i3c_master_send_ccc_cm... |
49775afa983e3e5ce8e7d00ee241791073be214d | Analyze and fix the following issue in the Linux kernel code: i3c: master: Move bus_init error suppression | Problem Details:
Prepare to fix improper Mx positive error propagation in later commits
by handling Mx error codes where the i3c_ccc_cmd command is allocated.
The CCC DISEC to broadcast address is invoked with
i3c_master_enec_disec_locked() and yields error I3C_ERROR_M2 if there
are no devices active on the bus. This i... | ```diff
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 19e33d12c558..d0ae27a680bc 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -1086,7 +1086,8 @@ int i3c_master_entdaa_locked(struct i3c_master_controller *master)
EXPORT_SYMBOL_GPL(i3c_master_entdaa_locked);
static int i3c_master_e... |
42247fffb3044dd99c405904fef78bfe6d9d58f6 | Analyze and fix the following issue in the Linux kernel code: i3c: master: Move entdaa error suppression | Problem Details:
Prepare to fix improper Mx positive error propagation in later commits
by handling Mx error codes where the i3c_ccc_cmd command is allocated.
The CCC ENTDAA is invoked with i3c_master_entdaa_locked() and yields
error I3C_ERROR_M2 if there are no devices active on the bus. Some
controllers may also yiel... | ```diff
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index fc2e91ea8e1c..19e33d12c558 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -1077,6 +1077,10 @@ int i3c_master_entdaa_locked(struct i3c_master_controller *master)
ret = i3c_master_send_ccc_cmd_locked(master, &cmd);
i3c_ccc_cmd_des... |
19a1b61fa623748f37f467e7813c58a2a792b90c | Analyze and fix the following issue in the Linux kernel code: i3c: master: Move rstdaa error suppression | Problem Details:
Prepare to fix improper Mx positive error propagation in later
commits by handling Mx error codes where the i3c_ccc_cmd command
is allocated. Two of the four i3c_master_rstdaa_locked() are error
paths that already suppressed the return value, the remaining two
are changed to handle the I3C_ERROR_M2 Mx ... | ```diff
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 6dd3c0fd7823..fc2e91ea8e1c 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -1043,6 +1043,10 @@ static int i3c_master_rstdaa_locked(struct i3c_master_controller *master,
ret = i3c_master_send_ccc_cmd_locked(master, &cmd);
i3c_ccc_... |
256cc1f1305a8e5dcadf8ca208d04a3acadd26f1 | Analyze and fix the following issue in the Linux kernel code: i3c: dw: Fix memory leak in dw_i3c_master_i3c_xfers() | Problem Details:
The dw_i3c_master_i3c_xfers() function allocates memory for the xfer
structure using dw_i3c_master_alloc_xfer(). If pm_runtime_resume_and_get()
fails, the function returns without freeing the allocated xfer, resulting
in a memory leak.
Since dw_i3c_master_free_xfer() is a thin wrapper around kfree(), ... | ```diff
diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
index b87073d2f8af..259e4f527665 100644
--- a/drivers/i3c/master/dw-i3c-master.c
+++ b/drivers/i3c/master/dw-i3c-master.c
@@ -7,6 +7,7 @@
#include <linux/bitfield.h>
#include <linux/bitops.h>
+#include <linux/cleanup.h>
#i... |
d7665c3b4f575251e449e2656879392346ca612b | Analyze and fix the following issue in the Linux kernel code: i3c: master: renesas: Fix memory leak in renesas_i3c_i3c_xfers() | Problem Details:
The xfer structure allocated by renesas_i3c_alloc_xfer() was never freed
in the renesas_i3c_i3c_xfers() function. Use the __free(kfree) cleanup
attribute to automatically free the memory when the variable goes out of
scope.
Fixes: d028219a9f14 ("i3c: master: Add basic driver for the Renesas I3C contro... | ```diff
diff --git a/drivers/i3c/master/renesas-i3c.c b/drivers/i3c/master/renesas-i3c.c
index d9f5b30a4b2f..a8a9e89a9710 100644
--- a/drivers/i3c/master/renesas-i3c.c
+++ b/drivers/i3c/master/renesas-i3c.c
@@ -8,6 +8,7 @@
#include <linux/bitfield.h>
#include <linux/bitops.h>
+#include <linux/cleanup.h>
#include <... |
19d6dd322c3f05550606dbfcbafb5f6989975c02 | Analyze and fix the following issue in the Linux kernel code: i3c: master: dw-i3c: Balance PM runtime usage count on probe failure | Problem Details:
When DW_I3C_DISABLE_RUNTIME_PM_QUIRK is set, the probe function calls
pm_runtime_get_noresume() to prevent runtime suspend. However, if
i3c_master_register() fails, the error path does not balance this
call, leaving the usage count incremented.
Add pm_runtime_put_noidle() in the error cleanup path to ... | ```diff
diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
index 3379cb16eeca..b87073d2f8af 100644
--- a/drivers/i3c/master/dw-i3c-master.c
+++ b/drivers/i3c/master/dw-i3c-master.c
@@ -1667,6 +1667,8 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
return 0;
err_disable_pm... |
bef1eef667186cedb0bc6d152464acb3c97d5f72 | Analyze and fix the following issue in the Linux kernel code: i3c: master: dw-i3c: Fix missing reset assertion in remove() callback | Problem Details:
The reset line acquired during probe is currently left deasserted when
the driver is unbound.
Switch to devm_reset_control_get_optional_exclusive_deasserted() to
ensure the reset is automatically re-asserted by the devres core when
the driver is removed.
Fixes: 62fe9d06f570 ("i3c: dw: Add power manag... | ```diff
diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
index d6bdb32397fb..3379cb16eeca 100644
--- a/drivers/i3c/master/dw-i3c-master.c
+++ b/drivers/i3c/master/dw-i3c-master.c
@@ -1606,13 +1606,11 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
if (IS_ERR(master->pclk))... |
acfcdff920dcab2b71536f04684e92c7933f7f40 | Analyze and fix the following issue in the Linux kernel code: i3c: fix missing newline in dev_err messages | Problem Details:
Add missing newline to dev_err messages in:
- drivers/i3c/master.c
- drivers/i3c/master/svc-i3c-master.c
Signed-off-by: haoyu.lu <hechushiguitu666@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://patch.msgid.link/20260317034015.63... | ```diff
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index c32847bc4d0d..6dd3c0fd7823 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -2423,7 +2423,7 @@ of_i3c_master_add_i2c_boardinfo(struct i3c_master_controller *master,
* DEFSLVS command.
*/
if (boardinfo->base.flags & I2C_CLIENT_... |
95aed2af87ec43fa7624cc81dd13d37824ad4972 | Analyze and fix the following issue in the Linux kernel code: crypto: qat - fix IRQ cleanup on 6xxx probe failure | Problem Details:
When adf_dev_up() partially completes and then fails, the IRQ
handlers registered during adf_isr_resource_alloc() are not detached
before the MSI-X vectors are released.
Since the device is enabled with pcim_enable_device(), calling
pci_alloc_irq_vectors() internally registers pcim_msi_release() as a
... | ```diff
diff --git a/drivers/crypto/intel/qat/qat_6xxx/adf_drv.c b/drivers/crypto/intel/qat/qat_6xxx/adf_drv.c
index 0684ea9be2ac..c52462a48c34 100644
--- a/drivers/crypto/intel/qat/qat_6xxx/adf_drv.c
+++ b/drivers/crypto/intel/qat/qat_6xxx/adf_drv.c
@@ -209,8 +209,10 @@ static int adf_probe(struct pci_dev *pdev, const... |
1ee57ab93b75eb59f426aef37b5498a7ffc28278 | Analyze and fix the following issue in the Linux kernel code: crypto: hisilicon - Fix dma_unmap_single() direction | Problem Details:
The direction used to map the buffer skreq->iv is DMA_TO_DEVICE but it is
unmapped with direction DMA_BIDIRECTIONAL in the error path.
Change the unmap to match the mapping.
Fixes: 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas ... | ```diff
diff --git a/drivers/crypto/hisilicon/sec/sec_algs.c b/drivers/crypto/hisilicon/sec/sec_algs.c
index 54e24fd7b9be..85eecbb40e7e 100644
--- a/drivers/crypto/hisilicon/sec/sec_algs.c
+++ b/drivers/crypto/hisilicon/sec/sec_algs.c
@@ -844,7 +844,7 @@ err_free_elements:
if (crypto_skcipher_ivsize(atfm))
dma_unm... |
655ef638a2bc3cd0a9eff99a02f83cab94a3a917 | Analyze and fix the following issue in the Linux kernel code: crypto: talitos - fix SEC1 32k ahash request limitation | Problem Details:
Since commit c662b043cdca ("crypto: af_alg/hash: Support
MSG_SPLICE_PAGES"), the crypto core may pass large scatterlists spanning
multiple pages to drivers supporting ahash operations. As a result, a
driver can now receive large ahash requests.
The SEC1 engine has a limitation where a single descripto... | ```diff
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index e8c0db687c57..4c325fa0eac1 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -12,6 +12,7 @@
* All rights reserved.
*/
+#include <linux/workqueue.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <... |
01d798e9feb30212952d4e992801ba6bd6a82351 | Analyze and fix the following issue in the Linux kernel code: crypto: jitterentropy - replace long-held spinlock with mutex | Problem Details:
jent_kcapi_random() serializes the shared jitterentropy state, but it
currently holds a spinlock across the jent_read_entropy() call. That
path performs expensive jitter collection and SHA3 conditioning, so
parallel readers can trigger stalls as contending waiters spin for
the same lock.
To prevent no... | ```diff
diff --git a/crypto/jitterentropy-kcapi.c b/crypto/jitterentropy-kcapi.c
index 7c880cf34c52..5edc6d285aa1 100644
--- a/crypto/jitterentropy-kcapi.c
+++ b/crypto/jitterentropy-kcapi.c
@@ -42,6 +42,7 @@
#include <linux/fips.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/mutex.h>
#incl... |
f94f6cff1dcf9296879c7242dda8171320188ed7 | Analyze and fix the following issue in the Linux kernel code: crypto: hisilicon - fix the format string type error | Problem Details:
1. The return value val of sec_debugfs_atomic64_get is of the
u64 type, but %lld instead of %llu is used in DEFINE_DEBUGFS_ATTRIBUTE.
Fix it.
2. In debugfs.c, since the types of q_depth and xeq_depth are u16,
the results of q_depth - 1 and xeq_depth - 1 are int rather than
u16. Use %d for int.
Signed-... | ```diff
diff --git a/drivers/crypto/hisilicon/debugfs.c b/drivers/crypto/hisilicon/debugfs.c
index 5d8b4112c543..e5878558dc64 100644
--- a/drivers/crypto/hisilicon/debugfs.c
+++ b/drivers/crypto/hisilicon/debugfs.c
@@ -305,7 +305,7 @@ static int q_dump_param_parse(struct hisi_qm *qm, char *s,
ret = kstrtou32(presul... |
02c64052fad03699b9c6d1df2f9b444d17e4ac50 | Analyze and fix the following issue in the Linux kernel code: crypto: ccree - fix a memory leak in cc_mac_digest() | Problem Details:
Add cc_unmap_result() if cc_map_hash_request_final()
fails to prevent potential memory leak.
Fixes: 63893811b0fc ("crypto: ccree - add ahash support")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> | ```diff
diff --git a/drivers/crypto/ccree/cc_hash.c b/drivers/crypto/ccree/cc_hash.c
index c6d085c8ff79..73179bf725a7 100644
--- a/drivers/crypto/ccree/cc_hash.c
+++ b/drivers/crypto/ccree/cc_hash.c
@@ -1448,6 +1448,7 @@ static int cc_mac_digest(struct ahash_request *req)
if (cc_map_hash_request_final(ctx->drvdata, s... |
a438423409692833e3b0f56a1d8440ac1761e594 | Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Fix pf_get_sched_priority() function signature | Problem Details:
The pf_get_sched_priority() function returns scheduling priority
that we defined as u32 so while it works we shouldn't return int.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20260402191726.4932-... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
index 2f376b5fb088..658e9b048751 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
@@ -2500,7 +2500,7 @@ static int pf_provision_sched_priority(struct xe_gt... |
3d14bd48e3a77091cbce637a12c2ae31b4a1687c | Analyze and fix the following issue in the Linux kernel code: crypto: algif_aead - Fix minimum RX size check for decryption | Problem Details:
The check for the minimum receive buffer size did not take the
tag size into account during decryption. Fix this by adding the
required extra length.
Reported-by: syzbot+aa11561819dc42ebbc7c@syzkaller.appspotmail.com
Reported-by: Daniel Pouzzner <douzzer@mega.nu>
Fixes: d887c52d6ae4 ("crypto: algif_a... | ```diff
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c
index dda15bb05e89..f8bd45f7dc83 100644
--- a/crypto/algif_aead.c
+++ b/crypto/algif_aead.c
@@ -144,7 +144,7 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,
if (usedpages < outlen) {
size_t less = outlen - usedpages;
- if (used ... |
d702c3408213bb12bd570bb97204d8340d141c51 | Analyze and fix the following issue in the Linux kernel code: X.509: Fix out-of-bounds access when parsing extensions | Problem Details:
Leo reports an out-of-bounds access when parsing a certificate with
empty Basic Constraints or Key Usage extension because the first byte of
the extension is read before checking its length. Fix it.
The bug can be triggered by an unprivileged user by submitting a
specially crafted certificate to the ... | ```diff
diff --git a/crypto/asymmetric_keys/x509_cert_parser.c b/crypto/asymmetric_keys/x509_cert_parser.c
index 37e4fb9da106..bfd10f0195e0 100644
--- a/crypto/asymmetric_keys/x509_cert_parser.c
+++ b/crypto/asymmetric_keys/x509_cert_parser.c
@@ -609,10 +609,10 @@ int x509_process_extension(void *context, size_t hdrlen... |
31d00156e50ecad37f2cb6cbf04aaa9a260505ef | Analyze and fix the following issue in the Linux kernel code: crypto: af_alg - Fix page reassignment overflow in af_alg_pull_tsgl | Problem Details:
When page reassignment was added to af_alg_pull_tsgl the original
loop wasn't updated so it may try to reassign one more page than
necessary.
Add the check to the reassignment so that this does not happen.
Also update the comment which still refers to the obsolete offset
argument.
Reported-by: syzbo... | ```diff
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
index 437f3e77c7e0..dd0e5be4d8c0 100644
--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -705,8 +705,8 @@ void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst)
* Assumption: caller created af_alg_count_tsgl(len)
* SG entries in dst.
... |
1603cbb64173a0e9fa7500f2a686f4aa011c58b9 | Analyze and fix the following issue in the Linux kernel code: clk: visconti: pll: initialize clk_init_data to zero | Problem Details:
Sashiko reported the following:
> The struct clk_init_data init is declared on the stack without being
> fully zero-initialized. While fields like name, flags, parent_names,
> num_parents, and ops are explicitly assigned, the parent_data and
> parent_hws fields are left containing stack garbage.
clk_... | ```diff
diff --git a/drivers/clk/visconti/pll.c b/drivers/clk/visconti/pll.c
index 6fd02c4b641e..805b95481281 100644
--- a/drivers/clk/visconti/pll.c
+++ b/drivers/clk/visconti/pll.c
@@ -249,7 +249,7 @@ static struct clk_hw *visconti_register_pll(struct visconti_pll_provider *ctx,
const struct visconti_pll_ra... |
32b0c7aac1a2d17373b38fcfd4d5f352281892f7 | Analyze and fix the following issue in the Linux kernel code: clk: fsl-sai: Extract clock setup into fsl_sai_clk_register() | Problem Details:
Create helper function fsl_sai_clk_register() to set up and register
SAI clock. Rename BCLK specific struct fsl_sai_clk members with bclk_
prefix. Use of_node_full_name(dev->of_node) and clock name to register
uniquely named clock. This is done in preparation for the follow up
patch, which adds MCLK su... | ```diff
diff --git a/drivers/clk/clk-fsl-sai.c b/drivers/clk/clk-fsl-sai.c
index 27925893c4c2..c595d340e00f 100644
--- a/drivers/clk/clk-fsl-sai.c
+++ b/drivers/clk/clk-fsl-sai.c
@@ -26,20 +26,71 @@ struct fsl_sai_data {
};
struct fsl_sai_clk {
- struct clk_divider div;
- struct clk_gate gate;
+ struct clk_divider ... |
57205e2dd962d2c0e2093cf9b06dad6ba7737844 | Analyze and fix the following issue in the Linux kernel code: bpf: Delete unused variable | Problem Details:
'cnt' is set, but not used. Delete it.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604111401.eqzyF2kx-lkp@intel.com/
Fixes: 2c167d91775b ("bpf: change logging scheme for live stack analysis")
Link: https://lore.kernel.org/r/20260411141447.45932-1-ale... | ```diff
diff --git a/kernel/bpf/liveness.c b/kernel/bpf/liveness.c
index 9bb6574d73fe..59d990237cbd 100644
--- a/kernel/bpf/liveness.c
+++ b/kernel/bpf/liveness.c
@@ -306,7 +306,7 @@ static inline bool update_insn(struct bpf_verifier_env *env,
/* Fixed-point computation of @live_before marks */
static void update_ins... |
5160e584c3616e744252d0a571264f9745bc6e11 | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: make str_has_pfx return pointer past the prefix | Problem Details:
Change str_has_pfx() to return a pointer to the first character after
the prefix, thus eliminating the repetitive (s + sizeof(PFX) - 1)
patterns.
Acked-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Acked-by: Mykyta Yatsenko <yatsenko@meta.com>
Reviewed-by: Puranjay Mohan <puranjay@kernel.org>
Signed-off... | ```diff
diff --git a/tools/testing/selftests/bpf/test_loader.c b/tools/testing/selftests/bpf/test_loader.c
index 96ed70e01fe5..fa6147607c4d 100644
--- a/tools/testing/selftests/bpf/test_loader.c
+++ b/tools/testing/selftests/bpf/test_loader.c
@@ -11,8 +11,12 @@
#include "cap_helpers.h"
#include "jit_disasm_helpers.h"... |
cdd54fe98c00549264a92613af6bb0e9a5fd0d1c | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: fix __jited_unpriv tag name | Problem Details:
__jited_unpriv was using "test_jited=" as its tag name, same as the
priv variant __jited. Fix by using "test_jited_unpriv=".
Fixes: 7d743e4c759c ("selftests/bpf: __jited test tag to check disassembly after jit")
Acked-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Reviewed-by: Puranjay Mohan <puranjay@ke... | ```diff
diff --git a/tools/testing/selftests/bpf/progs/bpf_misc.h b/tools/testing/selftests/bpf/progs/bpf_misc.h
index 4b313374c5f1..7e99fe8555e0 100644
--- a/tools/testing/selftests/bpf/progs/bpf_misc.h
+++ b/tools/testing/selftests/bpf/progs/bpf_misc.h
@@ -140,7 +140,7 @@
#define __msg_unpriv(msg) __attribute__((btf... |
9ce4a8c07b28cdd70f6ca38b60bf688c27dbbfb9 | Analyze and fix the following issue in the Linux kernel code: sysfs: attribute_group: Respect is_visible_const() when changing owner | Problem Details:
The call to grp->is_visible in sysfs_group_attrs_change_owner() was
missed when support for is_visible_const() was added.
Check for both is_visible variants there too.
Fixes: 7dd9fdb4939b ("sysfs: attribute_group: enable const variants of is_visible()")
Cc: stable@vger.kernel.org
Reported-by: Michael... | ```diff
diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c
index e1e639f515a0..989edd6c6c23 100644
--- a/fs/sysfs/group.c
+++ b/fs/sysfs/group.c
@@ -517,8 +517,11 @@ static int sysfs_group_attrs_change_owner(struct kobject *kobj,
struct attribute *const *attr;
for (i = 0, attr = grp->attrs; *attr; i++, attr++) {
... |
8602018b1f17fbdaa5e5d79f4c8603ad20640c12 | Analyze and fix the following issue in the Linux kernel code: iommufd: Fix a race with concurrent allocation and unmap | Problem Details:
iopt_unmap_iova_range() releases the lock on iova_rwsem inside the loop
body when getting to the more expensive unmap operations. This is fine on
its own, except the loop condition is based on the first area that matches
the unmap address range. If a concurrent call to map picks an area that
was unmapp... | ```diff
diff --git a/drivers/iommu/iommufd/io_pagetable.c b/drivers/iommu/iommufd/io_pagetable.c
index ee003bb2f647..24d4917105d9 100644
--- a/drivers/iommu/iommufd/io_pagetable.c
+++ b/drivers/iommu/iommufd/io_pagetable.c
@@ -814,6 +814,16 @@ again:
unmapped_bytes += area_last - area_first + 1;
down_write(&iop... |
a2225b6e834a838ae3c93709760edc0a169eb2f2 | Analyze and fix the following issue in the Linux kernel code: driver core: Don't let a device probe until it's ready | Problem Details:
The moment we link a "struct device" into the list of devices for the
bus, it's possible probe can happen. This is because another thread
can load the driver at any time and that can cause the device to
probe. This has been seen in practice with a stack crawl that looks
like this [1]:
really_probe()... | ```diff
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 09b98f02f559..984d6bfbd6e4 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -3688,6 +3688,21 @@ int device_add(struct device *dev)
fw_devlink_link_device(dev);
}
+ /*
+ * The moment the device was linked into the bus's "klist_devi... |
c4c3fc872d2a05bf10372233c98e81344e685cdf | Analyze and fix the following issue in the Linux kernel code: spi: sn-f-ospi: fix incorrect return code for invalid num-cs | Problem Details:
Returning -ENOMEM for an invalid num-cs value is semantically wrong. Use
-EINVAL instead.
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260411-ispi-v1-1-af384e81c4c8@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org> | ```diff
diff --git a/drivers/spi/spi-sn-f-ospi.c b/drivers/spi/spi-sn-f-ospi.c
index 3c61c799723b..b459d51cb3a8 100644
--- a/drivers/spi/spi-sn-f-ospi.c
+++ b/drivers/spi/spi-sn-f-ospi.c
@@ -625,7 +625,7 @@ static int f_ospi_probe(struct platform_device *pdev)
of_property_read_u32(dev->of_node, "num-cs", &num_cs);
... |
5e75c1d4d386fb7d64e2b19355e4d38dd4fd8845 | Analyze and fix the following issue in the Linux kernel code: spi: cadence-qspi: Revert the filtering of certain opcodes in ODTR | Problem Details:
I got mislead while analyzing the driver by the fact that the second
opcode byte was in all cases smashed:
if (op->cmd.dtr)
opcode = op->cmd.opcode >> 8;
else
opcode = op->cmd.opcode;
While at a first glance this doesn't let a chance to the second byte ... | ```diff
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index 2ead419e896e..b6f7f95e8bd3 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -1544,10 +1544,6 @@ static bool cqspi_supports_mem_op(struct spi_mem *mem,
if (op->data.nbytes && op->d... |
02d58df0a5c12e5dcff0a690973537fc1b27db3e | Analyze and fix the following issue in the Linux kernel code: dt-bindings: usb: generic-ehci: fix schema structure and add at91sam9g45 constraints | Problem Details:
Add clock and phy constraints for atmel,at91sam9g45-ehci and reorganize
the allOf section to fix dtbs_check warnings.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Charan Pedumuru <charan.pedumuru@gmail.com>
Link: https://patch.msgid.link/20260327-atmel-usb-v4-3-eb8b6e49b29d@gmail.co... | ```diff
diff --git a/Documentation/devicetree/bindings/usb/atmel-usb.txt b/Documentation/devicetree/bindings/usb/atmel-usb.txt
index c09685283109..bf2149e5f0b3 100644
--- a/Documentation/devicetree/bindings/usb/atmel-usb.txt
+++ b/Documentation/devicetree/bindings/usb/atmel-usb.txt
@@ -1,29 +1,5 @@
Atmel SOC USB contr... |
e7d219f4302182f956bc25e1b76bfe14009847e7 | Analyze and fix the following issue in the Linux kernel code: drivers/usb/host: Fix spelling error 'seperate' -> 'separate' | Problem Details:
Fix typo in comment where 'seperate' should be 'separate'.
Signed-off-by: Qinghua Zhao <zqh1630@126.com>
Link: https://patch.msgid.link/20260409145428.18130-1-zqh1630@126.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/usb/host/xhci-mvebu.c b/drivers/usb/host/xhci-mvebu.c
index 257e4d79971f..f91c5004fade 100644
--- a/drivers/usb/host/xhci-mvebu.c
+++ b/drivers/usb/host/xhci-mvebu.c
@@ -30,7 +30,7 @@ static void xhci_mvebu_mbus_config(void __iomem *base,
writel(0, base + USB3_WIN_BASE(win));
}
- /* ... |
8d7ea40011551c2ec915ee0260cae1c746c63156 | Analyze and fix the following issue in the Linux kernel code: s390/zcrypt: Fix warning about wrong kernel doc comment | Problem Details:
Fix this warning:
Warning: drivers/s390/crypto/zcrypt_msgtype6.c:1253 This comment
starts with '/**', but isn't a kernel-doc comment. Refer to
Documentation/doc-guide/kernel-doc.rst
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202603252022.vEojGo3V... | ```diff
diff --git a/drivers/s390/crypto/zcrypt_msgtype6.c b/drivers/s390/crypto/zcrypt_msgtype6.c
index bab8860417de..99a6c88ad52f 100644
--- a/drivers/s390/crypto/zcrypt_msgtype6.c
+++ b/drivers/s390/crypto/zcrypt_msgtype6.c
@@ -1254,7 +1254,7 @@ out:
return rc;
}
-/**
+/*
* Prepare a type6 CPRB message for ra... |
497fa510ee46af2bf04991cd64cb919266d0ca5a | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Add test for add_const base_id consistency | Problem Details:
Add a test to verifier_linked_scalars that exercises the base_id
consistency check for BPF_ADD_CONST linked scalars during state
pruning.
With the fix, pruning fails and the verifier discovers the true
branch's R3 is too wide for the stack access.
# LDLIBS=-static PKG_CONFIG='pkg-config --static' .... | ```diff
diff --git a/tools/testing/selftests/bpf/progs/verifier_linked_scalars.c b/tools/testing/selftests/bpf/progs/verifier_linked_scalars.c
index 60a6f246e2d1..d571fbfc86a3 100644
--- a/tools/testing/selftests/bpf/progs/verifier_linked_scalars.c
+++ b/tools/testing/selftests/bpf/progs/verifier_linked_scalars.c
@@ -6... |
2f2ec8e7730e21fc9bd49e0de9cdd58213ea24d0 | Analyze and fix the following issue in the Linux kernel code: bpf: Enforce regsafe base id consistency for BPF_ADD_CONST scalars | Problem Details:
When regsafe() compares two scalar registers that both carry
BPF_ADD_CONST, check_scalar_ids() maps their full compound id
(aka base | BPF_ADD_CONST flag) as one idmap entry. However,
it never verifies that the underlying base ids, that is, with
the flag stripped are consistent with existing idmap mapp... | ```diff
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 566311dd4fba..530bc0c2f116 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -20130,6 +20130,13 @@ static bool check_ids(u32 old_id, u32 cur_id, struct bpf_idmap *idmap)
* and r7.id=0 (both independent), without temp IDs both wou... |
3f3a2aefbc661b837c8e344f944982d61c2ae037 | Analyze and fix the following issue in the Linux kernel code: iavf: fix kernel-doc comment style in iavf_ethtool.c | Problem Details:
iavf_ethtool.c contains 31 kernel-doc comment blocks using the legacy
`**/` terminator instead of the correct single `*/`. Two function
headers also use a colon separator (`iavf_get_channels:`,
`iavf_set_channels:`) instead of the ` - ` dash required by kernel-doc.
Additionally several comments embed ... | ```diff
diff --git a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
index 1cd1f3f2930a..a615d599b88e 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
@@ -32,7 +32,7 @@
* statistics array. Thus, every stati... |
02f72964395911e7a09bb2ea2fe6f79eda4ea2c2 | Analyze and fix the following issue in the Linux kernel code: net: airoha: Fix FE_PSE_BUF_SET configuration if PPE2 is available | Problem Details:
airoha_fe_set routine is used to set specified bits to 1 in the selected
register. In the FE_PSE_BUF_SET case this can due to a overestimation of
the required buffers for I/O queues since we can miss to set some bits
of PSE_ALLRSV_MASK subfield to 0. Fix the issue relying on airoha_fe_rmw
routine inste... | ```diff
diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c
index 9285a68f435f..c14cdce588a7 100644
--- a/drivers/net/ethernet/airoha/airoha_eth.c
+++ b/drivers/net/ethernet/airoha/airoha_eth.c
@@ -293,16 +293,18 @@ static void airoha_fe_pse_ports_init(struct airoha_eth *eth... |
71934b9e6f36b1786bd969c0e1d2de8f9bd65f0f | Analyze and fix the following issue in the Linux kernel code: net: dsa: mxl862xx: don't skip early bridge port configuration | Problem Details:
mxl862xx_bridge_port_set() is currently guarded by the
mxl8622_port->setup_done flag, as the early call to
mxl862xx_bridge_port_set() from mxl862xx_port_stp_state_set() would
otherwise cause a NULL-pointer dereference on unused ports which don't
have dp->cpu_dp despite not being a CPU port.
Using the ... | ```diff
diff --git a/drivers/net/dsa/mxl862xx/mxl862xx.c b/drivers/net/dsa/mxl862xx/mxl862xx.c
index 9a9714c4859b..f65525aff5e5 100644
--- a/drivers/net/dsa/mxl862xx/mxl862xx.c
+++ b/drivers/net/dsa/mxl862xx/mxl862xx.c
@@ -278,7 +278,7 @@ static int mxl862xx_set_bridge_port(struct dsa_switch *ds, int port)
bool enabl... |
bf9a38803b2626b01cc769aaf13485d8650f576f | Analyze and fix the following issue in the Linux kernel code: net: hamradio: 6pack: fix uninit-value in sixpack_receive_buf | Problem Details:
sixpack_receive_buf() does not properly skip bytes with TTY error flags.
The while loop iterates through the flags buffer but never advances the
data pointer (cp), and passes the original count (including error bytes)
to sixpack_decode(). This causes sixpack_decode() to process bytes that
should have b... | ```diff
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 885992951e8a..c8b2dc5c1bec 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -391,7 +391,6 @@ static void sixpack_receive_buf(struct tty_struct *tty, const u8 *cp,
const u8 *fp, size_t count)
{
s... |
957c30c06748ffe8ab20c242f1a5506447436d6e | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: adjust verifier_log buffers | Problem Details:
The new liveness analysis in liveness.c adds verbose output at
BPF_LOG_LEVEL2, making the verifier log for good_prog exceed the 1024-byte
reference buffer. When the reference is truncated in fixed mode, the
rolling mode captures the actual tail of the full log, which doesn't match
the truncated referen... | ```diff
diff --git a/tools/testing/selftests/bpf/prog_tests/verifier_log.c b/tools/testing/selftests/bpf/prog_tests/verifier_log.c
index aaa2854974c0..c01c0114af1b 100644
--- a/tools/testing/selftests/bpf/prog_tests/verifier_log.c
+++ b/tools/testing/selftests/bpf/prog_tests/verifier_log.c
@@ -25,10 +25,10 @@ static bo... |
d6e152d905bdb1f32f9d99775e2f453350399a6a | Analyze and fix the following issue in the Linux kernel code: clockevents: Prevent timer interrupt starvation | Problem Details:
Calvin reported an odd NMI watchdog lockup which claims that the CPU locked
up in user space. He provided a reproducer, which sets up a timerfd based
timer and then rearms it in a loop with an absolute expiry time of 1ns.
As the expiry time is in the past, the timer ends up as the first expiring
timer... | ```diff
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index b0df28ddd394..50cdc9da8d32 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -80,6 +80,7 @@ enum clock_event_state {
* @shift: nanoseconds to cycles divisor (power of two)
* @state_use_accessors:current sta... |
4406942e65ca128c56c67443832988873c21d2e9 | Analyze and fix the following issue in the Linux kernel code: bpf: Fix RCU stall in bpf_fd_array_map_clear() | Problem Details:
Add a missing cond_resched() in bpf_fd_array_map_clear() loop.
For PROG_ARRAY maps with many entries this loop calls
prog_array_map_poke_run() per entry which can be expensive, and
without yielding this can cause RCU stalls under load:
rcu: Stack dump where RCU GP kthread last ran:
CPU: 0 UID: 0 ... | ```diff
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c
index 33de68c95ad8..5e25e0353509 100644
--- a/kernel/bpf/arraymap.c
+++ b/kernel/bpf/arraymap.c
@@ -1015,8 +1015,10 @@ static void bpf_fd_array_map_clear(struct bpf_map *map, bool need_defer)
struct bpf_array *array = container_of(map, struct bpf_arra... |
4cbee026db54cad39c39db4d356100cb133412b3 | Analyze and fix the following issue in the Linux kernel code: bpf: return VMA snapshot from task_vma iterator | Problem Details:
Holding the per-VMA lock across the BPF program body creates a lock
ordering problem when helpers acquire locks that depend on mmap_lock:
vm_lock -> i_rwsem -> mmap_lock -> vm_lock
Snapshot the VMA under the per-VMA lock in _next() via memcpy(), then
drop the lock before returning. The BPF program ... | ```diff
diff --git a/kernel/bpf/task_iter.c b/kernel/bpf/task_iter.c
index 87e87f18913d..e791ae065c39 100644
--- a/kernel/bpf/task_iter.c
+++ b/kernel/bpf/task_iter.c
@@ -808,7 +808,7 @@ static inline void bpf_iter_mmput_async(struct mm_struct *mm)
struct bpf_iter_task_vma_kern_data {
struct task_struct *task;
str... |
d8e27d2d22b6e2df3a0125b8c08e9aace38c954c | Analyze and fix the following issue in the Linux kernel code: bpf: fix mm lifecycle in open-coded task_vma iterator | Problem Details:
The open-coded task_vma iterator reads task->mm locklessly and acquires
mmap_read_trylock() but never calls mmget(). If the task exits
concurrently, the mm_struct can be freed as it is not
SLAB_TYPESAFE_BY_RCU, resulting in a use-after-free.
Safely read task->mm with a trylock on alloc_lock and acquir... | ```diff
diff --git a/kernel/bpf/task_iter.c b/kernel/bpf/task_iter.c
index 98d9b4c0daff..c1f5fbe9dc2f 100644
--- a/kernel/bpf/task_iter.c
+++ b/kernel/bpf/task_iter.c
@@ -9,6 +9,7 @@
#include <linux/bpf_mem_alloc.h>
#include <linux/btf_ids.h>
#include <linux/mm_types.h>
+#include <linux/sched/mm.h>
#include "mmap_u... |
2193af26a149acfb7a66f49397665640c2a60d8c | Analyze and fix the following issue in the Linux kernel code: sched_ext: Drop redundant rq-locked check from scx_bpf_task_cgroup() | Problem Details:
scx_kf_allowed_on_arg_tasks() runs both an scx_kf_allowed(__SCX_KF_RQ_LOCKED)
mask check and a kf_tasks[] check. After the preceding call-site fixes,
every SCX_CALL_OP_TASK*() invocation has kf_mask & __SCX_KF_RQ_LOCKED
non-zero, so the mask check is redundant whenever the kf_tasks[] check
passes. Drop... | ```diff
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index fa266fd7afd5..be5b6755f1d1 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -540,15 +540,18 @@ do { \
})
/*
- * Some kfuncs are allowed only on the tasks that are subjects of the
- * in-progress scx_ops operation for, e.g., locki... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.