id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
5a1256acaa856e6770d74dd786b1b12548969c28 | Analyze and fix the following issue in the Linux kernel code: regulator: s2mps11: drop redundant sanity checks in s2mpg10_of_parse_cb() | Problem Details:
The sanity checks being removed in this commit are useless as earlier
code already checks for all conditions, including all error cases like
out-of-bounds conditions. In other words, the code being removed here
has no effect, as any potential error it could catch will already have
been caught by earlie... | ```diff
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 2d5510acd078..2d67c5c16f48 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -478,8 +478,6 @@ static int s2mpg10_of_parse_cb(struct device_node *np,
return -EINVAL;
}
- if (ext_control > ARRAY_SIZE... |
600b665b903733bd60334e86031b157cc823ee55 | Analyze and fix the following issue in the Linux kernel code: io_uring/cmd_net: fix too strict requirement on ioctl | Problem Details:
Attempting SOCKET_URING_OP_SETSOCKOPT on an AF_NETLINK socket resulted
in an -EOPNOTSUPP, as AF_NETLINK doesn't have an ioctl in its struct
proto, but only in struct proto_ops.
Prior to the blamed commit, io_uring_cmd_sock() only had two cmd_op
operations, both requiring ioctl, thus the check was warr... | ```diff
diff --git a/io_uring/cmd_net.c b/io_uring/cmd_net.c
index cb2775936fb8..57ddaf874611 100644
--- a/io_uring/cmd_net.c
+++ b/io_uring/cmd_net.c
@@ -160,16 +160,19 @@ int io_uring_cmd_sock(struct io_uring_cmd *cmd, unsigned int issue_flags)
struct proto *prot = READ_ONCE(sk->sk_prot);
int ret, arg = 0;
- if... |
e98696edac6945144ece6819b0fad47192df4b2b | Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Avoid potentially repeated XRUN error messages | Problem Details:
Some XRUN-related error messages may repeat themselves, because there
can be multiple pending packets. Modify notify_xrun() function to
return whether it's being stopped or not, and show the error message
only once when the XRUN is actually handled.
Along with it, fix a typo of word package to packet... | ```diff
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 6e443f762de8..a855b2cc60c7 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -402,18 +402,21 @@ static int prepare_inbound_urb(struct snd_usb_endpoint *ep,
}
/* notify an error as XRUN to the assigned PCM data substream */
-static ... |
fba2105a157fffcf19825e4eea498346738c9948 | Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Add sanity check for OOB writes at silencing | Problem Details:
At silencing the playback URB packets in the implicit fb mode before
the actual playback, we blindly assume that the received packets fit
with the buffer size. But when the setup in the capture stream
differs from the playback stream (e.g. due to the USB core limitation
of max packet size), such an in... | ```diff
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 08cc2ee5707d..6e443f762de8 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -275,8 +275,8 @@ static inline bool has_tx_length_quirk(struct snd_usb_audio *chip)
return chip->quirk_flags & QUIRK_FLAG_TX_LENGTH;
}
-static void prepa... |
cf044e44190234a41a788de1cdbb6c21f4a52e1e | Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Update the number of packets properly at receiving | Problem Details:
At receiving the packets from the implicit feedback source, we didn't
update ctx->packets field but only the ctx->packet_size[] data.
In exceptional cases, this might lead to unexpectedly superfluous data
transfer (although this won't happen usually due to the nature of USB
isochronous transfer). Fix ... | ```diff
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 8f9313857ee9..27ade2aa16f5 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -481,6 +481,7 @@ int snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
/* copy over the length information */
if (implicit_fb) {
+ ctx-... |
7feebdb041a99ff4bfac72f1a18de44de2ed5d63 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Make xe_ggtt_node offset relative to starting offset | Problem Details:
Fix all functions that use node->start to use xe_ggtt_node_addr,
and add ggtt->start to node->start.
This will make node shifting for SR-IOV VF a one-liner, instead of
manually changing each GGTT node's base address.
Also convert some uses of mutex_lock/unlock to mutex guards.
Reviewed-by: Michal Wa... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 2ab880772847..479df63f31bf 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -299,7 +299,7 @@ static void __xe_ggtt_init_early(struct xe_ggtt *ggtt, u64 start, u64 size)
{
ggtt->start = start;
ggtt-... |
6af6be278e3ba2ffb6af5b796c89dfb3f5d9063e | Analyze and fix the following issue in the Linux kernel code: gpio: cdev: Avoid NULL dereference in linehandle_create() | Problem Details:
In linehandle_create(), there is a statement like this:
retain_and_null_ptr(lh);
Soon after, there is a debug printout that dereferences "lh", which
will crash things.
Avoid the crash by using handlereq.lines, which is the same value.
Fixes: da7e394bf58f ("gpio: convert linehandle_create() to FD_P... | ```diff
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index 2adc3c070908..189127721e38 100644
--- a/drivers/gpio/gpiolib-cdev.c
+++ b/drivers/gpio/gpiolib-cdev.c
@@ -388,7 +388,7 @@ static int linehandle_create(struct gpio_device *gdev, void __user *ip)
fd_publish(fdf);
dev_dbg(&gdev->dev... |
58433885ee99e8c96757e82ccf6d50646c4dfe09 | Analyze and fix the following issue in the Linux kernel code: gpio: nomadik: Add missing IS_ERR() check | Problem Details:
The function gpio_device_get_desc() can return an error pointer and is
not checked for one. Add check for error pointer.
Fixes: ddeb66d2cb10f ("gpio: nomadik: don't print out global GPIO numbers in debugfs callbacks")
Cc: stable@vger.kernel.org
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
L... | ```diff
diff --git a/drivers/gpio/gpio-nomadik.c b/drivers/gpio/gpio-nomadik.c
index 97c5cd33279d..e22b713166d7 100644
--- a/drivers/gpio/gpio-nomadik.c
+++ b/drivers/gpio/gpio-nomadik.c
@@ -430,6 +430,9 @@ void nmk_gpio_dbg_show_one(struct seq_file *s, struct pinctrl_dev *pctldev,
#ifdef CONFIG_PINCTRL_NOMADIK
if (... |
56112578c71213a10c995a56835bddb5e9ab1ed0 | Analyze and fix the following issue in the Linux kernel code: io_uring: delay sqarray static branch disablement | Problem Details:
io_key_has_sqarray static branch can be easily switched on/off by the
user every time patching the kernel. That can be very disruptive as it
might require heavy synchronisation across all CPUs. Use deferred static
keys, which can rate-limit it by deferring, batching and potentially
effectively eliminat... | ```diff
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index c45af82dda3d..ccab8562d273 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -119,7 +119,7 @@
static void io_queue_sqe(struct io_kiocb *req, unsigned int extra_flags);
static void __io_req_caches_free(struct io_ring_ctx *ctx);
-static ... |
7496e658a76a61758b20e27cea8abcfeafe3aec4 | Analyze and fix the following issue in the Linux kernel code: io_uring/zcrx: check unsupported flags on import | Problem Details:
The imoorted zcrx registration path checks for ZCRX_REG_IMPORT, as it
should, but doesn't reject any unsupported flags. Fix that.
Cc: stable@vger.kernel.org
Fixes: 00d91481279fb ("io_uring/zcrx: share an ifq between rings")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axb... | ```diff
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index b24d1da2e1ca..dda863e5e8b7 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -677,6 +677,8 @@ static int import_zcrx(struct io_ring_ctx *ctx,
return -EINVAL;
if (reg->if_rxq || reg->rq_entries || reg->area_ptr || reg->region_ptr)
return -EINVAL;
+... |
a09dc10d1353f0e92c21eae2a79af1c2b1ddcde8 | Analyze and fix the following issue in the Linux kernel code: ksmbd: call ksmbd_vfs_kern_path_end_removing() on some error paths | Problem Details:
There are two places where ksmbd_vfs_kern_path_end_removing() needs to be
called in order to balance what the corresponding successful call to
ksmbd_vfs_kern_path_start_removing() has done, i.e. drop inode locks and
put the taken references. Otherwise there might be potential deadlocks
and unbalanced ... | ```diff
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index cbb31efdbaa2..2782eea214d0 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -6115,14 +6115,14 @@ static int smb2_create_link(struct ksmbd_work *work,
rc = -EINVAL;
ksmbd_debug(SMB, "cannot delete %s\n",
... |
5d540e4508950c674d6feef1d95463d039bbf4f5 | Analyze and fix the following issue in the Linux kernel code: io_uring/zcrx: fix post open error handling | Problem Details:
Closing a queue doesn't guarantee that all associated page pools are
terminated right away, let the refcounting do the work instead of
releasing the zcrx ctx directly.
Cc: stable@vger.kernel.org
Fixes: e0793de24a9f6 ("io_uring/zcrx: set pp memory provider for an rx queue")
Signed-off-by: Pavel Begunko... | ```diff
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index 006e1bfefa5f..b24d1da2e1ca 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -515,9 +515,6 @@ static void io_close_queue(struct io_zcrx_ifq *ifq)
.mp_priv = ifq,
};
- if (ifq->if_rxq == -1)
- return;
-
scoped_guard(mutex, &ifq->pp_lock) {
net... |
a983aae397767e9da931128ff2b5bf9066513ce3 | Analyze and fix the following issue in the Linux kernel code: io_uring/zcrx: fix sgtable leak on mapping failures | Problem Details:
In an unlikely case when io_populate_area_dma() fails, which could only
happen on a PAGE_POOL_32BIT_ARCH_WITH_64BIT_DMA machine,
io_zcrx_map_area() will have an initialised and not freed table. It was
supposed to be cleaned up in the error path, but !is_mapped prevents
that.
Fixes: 439a98b972fbb ("io_... | ```diff
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index 69567e19b4ca..006e1bfefa5f 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -288,6 +288,9 @@ static int io_zcrx_map_area(struct io_zcrx_ifq *ifq, struct io_zcrx_area *area)
}
ret = io_populate_area_dma(ifq, area);
+ if (ret && !area->mem.is_dmabuf)... |
ca4ee40bf13dbd3a4be3b40a00c33a1153d487e5 | Analyze and fix the following issue in the Linux kernel code: Partly revert "drm/hyperv: Remove reference to hyperv_fb driver" | Problem Details:
This partly reverts commit 8f582bcd132c ("drm/hyperv: Remove reference
to hyperv_fb driver") which was messed up by me while trying to fix a
merge conflict.
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 65db9928439b..d3d52310c9cc 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -265,152 +265,6 @@ config DRM_SCHED
tristate
depends on DRM
-source "drivers/gpu/drm/sysfb/Kconfig"
-
-source "drivers/gpu/drm/arm/Kconfig"
... |
92978c83bb4eef55d02a6c990c01c423131eefa7 | Analyze and fix the following issue in the Linux kernel code: nfsd: Fix cred ref leak in nfsd_nl_listener_set_doit(). | Problem Details:
nfsd_nl_listener_set_doit() uses get_current_cred() without
put_cred().
As we can see from other callers, svc_xprt_create_from_sa()
does not require the extra refcount.
nfsd_nl_listener_set_doit() is always in the process context,
sendmsg(), and current->cred does not go away.
Let's use current_cred... | ```diff
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 43ced6b0e197..b06adb5d5a2e 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -2000,7 +2000,7 @@ int nfsd_nl_listener_set_doit(struct sk_buff *skb, struct genl_info *info)
}
ret = svc_xprt_create_from_sa(serv, xcl_name, net, sa, 0,
- ... |
1cb968a2013ffa8112d52ebe605009ea1c6a582c | Analyze and fix the following issue in the Linux kernel code: nfsd: Fix cred ref leak in nfsd_nl_threads_set_doit(). | Problem Details:
syzbot reported memory leak of struct cred. [0]
nfsd_nl_threads_set_doit() passes get_current_cred() to
nfsd_svc(), but put_cred() is not called after that.
The cred is finally passed down to _svc_xprt_create(),
which calls get_cred() with the cred for struct svc_xprt.
The ownership of the refcount ... | ```diff
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 89fe2c0e8d44..43ced6b0e197 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -1647,7 +1647,7 @@ int nfsd_nl_threads_set_doit(struct sk_buff *skb, struct genl_info *info)
if (attr)
nn->min_threads = nla_get_u32(attr);
- ret = nfsd_svc(nrpools, n... |
e1e828a1e9a79af76a7cdc271e0a506e496c2eaa | Analyze and fix the following issue in the Linux kernel code: docs: toshiba_haps: fix grammar error in SSD warning | Problem Details:
Replace "make this driver to fail" with "cause this driver to fail"
to correct the grammar.
Signed-off-by: Berke Antar <b@berkeantar.com>
Message-ID: <b9085090-e70f-46ac-aad0-96da1fc7cdcc@smtp-relay.sendinblue.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net> | ```diff
diff --git a/Documentation/admin-guide/laptops/toshiba_haps.rst b/Documentation/admin-guide/laptops/toshiba_haps.rst
index d28b6c3f2849..0226225b82e1 100644
--- a/Documentation/admin-guide/laptops/toshiba_haps.rst
+++ b/Documentation/admin-guide/laptops/toshiba_haps.rst
@@ -43,7 +43,7 @@ RSSS Shuts down the ... |
fe58576e6a2e9f74b770a5a51a77bde77bca26d3 | Analyze and fix the following issue in the Linux kernel code: Docs/mm: fix typos and grammar in page_tables.rst | Problem Details:
Correct several spelling and grammatical errors in the page tables
documentation. This includes:
- Fixing "a address" to "an address"
- Fixing "pfs" to "pfns"
- Correcting the possessive "Torvald's" to "Torvalds's"
- Fixing "instruction that want" to "instruction that wants"
- Fixing "code path" to "co... | ```diff
diff --git a/Documentation/mm/page_tables.rst b/Documentation/mm/page_tables.rst
index e7c69cc32493..126c87628250 100644
--- a/Documentation/mm/page_tables.rst
+++ b/Documentation/mm/page_tables.rst
@@ -26,9 +26,9 @@ Physical memory address 0 will be *pfn 0* and the highest pfn will be
the last page of physica... |
2ade267bd8872fb01750d4c1303735624087579a | Analyze and fix the following issue in the Linux kernel code: Docs/core-api: fix typos in rbtree.rst | Problem Details:
Correct minor typographical errors in the red-black tree documentation:
- Remove redundant "a" in the cached rbtrees section.
- Fix "updated" to "update" in the augmented rbtrees section.
- Fix "be looking" to "by looking" in the interval tree sample usage.
Signed-off-by: Min-Hsun Chang <chmh0624@gmai... | ```diff
diff --git a/Documentation/core-api/rbtree.rst b/Documentation/core-api/rbtree.rst
index ed1a9fbc779e..cce80e19087b 100644
--- a/Documentation/core-api/rbtree.rst
+++ b/Documentation/core-api/rbtree.rst
@@ -197,7 +197,7 @@ Cached rbtrees
--------------
Computing the leftmost (smallest) node is quite a commo... |
ac83896172798cf82ebc643cf555aa4cdd3a07da | Analyze and fix the following issue in the Linux kernel code: iomap: Describe @private in iomap_readahead() | Problem Details:
The kernel test rebot reports the kernel-doc warning:
```
Warning: fs/iomap/buffered-io.c:624 function parameter 'private'
not described in 'iomap_readahead'
```
The former commit in "iomap: stash iomap read ctx in the private
field of iomap_iter" has added a new parameter @private to
iomap_readahea... | ```diff
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 1fe19b4ee2f4..58887513b894 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -625,6 +625,7 @@ static int iomap_readahead_iter(struct iomap_iter *iter,
* iomap_readahead - Attempt to read pages from a file.
* @ops: The opera... |
81f16c9778d730f573d0d565706bb7227e2405f4 | Analyze and fix the following issue in the Linux kernel code: statmount: Fix the null-ptr-deref in do_statmount() | Problem Details:
If the mount is internal, it's mnt_ns will be MNT_NS_INTERNAL, which is
defined as ERR_PTR(-EINVAL). So, in the do_statmount(), need to check ns
of mount by IS_ERR() and return.
Fixes: 0e5032237ee5 ("statmount: accept fd as a parameter")
Reported-by: syzbot+9e03a9535ea65f687a44@syzkaller.appspotmail.c... | ```diff
diff --git a/fs/namespace.c b/fs/namespace.c
index a67cbe42746d..90700df65f0d 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -5678,6 +5678,8 @@ static int do_statmount(struct kstatmount *s, u64 mnt_id, u64 mnt_ns_id,
s->mnt = mnt_file->f_path.mnt;
ns = real_mount(s->mnt)->mnt_ns;
+ if (IS_ERR(ns))... |
9eed043d10f17301c1b5141e16bb98a85a8fd07e | Analyze and fix the following issue in the Linux kernel code: writeback: Fix wakeup and logging timeouts for !DETECT_HUNG_TASK | Problem Details:
Recent changes of fs-writeback cause such warnings if DETECT_HUNG_TASK
is not enabled:
INFO: The task sync:1342 has been waiting for writeback completion for more than 1 seconds.
The reason is sysctl_hung_task_timeout_secs is 0 when DETECT_HUNG_TASK
is not enabled, then it causes the warning message ... | ```diff
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 68228bf89b82..eb1ca86bf30a 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -198,10 +198,11 @@ static void wb_queue_work(struct bdi_writeback *wb,
static bool wb_wait_for_completion_cb(struct wb_completion *done)
{
+ unsigned long timeout = s... |
cb184dd19154fc486fa3d9e02afe70a97e54e055 | Analyze and fix the following issue in the Linux kernel code: fs: init flags_valid before calling vfs_fileattr_get | Problem Details:
syzbot reported a uninit-value bug in [1].
Similar to the "*get" context where the kernel's internal file_kattr
structure is initialized before calling vfs_fileattr_get(), we should
use the same mechanism when using fa.
[1]
BUG: KMSAN: uninit-value in fuse_fileattr_get+0xeb4/0x1450 fs/fuse/ioctl.c:51... | ```diff
diff --git a/fs/file_attr.c b/fs/file_attr.c
index 42721427245a..0e9b4f737546 100644
--- a/fs/file_attr.c
+++ b/fs/file_attr.c
@@ -376,7 +376,7 @@ SYSCALL_DEFINE5(file_getattr, int, dfd, const char __user *, filename,
struct path filepath __free(path_put) = {};
unsigned int lookup_flags = 0;
struct file_a... |
e9e0b48cd15b46dcb2bbc165f6b0fee698b855d6 | Analyze and fix the following issue in the Linux kernel code: drm/fourcc: fix plane order for 10/12/16-bit YCbCr formats | Problem Details:
The short comments had the correct order, but the long comments
had the planes reversed.
Fixes: 2271e0a20ef7 ("drm: drm_fourcc: add 10/12/16bit software decoder YCbCr formats")
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Robert Mader <r... | ```diff
diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
index e527b24bd824..c89aede3cb12 100644
--- a/include/uapi/drm/drm_fourcc.h
+++ b/include/uapi/drm/drm_fourcc.h
@@ -401,8 +401,8 @@ extern "C" {
* implementation can multiply the values by 2^6=64. For that reason the padding
* must o... |
ce4e25198a6aaaaf36248edf8daf3d744ec8e309 | Analyze and fix the following issue in the Linux kernel code: fbdev: au1200fb: Fix a memory leak in au1200fb_drv_probe() | Problem Details:
In au1200fb_drv_probe(), when platform_get_irq fails(), it directly
returns from the function with an error code, which causes a memory
leak.
Replace it with a goto label to ensure proper cleanup.
Fixes: 4e88761f5f8c ("fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe")
Signed-off-by: Feli... | ```diff
diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c
index ed770222660b..685e629e7e16 100644
--- a/drivers/video/fbdev/au1200fb.c
+++ b/drivers/video/fbdev/au1200fb.c
@@ -1724,8 +1724,10 @@ static int au1200fb_drv_probe(struct platform_device *dev)
/* Now hook interrupt too */
irq ... |
b28da0d092461ac239ff034a8ac3129320177ba3 | Analyze and fix the following issue in the Linux kernel code: fbdev: ffb: fix corrupted video output on Sun FFB1 | Problem Details:
Fix Sun FFB1 corrupted video out ([1] and [2]) by disabling overlay and
initializing window mode to a known state. The issue never appeared on
my FFB2+/vertical nor Elite3D/M6. It could also depend on the PROM
version.
/SUNW,ffb@1e,0: FFB at 000001fc00000000, type 11, DAC pnum[236c] rev[10] manuf_rev[... | ```diff
diff --git a/drivers/video/fbdev/ffb.c b/drivers/video/fbdev/ffb.c
index 34b6abff9493..da531b4cb451 100644
--- a/drivers/video/fbdev/ffb.c
+++ b/drivers/video/fbdev/ffb.c
@@ -335,6 +335,9 @@ struct ffb_dac {
};
#define FFB_DAC_UCTRL 0x1001 /* User Control */
+#define FFB_DAC_UCTRL_OVENAB 0x00000008 /* Over... |
c39ee2d264f98efa14aa46c9942114cb03c7baa6 | Analyze and fix the following issue in the Linux kernel code: fbdev: of_display_timing: Fix device node reference leak in of_get_display_timings() | Problem Details:
Use for_each_child_of_node_scoped instead of for_each_child_of_node
to ensure automatic of_node_put on early exit paths, preventing
device node reference leak.
Fixes: cc3f414cf2e4 ("video: add of helper for display timings/videomode")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Signed-off-by: Helge De... | ```diff
diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
index 1940c9505dd3..a6ec392253c3 100644
--- a/drivers/video/of_display_timing.c
+++ b/drivers/video/of_display_timing.c
@@ -195,7 +195,7 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
disp->num_... |
c595c19602cea955e23b8957e109f2da26407f8d | Analyze and fix the following issue in the Linux kernel code: staging: fbtft: Make framebuffer registration message debug-only | Problem Details:
The framebuffer registration message is informational only and not
useful during normal operation. Convert it to debug-level logging to
keep the driver quiet when working correctly.
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>... | ```diff
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 1b3b62950205..f427c0914907 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -792,11 +792,11 @@ int fbtft_register_framebuffer(struct fb_info *fb_info)
if (spi)
sprintf(text2... |
be26a07c61af5fe8eafbd3d172d4b6ab726d99d0 | Analyze and fix the following issue in the Linux kernel code: staging: fbtft: Fix build failure when CONFIG_FB_DEVICE=n | Problem Details:
When CONFIG_FB_DEVICE is disabled, struct fb_info does
not provide a valid dev pointer. Direct dereferences of
fb_info->dev therefore result in build failures.
Fix this by avoiding direct accesses to fb_info->dev and
switching the affected debug logging to framebuffer helpers
that do not rely on a dev... | ```diff
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 8a5ccc8ae0a1..1b3b62950205 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -365,9 +365,9 @@ static int fbtft_fb_setcolreg(unsigned int regno, unsigned int red,
unsigned int va... |
8e9bf8b9e8c0a3e1ef16dd48260a113f65ed01d2 | Analyze and fix the following issue in the Linux kernel code: printk, vt, fbcon: Remove console_conditional_schedule() | Problem Details:
do_con_write(), fbcon_redraw.*() invoke console_conditional_schedule()
which is a conditional scheduling point based on printk's internal
variables console_may_schedule. It may only be used if the console lock
is acquired for instance via console_lock() or console_trylock().
Prinkt sets the internal v... | ```diff
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 84de274d24ca..3bdbd4c52c2f 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -3230,7 +3230,6 @@ rescan_last_byte:
goto rescan_last_byte;
}
con_flush(vc, &draw);
- console_conditional_schedule();
notify_update(vc);
return n;
d... |
4a16b380333d2a07a4b3ceadee3ac2a320d266ef | Analyze and fix the following issue in the Linux kernel code: fbdev: fix fb_pad_unaligned_buffer mask | Problem Details:
mask is u8, so it should use 0xff instead of 0xfff
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de> | ```diff
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index eff757ebbed1..cf199038f069 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -100,7 +100,7 @@ EXPORT_SYMBOL(fb_pad_aligned_buffer);
void fb_pad_unaligned_buffer(u8 *dst, u32 d_pitch, u8 ... |
eacf9840ae1285a1ef47eb0ce16d786e542bd4d7 | Analyze and fix the following issue in the Linux kernel code: fbdev: of: display_timing: fix refcount leak in of_get_display_timings() | Problem Details:
of_parse_phandle() returns a device_node with refcount incremented,
which is stored in 'entry' and then copied to 'native_mode'. When the
error paths at lines 184 or 192 jump to 'entryfail', native_mode's
refcount is not decremented, causing a refcount leak.
Fix this by changing the goto target from '... | ```diff
diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
index bebd371c6b93..1940c9505dd3 100644
--- a/drivers/video/of_display_timing.c
+++ b/drivers/video/of_display_timing.c
@@ -181,7 +181,7 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
if (disp->... |
88b3b9924337336a31cefbe99a22ed09401be74a | Analyze and fix the following issue in the Linux kernel code: fbdev: vt8500lcdfb: fix missing dma_free_coherent() | Problem Details:
fbi->fb.screen_buffer is allocated with dma_alloc_coherent() but is not
freed if the error path is reached.
Fixes: e7b995371fe1 ("video: vt8500: Add devicetree support for vt8500-fb and wm8505-fb")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Signed-off-by: Hel... | ```diff
diff --git a/drivers/video/fbdev/vt8500lcdfb.c b/drivers/video/fbdev/vt8500lcdfb.c
index b08a6fdc53fd..85c7a99a7d64 100644
--- a/drivers/video/fbdev/vt8500lcdfb.c
+++ b/drivers/video/fbdev/vt8500lcdfb.c
@@ -369,7 +369,7 @@ static int vt8500lcd_probe(struct platform_device *pdev)
if (fbi->palette_cpu == NULL) ... |
011a0502801c8536f64141a2b61362c14f456544 | Analyze and fix the following issue in the Linux kernel code: fbcon: check return value of con2fb_acquire_newinfo() | Problem Details:
If fbcon_open() fails when called from con2fb_acquire_newinfo() then
info->fbcon_par pointer remains NULL which is later dereferenced.
Add check for return value of the function con2fb_acquire_newinfo() to
avoid it.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: d1baa4ffa67... | ```diff
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 34ea14412ace..36e380797a9e 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -1068,7 +1068,8 @@ static void fbcon_init(struct vc_data *vc, bool init)
return;
if (!info->fbcon_par)
... |
68eeb0871e986ae5462439dae881e3a27bcef85f | Analyze and fix the following issue in the Linux kernel code: fbdev: Use device_create_with_groups() to fix sysfs groups registration race | Problem Details:
The fbdev sysfs attributes are registered after sending the uevent for
the device creation, leaving a race window where e.g. udev rules may
not be able to access the sysfs attributes because the registration is
not done yet.
Fix this by switching to device_create_with_groups(). This also results in
a ... | ```diff
diff --git a/drivers/video/fbdev/core/fbsysfs.c b/drivers/video/fbdev/core/fbsysfs.c
index b8344c40073b..baa2bae0fb5b 100644
--- a/drivers/video/fbdev/core/fbsysfs.c
+++ b/drivers/video/fbdev/core/fbsysfs.c
@@ -12,8 +12,6 @@
#include "fb_internal.h"
-#define FB_SYSFS_FLAG_ATTR 1
-
static int activate(stru... |
120adae7b42faa641179270c067864544a50ab69 | Analyze and fix the following issue in the Linux kernel code: fbdev: smscufx: properly copy ioctl memory to kernelspace | Problem Details:
The UFX_IOCTL_REPORT_DAMAGE ioctl does not properly copy data from
userspace to kernelspace, and instead directly references the memory,
which can cause problems if invalid data is passed from userspace. Fix
this all up by correctly copying the memory before accessing it within
the kernel.
Reported-b... | ```diff
diff --git a/drivers/video/fbdev/smscufx.c b/drivers/video/fbdev/smscufx.c
index 5f0dd01fd834..891ce7b76d63 100644
--- a/drivers/video/fbdev/smscufx.c
+++ b/drivers/video/fbdev/smscufx.c
@@ -932,7 +932,6 @@ static int ufx_ops_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg)
{
struct ufx_... |
0209e21e3c372fa2da04c39214bec0b64e4eb5f4 | Analyze and fix the following issue in the Linux kernel code: fbdev: rivafb: fix divide error in nv3_arb() | Problem Details:
A userspace program can trigger the RIVA NV3 arbitration code by calling
the FBIOPUT_VSCREENINFO ioctl on /dev/fb*. When doing so, the driver
recomputes FIFO arbitration parameters in nv3_arb(), using state->mclk_khz
(derived from the PRAMDAC MCLK PLL) as a divisor without validating it
first.
In a no... | ```diff
diff --git a/drivers/video/fbdev/riva/riva_hw.c b/drivers/video/fbdev/riva/riva_hw.c
index 8b829b720064..f292079566cf 100644
--- a/drivers/video/fbdev/riva/riva_hw.c
+++ b/drivers/video/fbdev/riva/riva_hw.c
@@ -436,6 +436,9 @@ static char nv3_arb(nv3_fifo_info * res_info, nv3_sim_state * state, nv3_arb_in
... |
f043a93fff9e3e3e648b6525483f59104b0819fa | Analyze and fix the following issue in the Linux kernel code: mm: numa_memblks: Identify the accurate NUMA ID of CFMW | Problem Details:
In some physical memory layout designs, the address space of CFMW (CXL
Fixed Memory Window) resides between multiple segments of system memory
belonging to the same NUMA node. In numa_cleanup_meminfo, these multiple
segments of system memory are merged into a larger numa_memblk. When
identifying which ... | ```diff
diff --git a/mm/numa_memblks.c b/mm/numa_memblks.c
index 8f5735fda0a2..3f53464240e8 100644
--- a/mm/numa_memblks.c
+++ b/mm/numa_memblks.c
@@ -570,15 +570,16 @@ static int meminfo_to_nid(struct numa_meminfo *mi, u64 start)
int phys_to_target_node(u64 start)
{
int nid = meminfo_to_nid(&numa_meminfo, start);
... |
b0b1a8583d8e797114e613139e3e3318a1704690 | Analyze and fix the following issue in the Linux kernel code: bpf: Add a map/btf from a fd array more consistently | Problem Details:
The add_fd_from_fd_array() function takes a file descriptor as a
parameter and tries to add either map or btf to the corresponding
list of used objects. As was reported by Dan Carpenter, since the
commit c81e4322acf0 ("bpf: Fix a potential use-after-free of BTF
object"), the fdget() is called twice on ... | ```diff
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index d4afd571761b..dbaafb64d3bd 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -25372,9 +25372,11 @@ static int add_fd_from_fd_array(struct bpf_verifier_env *env, int fd)
return 0;
}
- btf = btf_get_by_fd(fd);
- if (!IS_ERR(bt... |
2669dde7a8c67e3efe8052d75d6040de2cbb5e5a | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix map_kptr grace period wait | Problem Details:
Commit c27cea4416a3 ("rcu: Re-implement RCU Tasks Trace in terms of SRCU-fast")
broke map_kptr selftest since it removed the function we were kprobing.
Use a new kfunc that invokes call_rcu_tasks_trace and sets a program
provided pointer to an integer to 1. Technically this can be unsafe if
the memory ... | ```diff
diff --git a/tools/testing/selftests/bpf/prog_tests/map_kptr.c b/tools/testing/selftests/bpf/prog_tests/map_kptr.c
index f372162c0280..03b46f17cf53 100644
--- a/tools/testing/selftests/bpf/prog_tests/map_kptr.c
+++ b/tools/testing/selftests/bpf/prog_tests/map_kptr.c
@@ -118,15 +118,16 @@ exit:
static int ker... |
48f624c3dc71c2b807ce138bb70d1f5216532874 | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Adjust selftest due to function rename | Problem Details:
do_filp_open() was renamed in commit
541003b576c3 ("rename do_filp_open() to do_file_open()")
This broke test_profiler, because it uses a kretprobe on that
function. Fix it by renaming accordingly.
Reported-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>
Closes: https://lore.kernel.org/bpf/djwjf2vfb7gro3rfa... | ```diff
diff --git a/tools/testing/selftests/bpf/progs/profiler.h b/tools/testing/selftests/bpf/progs/profiler.h
index 3bac4fdd4bdf..637fbf2c2652 100644
--- a/tools/testing/selftests/bpf/progs/profiler.h
+++ b/tools/testing/selftests/bpf/progs/profiler.h
@@ -169,7 +169,7 @@ enum bpf_function_id {
profiler_bpf_sched_p... |
ccd2d799ed4467c07f5ee18c2f5c59bcc990822c | Analyze and fix the following issue in the Linux kernel code: bpf: Fix a potential use-after-free of BTF object | Problem Details:
Refcounting in the check_pseudo_btf_id() function is incorrect:
the __check_pseudo_btf_id() function might get called with a zero
refcounted btf. Fix this, and patch related code accordingly.
v3: rephrase a comment (AI)
v2: fix a refcount leak introduced in v1 (AI)
Reported-by: syzbot+5a0f1995634f7c1... | ```diff
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index edf5342b982f..d4afd571761b 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -21333,29 +21333,29 @@ static int find_btf_percpu_datasec(struct btf *btf)
}
/*
- * Add btf to the used_btfs array and return the index. (If the btf w... |
04999b99e81eaa7b6223ec1c03af3bcb4ac57aaa | Analyze and fix the following issue in the Linux kernel code: libbpf: Fix invalid write loop logic in bpf_linker__add_buf() | Problem Details:
Fix bpf_linker__add_buf()'s logic of copying data from memory buffer into
memfd. In the event of short write not writing entire buf_sz bytes into memfd
file, we'll append bytes from the beginning of buf *again* (corrupting ELF
file contents) instead of correctly appending the rest of not-yet-read buf
c... | ```diff
diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c
index f4403e3cf994..78f92c39290a 100644
--- a/tools/lib/bpf/linker.c
+++ b/tools/lib/bpf/linker.c
@@ -581,7 +581,7 @@ int bpf_linker__add_buf(struct bpf_linker *linker, void *buf, size_t buf_sz,
written = 0;
while (written < buf_sz) {
- ret = w... |
728ff167910ef16e97717719c749ddf4064c653b | Analyze and fix the following issue in the Linux kernel code: libbpf: Add gating for arena globals relocation feature | Problem Details:
Add feature gating for the arena globals relocation introduced in
commit c1f61171d44b. The commit depends on a previous commit in the
same patchset that is absent from older kernels
(12a1fe6e12db "bpf/verifier: Do not limit maximum direct offset into arena map").
Without this commit, arena globals rel... | ```diff
diff --git a/tools/lib/bpf/features.c b/tools/lib/bpf/features.c
index b842b83e2480..b65ab109e3ff 100644
--- a/tools/lib/bpf/features.c
+++ b/tools/lib/bpf/features.c
@@ -506,6 +506,67 @@ static int probe_kern_arg_ctx_tag(int token_fd)
return probe_fd(prog_fd);
}
+static int probe_ldimm64_full_range_off(in... |
2995e713d8a76249bde325b464183430e21266aa | Analyze and fix the following issue in the Linux kernel code: ACPI: video: Clear driver_data pointer on remove | Problem Details:
After commit 02c057ddefef ("ACPI: video: Convert the driver to a
platform one") the driver_data pointer in the ACPI companion device
object is not cleared automatically on driver remove any more, so
clear it directly in acpi_video_bus_remove().
Fixes: 02c057ddefef ("ACPI: video: Convert the driver to ... | ```diff
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index 69469757b965..3d6e7306f29a 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -2116,6 +2116,7 @@ static void acpi_video_bus_remove(struct platform_device *pdev)
kfree(video->attached_array);
kfree(video);
+ dev... |
0b87d51690dd5131cbe9fbd23746b037aab89815 | Analyze and fix the following issue in the Linux kernel code: drm/bridge: ti-sn65dsi86: Enable HPD polling if IRQ is not used | Problem Details:
Fallback to polling to detect hotplug events on systems without
interrupts.
On systems where the interrupt line of the bridge is not connected,
the bridge cannot notify hotplug events. Only add the
DRM_BRIDGE_OP_HPD flag if an interrupt has been registered
otherwise remain in polling mode.
Fixes: 55e... | ```diff
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index 276d05d25ad8..98d64ad791d0 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -1415,6 +1415,7 @@ static int ti_sn_bridge_probe(struct auxiliary_device *adev,
{
struc... |
ee5492fd88cfc079c19fbeac78e9e53b7f6c04f3 | Analyze and fix the following issue in the Linux kernel code: fbnic: close fw_log race between users and teardown | Problem Details:
Fixes a theoretical race on fw_log between the teardown path and fw_log
write functions.
fw_log is written inside fbnic_fw_log_write() and can be reached from
the mailbox handler fbnic_fw_msix_intr(), but fw_log is freed before
IRQ/MBX teardown during cleanup, resulting in a potential data race of
der... | ```diff
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_fw_log.c b/drivers/net/ethernet/meta/fbnic/fbnic_fw_log.c
index 85a883dba385..d8a9a7d7c237 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_fw_log.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_fw_log.c
@@ -51,8 +51,6 @@ int fbnic_fw_log_init(struct fbnic_dev ... |
6a997f38bdf822d4c5cc10b445ff1cb26872580a | Analyze and fix the following issue in the Linux kernel code: vsock: prevent child netns mode switch from local to global | Problem Details:
A "local" namespace can change its `child_ns_mode` sysctl to "global",
allowing nested namespaces to access global CIDs. This can be exploited
by an unprivileged user who gained CAP_NET_ADMIN through a user
namespace.
Prevent this by rejecting writes that attempt to set `child_ns_mode` to
"global" whe... | ```diff
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 3b629b4a0359..9880756d9eff 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -95,8 +95,9 @@
* the namespace's own ns_mode.
*
* Changing child_ns_mode only affects newly created namespaces, not the
- * curr... |
9dd391493a727464e9a03cfff9356c8e10b8da0b | Analyze and fix the following issue in the Linux kernel code: vsock: fix child netns mode initialization | Problem Details:
When a new network namespace is created, vsock_net_init() correctly
initializes the namespace's mode by reading the parent's `child_ns_mode`
via vsock_net_child_mode(). However, the `child_ns_mode` of the new
namespace was always hardcoded to VSOCK_NET_MODE_GLOBAL, regardless of
its own mode.
This mea... | ```diff
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 20ad2b2dc17b..3b629b4a0359 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -91,7 +91,8 @@
* - /proc/sys/net/vsock/ns_mode (read-only) reports the current namespace's
* mode, which is set at namespace creatio... |
a49d2a2c37a6252c41cbdd505f9d1c58d5a3817a | Analyze and fix the following issue in the Linux kernel code: net: sparx5/lan969x: fix PTP clock max_adj value | Problem Details:
The max_adj field in ptp_clock_info tells userspace how much the PHC
clock frequency can be adjusted. ptp4l reads this and will never request
a correction larger than max_adj.
On both sparx5 and lan969x the clock offset may never converge because
the servo needs a frequency correction larger than the ... | ```diff
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c b/drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
index 2f168700f63c..8b2e07821a95 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
@@ -576,7 +576,7 @@ static int sparx5_ptp... |
8244f959e2c125c849e569f5b23ed49804cce695 | Analyze and fix the following issue in the Linux kernel code: ipv6: Fix out-of-bound access in fib6_add_rt2node(). | Problem Details:
syzbot reported out-of-bound read in fib6_add_rt2node(). [0]
When IPv6 route is created with RTA_NH_ID, struct fib6_info
does not have the trailing struct fib6_nh.
The cited commit started to check !iter->fib6_nh->fib_nh_gw_family
to ensure that rt6_qualify_for_ecmp() will return false for iter.
If ... | ```diff
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 9880d608392b..56058e6de490 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1139,7 +1139,7 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct fib6_info *rt,
fib6_add_gc_list(iter);
}
if (!(rt->fib6_flags & (RTF_ADDRC... |
6db8b56eed62baacaf37486e83378a72635c04cc | Analyze and fix the following issue in the Linux kernel code: ipv6: ioam: fix heap buffer overflow in __ioam6_fill_trace_data() | Problem Details:
On the receive path, __ioam6_fill_trace_data() uses trace->nodelen
to decide how much data to write for each node. It trusts this field
as-is from the incoming packet, with no consistency check against
trace->type (the 24-bit field that tells which data items are
present). A crafted packet can set node... | ```diff
diff --git a/include/net/ioam6.h b/include/net/ioam6.h
index 2cbbee6e806a..a75912fe247e 100644
--- a/include/net/ioam6.h
+++ b/include/net/ioam6.h
@@ -60,6 +60,8 @@ void ioam6_fill_trace_data(struct sk_buff *skb,
struct ioam6_trace_hdr *trace,
bool is_input);
+u8 ioam6_trace_compute_nodelen(u32 ... |
a68a9bd086c2822d0c629443bd16ad1317afe501 | Analyze and fix the following issue in the Linux kernel code: selftests: netconsole: Increase port listening timeout | Problem Details:
wait_for_port() can wait up to 2 seconds with the sleep and the polling
in wait_local_port_listen() combined. So, in netcons_basic.sh, the socat
process could die before the test writes to the netconsole.
Increase the timeout to 3 seconds to make netcons_basic.sh pass
consistently.
Fixes: 3dc6c76391c... | ```diff
diff --git a/tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh b/tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh
index b6093bcf2b06..02dcdeb723be 100644
--- a/tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh
+++ b/tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh
@@ -249,8 +24... |
96718ad296af4a6d984b3a09276b165ab6a3b0c8 | Analyze and fix the following issue in the Linux kernel code: tools/power turbostat: Fix and document --header_iterations | Problem Details:
The "header_iterations" option is commonly used to de-clutter
the screen of redundant header label rows in an interactive session:
Eg. every 10 rows:
$ sudo turbostat --header_iterations 10 -S -q -i 1
But --header_iterations was missing from turbostat.8
Also turbostat help advertised the "-N" short ... | ```diff
diff --git a/tools/power/x86/turbostat/turbostat.8 b/tools/power/x86/turbostat/turbostat.8
index b4ef04200219..344ede2f8546 100644
--- a/tools/power/x86/turbostat/turbostat.8
+++ b/tools/power/x86/turbostat/turbostat.8
@@ -111,12 +111,14 @@ The column name "all" can be used to enable all disabled-by-default bui... |
afdfb71c018e9a0aa2e51fb8186d3fb1acdd3f0e | Analyze and fix the following issue in the Linux kernel code: kbuild: rpm-pkg: Fix manual debuginfo generation when using .src.rpm | Problem Details:
Commit 62089b804895 ("kbuild: rpm-pkg: Generate debuginfo package
manually") added uses of OBJCOPY and READELF, variables from Kbuild.
These variables are defined and work properly when using the binrpm-pkg
target because rpmbuild is run within Kbuild. However, these variables
are not defined when buil... | ```diff
diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index af682a705477..bccf58bdd45f 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -148,11 +148,11 @@ echo /usr/lib/debug/lib/modules/%{KERNELRELEASE}/vmlinux > %{buildroot}/debuginf
while read -r mod; do
mod="... |
ffe9ac1ad56df8f915896b97bd7645f522c47ce9 | Analyze and fix the following issue in the Linux kernel code: kernel: rpm-pkg: Restore find-debuginfo.sh approach to -debuginfo package | Problem Details:
Commit 62089b804895 ("kbuild: rpm-pkg: Generate debuginfo package
manually") effectively reverted commit a7c699d090a1 ("kbuild: rpm-pkg:
build a debuginfo RPM") but the approach it took is not safe for older
RPM releases. Restore commit a7c699d090a1 ("kbuild: rpm-pkg: build a
debuginfo RPM") for the !C... | ```diff
diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index b7deb159f404..af682a705477 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -2,8 +2,6 @@
%{!?_arch: %define _arch dummy}
%{!?make: %define make make}
%define makeflags %{?_smp_mflags} ARCH=%{ARCH}
-%defi... |
6d6b8b0e28c468263d7fcb071e5cb284ae343df2 | Analyze and fix the following issue in the Linux kernel code: kbuild: rpm-pkg: Restrict manual debug package creation | Problem Details:
Commit 62089b804895 ("kbuild: rpm-pkg: Generate debuginfo package
manually") moved away from the built-in RPM machinery for generating
-debuginfo packages to a more manual way to be compatible with module
signing, as the built-in machinery strips the modules after the
installation process, breaking the... | ```diff
diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index 0f1c8de1bd95..b7deb159f404 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -47,12 +47,13 @@ This package provides kernel headers and makefiles sufficient to build modules
against the %{version} kernel pac... |
59f18d88d96e87e8c1faa171904dae43b19729db | Analyze and fix the following issue in the Linux kernel code: scripts/make_fit.py: Drop explicit LZMA parallel compression | Problem Details:
Parallel compression for LZMA was added using the plzip tool. However
plzip produces lzip format output, which is different from the raw LZMA
format that the lzma tool produces. This causes depthcharge (the second
stage bootloader on Chromebooks) to fail to load the payload.
Drop the explicit LZMA par... | ```diff
diff --git a/scripts/make_fit.py b/scripts/make_fit.py
index e923cc8b05b7..15ba26974fd7 100755
--- a/scripts/make_fit.py
+++ b/scripts/make_fit.py
@@ -54,7 +54,7 @@ COMP_TOOLS = {
'bzip2': CompTool('.bz2', 'pbzip2,bzip2'),
'gzip': CompTool('.gz', 'pigz,gzip'),
'lz4': CompTool('.lz4', 'lz4'),
- ... |
be55899b71630c79ad01df54c92e467e47644f87 | Analyze and fix the following issue in the Linux kernel code: kbuild: Fix CC_CAN_LINK detection | Problem Details:
Most samples cannot be build on some environments because they depend
on CC_CAN_LINK, which is set according to the result of
scripts/cc-can-link.sh called by cc_can_link_user.
Because cc-can-link.sh must now build without warning, it may fail
because it is calling printf() with an empty string:
+ ... | ```diff
diff --git a/scripts/cc-can-link.sh b/scripts/cc-can-link.sh
index e67fd8d7b684..58dc7dd6d556 100755
--- a/scripts/cc-can-link.sh
+++ b/scripts/cc-can-link.sh
@@ -5,7 +5,7 @@ cat << "END" | $@ -Werror -Wl,--fatal-warnings -x c - -o /dev/null >/dev/null 2>
#include <stdio.h>
int main(void)
{
- printf("");
+ p... |
0b82cc331d2e23537670878c62c19ee3f4147a93 | Analyze and fix the following issue in the Linux kernel code: selftests/sched_ext: Fix rt_stall flaky failure | Problem Details:
The rt_stall test measures the runtime ratio between an EXT and an RT
task pinned to the same CPU, verifying that the deadline server prevents
RT tasks from starving SCHED_EXT tasks. It expects the EXT task to get
at least 4% of CPU time.
The test is flaky because sched_stress_test() calls sleep(RUN_T... | ```diff
diff --git a/tools/testing/selftests/sched_ext/rt_stall.c b/tools/testing/selftests/sched_ext/rt_stall.c
index 015200f80f6e..ab772e336f86 100644
--- a/tools/testing/selftests/sched_ext/rt_stall.c
+++ b/tools/testing/selftests/sched_ext/rt_stall.c
@@ -23,6 +23,30 @@
#define CORE_ID 0 /* CPU to pin tasks to */
... |
cd7a5651db263b5384aef1950898e5e889425134 | Analyze and fix the following issue in the Linux kernel code: alpha: add missing address argument in call to page_table_check_pte_clear() | Problem Details:
After the merge of the alpha and mm trees, this code does not compile,
as a parameter is missing in a call to page_table_check_pte_clear().
The parameter was re-added in commit d7b4b67eb6b3 ("mm/page_table_check:
reinstate address parameter in [__]page_table_check_pte_clear()").
The alpha-specific cod... | ```diff
diff --git a/arch/alpha/include/asm/pgtable.h b/arch/alpha/include/asm/pgtable.h
index c9508ec37efc..e9368c54be45 100644
--- a/arch/alpha/include/asm/pgtable.h
+++ b/arch/alpha/include/asm/pgtable.h
@@ -289,7 +289,7 @@ static inline pte_t ptep_clear_flush(struct vm_area_struct *vma,
struct mm_struct *mm = vma... |
c020fff70d757612933711dd3cc3751d7d782d3c | Analyze and fix the following issue in the Linux kernel code: drm/xe/bo: Redirect faults to dummy page for wedged device | Problem Details:
As per uapi documentation[1], the prerequisite for wedged device is to
redirected page faults to a dummy page. Follow it.
[1] Documentation/gpu/drm-uapi.rst
v2: Add uapi reference and fixes tag (Matthew Brost)
Fixes: 7bc00751f877 ("drm/xe: Use device wedged event")
Signed-off-by: Raag Jadav <raag.ja... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index cb8a177ec02b..d6c2cb959cdd 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -1941,7 +1941,7 @@ static vm_fault_t xe_bo_cpu_fault(struct vm_fault *vmf)
int err = 0;
int idx;
- if (!drm_dev_enter(&xe->drm, ... |
888a0a802c467bbe34a42167bdf9d7331333440a | Analyze and fix the following issue in the Linux kernel code: spi: wpcm-fiu: Fix potential NULL pointer dereference in wpcm_fiu_probe() | Problem Details:
platform_get_resource_byname() can return NULL, which would cause a crash
when passed the pointer to resource_size().
Move the fiu->memory_size assignment after the error check for
devm_ioremap_resource() to prevent the potential NULL pointer dereference.
Fixes: 9838c182471e ("spi: wpcm-fiu: Add dire... | ```diff
diff --git a/drivers/spi/spi-wpcm-fiu.c b/drivers/spi/spi-wpcm-fiu.c
index 0e3ee5516587..0e26ff178505 100644
--- a/drivers/spi/spi-wpcm-fiu.c
+++ b/drivers/spi/spi-wpcm-fiu.c
@@ -459,11 +459,11 @@ static int wpcm_fiu_probe(struct platform_device *pdev)
res = platform_get_resource_byname(pdev, IORESOURCE_MEM... |
02471a78a052b631204aed051ab718e4d14ae687 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Remove redundant kern_hyp_va() in unpin_host_sve_state() | Problem Details:
The `sve_state` pointer in `hyp_vcpu->vcpu.arch` is initialized as a
hypervisor virtual address during vCPU initialization in
`pkvm_vcpu_init_sve()`.
`unpin_host_sve_state()` calls `kern_hyp_va()` on this address. Since
`kern_hyp_va()` is idempotent, it's not a bug. However, it is
unnecessary and pote... | ```diff
diff --git a/arch/arm64/kvm/hyp/nvhe/pkvm.c b/arch/arm64/kvm/hyp/nvhe/pkvm.c
index f3c1c6955163..2f029bfe4755 100644
--- a/arch/arm64/kvm/hyp/nvhe/pkvm.c
+++ b/arch/arm64/kvm/hyp/nvhe/pkvm.c
@@ -392,7 +392,7 @@ static void unpin_host_sve_state(struct pkvm_hyp_vcpu *hyp_vcpu)
if (!vcpu_has_feature(&hyp_vcpu->v... |
7e7c2cf0024d89443a7af52e09e47b1fe634ab17 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Fix ID register initialization for non-protected pKVM guests | Problem Details:
In protected mode, the hypervisor maintains a separate instance of
the `kvm` structure for each VM. For non-protected VMs, this structure is
initialized from the host's `kvm` state.
Currently, `pkvm_init_features_from_host()` copies the
`KVM_ARCH_FLAG_ID_REGS_INITIALIZED` flag from the host without th... | ```diff
diff --git a/arch/arm64/kvm/hyp/nvhe/pkvm.c b/arch/arm64/kvm/hyp/nvhe/pkvm.c
index 8e29d7734a15..f3c1c6955163 100644
--- a/arch/arm64/kvm/hyp/nvhe/pkvm.c
+++ b/arch/arm64/kvm/hyp/nvhe/pkvm.c
@@ -342,6 +342,7 @@ static void pkvm_init_features_from_host(struct pkvm_hyp_vm *hyp_vm, const struc
/* No restrictions... |
f66857bafd4f151c5cc6856e47be2e12c1721e43 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Hide S1POE from guests when not supported by the host | Problem Details:
When CONFIG_ARM64_POE is disabled, KVM does not save/restore POR_EL1.
However, ID_AA64MMFR3_EL1 sanitisation currently exposes the feature to
guests whenever the hardware supports it, ignoring the host kernel
configuration.
If a guest detects this feature and attempts to use it, the host will
fail to ... | ```diff
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
index a7cd0badc20c..1b4cacb6e918 100644
--- a/arch/arm64/kvm/sys_regs.c
+++ b/arch/arm64/kvm/sys_regs.c
@@ -1816,6 +1816,9 @@ static u64 __kvm_read_sanitised_id_reg(const struct kvm_vcpu *vcpu,
ID_AA64MMFR3_EL1_SCTLRX |
ID_AA... |
53b2fae90ff01fede6520ca744ed5e8e366497ba | Analyze and fix the following issue in the Linux kernel code: function_graph: Restore direct mode when callbacks drop to one | Problem Details:
When registering a second fgraph callback, direct path is disabled and
array loop is used instead. When ftrace_graph_active falls back to one,
we try to re-enable direct mode via ftrace_graph_enable_direct(true, ...).
But ftrace_graph_enable_direct() incorrectly disables the static key
rather than ena... | ```diff
diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c
index cc48d16be43e..4df766c690f9 100644
--- a/kernel/trace/fgraph.c
+++ b/kernel/trace/fgraph.c
@@ -1303,7 +1303,7 @@ static void ftrace_graph_enable_direct(bool enable_branch, struct fgraph_ops *go
static_call_update(fgraph_func, func);
static_call... |
026f6513c5880c2c89e38ad66bbec2868f978605 | Analyze and fix the following issue in the Linux kernel code: net: mscc: ocelot: add missing lock protection in ocelot_port_xmit_inj() | Problem Details:
ocelot_port_xmit_inj() calls ocelot_can_inject() and
ocelot_port_inject_frame() without holding the injection group lock.
Both functions contain lockdep_assert_held() for the injection lock,
and the correct caller felix_port_deferred_xmit() properly acquires
the lock using ocelot_lock_inj_grp() before ... | ```diff
diff --git a/drivers/net/ethernet/mscc/ocelot_net.c b/drivers/net/ethernet/mscc/ocelot_net.c
index a7966c174b2e..1b8269320464 100644
--- a/drivers/net/ethernet/mscc/ocelot_net.c
+++ b/drivers/net/ethernet/mscc/ocelot_net.c
@@ -597,14 +597,22 @@ static netdev_tx_t ocelot_port_xmit_inj(struct sk_buff *skb,
int ... |
6c28aa8dfdf24f554d4c5d4ff7d723a95360d94a | Analyze and fix the following issue in the Linux kernel code: net: sparx5/lan969x: fix DWRR cost max to match hardware register width | Problem Details:
DWRR (Deficit Weighted Round Robin) scheduling distributes bandwidth
across traffic classes based on per-queue cost values, where lower cost
means higher bandwidth share.
The SPX5_DWRR_COST_MAX constant is 63 (6 bits) but the hardware
register field HSCH_DWRR_ENTRY_DWRR_COST is GENMASK(24, 20), only
5... | ```diff
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_qos.h b/drivers/net/ethernet/microchip/sparx5/sparx5_qos.h
index 1231a80335d7..04f76f1e23f6 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_qos.h
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_qos.h
@@ -35,7 +35,7 @@
#define SPX5_SE_BURST_... |
8930878101cd40063888a68af73b1b0f8b6c79bc | Analyze and fix the following issue in the Linux kernel code: atm: fore200e: fix use-after-free in tasklets during device removal | Problem Details:
When the PCA-200E or SBA-200E adapter is being detached, the fore200e
is deallocated. However, the tx_tasklet or rx_tasklet may still be running
or pending, leading to use-after-free bug when the already freed fore200e
is accessed again in fore200e_tx_tasklet() or fore200e_rx_tasklet().
One of the rac... | ```diff
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index f62e38571440..fec081db36dc 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -373,6 +373,10 @@ fore200e_shutdown(struct fore200e* fore200e)
fallthrough;
case FORE200E_STATE_IRQ:
free_irq(fore200e->irq, fore200e->atm_de... |
babab1b42ed68877ef669a08384becf281ad2582 | Analyze and fix the following issue in the Linux kernel code: net: stmmac: fix oops when split header is enabled | Problem Details:
For GMAC4, when split header is enabled, in some rare cases, the
hardware does not fill buf2 of the first descriptor with payload.
Thus we cannot assume buf2 is always fully filled if it is not
the last descriptor. Otherwise, the length of buf2 of the second
descriptor will be calculated wrong and caus... | ```diff
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index c63099a77cc0..82375d34ad57 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -5040,13 +5040,27 @@ static unsigned int s... |
d03e094473ecdeb68d853752ba467abe13e1de44 | Analyze and fix the following issue in the Linux kernel code: net: intel: fix PCI device ID conflict between i40e and ipw2200 | Problem Details:
The ID 8086:104f is matched by both i40e and ipw2200. The same device
ID should not be in more than one driver, because in that case, which
driver is used is unpredictable. Fix this by taking advantage of the
fact that i40e devices use PCI_CLASS_NETWORK_ETHERNET and ipw2200
devices use PCI_CLASS_NETWOR... | ```diff
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index d3bc3207054f..02de186dcc8f 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -75,7 +75,13 @@ static const struct pci_device_id i40e_pci_tbl[] =... |
10ec0fc0ccc525abc807b0ca8ad5a26a0bd56361 | Analyze and fix the following issue in the Linux kernel code: selftests: net: lib: Fix jq parsing error | Problem Details:
The testcase failed as below:
$./vlan_bridge_binding.sh
...
+ adf_ip_link_set_up d1
+ local name=d1
+ shift
+ ip_link_is_up d1
+ ip_link_has_flag d1 UP
+ local name=d1
+ shift
+ local flag=UP
+ shift
++ ip -j link show d1
++ jq --arg flag UP 'any(.[].flags.[]; . == $flag)'
jq: error: syntax error, unex... | ```diff
diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh
index 0ec131b339bc..b40694573f4c 100644
--- a/tools/testing/selftests/net/lib.sh
+++ b/tools/testing/selftests/net/lib.sh
@@ -577,7 +577,7 @@ ip_link_has_flag()
local flag=$1; shift
local state=$(ip -j link show "$name" |... |
a2646773a005b59fd1dc7ff3ba15df84889ca5d2 | Analyze and fix the following issue in the Linux kernel code: selftests: mlxsw: tc_restrictions: Fix test failure with new iproute2 | Problem Details:
As explained in [1], iproute2 started rejecting tc-police burst sizes
that result in an overflow. This can happen when the burst size is high
enough and the rate is low enough.
A couple of test cases specify such configurations, resulting in
iproute2 errors and test failure.
Fix by reducing the burst... | ```diff
diff --git a/tools/testing/selftests/drivers/net/mlxsw/tc_restrictions.sh b/tools/testing/selftests/drivers/net/mlxsw/tc_restrictions.sh
index 0441a18f098b..aac8ef490feb 100755
--- a/tools/testing/selftests/drivers/net/mlxsw/tc_restrictions.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/tc_restrictions.sh
@... |
a6a9bc544b675d8b5180f2718ec985ad267b5cbf | Analyze and fix the following issue in the Linux kernel code: net: mctp: ensure our nlmsg responses are initialised | Problem Details:
Syed Faraz Abrar (@farazsth98) from Zellic, and Pumpkin (@u1f383) from
DEVCORE Research Team working with Trend Micro Zero Day Initiative
report that a RTM_GETNEIGH will return uninitalised data in the pad
bytes of the ndmsg data.
Ensure we're initialising the netlink data to zero, in the link, addr
a... | ```diff
diff --git a/net/mctp/device.c b/net/mctp/device.c
index 4d404edd7446..04c5570bacff 100644
--- a/net/mctp/device.c
+++ b/net/mctp/device.c
@@ -70,6 +70,7 @@ static int mctp_fill_addrinfo(struct sk_buff *skb,
return -EMSGSIZE;
hdr = nlmsg_data(nlh);
+ memset(hdr, 0, sizeof(*hdr));
hdr->ifa_family = AF_M... |
4cebb26ac6f02b49b8a7c6974af3b4f23685e1a2 | Analyze and fix the following issue in the Linux kernel code: net: phy: phy_port: Correctly recompute the port's linkmodes | Problem Details:
a PHY-driven phy_port contains a 'supported' field containing the
linkmodes available on this port. This is populated based on :
- The PHY's reported features
- The DT representation of the connector
- The PHY's attach_mdi() callback
As these different attrbution methods work in conjunction, the he... | ```diff
diff --git a/drivers/net/phy/phy_port.c b/drivers/net/phy/phy_port.c
index a269e9ea12c4..63d1bb154dc7 100644
--- a/drivers/net/phy/phy_port.c
+++ b/drivers/net/phy/phy_port.c
@@ -108,16 +108,10 @@ EXPORT_SYMBOL_GPL(phy_of_parse_port);
*/
void phy_port_update_supported(struct phy_port *port)
{
- __ETHTOOL_DE... |
8429538c2c0420c65fbb4872966622b96ec36cea | Analyze and fix the following issue in the Linux kernel code: tools/testing: keep legacy generated files around in .gitignore file | Problem Details:
People keep removing generated files from .gitignore files even when the
files stay around. Please don't do that: just because the file is no
longer being generated doesn't make it magically go away, and doesn't
make it suddenly be something that should now not be ignored any more.
Fixes: dd2c6ec24fc... | ```diff
diff --git a/tools/testing/selftests/mm/.gitignore b/tools/testing/selftests/mm/.gitignore
index 702e5723c35d..c2a8586e51a1 100644
--- a/tools/testing/selftests/mm/.gitignore
+++ b/tools/testing/selftests/mm/.gitignore
@@ -32,6 +32,7 @@ uffd-unit-tests
uffd-wp-mremap
mlock-intersect-test
mlock-random-test
+v... |
4c91b67f87ac032c77650108ef9841772b9dc364 | Analyze and fix the following issue in the Linux kernel code: smb: client: fix data corruption due to racy lease checks | Problem Details:
Customer reported data corruption in some of their files. It turned
out the client would end up calling cacheless IO functions while
having RHW lease, bypassing the pagecache and then leaving gaps in the
file while writing to it. It was related to concurrent opens changing
the lease state while havin... | ```diff
diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h
index 7eb0131963dd..080ea601c209 100644
--- a/fs/smb/client/cifsglob.h
+++ b/fs/smb/client/cifsglob.h
@@ -515,8 +515,10 @@ struct smb_version_operations {
/* check for STATUS_NETWORK_SESSION_EXPIRED */
bool (*is_session_expired)(char *);
/* ... |
34df6c4734db4765d6ec2b0f0b61d4aec4a8f345 | Analyze and fix the following issue in the Linux kernel code: kho: fix missing early_memunmap() call in kho_populate() | Problem Details:
Patch series "two fixes in kho_populate()", v3.
This patch (of 2):
kho_populate() returns without calling early_memunmap() on success path,
this will cause early ioremap virtual address space leak.
Link: https://lkml.kernel.org/r/20260212111146.210086-1-ranxiaokai627@163.com
Link: https://lkml.kern... | ```diff
diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c
index fb3a7b67676e..af82d8862dd7 100644
--- a/kernel/liveupdate/kexec_handover.c
+++ b/kernel/liveupdate/kexec_handover.c
@@ -1463,36 +1463,37 @@ void __init kho_populate(phys_addr_t fdt_phys, u64 fdt_len,
struct kho_scratch ... |
55f8b4518d14b7436f70defe27faba4eca0cd4e1 | Analyze and fix the following issue in the Linux kernel code: scripts/gdb: implement x86_page_ops in mm.py | Problem Details:
Implement all member functions of x86_page_ops strictly following the
logic of aarch64_page_ops.
This includes full support for SPARSEMEM and standard page translation
functions.
This fixes compatibility with 'lx-' commands on x86_64, preventing
AttributeErrors when using lx-pfn_to_page and others.
... | ```diff
diff --git a/scripts/gdb/linux/constants.py.in b/scripts/gdb/linux/constants.py.in
index 6d475540c6ba..dab8b80bed69 100644
--- a/scripts/gdb/linux/constants.py.in
+++ b/scripts/gdb/linux/constants.py.in
@@ -150,8 +150,8 @@ LX_CONFIG(CONFIG_ARM64_64K_PAGES)
if IS_BUILTIN(CONFIG_ARM64):
LX_VALUE(CONFIG_ARM6... |
5ed4b6b37c647d168ae31035b3f61b705997e043 | Analyze and fix the following issue in the Linux kernel code: objpool: fix the overestimation of object pooling metadata size | Problem Details:
objpool uses struct objpool_head to store metadata information, and its
cpu_slots member points to an array of pointers that store the addresses
of the percpu ring arrays. However, the memory size allocated during the
initialization of cpu_slots is nr_cpu_ids * sizeof(struct objpool_slot).
On a 64-bi... | ```diff
diff --git a/lib/objpool.c b/lib/objpool.c
index b998b720c732..d98fadf1de16 100644
--- a/lib/objpool.c
+++ b/lib/objpool.c
@@ -142,7 +142,7 @@ int objpool_init(struct objpool_head *pool, int nr_objs, int object_size,
pool->gfp = gfp & ~__GFP_ZERO;
pool->context = context;
pool->release = release;
- slot_s... |
b24335521de92fd2ee22460072b75367ca8860b0 | Analyze and fix the following issue in the Linux kernel code: selftests/memfd: use IPC semaphore instead of SIGSTOP/SIGCONT | Problem Details:
selftests/memfd: use IPC semaphore instead of SIGSTOP/SIGCONT
In order to synchronize new processes to test inheritance of memfd_noexec
sysctl, memfd_test sets up the sysctl with a value before creating the new
process. The new process then sends itself a SIGSTOP in order to wait for
the parent to fl... | ```diff
diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c
index 5b993924cc3f..2ca07ea7202a 100644
--- a/tools/testing/selftests/memfd/memfd_test.c
+++ b/tools/testing/selftests/memfd/memfd_test.c
@@ -18,6 +18,9 @@
#include <sys/stat.h>
#include <sys/syscall.h>
#incl... |
9333980c230fc29afb41dc52b58a0dc9ea201f2a | Analyze and fix the following issue in the Linux kernel code: delayacct: fix build regression on accounting tool | Problem Details:
The accounting tool was modified for the original ABI using a custom
'timespec64' type in linux/taskstats.h, which I changed to use the regular
__kernel_timespec type, causing a build failure:
getdelays.c:202:45: warning: 'struct timespec64' declared inside parameter list will not be visible o... | ```diff
diff --git a/tools/accounting/getdelays.c b/tools/accounting/getdelays.c
index 64796c0223be..50792df27707 100644
--- a/tools/accounting/getdelays.c
+++ b/tools/accounting/getdelays.c
@@ -196,20 +196,20 @@ static int get_family_id(int sd)
#define delay_ms(t) (t / 1000000ULL)
/*
- * Format timespec64 to human... |
ac1ea219590c09572ed5992dc233bbf7bb70fef9 | Analyze and fix the following issue in the Linux kernel code: mm/page_alloc: clear page->private in free_pages_prepare() | Problem Details:
Several subsystems (slub, shmem, ttm, etc.) use page->private but don't
clear it before freeing pages. When these pages are later allocated as
high-order pages and split via split_page(), tail pages retain stale
page->private values.
This causes a use-after-free in the swap subsystem. The swap code ... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e4104973e22f..77dcec36946f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1429,6 +1429,7 @@ __always_inline bool free_pages_prepare(struct page *page,
page_cpupid_reset_last(page);
page->flags.f &= ~PAGE_FLAGS_CHECK_AT_PREP;
+ page->private = 0;... |
590d356aa433074ece2b0d02faa5f959b26d54d6 | Analyze and fix the following issue in the Linux kernel code: mm: update shmem_[kernel]_file_*() functions to use vma_flags_t | Problem Details:
In order to be able to use only vma_flags_t in vm_area_desc we must adjust
shmem file setup functions to operate in terms of vma_flags_t rather than
vm_flags_t.
This patch makes this change and updates all callers to use the new
functions.
No functional changes intended.
[akpm@linux-foundation.org: ... | ```diff
diff --git a/arch/x86/kernel/cpu/sgx/ioctl.c b/arch/x86/kernel/cpu/sgx/ioctl.c
index 9322a9287dc7..0bc36957979d 100644
--- a/arch/x86/kernel/cpu/sgx/ioctl.c
+++ b/arch/x86/kernel/cpu/sgx/ioctl.c
@@ -83,7 +83,7 @@ static int sgx_encl_create(struct sgx_encl *encl, struct sgx_secs *secs)
encl_size = secs->size +... |
fd3196ee9ca135afdf3250d7a13219c1de96531c | Analyze and fix the following issue in the Linux kernel code: mm: update secretmem to use VMA flags on mmap_prepare | Problem Details:
This patch updates secretmem to use the new vma_flags_t type which will
soon supersede vm_flags_t altogether.
In order to make this change we also have to update mlock_future_ok(), we
replace the vm_flags_t parameter with a simple boolean is_vma_locked one,
which also simplifies the invocation here.
... | ```diff
diff --git a/mm/internal.h b/mm/internal.h
index ef71a1d9991f..d67e8bb75734 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -1046,7 +1046,7 @@ extern long populate_vma_page_range(struct vm_area_struct *vma,
unsigned long start, unsigned long end, int *locked);
extern long faultin_page_range(struct mm_stru... |
a8700d42b0af3a1751f70d53ee90c97fb4dc50f2 | Analyze and fix the following issue in the Linux kernel code: mm: use unmap_desc struct for freeing page tables | Problem Details:
Pass through the unmap_desc to free_pgtables() because it almost has
everything necessary and is already on the stack.
Updates testing code as necessary.
No functional changes intended.
[Liam.Howlett@oracle.com: fix up unmap desc use on exit_mmap()]
Link: https://lkml.kernel.org/r/20260210214214.3... | ```diff
diff --git a/mm/internal.h b/mm/internal.h
index 0f3ad8665d95..ef71a1d9991f 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -512,10 +512,7 @@ bool __folio_end_writeback(struct folio *folio);
void deactivate_file_folio(struct folio *folio);
void folio_activate(struct folio *folio);
-void free_pgtables(stru... |
3f54ef56fd4540142d2d9a7e7cf0b70dd221c1e1 | Analyze and fix the following issue in the Linux kernel code: mm: folio_zero_user: open code range computation in folio_zero_user() | Problem Details:
riscv64-gcc-linux-gnu (v8.5) reports a compile time assert in:
r[2] = DEFINE_RANGE(clamp_t(s64, fault_idx - radius, pg.start, pg.end),
clamp_t(s64, fault_idx + radius, pg.start, pg.end));
where it decides that pg.start > pg.end in:
clamp_t(s64, fault_idx + radius, pg.start, pg.end));
... | ```diff
diff --git a/mm/memory.c b/mm/memory.c
index 15a6c09d54ee..cf32e2666e71 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -7316,7 +7316,7 @@ void folio_zero_user(struct folio *folio, unsigned long addr_hint)
const unsigned long base_addr = ALIGN_DOWN(addr_hint, folio_size(folio));
const long fault_idx = (addr_h... |
7ec9ecf217f8e565577bde8a47915a51491ef3a3 | Analyze and fix the following issue in the Linux kernel code: mm/vmscan: select the closest preferred node in demote_folio_list() | Problem Details:
The preferred demotion node (migration_target_control.nid) should be the
one closest to the source node to minimize migration latency. Currently,
a discrepancy exists where demote_folio_list() randomly selects an allowed
node if the preferred node from next_demotion_node() is not set in
mems_effective... | ```diff
diff --git a/include/linux/memory-tiers.h b/include/linux/memory-tiers.h
index 7a805796fcfd..96987d9d95a8 100644
--- a/include/linux/memory-tiers.h
+++ b/include/linux/memory-tiers.h
@@ -53,11 +53,11 @@ struct memory_dev_type *mt_find_alloc_memory_type(int adist,
struct list_head *memory_types);
void ... |
1aceed565ff172fc0331dd1d5e7e65139b711139 | Analyze and fix the following issue in the Linux kernel code: mm/vmscan: fix demotion targets checks in reclaim/demotion | Problem Details:
Patch series "mm/vmscan: fix demotion targets checks in reclaim/demotion",
v9.
This patch series addresses two issues in demote_folio_list(),
can_demote(), and next_demotion_node() in reclaim/demotion.
1. demote_folio_list() and can_demote() do not correctly check
demotion target against cpuset.me... | ```diff
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index a98d3330385c..631577384677 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -174,7 +174,7 @@ static inline void set_mems_allowed(nodemask_t nodemask)
task_unlock(current);
}
-extern bool cpuset_node_allowed(struct cgroup ... |
61dc9f776705d6db6847c101b98fa4f0e9eb6fa3 | Analyze and fix the following issue in the Linux kernel code: procfs: fix possible double mmput() in do_procmap_query() | Problem Details:
When user provides incorrectly sized buffer for build ID for PROCMAP_QUERY
we return with -ENAMETOOLONG error. After recent changes this condition
happens later, after we unlocked mmap_lock/per-VMA lock and did mmput(),
so original goto out is now wrong and will double-mmput() mm_struct. Fix
by jumpi... | ```diff
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 26188a4ad1ab..2f55efc36816 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -780,7 +780,7 @@ static int do_procmap_query(struct mm_struct *mm, void __user *uarg)
} else {
if (karg.build_id_size < build_id_sz) {
err = -ENAMETOOLONG... |
338ad1e84d15078a9ae46d7dd7466329ae0bfa61 | Analyze and fix the following issue in the Linux kernel code: mm/page_alloc: skip debug_check_no_{obj,locks}_freed with FPI_TRYLOCK | Problem Details:
When CONFIG_DEBUG_OBJECTS_FREE is enabled,
debug_check_no_{obj,locks}_freed() functions are called.
Since both of them spin on a lock, they are not safe to be called if the
FPI_TRYLOCK flag is specified. This leads to a lockdep splat:
================================
WARNING: inconsistent lock s... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index cbf758e27aa2..1513084d7507 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1340,8 +1340,8 @@ static inline void pgalloc_tag_sub_pages(struct alloc_tag *tag, unsigned int nr)
#endif /* CONFIG_MEM_ALLOC_PROFILING */
-__always_inline bool free_pages_... |
1d3f9bb4c8af70304d19c22e30f5d16a2d589bb5 | Analyze and fix the following issue in the Linux kernel code: mm/hugetlb: restore failed global reservations to subpool | Problem Details:
Commit a833a693a490 ("mm: hugetlb: fix incorrect fallback for subpool")
fixed an underflow error for hstate->resv_huge_pages caused by incorrectly
attributing globally requested pages to the subpool's reservation.
Unfortunately, this fix also introduced the opposite problem, which would
leave spool->u... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index a1832da0f623..77e45dd50ba2 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -6717,6 +6717,15 @@ out_put_pages:
*/
hugetlb_acct_memory(h, -gbl_resv);
}
+ /* Restore used_hpages for pages that failed global reservation */
+ if (gbl_reserve && spool) {
+ unsi... |
048714d9df73a724d3f84b587f1110963e32f9b3 | Analyze and fix the following issue in the Linux kernel code: tools/sched_ext: scx_userland: fix restart and stats thread lifecycle bugs | Problem Details:
Fix three issues in scx_userland's restart path:
- exit_req is not reset on restart, causing sched_main_loop() to exit
immediately without doing any scheduling work.
- stats_printer thread handle is local to spawn_stats_thread(), making
it impossible to join from main(). Promote it to file scope.... | ```diff
diff --git a/tools/sched_ext/scx_userland.c b/tools/sched_ext/scx_userland.c
index 10b31020f44f..63f89b35d999 100644
--- a/tools/sched_ext/scx_userland.c
+++ b/tools/sched_ext/scx_userland.c
@@ -54,6 +54,7 @@ static bool verbose;
static volatile int exit_req;
static int enqueued_fd, dispatched_fd;
+static p... |
804490c3eb26098b60c5e858fa20c0e6f2c2c1d8 | Analyze and fix the following issue in the Linux kernel code: tools build: Fix feature test for rust compiler | Problem Details:
Currently a dummy rust code is compiled to detect if the rust feature
could be enabled. It turns out that in this case rust emits a dependency
file without any external references:
/perf/feature/test-rust.d: test-rust.rs
/perf/feature/test-rust.bin: test-rust.rs
test-rust.rs:
This can l... | ```diff
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index e959caa7f1c7..1fbcb3ce74d2 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -113,9 +113,6 @@ __BUILD = $(CC) $(CFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(
__BUILDXX = $(CXX) $(CXXFLA... |
1a6c45969a85d1be43dbbf0705aef4bc8eb515a8 | Analyze and fix the following issue in the Linux kernel code: perf libunwind: Fix calls to thread__e_machine() | Problem Details:
Add the missing 'e_flags' option to fix the build.
Fixes: 4e66527f8859a661 ("perf thread: Add optional e_flags output argument to thread__e_machine")
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
C... | ```diff
diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c
index ecf0c01fe51f..5b39ce21e333 100644
--- a/tools/perf/util/unwind-libunwind-local.c
+++ b/tools/perf/util/unwind-libunwind-local.c
@@ -584,7 +584,9 @@ static int access_mem(unw_addr_space_t __maybe_unused as,
}... |
abde491143e4e12eecc41337910aace4e8d59603 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix out-of-bounds stream encoder index v3 | Problem Details:
eng_id can be negative and that stream_enc_regs[]
can be indexed out of bounds.
eng_id is used directly as an index into stream_enc_regs[], which has
only 5 entries. When eng_id is 5 (ENGINE_ID_DIGF) or negative, this can
access memory past the end of the array.
Add a bounds check using ARRAY_SIZE() ... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
index a8283f21008e..3ae787a377b1 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn... |
8446c747370ab31a3ae0177227f0de3e65c8815c | Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Fix APU to use GTT, not VRAM for MQD | Problem Details:
Add a check in mqd_on_vram. If the device prefers GTT, it returns false
Fixes: d4a814f400d4 ("drm/amdkfd: Move gfx9.4.3 and gfx 9.5 MQD to HBM")
Signed-off-by: Siwei He <siwei.he@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ```diff
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
index dcf4bbfa641b..5578c241b7d0 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
@@ -111,6 +111,9 @@ static void set_priority(struct v... |
57d00816c6a9c152f01b65bb7b3662f4d03ccd09 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: set family for GC 11.5.4 | Problem Details:
Set the family for GC 11.5.4
Fixes: 47ae1f938d12 ("drm/amdgpu: add support for GC IP version 11.5.4")
Cc: Tim Huang <tim.huang@amd.com>
Cc: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
Cc: Roman Li <Roman.Li@amd.com>
Reviewed-by: Tim Huang <tim.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index 41e63c286912..4143a25a498b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -2988,9 +2988,11 @@ int amdgpu_discovery_set_ip_blocks(str... |
e4424687fc6d866c7e0dca979d9d362ec8cbc71a | Analyze and fix the following issue in the Linux kernel code: smb/client: map NT_STATUS_BUFFER_OVERFLOW | Problem Details:
See MS-CIFS 2.2.2.4 STATUS_BUFFER_OVERFLOW.
Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: Steve French <stfrench@microsoft.com> | ```diff
diff --git a/fs/smb/client/smb1maperror.c b/fs/smb/client/smb1maperror.c
index ae13367e3782..c6853b447dbd 100644
--- a/fs/smb/client/smb1maperror.c
+++ b/fs/smb/client/smb1maperror.c
@@ -113,6 +113,7 @@ static const struct {
} ntstatus_to_dos_map[] = {
{
ERRSRV, ERR_NOTIFY_ENUM_DIR, NT_STATUS_NOTIFY_ENUM_D... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.