id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
c1be952f1eb2939a38db66780854e870700eaf4c | Analyze and fix the following issue in the Linux kernel code: Documentation: amd-sbi: Wrap miscdevice listing snippet in literal code block | Problem Details:
Device file listing (ls output) is shown as long-running paragraph
instead. Wrap it in literal code block.
Fixes: 4d95514d14e874 ("misc: amd-sbi: Add document for AMD SB IOCTL description")
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by:... | ```diff
diff --git a/Documentation/misc-devices/amd-sbi.rst b/Documentation/misc-devices/amd-sbi.rst
index 5648fc6ec572..07ceb44fbe5e 100644
--- a/Documentation/misc-devices/amd-sbi.rst
+++ b/Documentation/misc-devices/amd-sbi.rst
@@ -28,8 +28,10 @@ MCAMSR and register xfer commands.
Register sets is common across APM... |
1f37cae5d1c7c36c7bf7d2a5f5ebb3bc4a87020b | Analyze and fix the following issue in the Linux kernel code: xfs-doc: Fix typo error | Problem Details:
Online fsck may take longer than offline fsck...
Signed-off-by: Gou Hao <gouhao@uniontech.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251105013506.358-1-gouhao@uniontech.com> | ```diff
diff --git a/Documentation/filesystems/xfs/xfs-online-fsck-design.rst b/Documentation/filesystems/xfs/xfs-online-fsck-design.rst
index 8cbcd3c26434..55e727b5f12e 100644
--- a/Documentation/filesystems/xfs/xfs-online-fsck-design.rst
+++ b/Documentation/filesystems/xfs/xfs-online-fsck-design.rst
@@ -249,7 +249,7 ... |
285f79bebf5b36a9ec57c89aeb3809051ffcb466 | Analyze and fix the following issue in the Linux kernel code: Documentation: parport-lowlevel: Separate function listing code blocks | Problem Details:
Commit be9d0411f1608a ("parport-lowlevel.txt: standardize document
format") reSTify parport interface documentation but forgets to properly
mark function listing code blocks up. As such, these are rendered as
long-running normal paragraph instead.
Fix them by adding missing separator between the code ... | ```diff
diff --git a/Documentation/driver-api/parport-lowlevel.rst b/Documentation/driver-api/parport-lowlevel.rst
index 0633d70ffda7..a907e279f509 100644
--- a/Documentation/driver-api/parport-lowlevel.rst
+++ b/Documentation/driver-api/parport-lowlevel.rst
@@ -7,6 +7,7 @@ PARPORT interface documentation
Described he... |
fc9e9a39cc98de2f6dc5c927bfbcce9db40978d2 | Analyze and fix the following issue in the Linux kernel code: tools/docs/get_abi.py: fix get_abi library directory | Problem Details:
changeset a5dd93016f20 ("docs: move get_abi.py to tools/docs") moved
the script location, but didn't update library location, causing it
to fail.
Fixes: a5dd93016f20 ("docs: move get_abi.py to tools/docs")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet ... | ```diff
diff --git a/tools/docs/get_abi.py b/tools/docs/get_abi.py
index 7ce4748a46d2..da69e77559cc 100755
--- a/tools/docs/get_abi.py
+++ b/tools/docs/get_abi.py
@@ -14,7 +14,7 @@ import sys
# Import Python modules
-LIB_DIR = "lib/abi"
+LIB_DIR = "../../scripts/lib/abi"
SRC_DIR = os.path.dirname(os.path.realpath... |
e1cf4aac38648c726e2859d8bcf43f2944526f47 | Analyze and fix the following issue in the Linux kernel code: docs: Fix missing word in spectre.rst | Problem Details:
Corrects a missing word in the hardware vulnerability docs.
Signed-off-by: Will Pierce <pierwill@protonmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <Ru-d3ltJIyY4Oc6tzHwpSiDeFwSLHEzd7Utcr6iobgIy1B8wLRI4f6JiCb0a9n-0-r19d0dyLL3yS8KWVcyHfpkyDErWXYTkI3AJfUPTNCc=@protonmail.com> | ```diff
diff --git a/Documentation/admin-guide/hw-vuln/spectre.rst b/Documentation/admin-guide/hw-vuln/spectre.rst
index 991f12adef8d..4bb8549bee82 100644
--- a/Documentation/admin-guide/hw-vuln/spectre.rst
+++ b/Documentation/admin-guide/hw-vuln/spectre.rst
@@ -406,7 +406,7 @@ The possible values in this file are:
... |
1f214e9c3aef2d0936be971072e991d78a174d71 | Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix an incorrect parameter when calling nfs4_call_sync() | Problem Details:
The Smatch static checker noted that in _nfs4_proc_lookupp(), the flag
RPC_TASK_TIMEOUT is being passed as an argument to nfs4_init_sequence(),
which is clearly incorrect.
Since LOOKUPP is an idempotent operation, nfs4_init_sequence() should
not ask the server to cache the result. The RPC_TASK_TIMEOUT ... | ```diff
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 411776718494..93c6ce04332b 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4715,16 +4715,19 @@ static int _nfs4_proc_lookupp(struct inode *inode,
};
unsigned short task_flags = 0;
- if (NFS_SERVER(inode)->flags & NFS_MOUNT_SOFTREVAL)
+ if... |
7a7a3456520b309a0bffa1d9d62bd6c9dcab89b3 | Analyze and fix the following issue in the Linux kernel code: NFS: sysfs: fix leak when nfs_client kobject add fails | Problem Details:
If adding the second kobject fails, drop both references to avoid sysfs
residue and memory leak.
Fixes: e96f9268eea6 ("NFS: Make all of /sys/fs/nfs network-namespace unique")
Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
Reviewed-by: Benjamin Coddington <ben.coddington@hammerspace.com>
Signed-of... | ```diff
diff --git a/fs/nfs/sysfs.c b/fs/nfs/sysfs.c
index 545148d42dcc..ea6e6168092b 100644
--- a/fs/nfs/sysfs.c
+++ b/fs/nfs/sysfs.c
@@ -189,6 +189,7 @@ static struct nfs_netns_client *nfs_netns_client_alloc(struct kobject *parent,
return p;
kobject_put(&p->kobject);
+ kobject_put(&p->nfs_net_kobj);
}
r... |
85d2c2392ac6348e1171d627497034a341a250c1 | Analyze and fix the following issue in the Linux kernel code: NFSv2/v3: Fix error handling in nfs_atomic_open_v23() | Problem Details:
When nfs_do_create() returns an EEXIST error, it means that a regular
file could not be created. That could mean that a symlink needs to be
resolved. If that's the case, a lookup needs to be kicked off.
Reported-by: Stephen Abbene <sabbene87@gmail.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id... | ```diff
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 46d9c65d50f8..ea9f6ca8f30f 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -2268,11 +2268,12 @@ int nfs_atomic_open_v23(struct inode *dir, struct dentry *dentry,
return -ENAMETOOLONG;
if (open_flags & O_CREAT) {
- file->f_mode |= FMODE_CREATED;
error = n... |
6a218b9c3183ed19d5703130025282cf20463d87 | Analyze and fix the following issue in the Linux kernel code: nfs/localio: do not issue misaligned DIO out-of-order | Problem Details:
From https://lore.kernel.org/linux-nfs/aQHASIumLJyOoZGH@infradead.org/
On Wed, Oct 29, 2025 at 12:20:40AM -0700, Christoph Hellwig wrote:
> On Mon, Oct 27, 2025 at 12:18:30PM -0400, Mike Snitzer wrote:
> > LOCALIO's misaligned DIO will issue head/tail followed by O_DIRECT
> > middle (via AIO completio... | ```diff
diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c
index 839dbda0b370..656976b4f42c 100644
--- a/fs/nfs/localio.c
+++ b/fs/nfs/localio.c
@@ -44,8 +44,7 @@ struct nfs_local_kiocb {
short int end_iter_index;
atomic_t n_iters;
bool iter_is_dio_aligned[NFSLOCAL_MAX_IOS];
- loff_t offset[NFS... |
23e719e93b1bb0501aacc0a4cc96a1fe2d0b5a15 | Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Add runtime registers for GFX ver >= 35 | Problem Details:
Add a dedicated runtime register list for GFX ver >= 35.
Compared to the list for GFX >= 30, this variant drops
HUC_KERNEL_LOAD_INFO, MIRROR_FUSE1 and adds SERVICE_COPY_ENABLE.
v2:
- drop MIRROR_FUSE1 register
- update commit message
Fixes: 5e0de2dfbc1b ("drm/xe/cri: Add CRI platform definition")
S... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_service.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_service.c
index 76dd9233ef9f..2eb21610e5a0 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_service.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_service.c
@@ -99,11 +99,30 @@ static const struct xe_reg ver_3000_runtime_regs[... |
d794b499f948801f54d67ddbc34a6eac5a6d150a | Analyze and fix the following issue in the Linux kernel code: scsi: ufs: core: fix incorrect buffer duplication in ufshcd_read_string_desc() | Problem Details:
The function ufshcd_read_string_desc() was duplicating memory starting
from the beginning of struct uc_string_id, which included the length and
type fields. As a result, the allocated buffer contained unwanted
metadata in addition to the string itself.
The correct behavior is to duplicate only the Uni... | ```diff
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 2a653137a9ea..af7f87f27630 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -3835,7 +3835,7 @@ int ufshcd_read_string_desc(struct ufs_hba *hba, u8 desc_index, u8 **buf, enum u
str[ret++] = '\0';
} else {
- ... |
97b726eb1dc2b4a2532544eb3da72bb6acbd39a3 | Analyze and fix the following issue in the Linux kernel code: platform/x86: msi-wmi-platform: Fix typo in WMI GUID | Problem Details:
The WMI driver core only supports GUID strings containing only
uppercase characters, however the GUID string used by the
msi-wmi-platform driver contains a single lowercase character.
This prevents the WMI driver core from matching said driver to
its WMI device.
Fix this by turning the lowercase chara... | ```diff
diff --git a/Documentation/wmi/driver-development-guide.rst b/Documentation/wmi/driver-development-guide.rst
index 99ef21fc1c1e..5680303ae314 100644
--- a/Documentation/wmi/driver-development-guide.rst
+++ b/Documentation/wmi/driver-development-guide.rst
@@ -54,6 +54,7 @@ to matching WMI devices using a struct ... |
c93433fd4e2bbbe7caa67b53d808b4a084852ff3 | Analyze and fix the following issue in the Linux kernel code: platform/x86: msi-wmi-platform: Only load on MSI devices | Problem Details:
It turns out that the GUID used by the msi-wmi-platform driver
(ABBC0F60-8EA1-11D1-00A0-C90629100000) is not unique, but was instead
copied from the WIndows Driver Samples. This means that this driver
could load on devices from other manufacturers that also copied this
GUID, potentially causing hardwar... | ```diff
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index c122016d82f1..c883a28e0916 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -545,6 +545,7 @@ config MSI_WMI
config MSI_WMI_PLATFORM
tristate "MSI WMI Platform features"
depends on ACPI_WMI
+ depend... |
eb2d6774cc0d9d6ab8f924825695a85c14b2e0c2 | Analyze and fix the following issue in the Linux kernel code: ASoC: SDCA: bug fix while parsing mipi-sdca-control-cn-list | Problem Details:
"struct sdca_control" declares "values" field as integer array.
But the memory allocated to it is of char array. This causes
crash for sdca_parse_function API. This patch addresses the
issue by allocating correct data size.
Signed-off-by: Niranjan H Y <niranjan.hy@ti.com>
Reviewed-by: Charles Keepax <... | ```diff
diff --git a/sound/soc/sdca/sdca_functions.c b/sound/soc/sdca/sdca_functions.c
index 13f68f7b6dd6..0ccb6775f4de 100644
--- a/sound/soc/sdca/sdca_functions.c
+++ b/sound/soc/sdca/sdca_functions.c
@@ -894,7 +894,8 @@ static int find_sdca_entity_control(struct device *dev, struct sdca_entity *enti
return ret;
... |
e109f644b871df8440c886a69cdce971ed533088 | Analyze and fix the following issue in the Linux kernel code: drm/i915/dp_mst: Disable Panel Replay | Problem Details:
Disable Panel Replay on MST links until it's properly implemented. For
instance the required VSC SDP is not programmed on MST and FEC is not
enabled if Panel Replay is enabled.
Fixes: 3257e55d3ea7 ("drm/i915/panelreplay: enable/disable panel replay")
Closes: https://gitlab.freedesktop.org/drm/i915/ker... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 3decc190d2ac..66d94e25fd96 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -625,6 +625,10 @@ static void _panel_replay_init_dpcd(struct intel_dp *intel_d... |
d32ddfeb559342e89a4d06b1df4e7e5e96df3762 | Analyze and fix the following issue in the Linux kernel code: nfs/localio: Ensure DIO WRITE's IO on stable storage upon completion | Problem Details:
LOCALIO's misaligned DIO WRITE support requires synchronous IO for any
misaligned head and/or tail that are issued using buffered IO. In
addition, it is important that the O_DIRECT middle be on stable
storage upon its completion via AIO.
Otherwise, a misaligned DIO WRITE could mix buffered IO for the... | ```diff
diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c
index 9c205f8b5e59..839dbda0b370 100644
--- a/fs/nfs/localio.c
+++ b/fs/nfs/localio.c
@@ -485,8 +485,12 @@ nfs_local_iters_init(struct nfs_local_kiocb *iocb, int rw)
struct nfs_local_dio local_dio;
if (nfs_is_local_dio_possible(iocb, rw, len, &local_dio) ... |
d0497dd27452c79a48414df813a16cd12d274b3b | Analyze and fix the following issue in the Linux kernel code: nfs/localio: backfill missing partial read support for misaligned DIO | Problem Details:
Misaligned DIO read can be split into 3 IOs, must handle potential for
short read from each component IO (follows same pattern used for
handling partial writes, except upper layer read code handles advancing
offset before retry).
Fixes: c817248fc831 ("nfs/localio: add proper O_DIRECT support for READ ... | ```diff
diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c
index 647fa19b0479..9c205f8b5e59 100644
--- a/fs/nfs/localio.c
+++ b/fs/nfs/localio.c
@@ -414,7 +414,7 @@ nfs_local_iters_setup_dio(struct nfs_local_kiocb *iocb, int rw,
/* Setup misaligned end?
* If so, the end is purposely setup to be issued using buffered... |
f2060bdc21d70f3d8a4753a9fd3b0b02cb48c0bc | Analyze and fix the following issue in the Linux kernel code: nfs/localio: add refcounting for each iocb IO associated with NFS pgio header | Problem Details:
Improve completion handling of as many as 3 IOs associated with each
misaligned DIO by using a atomic_t to track completion of each IO.
Update nfs_local_pgio_done() to use precise atomic_t accounting for
remaining iov_iter (up to 3) associated with each iocb, so that each
NFS LOCALIO pgio header is on... | ```diff
diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c
index 0383d6eb2f46..647fa19b0479 100644
--- a/fs/nfs/localio.c
+++ b/fs/nfs/localio.c
@@ -42,7 +42,7 @@ struct nfs_local_kiocb {
/* Begin mostly DIO-specific members */
size_t end_len;
short int end_iter_index;
- short int n_iters;
+ atom... |
51a491f2708de79da76791523d40926921823b7e | Analyze and fix the following issue in the Linux kernel code: nfs/localio: remove unecessary ENOTBLK handling in DIO WRITE support | Problem Details:
Each filesystem is meant to fallback to retrying DIO in terms buffered
IO when it might encounter -ENOTBLK when issuing DIO (which can happen
if the VFS cannot invalidate the page cache).
So NFS doesn't need special handling for -ENOTBLK.
Also, explicitly initialize a couple DIO related iocb members ... | ```diff
diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c
index 2c0455e91571..0383d6eb2f46 100644
--- a/fs/nfs/localio.c
+++ b/fs/nfs/localio.c
@@ -315,6 +315,7 @@ nfs_local_iocb_alloc(struct nfs_pgio_header *hdr,
iocb->hdr = hdr;
iocb->kiocb.ki_flags &= ~IOCB_APPEND;
+ iocb->kiocb.ki_complete = NULL;
iocb->aio_... |
fb2cba0854a7f315c8100a807a6959b99d72479e | Analyze and fix the following issue in the Linux kernel code: NFS: Check the TLS certificate fields in nfs_match_client() | Problem Details:
If the TLS security policy is of type RPC_XPRTSEC_TLS_X509, then the
cert_serial and privkey_serial fields need to match as well since they
define the client's identity, as presented to the server.
Fixes: 90c9550a8d65 ("NFS: support the kernel keyring for TLS")
Signed-off-by: Trond Myklebust <trond.my... | ```diff
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 4e3dcc157a83..54699299d5b1 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -338,6 +338,14 @@ again:
/* Match the xprt security policy */
if (clp->cl_xprtsec.policy != data->xprtsec.policy)
continue;
+ if (clp->cl_xprtsec.policy == RPC_XPRTSEC... |
8ab523ce78d4ca13add6b4ecbacff0f84c274603 | Analyze and fix the following issue in the Linux kernel code: pnfs: Set transport security policy to RPC_XPRTSEC_NONE unless using TLS | Problem Details:
The default setting for the transport security policy must be
RPC_XPRTSEC_NONE, when using a TCP or RDMA connection without TLS.
Conversely, when using TLS, the security policy needs to be set.
Fixes: 6c0a8c5fcf71 ("NFS: Have struct nfs_client carry a TLS policy field")
Signed-off-by: Trond Myklebust ... | ```diff
diff --git a/fs/nfs/nfs3client.c b/fs/nfs/nfs3client.c
index 0d7310c1ee0c..5d97c1d38bb6 100644
--- a/fs/nfs/nfs3client.c
+++ b/fs/nfs/nfs3client.c
@@ -2,6 +2,7 @@
#include <linux/nfs_fs.h>
#include <linux/nfs_mount.h>
#include <linux/sunrpc/addr.h>
+#include <net/handshake.h>
#include "internal.h"
#include... |
28e19737e1570c7c71890547c2e43c3e0da79df9 | Analyze and fix the following issue in the Linux kernel code: pnfs: Fix TLS logic in _nfs4_pnfs_v4_ds_connect() | Problem Details:
Don't try to add an RDMA transport to a client that is already marked as
being a TCP/TLS transport.
Fixes: a35518cae4b3 ("NFSv4.1/pnfs: fix NFS with TLS in pnfs")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com> | ```diff
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index ff48056bf750..9976cc16b689 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -884,7 +884,10 @@ static int _nfs4_pnfs_v4_ds_connect(struct nfs_server *mds_srv,
u32 minor_version)
{
struct nfs_client *clp = ERR_PTR(-EIO);
+ struct nfs_clien... |
7aca00d950e782e66c34fbd045c9605eca343a36 | Analyze and fix the following issue in the Linux kernel code: pnfs: Fix TLS logic in _nfs4_pnfs_v3_ds_connect() | Problem Details:
Don't try to add an RDMA transport to a client that is already marked as
being a TCP/TLS transport.
Fixes: 04a15263662a ("pnfs/flexfiles: connect to NFSv3 DS using TLS if MDS connection uses TLS")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <anna.schu... | ```diff
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index 7b32afb29782..ff48056bf750 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -809,8 +809,11 @@ static int _nfs4_pnfs_v3_ds_connect(struct nfs_server *mds_srv,
unsigned int retrans)
{
struct nfs_client *clp = ERR_PTR(-EIO);
+ struct nfs_cl... |
994dec10991b53beac3e16109d876ae363e8a329 | Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: fix pipe to vblank conversion | Problem Details:
First, we can't assume pipe == crtc index. If a pipe is fused off in
between, it no longer holds. intel_crtc_for_pipe() is the only proper
way to get from a pipe to the corresponding crtc.
Second, drivers aren't supposed to access or index drm->vblank[]
directly. There's drm_crtc_vblank_crtc() for thi... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 10eb93a34cf2..d5e0a1e66944 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -888,7 +888,8 @@ static bool is_dc5_dc6_blocked(struct intel_dp *intel_dp)
{
... |
4492d54d59872bb72e119ff9f77969ab4d8a0e6b | Analyze and fix the following issue in the Linux kernel code: drm/panthor: Fix potential memleak of vma structure | Problem Details:
This commit addresses a memleak issue of panthor_vma (or drm_gpuva)
structure in Panthor driver, that can happen if the GPU page table
update operation to map the pages fail.
The issue is very unlikely to occur in practice.
v2: Add panthor_vm_op_ctx_return_vma() helper (Boris)
v3: Add WARN_ON_ONCE (B... | ```diff
diff --git a/drivers/gpu/drm/panthor/panthor_mmu.c b/drivers/gpu/drm/panthor/panthor_mmu.c
index 58fead90533a..6a41dfd7aaf3 100644
--- a/drivers/gpu/drm/panthor/panthor_mmu.c
+++ b/drivers/gpu/drm/panthor/panthor_mmu.c
@@ -1147,6 +1147,20 @@ static void panthor_vm_cleanup_op_ctx(struct panthor_vm_op_ctx *op_ctx... |
4361e1d913095fa5833fcc38914a6e55360d90f3 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix MTL vm_max_level | Problem Details:
MTL was broken after the vm_max_level movement. Get it back to a
working value.
[ 37.722413] xe 0000:00:02.0: [drm] Tile0: GT0: VM job timed out on non-killed execqueue
[ 37.722465] WARNING: CPU: 0 PID: 12 at drivers/gpu/drm/xe/xe_guc_submit.c:1379 guc_exec_queue_timedout_job+0x2f3/0xe00 [xe]
[ ... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 6e59642e7820..10eb18bc740e 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -333,7 +333,7 @@ static const struct xe_device_desc mtl_desc = {
.has_pxp = true,
.max_gt_per_tile = 2,
.va_bits = 48,
- .vm... |
576c930e5e7dcb937648490611a83f1bf0171048 | Analyze and fix the following issue in the Linux kernel code: drm/panthor: Flush shmem writes before mapping buffers CPU-uncached | Problem Details:
The shmem layer zeroes out the new pages using cached mappings, and if
we don't CPU-flush we might leave dirty cachelines behind, leading to
potential data leaks and/or asynchronous buffer corruption when dirty
cachelines are evicted.
Fixes: 8a1cc07578bf ("drm/panthor: Add GEM logical block")
Signed-o... | ```diff
diff --git a/drivers/gpu/drm/panthor/panthor_gem.c b/drivers/gpu/drm/panthor/panthor_gem.c
index 156c7a0b62a2..3f43686f0195 100644
--- a/drivers/gpu/drm/panthor/panthor_gem.c
+++ b/drivers/gpu/drm/panthor/panthor_gem.c
@@ -288,6 +288,23 @@ panthor_gem_create_with_handle(struct drm_file *file,
panthor_gem_de... |
07d7ad46dad48a81ffc796fb7875b1ec141c8b48 | Analyze and fix the following issue in the Linux kernel code: selftests/namespaces: test for efault | Problem Details:
Ensure that put_user() can fail and that namespace cleanup works
correctly.
Link: https://patch.msgid.link/20251109-namespace-6-19-fixes-v1-8-ae8a4ad5a3b3@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org> | ```diff
diff --git a/tools/testing/selftests/namespaces/.gitignore b/tools/testing/selftests/namespaces/.gitignore
index 4cb428d77659..0989e80da457 100644
--- a/tools/testing/selftests/namespaces/.gitignore
+++ b/tools/testing/selftests/namespaces/.gitignore
@@ -4,6 +4,7 @@ init_ino_test
ns_active_ref_test
listns_tes... |
c96573c0d75db3f8478000d0d392a9cdb95adbed | Analyze and fix the following issue in the Linux kernel code: NFSD: Never cache a COMPOUND when the SEQUENCE operation fails | Problem Details:
RFC 8881 normatively mandates that operations where the initial
SEQUENCE operation in a compound fails must not modify the slot's
replay cache.
nfsd4_cache_this() doesn't prevent such caching. So when SEQUENCE
fails, cstate.data_offset is not set, allowing
read_bytes_from_xdr_buf() to access uninitial... | ```diff
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index de763e6d9b58..c8c326679dca 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3487,7 +3487,20 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp)
struct nfsd4_slot *slot = resp->cstate.slot;
unsigned int base;
- dprintk("--> %... |
ff8141e49cf70d2d093a5228f5299ce188de6142 | Analyze and fix the following issue in the Linux kernel code: NFSD: Skip close replay processing if XDR encoding fails | Problem Details:
The replay logic added by commit 9411b1d4c7df ("nfsd4: cleanup
handling of nfsv4.0 closed stateid's") cannot be done if encoding
failed due to a short send buffer; there's no guarantee that the
operation encoder has actually encoded the data that is being copied
to the replay cache.
Reported-by: rtm@c... | ```diff
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 6040a6145dad..cf5df0f50208 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -5925,8 +5925,7 @@ nfsd4_encode_operation(struct nfsd4_compoundres *resp, struct nfsd4_op *op)
*/
warn_on_nonidempotent_op(op);
xdr_truncate_encode(xdr, op_stat... |
4aa17144d5abc3c756883e3a010246f0dba8b468 | Analyze and fix the following issue in the Linux kernel code: NFSD: free copynotify stateid in nfs4_free_ol_stateid() | Problem Details:
Typically copynotify stateid is freed either when parent's stateid
is being close/freed or in nfsd4_laundromat if the stateid hasn't
been used in a lease period.
However, in case when the server got an OPEN (which created
a parent stateid), followed by a COPY_NOTIFY using that stateid,
followed by a c... | ```diff
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index c1b54322c412..de763e6d9b58 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1542,7 +1542,8 @@ static void nfs4_free_ol_stateid(struct nfs4_stid *stid)
release_all_access(stp);
if (stp->st_stateowner)
nfs4_put_stateowner(stp->st_st... |
f0e6bc0c3ef4b4afb299bd6912586cafd5d864e9 | Analyze and fix the following issue in the Linux kernel code: clk: mvebu: cp110 add CLK_IGNORE_UNUSED to pcie_x10, pcie_x11 & pcie_x4 | Problem Details:
CP110 based platforms rely on the bootloader for pci port
initialization.
TF-A actively prevents non-uboot re-configuration of pci lanes, and many
boards do not have software control over the pci card reset.
If a pci port had link at boot-time and the clock is stopped at a later
point, the link fails ... | ```diff
diff --git a/drivers/clk/mvebu/cp110-system-controller.c b/drivers/clk/mvebu/cp110-system-controller.c
index 03c59bf22106..b47c86906046 100644
--- a/drivers/clk/mvebu/cp110-system-controller.c
+++ b/drivers/clk/mvebu/cp110-system-controller.c
@@ -110,6 +110,25 @@ static const char * const gate_base_names[] = {
... |
c9b6a836704753fd6fb7e47f5f07c83b408e51d4 | Analyze and fix the following issue in the Linux kernel code: Revert "arm64: dts: marvell: cn9132-clearfog: fix multi-lane pci x2 and x4 ports" | Problem Details:
This reverts commit 794a066688038df46c01e177cc6faebded0acba4 because it
misunderstood interworking between arm trusted firmware and the common
phy driver, and does not consistently resolve the issue it was intended
to address.
Further diagnostics have revealed the root cause for the reported system
lo... | ```diff
diff --git a/arch/arm64/boot/dts/marvell/cn9132-clearfog.dts b/arch/arm64/boot/dts/marvell/cn9132-clearfog.dts
index 5cf83d8ca1f5..2507896d58f9 100644
--- a/arch/arm64/boot/dts/marvell/cn9132-clearfog.dts
+++ b/arch/arm64/boot/dts/marvell/cn9132-clearfog.dts
@@ -413,13 +413,7 @@
/* SRDS #0,#1,#2,#3 - PCIe */
... |
da69aeac10c040d78c5bd7e0ee0be0a83f12e856 | Analyze and fix the following issue in the Linux kernel code: arm64/arm: dts: marvell: Rename "nand-rb" pinctrl node names | Problem Details:
Update the "nand-rb" pinctrl child node names to use the defined "-pins"
suffix fixing DT schema warnings.
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> | ```diff
diff --git a/arch/arm/boot/dts/marvell/armada-38x.dtsi b/arch/arm/boot/dts/marvell/armada-38x.dtsi
index 1181b13deabc..1d616edda322 100644
--- a/arch/arm/boot/dts/marvell/armada-38x.dtsi
+++ b/arch/arm/boot/dts/marvell/armada-38x.dtsi
@@ -247,7 +247,7 @@
marvell,function = "dev";
};
- nand_rb: n... |
c3856bb499eae0cd5773b609ee9aa8a0e6e42b6c | Analyze and fix the following issue in the Linux kernel code: ntfs3: avoid memcpy size warning | Problem Details:
There are more entries after the structure, use unsafe_memcpy() to avoid
this warning.
syzbot reported:
memcpy: detected field-spanning write (size 3656) of single field "hdr1" at fs/ntfs3/index.c:1927 (size 16)
Call Trace:
indx_insert_entry+0x1a0/0x460 fs/ntfs3/index.c:1996
ni_add_name+0x4dd/0x820 ... | ```diff
diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
index 6d1bf890929d..7157cfd70fdc 100644
--- a/fs/ntfs3/index.c
+++ b/fs/ntfs3/index.c
@@ -1924,7 +1924,8 @@ indx_insert_into_buffer(struct ntfs_index *indx, struct ntfs_inode *ni,
* Undo critical operations.
*/
indx_mark_free(indx, ni, new_vbn >> indx-... |
5f33da04e6ceee849e76e6592cc283c72fef7af9 | Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: fix KMSAN uninit-value in ni_create_attr_list | Problem Details:
The call to kmalloc() to allocate the attribute list buffer is given a
size of al_aligned(rs). This size can be larger than the data
subsequently copied into the buffer, leaving trailing bytes uninitialized.
This can trigger a KMSAN "uninit-value" warning if that memory is
later accessed.
Fix this by... | ```diff
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c
index e44181185526..c3638f482393 100644
--- a/fs/ntfs3/frecord.c
+++ b/fs/ntfs3/frecord.c
@@ -767,7 +767,7 @@ int ni_create_attr_list(struct ntfs_inode *ni)
* Skip estimating exact memory requirement.
* Looks like one record_size is always enough.
*/... |
be99c62ac7e7af514e4b13f83c891a3cccefaa48 | Analyze and fix the following issue in the Linux kernel code: ntfs3: init run lock for extend inode | Problem Details:
After setting the inode mode of $Extend to a regular file, executing the
truncate system call will enter the do_truncate() routine, causing the
run_lock uninitialized error reported by syzbot.
Prior to patch 4e8011ffec79, if the inode mode of $Extend was not set to
a regular file, the do_truncate() ro... | ```diff
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
index 439078106cc6..b0c557a6c115 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -472,6 +472,7 @@ end_enum:
/* Records in $Extend are not a files or general directories. */
inode->i_op = &ntfs_file_inode_operations;
mode = S_IFREG;
+ init_rwsem(... |
d1693a7d5a38acf6424235a6070bcf5b186a360d | Analyze and fix the following issue in the Linux kernel code: ntfs: set dummy blocksize to read boot_block when mounting | Problem Details:
When mounting, sb->s_blocksize is used to read the boot_block without
being defined or validated. Set a dummy blocksize before attempting to
read the boot_block.
The issue can be triggered with the following syz reproducer:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./file1\x00', 0x0)
r4 = op... | ```diff
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index aae1f32f4dab..a478ec510640 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -946,6 +946,11 @@ static int ntfs_init_from_boot(struct super_block *sb, u32 sector_size,
sbi->volume.blocks = dev_size >> PAGE_SHIFT;
+ /* Set dummy blocksize to read ... |
394aa576c0b783ae728d87ed98fe4f1831dfd720 | Analyze and fix the following issue in the Linux kernel code: printk_ringbuffer: Create a helper function to decide whether more space is needed | Problem Details:
The decision whether some more space is needed is tricky in the printk
ring buffer code:
1. The given lpos values might overflow. A subtraction must be used
instead of a simple "lower than" check.
2. Another CPU might reuse the space in the mean time. It can be
detected when the subtrac... | ```diff
diff --git a/kernel/printk/printk_ringbuffer.c b/kernel/printk/printk_ringbuffer.c
index 3e6fd8d6fa9f..56c8e3d031f4 100644
--- a/kernel/printk/printk_ringbuffer.c
+++ b/kernel/printk/printk_ringbuffer.c
@@ -411,6 +411,23 @@ static bool data_check_size(struct prb_data_ring *data_ring, unsigned int size)
return... |
cc3bad11de6e0d6012460487903e7167d3e73957 | Analyze and fix the following issue in the Linux kernel code: printk_ringbuffer: Fix check of valid data size when blk_lpos overflows | Problem Details:
The commit 67e1b0052f6bb8 ("printk_ringbuffer: don't needlessly wrap
data blocks around") allows to use the last 4 bytes of the ring buffer.
But the check for the @data_size was not properly updated in get_data().
It fails when "blk_lpos->next" overflows to "0". In this case:
+ is_blk_wrapped(data_... | ```diff
diff --git a/kernel/printk/printk_ringbuffer.c b/kernel/printk/printk_ringbuffer.c
index 839f504db6d3..3e6fd8d6fa9f 100644
--- a/kernel/printk/printk_ringbuffer.c
+++ b/kernel/printk/printk_ringbuffer.c
@@ -1260,9 +1260,8 @@ static const char *get_data(struct prb_data_ring *data_ring,
return NULL;
}
- /*... |
249092174caa3fe9fb8f7914991a8c0de484bcf8 | Analyze and fix the following issue in the Linux kernel code: tools/objtool: Copy the __cleanup unused variable fix for older clang | Problem Details:
Copy from
54da6a092431 ("locking: Introduce __cleanup() based infrastructure")
the bits which mark the variable with a cleanup attribute unused so that my
clang 15 can dispose of it properly instead of warning that it is unused which
then fails the build due to -Werror.
Suggested-by: Nathan Chance... | ```diff
diff --git a/tools/objtool/include/objtool/warn.h b/tools/objtool/include/objtool/warn.h
index e88322d97573..a1e3927d8e7c 100644
--- a/tools/objtool/include/objtool/warn.h
+++ b/tools/objtool/include/objtool/warn.h
@@ -107,6 +107,15 @@ extern int indent;
static inline void unindent(int *unused) { indent--; }... |
523bf0a59e674b52e4b5607a2aba655fbfa20ff2 | Analyze and fix the following issue in the Linux kernel code: USB: serial: option: add support for Rolling RW101R-GL | Problem Details:
- VID:PID 33f8:0301, RW101R-GL for laptop debug M.2 cards (with MBIM
interface for Linux/Chrome OS)
0x0301: mbim, pipe
T: Bus=04 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0
D: Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1
P: Vendor=33f8 ProdID=0301 Rev=05.04
S: Manufact... | ```diff
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 5de856f65f0d..e9400727ad36 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -2424,12 +2424,18 @@ static const struct usb_device_id option_ids[] = {
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, ... |
75b51437a4ac18195cc0683acea7bf75b6f43e7f | Analyze and fix the following issue in the Linux kernel code: parisc: Drop linux/kernel.h include from asm/bug.h header | Problem Details:
While working on an unrelated patch series, I needed to include
linux/bug.h from linux/instrumented.h, in order to call WARN_ON_ONCE().
Doing so resulted in the following compiler error on parisc:
In file included from ./include/linux/atomic/atomic-instrumented.h:17,
from ./include/l... | ```diff
diff --git a/arch/parisc/include/asm/bug.h b/arch/parisc/include/asm/bug.h
index 833555f74ffa..dbf65623c513 100644
--- a/arch/parisc/include/asm/bug.h
+++ b/arch/parisc/include/asm/bug.h
@@ -2,8 +2,6 @@
#ifndef _PARISC_BUG_H
#define _PARISC_BUG_H
-#include <linux/kernel.h> /* for BUGFLAG_TAINT */
-
/*
* ... |
e8f288a115f4850a65063af8787545dbf50abf47 | Analyze and fix the following issue in the Linux kernel code: mtd: spi-nor: spansion: SMPT fixups for S25FS-S | Problem Details:
S25FS-S family supports SMPT that helps to detect sector layout settings
in configuration registers, but some of parameters in the table are
wrong or undetermined so the fixups below are required.
Read Any Register op is used to read configuration registers that
related to sector map. The op requires ... | ```diff
diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
index a0296c871634..8498c7003d88 100644
--- a/drivers/mtd/spi-nor/spansion.c
+++ b/drivers/mtd/spi-nor/spansion.c
@@ -785,8 +785,46 @@ s25fs_s_nor_post_bfpt_fixups(struct spi_nor *nor,
return 0;
}
+static void s25fs_s_nor_smpt_rea... |
f74de390557bf2bcc5dca4a357b41c0701d3f76e | Analyze and fix the following issue in the Linux kernel code: mtd: spi-nor: sfdp: introduce smpt_map_id fixup hook | Problem Details:
Certain chips have inconsistent Sector Map Parameter Table (SMPT) data,
which leads to the wrong map ID being identified, causing failures to
detect the correct sector map.
To fix this, introduce smpt_map_id() into the struct spi_nor_fixups.
This function will be called after the initial SMPT-based de... | ```diff
diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
index 5ad46d95d09c..16b382d4f04f 100644
--- a/drivers/mtd/spi-nor/core.h
+++ b/drivers/mtd/spi-nor/core.h
@@ -411,6 +411,8 @@ struct spi_nor_flash_parameter {
* @post_bfpt: called after the BFPT table has been parsed
* @smpt_read_dummy: ca... |
653f6def567c81f37302f9591ffd54df3e2a11eb | Analyze and fix the following issue in the Linux kernel code: mtd: spi-nor: sfdp: introduce smpt_read_dummy fixup hook | Problem Details:
SMPT contains config detection info that describes opcode, address, and
dummy cycles to read sector map config. The dummy cycles parameter can
be SMPT_CMD_READ_DUMMY_IS_VARIABLE and in that case nor->read_dummy
(initialized as 0) is used. In Infineon flash chips, Read Any Register
command with variable... | ```diff
diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
index ceff412f7d65..5ad46d95d09c 100644
--- a/drivers/mtd/spi-nor/core.h
+++ b/drivers/mtd/spi-nor/core.h
@@ -409,6 +409,8 @@ struct spi_nor_flash_parameter {
* flash parameters when information provided by the flash_info
* ... |
aaa5abcc9d44d2c8484f779ab46d242d774cabcb | Analyze and fix the following issue in the Linux kernel code: coresight: tmc: add the handle of the event to the path | Problem Details:
The handle is essential for retrieving the AUX_EVENT of each CPU and is
required in perf mode. It has been added to the coresight_path so that
dependent devices can access it from the path when needed.
The existing bug can be reproduced with:
perf record -e cs_etm//k -C 0-9 dd if=/dev/zero of=/dev/nul... | ```diff
diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c
index f677c08233ba..5c256af6e54a 100644
--- a/drivers/hwtracing/coresight/coresight-etm-perf.c
+++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
@@ -520,6 +520,7 @@ static void etm_event_start(s... |
05a1fc5efdd8560f34a3af39c9cf1e1526cc3ddf | Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Fix potential overflow of PCM transfer buffer | Problem Details:
The PCM stream data in USB-audio driver is transferred over USB URB
packet buffers, and each packet size is determined dynamically. The
packet sizes are limited by some factors such as wMaxPacketSize USB
descriptor. OTOH, in the current code, the actually used packet sizes
are determined only by the ... | ```diff
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 880f5afcce60..cc15624ecaff 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -1362,6 +1362,11 @@ int snd_usb_endpoint_set_params(struct snd_usb_audio *chip,
ep->sample_rem = ep->cur_rate % ep->pps;
ep->packsize[0] = ep->cur_rate / ... |
473235677af46ecb167917887586646e9d70d9ff | Analyze and fix the following issue in the Linux kernel code: wifi: cfg80211: fix doc of struct key_params | Problem Details:
The seq in struct key_params is for many ciphers, including CCMP, GCMP,
CMAC, GMAC. In addition to get_key(), it is also used when setting keys.
Signed-off-by: Chien Wong <m@xv97.com>
Link: https://patch.msgid.link/20251107142332.181308-1-m@xv97.com
Signed-off-by: Johannes Berg <johannes.berg@intel.co... | ```diff
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 84be0cdd1da0..d87c18e1b133 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -786,8 +786,7 @@ struct vif_params {
* @key: key material
* @key_len: length of key material
* @cipher: cipher suite selector
- * @seq: sequence... |
68eb1b791ac8da7c3d03967143f1417e2978bf5e | Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: pass frame type to element parsing | Problem Details:
This will be needed for UHR operation parsing, and we
already pass whether or not the frame is an action
frame, replace that by the full type. Note this fixes
a few cases where 'false' was erroneously passed (mesh
and TDLS) and removes ieee802_11_parse_elems_crc() as
it's unused.
Link: https://patch.m... | ```diff
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 48ce05e1d203..6d4bc80caf96 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -43,6 +43,7 @@
#define IEEE80211_FCTL_VERS 0x0003
#define IEEE80211_FCTL_FTYPE 0x000c
#define IEEE80211_FCTL_STYPE 0x00f0
+#define I... |
1a1cad924e8a60252132446fbba1284035010b4f | Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: fix EHT typo | Problem Details:
This is clearly EHT, not ETH, fix the typo.
Link: https://patch.msgid.link/20251105153958.12a04517f7ec.Idcf800817fa30605b1002c3d2287cad016e7aea7@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com> | ```diff
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c326243e1f01..c2e49542626c 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -7223,7 +7223,7 @@ ieee80211_get_he_6ghz_capa_vif(const struct ieee80211_supported_band *sband,
}
/**
- * ieee80211_get_eht_iftype_cap_vif - retur... |
30b6089aad35500e683025dddc029ac28705385d | Analyze and fix the following issue in the Linux kernel code: wifi: cfg80211: fix EHT typo | Problem Details:
This is clearly EHT, not ETH, fix the typo.
Link: https://patch.msgid.link/20251105153958.e9d4af3b768e.I5f3378326837e3f62928a2f1fd3403f29cea069b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com> | ```diff
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index f2e8963cfaac..84be0cdd1da0 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -685,7 +685,7 @@ ieee80211_get_he_6ghz_capa(const struct ieee80211_supported_band *sband,
}
/**
- * ieee80211_get_eht_iftype_cap - return ETH capa... |
88efd7c6997ee9da3e0274106f72b99fa105f45f | Analyze and fix the following issue in the Linux kernel code: selftests/namespaces: add active reference count regression test | Problem Details:
Add a regression test for setns() with pidfd.
Link: https://patch.msgid.link/20251109-namespace-6-19-fixes-v1-7-ae8a4ad5a3b3@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org> | ```diff
diff --git a/tools/testing/selftests/namespaces/.gitignore b/tools/testing/selftests/namespaces/.gitignore
index f4d2209ca4e4..4cb428d77659 100644
--- a/tools/testing/selftests/namespaces/.gitignore
+++ b/tools/testing/selftests/namespaces/.gitignore
@@ -8,3 +8,4 @@ siocgskns_test
cred_change_test
stress_test... |
57b39aabb99ea69b9046df2915404a931d9d6695 | Analyze and fix the following issue in the Linux kernel code: ns: add asserts for active refcount underflow | Problem Details:
Add a few more assert to detect active reference count underflows.
Link: https://patch.msgid.link/20251109-namespace-6-19-fixes-v1-6-ae8a4ad5a3b3@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org> | ```diff
diff --git a/include/linux/ns_common.h b/include/linux/ns_common.h
index 3aaba2ca31d7..66ea09b48377 100644
--- a/include/linux/ns_common.h
+++ b/include/linux/ns_common.h
@@ -294,7 +294,6 @@ void __ns_ref_active_put(struct ns_common *ns);
static __always_inline struct ns_common *__must_check ns_get_unless_in... |
f8d5a8970d2f49411824fb1fdd34bbb3eea22756 | Analyze and fix the following issue in the Linux kernel code: ns: handle setns(pidfd, ...) cleanly | Problem Details:
The setns() system call supports:
(1) namespace file descriptors (nsfd)
(2) process file descriptors (pidfd)
When using nsfds the namespaces will remain active because they are
pinned by the vfs. However, when pidfds are used things are more
complicated.
When the target task exits and passes through... | ```diff
diff --git a/fs/nsfs.c b/fs/nsfs.c
index ba6c8975c82e..a80f8d2a4122 100644
--- a/fs/nsfs.c
+++ b/fs/nsfs.c
@@ -430,7 +430,7 @@ static int nsfs_init_inode(struct inode *inode, void *data)
* ioctl on such a socket will resurrect the relevant namespace
* subtree.
*/
- __ns_ref_active_resurrect(ns);
+ __ns... |
a51dce7c3261d26e574b35da71dac3903bb35ae2 | Analyze and fix the following issue in the Linux kernel code: ns: return EFAULT on put_user() error | Problem Details:
Don't return EINVAL, return EFAULT just like we do in other system
calls.
Link: https://patch.msgid.link/20251109-namespace-6-19-fixes-v1-4-ae8a4ad5a3b3@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org> | ```diff
diff --git a/kernel/nstree.c b/kernel/nstree.c
index 55b72d4f8de4..f27f772a6762 100644
--- a/kernel/nstree.c
+++ b/kernel/nstree.c
@@ -584,7 +584,7 @@ static ssize_t do_listns_userns(struct klistns *kls)
if (put_user(valid->ns_id, ns_ids + ret)) {
ns_put(prev);
- return -EINVAL;
+ return -EFAULT;
... |
2ec2aff3c8e2523f3bde90e78031bae811335f3c | Analyze and fix the following issue in the Linux kernel code: ns: make sure reference are dropped outside of rcu lock | Problem Details:
The mount namespace may in fact sleep when putting the last passive
reference so we need to drop the namespace reference outside of the rcu
read lock. Do this by delaying the put until the next iteration where
we've already moved on to the next namespace and legitimized it. Once we
drop the rcu read lo... | ```diff
diff --git a/kernel/nstree.c b/kernel/nstree.c
index 4a8838683b6b..55b72d4f8de4 100644
--- a/kernel/nstree.c
+++ b/kernel/nstree.c
@@ -505,13 +505,13 @@ static inline bool __must_check may_list_ns(const struct klistns *kls,
return false;
}
-static void __ns_put(struct ns_common *ns)
+static inline void ns_... |
7cd3d204412b0584df38fd7be20002137f34721a | Analyze and fix the following issue in the Linux kernel code: ns: don't increment or decrement initial namespaces | Problem Details:
There's no need to bump the active reference counts of initial
namespaces as they're always active and can simply remain at 1.
Link: https://patch.msgid.link/20251109-namespace-6-19-fixes-v1-2-ae8a4ad5a3b3@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org> | ```diff
diff --git a/include/linux/ns_common.h b/include/linux/ns_common.h
index bd4492ef6ffc..791b18dc77d0 100644
--- a/include/linux/ns_common.h
+++ b/include/linux/ns_common.h
@@ -141,6 +141,12 @@ static __always_inline bool is_initial_namespace(struct ns_common *ns)
IPC_NS_INIT_INO - MNT_NS_INIT_INO + 1));
}... |
0355dcae2d157d95f234a56b540ab110350fd022 | Analyze and fix the following issue in the Linux kernel code: ns: don't skip active reference count initialization | Problem Details:
Don't skip active reference count initialization for initial namespaces.
Doing this will break network namespace active reference counting.
Link: https://patch.msgid.link/20251109-namespace-6-19-fixes-v1-1-ae8a4ad5a3b3@kernel.org
Fixes: 3a18f809184b ("ns: add active reference count")
Signed-off-by: Ch... | ```diff
diff --git a/kernel/nscommon.c b/kernel/nscommon.c
index 6fe1c747fa46..d67ae7ad7759 100644
--- a/kernel/nscommon.c
+++ b/kernel/nscommon.c
@@ -54,7 +54,7 @@ static void ns_debug(struct ns_common *ns, const struct proc_ns_operations *ops)
int __ns_common_init(struct ns_common *ns, u32 ns_type, const struct pr... |
e54ad0cd3673c93cdafda58505eaa81610fe3aef | Analyze and fix the following issue in the Linux kernel code: rust/drm/gem: Fix missing header in `Object` rustdoc | Problem Details:
Invariants should be prefixed with a # to turn it into a header.
There are no functional changes in this patch.
Cc: stable@vger.kernel.org
Fixes: c284d3e42338 ("rust: drm: gem: Add GEM object abstraction")
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patch.msgid.link/20251107202603.4659... | ```diff
diff --git a/rust/kernel/drm/gem/mod.rs b/rust/kernel/drm/gem/mod.rs
index eb5f3feac890..a7f682e95c01 100644
--- a/rust/kernel/drm/gem/mod.rs
+++ b/rust/kernel/drm/gem/mod.rs
@@ -164,7 +164,7 @@ impl<T: IntoGEMObject> BaseObject for T {}
/// A base GEM object.
///
-/// Invariants
+/// # Invariants
///
///... |
d4f279eced3903e77de418aa9090bf8db587f897 | Analyze and fix the following issue in the Linux kernel code: drm/xe/vf: Enable VF resource fixup unconditionally | Problem Details:
All the feature enabling code is in place - drop the debug flag
requirement for VF resource fixup.
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patch.msgid.link/20251107161000.1938186-1-michal.winiarski@intel.com
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> | ```diff
diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.c b/drivers/gpu/drm/xe/xe_sriov_vf.c
index 39c829daa97c..284ce37ca92d 100644
--- a/drivers/gpu/drm/xe/xe_sriov_vf.c
+++ b/drivers/gpu/drm/xe/xe_sriov_vf.c
@@ -156,14 +156,6 @@ void xe_sriov_vf_migration_disable(struct xe_device *xe, const char *fmt, ...)
static voi... |
aaf46c6a6df6052881c2e75cba65aeb6f1cfa88a | Analyze and fix the following issue in the Linux kernel code: tee: <uapi/linux/tee.h: fix all kernel-doc issues | Problem Details:
Fix kernel-doc warnings so that there no other kernel-doc issues
in <uapi/linux/tee.h>:
- add ending ':' to some struct members as needed for kernel-doc
- change struct name in kernel-doc to match the actual struct name (2x)
- add a @params: kernel-doc entry multiple times
Warning: tee.h:265 struct m... | ```diff
diff --git a/include/uapi/linux/tee.h b/include/uapi/linux/tee.h
index 386ad36f1a0a..cab5cadca8ef 100644
--- a/include/uapi/linux/tee.h
+++ b/include/uapi/linux/tee.h
@@ -249,8 +249,9 @@ struct tee_ioctl_param {
* @cancel_id: [in] Cancellation id, a unique value to identify this request
* @session: [out] Se... |
e40b061cd379f4897e705d17cf1b4572ad0f3963 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: stm32: stm32mp157c-phycore: Fix STMPE811 touchscreen node properties | Problem Details:
Move st,adc-freq, st,mod-12b, st,ref-sel, and st,sample-time properties
from the touchscreen subnode to the parent touch@44 node. These properties
are defined in the st,stmpe.yaml schema for the parent node, not the
touchscreen subnode, resolving the validation error about unevaluated
properties.
Fixe... | ```diff
diff --git a/arch/arm/boot/dts/st/stm32mp157c-phycore-stm32mp15-som.dtsi b/arch/arm/boot/dts/st/stm32mp157c-phycore-stm32mp15-som.dtsi
index bf0c32027baf..370b2afbf15b 100644
--- a/arch/arm/boot/dts/st/stm32mp157c-phycore-stm32mp15-som.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp157c-phycore-stm32mp15-som.dtsi
@@ -1... |
a338d6e849ab31f32c08b4fcac11c0c72afbb150 | Analyze and fix the following issue in the Linux kernel code: RDMA/rtrs: server: Fix error handling in get_or_create_srv | Problem Details:
After device_initialize() is called, use put_device() to release the
device according to kernel device management rules. While direct
kfree() work in this case, using put_device() is more correct.
Found by code review.
Fixes: 9cb837480424 ("RDMA/rtrs: server: main functionality")
Signed-off-by: Ma Ke... | ```diff
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-srv.c b/drivers/infiniband/ulp/rtrs/rtrs-srv.c
index ef4abdea3c2d..9ecc6343455d 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-srv.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-srv.c
@@ -1450,7 +1450,7 @@ err_free_chunks:
kfree(srv->chunks);
err_free_srv:
- kfree(srv... |
0e9b51a43214f81f07813b63349b03ded35139c7 | Analyze and fix the following issue in the Linux kernel code: perf pmu: Make pmu_alias_terms weak again | Problem Details:
The terms for a json event should be weak so they don't override
command line options.
Before:
```
$ perf record -vv -c 1000 -e uops_issued.any -o /dev/null true 2>&1
|grep "{ sample_period, sample_freq }"
{ sample_period, sample_freq } 200003
{ sample_period, sample_freq } 2000003
{ sample_per... | ```diff
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index d597263fab4f..f14f2a12d061 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -802,6 +802,7 @@ static int pmu_aliases_parse_eager(struct perf_pmu *pmu, int sysfs_fd)
static int pmu_alias_terms(struct perf_pmu_alias *alias, struct l... |
85faa6495f34129778db61d8cd5a80db8ab19261 | Analyze and fix the following issue in the Linux kernel code: fpga: xilinx-spi: Add missing spi_device_id table | Problem Details:
The "xlnx,fpga-slave-serial" devicetree compatible string currently misses
its SPI device ID entry. Without an spi_device_id table, the driver still
works with device tree, but triggers the following runtime warning when
registered via SPI core:
SPI driver xlnx-slave-spi has no spi_device_id for xlnx,... | ```diff
diff --git a/drivers/fpga/xilinx-spi.c b/drivers/fpga/xilinx-spi.c
index 8756504340de..e294e3a6cc03 100644
--- a/drivers/fpga/xilinx-spi.c
+++ b/drivers/fpga/xilinx-spi.c
@@ -57,6 +57,12 @@ static int xilinx_spi_probe(struct spi_device *spi)
return xilinx_core_probe(core);
}
+static const struct spi_device... |
eff0306b109f2d611e44f0155b0324f6cfec3ef4 | Analyze and fix the following issue in the Linux kernel code: PCI: meson: Fix parsing the DBI register region | Problem Details:
First of all, the driver was parsing the 'dbi' register region as 'elbi'.
This was due to DT mistakenly passing 'dbi' as 'elbi'. Since the DT is
now fixed to supply 'dbi' region, this driver can rely on the DWC core
driver to parse and map it.
However, to support the old DTs, if the 'elbi' region is f... | ```diff
diff --git a/drivers/pci/controller/dwc/pci-meson.c b/drivers/pci/controller/dwc/pci-meson.c
index 787469d1b396..54b6a4196f17 100644
--- a/drivers/pci/controller/dwc/pci-meson.c
+++ b/drivers/pci/controller/dwc/pci-meson.c
@@ -108,10 +108,22 @@ static int meson_pcie_get_mems(struct platform_device *pdev,
... |
4813dea9e272ba0a57c50b8d51d440dd8e3ccdd7 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: PCI: amlogic: Fix the register name of the DBI region | Problem Details:
Binding incorrectly specifies the 'DBI' region as 'ELBI'. DBI is a must
have region for DWC controllers as it has the Root Port and controller
specific registers, while ELBI has optional registers.
Hence, fix the binding. Though this is an ABI break, this change is needed
to accurately describe the PC... | ```diff
diff --git a/Documentation/devicetree/bindings/pci/amlogic,axg-pcie.yaml b/Documentation/devicetree/bindings/pci/amlogic,axg-pcie.yaml
index 79a21ba0f9fd..c8258ef40328 100644
--- a/Documentation/devicetree/bindings/pci/amlogic,axg-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/amlogic,axg-pcie.yaml
@@ -3... |
944edca81e7aea15f83cf9a13a6ab67f711e8abd | Analyze and fix the following issue in the Linux kernel code: platform/chrome: cros_ec_ishtp: Fix UAF after unbinding driver | Problem Details:
After unbinding the driver, another kthread `cros_ec_console_log_work`
is still accessing the device, resulting an UAF and crash.
The driver doesn't unregister the EC device in .remove() which should
shutdown sub-devices synchronously. Fix it.
Fixes: 26a14267aff2 ("platform/chrome: Add ChromeOS EC I... | ```diff
diff --git a/drivers/platform/chrome/cros_ec_ishtp.c b/drivers/platform/chrome/cros_ec_ishtp.c
index 4e74e702c5a2..3766cef81fe8 100644
--- a/drivers/platform/chrome/cros_ec_ishtp.c
+++ b/drivers/platform/chrome/cros_ec_ishtp.c
@@ -667,6 +667,7 @@ static void cros_ec_ishtp_remove(struct ishtp_cl_device *cl_devic... |
b05addf6f0596edb1f82ab4059438c7ef2d2686d | Analyze and fix the following issue in the Linux kernel code: kho: warn and exit when unpreserved page wasn't preserved | Problem Details:
Calling __kho_unpreserve() on a pair of (pfn, end_pfn) that wasn't
preserved is a bug. Currently, if that is done, the physxa or bits can be
NULL. This results in a soft lockup since a NULL physxa or bits results
in redoing the loop without ever making any progress.
Return when physxa or bits are no... | ```diff
diff --git a/kernel/kexec_handover.c b/kernel/kexec_handover.c
index e0bafe7c0ded..03d12e27189f 100644
--- a/kernel/kexec_handover.c
+++ b/kernel/kexec_handover.c
@@ -171,12 +171,12 @@ static void __kho_unpreserve(struct kho_mem_track *track, unsigned long pfn,
const unsigned long pfn_high = pfn >> order;
... |
7ecd2e439d1272ac02d798b0033a426e3b00dff5 | Analyze and fix the following issue in the Linux kernel code: kho: fix unpreservation of higher-order vmalloc preservations | Problem Details:
kho_vmalloc_unpreserve_chunk() calls __kho_unpreserve() with end_pfn as
pfn + 1. This happens to work for 0-order pages, but leaks higher order
pages.
For example, say order 2 pages back the allocation. During preservation,
they get preserved in the order 2 bitmaps, but
kho_vmalloc_unpreserve_chunk(... | ```diff
diff --git a/kernel/kexec_handover.c b/kernel/kexec_handover.c
index 36fdce2667c5..e0bafe7c0ded 100644
--- a/kernel/kexec_handover.c
+++ b/kernel/kexec_handover.c
@@ -882,7 +882,8 @@ err_free:
return NULL;
}
-static void kho_vmalloc_unpreserve_chunk(struct kho_vmalloc_chunk *chunk)
+static void kho_vmalloc... |
0b07092d09e54e49b85379a9c60f82d54a881514 | Analyze and fix the following issue in the Linux kernel code: kho: fix out-of-bounds access of vmalloc chunk | Problem Details:
The list of pages in a vmalloc chunk is NULL-terminated. So when looping
through the pages in a vmalloc chunk, both kho_restore_vmalloc() and
kho_vmalloc_unpreserve_chunk() rightly make sure to stop when encountering
a NULL page. But when the chunk is full, the loops do not stop and go
past the bound... | ```diff
diff --git a/kernel/kexec_handover.c b/kernel/kexec_handover.c
index 2a8c20c238a8..36fdce2667c5 100644
--- a/kernel/kexec_handover.c
+++ b/kernel/kexec_handover.c
@@ -889,7 +889,7 @@ static void kho_vmalloc_unpreserve_chunk(struct kho_vmalloc_chunk *chunk)
__kho_unpreserve(track, pfn, pfn + 1);
- for (int... |
6f86d0534fddfbd08687fa0f01479d4226bc3c3d | Analyze and fix the following issue in the Linux kernel code: mm/secretmem: fix use-after-free race in fault handler | Problem Details:
When a page fault occurs in a secret memory file created with
`memfd_secret(2)`, the kernel will allocate a new folio for it, mark the
underlying page as not-present in the direct map, and add it to the file
mapping.
If two tasks cause a fault in the same page concurrently, both could end
up allocatin... | ```diff
diff --git a/mm/secretmem.c b/mm/secretmem.c
index 60137305bc20..b59350daffe3 100644
--- a/mm/secretmem.c
+++ b/mm/secretmem.c
@@ -82,13 +82,13 @@ retry:
__folio_mark_uptodate(folio);
err = filemap_add_folio(mapping, folio, offset, gfp);
if (unlikely(err)) {
- folio_put(folio);
/*
* If a spl... |
adfb6609c6809e107ded9a1cd46f519c882e64ea | Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: initialise the tags of the huge zero folio | Problem Details:
On arm64 with MTE enabled, a page mapped as Normal Tagged (PROT_MTE) in
user space will need to have its allocation tags initialised. This is
normally done in the arm64 set_pte_at() after checking the memory
attributes. Such page is also marked with the PG_mte_tagged flag to avoid
subsequent clearing... | ```diff
diff --git a/arch/arm64/kernel/mte.c b/arch/arm64/kernel/mte.c
index 43f7a2f39403..32148bf09c1d 100644
--- a/arch/arm64/kernel/mte.c
+++ b/arch/arm64/kernel/mte.c
@@ -476,7 +476,8 @@ static int __access_remote_tags(struct mm_struct *mm, unsigned long addr,
folio = page_folio(page);
if (folio_test_hugetl... |
9a6b60cb147d53968753a34805211d2e5e08c027 | Analyze and fix the following issue in the Linux kernel code: nilfs2: avoid having an active sc_timer before freeing sci | Problem Details:
Because kthread_stop did not stop sc_task properly and returned -EINTR,
the sc_timer was not properly closed, ultimately causing the problem [1]
reported by syzbot when freeing sci due to the sc_timer not being closed.
Because the thread sc_task main function nilfs_segctor_thread() returns 0
when it s... | ```diff
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index f15ca6fc400d..deee16bc9d4e 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -2768,7 +2768,12 @@ static void nilfs_segctor_destroy(struct nilfs_sc_info *sci)
if (sci->sc_task) {
wake_up(&sci->sc_wait_daemon);
- kthread_stop(sci->sc... |
7d9f7d390f6af3a29614e81e802e2b9c238eb7b2 | Analyze and fix the following issue in the Linux kernel code: scripts/decode_stacktrace.sh: fix build ID and PC source parsing | Problem Details:
Support for parsing PC source info in stacktraces (e.g. '(P)') was added
in commit 2bff77c665ed ("scripts/decode_stacktrace.sh: fix decoding of
lines with an additional info"). However, this logic was placed after the
build ID processing. This incorrect order fails to parse lines containing
both ele... | ```diff
diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
index c73cb802a0a3..8d01b741de62 100755
--- a/scripts/decode_stacktrace.sh
+++ b/scripts/decode_stacktrace.sh
@@ -277,12 +277,6 @@ handle_line() {
fi
done
- if [[ ${words[$last]} =~ ^[0-9a-f]+\] ]]; then
- words[$last-1]="${words[$... |
9fd7bb5083d1e1027b8ac1e365c29921ab88b177 | Analyze and fix the following issue in the Linux kernel code: mm/damon/sysfs: change next_update_jiffies to a global variable | Problem Details:
In DAMON's damon_sysfs_repeat_call_fn(), time_before() is used to compare
the current jiffies with next_update_jiffies to determine whether to
update the sysfs files at this moment.
On 32-bit systems, the kernel initializes jiffies to "-5 minutes" to make
jiffies wrap bugs appear earlier. However, thi... | ```diff
diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c
index cd6815ecc04e..3c0d727788c8 100644
--- a/mm/damon/sysfs.c
+++ b/mm/damon/sysfs.c
@@ -1552,16 +1552,17 @@ static struct damon_ctx *damon_sysfs_build_ctx(
return ctx;
}
+static unsigned long damon_sysfs_next_update_jiffies;
+
static int damon_sysfs_repea... |
2f6ce7e714ef842e43120ecd6a7ed287b502026d | Analyze and fix the following issue in the Linux kernel code: mm/damon/stat: change last_refresh_jiffies to a global variable | Problem Details:
Patch series "mm/damon: fixes for the jiffies-related issues", v2.
On 32-bit systems, the kernel initializes jiffies to "-5 minutes" to make
jiffies wrap bugs appear earlier. However, this may cause the
time_before() series of functions to return unexpected values, resulting
in DAMON not functioning ... | ```diff
diff --git a/mm/damon/stat.c b/mm/damon/stat.c
index d8010968bbed..bf8626859902 100644
--- a/mm/damon/stat.c
+++ b/mm/damon/stat.c
@@ -46,6 +46,8 @@ MODULE_PARM_DESC(aggr_interval_us,
static struct damon_ctx *damon_stat_context;
+static unsigned long damon_stat_last_refresh_jiffies;
+
static void damon_st... |
91a54090026f84ceffaa12ac53c99b9f162946f6 | Analyze and fix the following issue in the Linux kernel code: maple_tree: fix tracepoint string pointers | Problem Details:
maple_tree tracepoints contain pointers to function names. Such a pointer
is saved when a tracepoint logs an event. There's no guarantee that it's
still valid when the event is parsed later and the pointer is dereferenced.
The kernel warns about these unsafe pointers.
event 'ma_read' has unsafe poin... | ```diff
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 39bb779cb311..5aa4c9500018 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -64,6 +64,8 @@
#define CREATE_TRACE_POINTS
#include <trace/events/maple_tree.h>
+#define TP_FCT tracepoint_string(__func__)
+
/*
* Kernel pointer hashing renders much ... |
1abbdf3d57aa964e572940d67c9ec5dc87710738 | Analyze and fix the following issue in the Linux kernel code: codetag: debug: handle existing CODETAG_EMPTY in mark_objexts_empty for slabobj_ext | Problem Details:
When alloc_slab_obj_exts() fails and then later succeeds in allocating a
slab extension vector, it calls handle_failed_objexts_alloc() to mark all
objects in the vector as empty. As a result all objects in this slab
(slabA) will have their extensions set to CODETAG_EMPTY.
Later on if this slabA is us... | ```diff
diff --git a/mm/slub.c b/mm/slub.c
index f1a5373eee7b..1bf65c421325 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2046,7 +2046,11 @@ static inline void mark_objexts_empty(struct slabobj_ext *obj_exts)
if (slab_exts) {
unsigned int offs = obj_to_index(obj_exts_slab->slab_cache,
obj_exts_slab, obj_exts)... |
04d1c9d60c6ec4c0003d433572eaa45f8b217788 | Analyze and fix the following issue in the Linux kernel code: mm/mremap: honour writable bit in mremap pte batching | Problem Details:
Currently mremap folio pte batch ignores the writable bit during figuring
out a set of similar ptes mapping the same folio. Suppose that the first
pte of the batch is writable while the others are not - set_ptes will end
up setting the writable bit on the other ptes, which is a violation of
mremap sem... | ```diff
diff --git a/mm/mremap.c b/mm/mremap.c
index bd7314898ec5..419a0ea0a870 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -187,7 +187,7 @@ static int mremap_folio_pte_batch(struct vm_area_struct *vma, unsigned long addr
if (!folio || !folio_test_large(folio))
return 1;
- return folio_pte_batch(folio, ptep, p... |
ec4d11fc4b2dd4a2fa8c9d801ee9753b74623554 | Analyze and fix the following issue in the Linux kernel code: gcov: add support for GCC 15 | Problem Details:
Using gcov on kernels compiled with GCC 15 results in truncated 16-byte
long .gcda files with no usable data. To fix this, update GCOV_COUNTERS
to match the value defined by GCC 15.
Tested with GCC 14.3.0 and GCC 15.2.0.
Link: https://lkml.kernel.org/r/20251028115125.1319410-1-oberpar@linux.ibm.com
... | ```diff
diff --git a/kernel/gcov/gcc_4_7.c b/kernel/gcov/gcc_4_7.c
index a08cc076f332..ffde93d051a4 100644
--- a/kernel/gcov/gcc_4_7.c
+++ b/kernel/gcov/gcc_4_7.c
@@ -18,7 +18,9 @@
#include <linux/mm.h>
#include "gcov.h"
-#if (__GNUC__ >= 14)
+#if (__GNUC__ >= 15)
+#define GCOV_COUNTERS 10
+#elif (__GNUC__ >= 14)... |
0d6c356dd6547adac2b06b461528e3573f52d953 | Analyze and fix the following issue in the Linux kernel code: mm/mm_init: fix hash table order logging in alloc_large_system_hash() | Problem Details:
When emitting the order of the allocation for a hash table,
alloc_large_system_hash() unconditionally subtracts PAGE_SHIFT from log
base 2 of the allocation size. This is not correct if the allocation size
is smaller than a page, and yields a negative value for the order as seen
below:
TCP establishe... | ```diff
diff --git a/mm/mm_init.c b/mm/mm_init.c
index 3db2dea7db4c..7712d887b696 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -2469,7 +2469,7 @@ void *__init alloc_large_system_hash(const char *tablename,
panic("Failed to allocate %s hash table\n", tablename);
pr_info("%s hash table entries: %ld (order: %d, ... |
fa04f5b60fda62c98a53a60de3a1e763f11feb41 | Analyze and fix the following issue in the Linux kernel code: mm/truncate: unmap large folio on split failure | Problem Details:
Accesses within VMA, but beyond i_size rounded up to PAGE_SIZE are
supposed to generate SIGBUS.
This behavior might not be respected on truncation.
During truncation, the kernel splits a large folio in order to reclaim
memory. As a side effect, it unmaps the folio and destroys PMD mappings
of the fo... | ```diff
diff --git a/mm/truncate.c b/mm/truncate.c
index 9210cf808f5c..3c5a50ae3274 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -177,6 +177,32 @@ int truncate_inode_folio(struct address_space *mapping, struct folio *folio)
return 0;
}
+static int try_folio_split_or_unmap(struct folio *folio, struct page *spl... |
74207de2ba10c2973334906822dc94d2e859ffc5 | Analyze and fix the following issue in the Linux kernel code: mm/memory: do not populate page table entries beyond i_size | Problem Details:
Patch series "Fix SIGBUS semantics with large folios", v3.
Accessing memory within a VMA, but beyond i_size rounded up to the next
page size, is supposed to generate SIGBUS.
Darrick reported[1] an xfstests regression in v6.18-rc1. generic/749
failed due to missing SIGBUS. This was caused by my rece... | ```diff
diff --git a/mm/filemap.c b/mm/filemap.c
index 13f0259d993c..2f1e7e283a51 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -3681,7 +3681,8 @@ skip:
static vm_fault_t filemap_map_folio_range(struct vm_fault *vmf,
struct folio *folio, unsigned long start,
unsigned long addr, unsigned int nr_pages,
- uns... |
895b4c0c79b092d732544011c3cecaf7322c36a1 | Analyze and fix the following issue in the Linux kernel code: fs/proc: fix uaf in proc_readdir_de() | Problem Details:
Pde is erased from subdir rbtree through rb_erase(), but not set the node
to EMPTY, which may result in uaf access. We should use RB_CLEAR_NODE()
set the erased node to EMPTY, then pde_subdir_next() will return NULL to
avoid uaf access.
We found an uaf issue while using stress-ng testing, need to run... | ```diff
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 176281112273..501889856461 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -698,6 +698,12 @@ void pde_put(struct proc_dir_entry *pde)
}
}
+static void pde_erase(struct proc_dir_entry *pde, struct proc_dir_entry *parent)
+{
+ rb_erase(&pde->... |
fa5a061700364bc28ee1cb1095372f8033645dcb | Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: preserve PG_has_hwpoisoned if a folio is split to >0 order | Problem Details:
folio split clears PG_has_hwpoisoned, but the flag should be preserved in
after-split folios containing pages with PG_hwpoisoned flag if the folio
is split to >0 order folios. Scan all pages in a to-be-split folio to
determine which after-split folios need the flag.
An alternatives is to change PG_ha... | ```diff
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index feac4aef7dfb..b4ff49d96501 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -3263,6 +3263,14 @@ bool can_split_folio(struct folio *folio, int caller_pins, int *pextra_pins)
caller_pins;
}
+static bool page_range_has_hwpoisoned(struct page *p... |
f5548c318d6520d4fa3c5ed6003eeb710763cbc5 | Analyze and fix the following issue in the Linux kernel code: ksm: use range-walk function to jump over holes in scan_get_next_rmap_item | Problem Details:
Currently, scan_get_next_rmap_item() walks every page address in a VMA to
locate mergeable pages. This becomes highly inefficient when scanning
large virtual memory areas that contain mostly unmapped regions, causing
ksmd to use large amount of cpu without deduplicating much pages.
This patch replace... | ```diff
diff --git a/mm/ksm.c b/mm/ksm.c
index 7bc726b50b2f..c4e730409949 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -2455,6 +2455,95 @@ static bool should_skip_rmap_item(struct folio *folio,
return true;
}
+struct ksm_next_page_arg {
+ struct folio *folio;
+ struct page *page;
+ unsigned long addr;
+};
+
+static int... |
7e76b75e5ab3339bebab3a4738226cd9b27d8c42 | Analyze and fix the following issue in the Linux kernel code: mm/kmsan: fix kmsan kmalloc hook when no stack depots are allocated yet | Problem Details:
If no stack depot is allocated yet, due to masking out __GFP_RECLAIM flags
kmsan called from kmalloc cannot allocate stack depot. kmsan fails to
record origin and report issues. This may result in KMSAN failing to
report issues.
Reusing flags from kmalloc without modifying them should be safe for km... | ```diff
diff --git a/mm/kmsan/core.c b/mm/kmsan/core.c
index 8bca7fece47f..35ceaa8adb41 100644
--- a/mm/kmsan/core.c
+++ b/mm/kmsan/core.c
@@ -72,9 +72,6 @@ depot_stack_handle_t kmsan_save_stack_with_flags(gfp_t flags,
nr_entries = stack_trace_save(entries, KMSAN_STACK_DEPTH, 0);
- /* Don't sleep. */
- flags &= ~... |
fc745ff317566ec299e16346ebb9eacc8fe5b9d2 | Analyze and fix the following issue in the Linux kernel code: mm/shmem: fix THP allocation and fallback loop | Problem Details:
The order check and fallback loop is updating the index value on every
loop. This will cause the index to be wrongly aligned by a larger value
while the loop shrinks the order.
This may result in inserting and returning a folio of the wrong index and
cause data corruption with some userspace workload... | ```diff
diff --git a/mm/shmem.c b/mm/shmem.c
index b9081b817d28..58701d14dd96 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1882,6 +1882,7 @@ static struct folio *shmem_alloc_and_add_folio(struct vm_fault *vmf,
struct shmem_inode_info *info = SHMEM_I(inode);
unsigned long suitable_orders = 0;
struct folio *folio =... |
fa759cd75bce5489eed34596daa53f721849a86f | Analyze and fix the following issue in the Linux kernel code: kho: allocate metadata directly from the buddy allocator | Problem Details:
KHO allocates metadata for its preserved memory map using the slab
allocator via kzalloc(). This metadata is temporary and is used by the
next kernel during early boot to find preserved memory.
A problem arises when KFENCE is enabled. kzalloc() calls can be randomly
intercepted by kfence_alloc(), wh... | ```diff
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 0ceb4e09306c..623bee335383 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -7,6 +7,7 @@
#include <linux/mmzone.h>
#include <linux/topology.h>
#include <linux/alloc_tag.h>
+#include <linux/cleanup.h>
#include <linux/sched.h>
struct... |
a2fff99f92dae9c0eaf0d75de3def70ec68dad92 | Analyze and fix the following issue in the Linux kernel code: kho: increase metadata bitmap size to PAGE_SIZE | Problem Details:
KHO memory preservation metadata is preserved in 512 byte chunks which
requires their allocation from slab allocator. Slabs are not safe to be
used with KHO because of kfence, and because partial slabs may lead leaks
to the next kernel. Change the size to be PAGE_SIZE.
The kfence specifically may ca... | ```diff
diff --git a/kernel/kexec_handover.c b/kernel/kexec_handover.c
index 0bc9001e532a..9217d2fdd2d3 100644
--- a/kernel/kexec_handover.c
+++ b/kernel/kexec_handover.c
@@ -69,10 +69,10 @@ early_param("kho", kho_parse_enable);
* Keep track of memory that is to be preserved across KHO.
*
* The serializing side u... |
e38f65d317df1fd2dcafe614d9c537475ecf9992 | Analyze and fix the following issue in the Linux kernel code: kho: warn and fail on metadata or preserved memory in scratch area | Problem Details:
Patch series "KHO: kfence + KHO memory corruption fix", v3.
This series fixes a memory corruption bug in KHO that occurs when KFENCE
is enabled.
The root cause is that KHO metadata, allocated via kzalloc(), can be
randomly serviced by kfence_alloc(). When a kernel boots via KHO, the
early memblock a... | ```diff
diff --git a/kernel/Kconfig.kexec b/kernel/Kconfig.kexec
index 422270d64820..54e581072617 100644
--- a/kernel/Kconfig.kexec
+++ b/kernel/Kconfig.kexec
@@ -109,6 +109,15 @@ config KEXEC_HANDOVER
to keep data or state alive across the kexec. For this to work,
both source and target kernels need to have th... |
77008e1b2ef73249bceb078a321a3ff6bc087afb | Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: do not change split_huge_page*() target order silently | Problem Details:
Page cache folios from a file system that support large block size (LBS)
can have minimal folio order greater than 0, thus a high order folio might
not be able to be split down to order-0. Commit e220917fa507 ("mm: split
a folio in minimum folio order chunks") bumps the target order of
split_huge_page... | ```diff
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index f327d62fc985..71ac78b9f834 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -376,45 +376,30 @@ bool non_uniform_split_supported(struct folio *folio, unsigned int new_order,
int folio_split(struct folio *folio, unsigned in... |
237e74bfa261fb0cf75bd08c9be0c5094018ee20 | Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Fix max supported vCPUs set with EIOINTC | Problem Details:
VM fails to boot with 256 vCPUs, the detailed command is
qemu-system-loongarch64 -smp 256
and there is an error reported as follows:
KVM_LOONGARCH_EXTIOI_INIT_NUM_CPU failed: Invalid argument
There is typo issue in function kvm_eiointc_ctrl_access() when set
max supported vCPUs.
Cc: stable@vge... | ```diff
diff --git a/arch/loongarch/kvm/intc/eiointc.c b/arch/loongarch/kvm/intc/eiointc.c
index c32333695381..a1cc116b4dac 100644
--- a/arch/loongarch/kvm/intc/eiointc.c
+++ b/arch/loongarch/kvm/intc/eiointc.c
@@ -439,7 +439,7 @@ static int kvm_eiointc_ctrl_access(struct kvm_device *dev,
spin_lock_irqsave(&s->lock, ... |
5001bcf86edf2de02f025a0f789bcac37fa040e6 | Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Restore guest PMU if it is enabled | Problem Details:
On LoongArch system, guest PMU hardware is shared by guest and host but
PMU interrupt is separated. PMU is pass-through to VM, and there is PMU
context switch when exit to host and return to guest.
There is optimiation to check whether PMU is enabled by guest. If not,
it is not necessary to return to ... | ```diff
diff --git a/arch/loongarch/kvm/vcpu.c b/arch/loongarch/kvm/vcpu.c
index 30e3b089a596..b3995ff4b17e 100644
--- a/arch/loongarch/kvm/vcpu.c
+++ b/arch/loongarch/kvm/vcpu.c
@@ -132,6 +132,9 @@ static void kvm_lose_pmu(struct kvm_vcpu *vcpu)
* Clear KVM_LARCH_PMU if the guest is not using PMU CSRs when
* exi... |
62cda5e54f7c5e773911b458dd4d10ee8c91b60b | Analyze and fix the following issue in the Linux kernel code: LoongArch: kexec: Print out debugging message if required | Problem Details:
When specifying '-d' for kexec_file_load interface, loaded locations of
kernel/initrd/cmdline etc can be printed out to help debug.
Commit eb7622d908a0 ("kexec_file, riscv: print out debugging message if
required") fixes the same issue on RISC-V.
So, remove kexec_image_info() because the content has ... | ```diff
diff --git a/arch/loongarch/kernel/machine_kexec.c b/arch/loongarch/kernel/machine_kexec.c
index e4b2bbc47e62..2d64b7c81e5e 100644
--- a/arch/loongarch/kernel/machine_kexec.c
+++ b/arch/loongarch/kernel/machine_kexec.c
@@ -39,34 +39,12 @@ static unsigned long systable_ptr;
static unsigned long start_addr;
sta... |
df16b8956cae970027f4be4a1500272201e2d5c1 | Analyze and fix the following issue in the Linux kernel code: LoongArch: kexec: Initialize the kexec_buf structure | Problem Details:
The kexec_buf structure was previously declared without initialization.
commit bf454ec31add ("kexec_file: allow to place kexec_buf randomly")
added a field that is always read but not consistently populated by all
architectures. This un-initialized field will contain garbage.
This is also triggering a... | ```diff
diff --git a/arch/loongarch/kernel/kexec_efi.c b/arch/loongarch/kernel/kexec_efi.c
index 45121b914f8f..5ee78ebb1546 100644
--- a/arch/loongarch/kernel/kexec_efi.c
+++ b/arch/loongarch/kernel/kexec_efi.c
@@ -42,7 +42,7 @@ static void *efi_kexec_load(struct kimage *image,
{
int ret;
unsigned long text_offset... |
eeeeaafa62ea0cd4b86390f657dc0aea73bff4f5 | Analyze and fix the following issue in the Linux kernel code: LoongArch: Use correct accessor to read FWPC/MWPC | Problem Details:
CSR.FWPC and CSR.MWPC are 32bit registers, so use csr_read32() rather
than csr_read64() to read the values of FWPC/MWPC.
Cc: stable@vger.kernel.org
Fixes: edffa33c7bb5a73 ("LoongArch: Add hardware breakpoints/watchpoints support")
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> | ```diff
diff --git a/arch/loongarch/include/asm/hw_breakpoint.h b/arch/loongarch/include/asm/hw_breakpoint.h
index 13b2462f3d8c..5faa97a87a9e 100644
--- a/arch/loongarch/include/asm/hw_breakpoint.h
+++ b/arch/loongarch/include/asm/hw_breakpoint.h
@@ -134,13 +134,13 @@ static inline void hw_breakpoint_thread_switch(stru... |
4e67526840fc55917581b90f6a4b65849a616dd8 | Analyze and fix the following issue in the Linux kernel code: LoongArch: Use physical addresses for CSR_MERRENTRY/CSR_TLBRENTRY | Problem Details:
Now we use virtual addresses to fill CSR_MERRENTRY/CSR_TLBRENTRY, but
hardware hope physical addresses. Now it works well because the high
bits are ignored above PA_BITS (48 bits), but explicitly use physical
addresses can avoid potential bugs. So fix it.
Cc: stable@vger.kernel.org
Signed-off-by: Huac... | ```diff
diff --git a/arch/loongarch/kernel/traps.c b/arch/loongarch/kernel/traps.c
index 3d9be6ca7ec5..da5926fead4a 100644
--- a/arch/loongarch/kernel/traps.c
+++ b/arch/loongarch/kernel/traps.c
@@ -1131,8 +1131,8 @@ static void configure_exception_vector(void)
tlbrentry = (unsigned long)exception_handlers + 80*VECSI... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.