id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
7fce830ecd0a0256590ee37eb65a39cbad3d64fc | Analyze and fix the following issue in the Linux kernel code: libceph: prevent potential out-of-bounds writes in handle_auth_session_key() | Problem Details:
The len field originates from untrusted network packets. Boundary
checks have been added to prevent potential out-of-bounds writes when
decrypting the connection secret or processing service tickets.
[ idryomov: changelog ]
Cc: stable@vger.kernel.org
Signed-off-by: ziming zhang <ezrakiez@gmail.com>
R... | ```diff
diff --git a/net/ceph/auth_x.c b/net/ceph/auth_x.c
index b71b1635916e..a21c157daf7d 100644
--- a/net/ceph/auth_x.c
+++ b/net/ceph/auth_x.c
@@ -631,6 +631,7 @@ static int handle_auth_session_key(struct ceph_auth_client *ac, u64 global_id,
/* connection secret */
ceph_decode_32_safe(p, end, len, e_inval);
+... |
43962db4a6f593903340c85591056a0cef812dfd | Analyze and fix the following issue in the Linux kernel code: ceph: fix crash in process_v2_sparse_read() for encrypted directories | Problem Details:
The crash in process_v2_sparse_read() for fscrypt-encrypted directories
has been reported. Issue takes place for Ceph msgr2 protocol in secure
mode. It can be reproduced by the steps:
sudo mount -t ceph :/ /mnt/cephfs/ -o name=admin,fs=cephfs,ms_mode=secure
(1) mkdir /mnt/cephfs/fscrypt-test-3
(2) cp... | ```diff
diff --git a/net/ceph/messenger_v2.c b/net/ceph/messenger_v2.c
index 9e39378eda00..9e48623018a3 100644
--- a/net/ceph/messenger_v2.c
+++ b/net/ceph/messenger_v2.c
@@ -1061,13 +1061,16 @@ static int decrypt_control_remainder(struct ceph_connection *con)
static int process_v2_sparse_read(struct ceph_connection *... |
fae00ea9f00367771003ace78f29549dead58fc7 | Analyze and fix the following issue in the Linux kernel code: pwm: rzg2l-gpt: Allow checking period_tick cache value only if sibling channel is enabled | Problem Details:
The rzg2l_gpt_config() tests the rzg2l_gpt->period_tick variable when
both channels of a hardware channel are in use. This check is not valid
if rzg2l_gpt_config() is called after disabling all the channels, as it
tests against the cached value. Hence, allow checking and setting the
cached value only i... | ```diff
diff --git a/drivers/pwm/pwm-rzg2l-gpt.c b/drivers/pwm/pwm-rzg2l-gpt.c
index 360c8bf3b190..4856af080e8e 100644
--- a/drivers/pwm/pwm-rzg2l-gpt.c
+++ b/drivers/pwm/pwm-rzg2l-gpt.c
@@ -96,6 +96,11 @@ static inline unsigned int rzg2l_gpt_subchannel(unsigned int hwpwm)
return hwpwm & 0x1;
}
+static inline unsi... |
155c9971fa88a6655431476f024566fcd9ddcdb6 | Analyze and fix the following issue in the Linux kernel code: RDMA/bng_re: Remove prefetch instruction | Problem Details:
The prefetch instruction is meant to speed up access to memory referenced
by its address argument. In the bng_re code path, it has no effect,
because the pointer refers to a function that is executed immediately
afterward.
The issue was identified due to the following kbuild compilation error:
driv... | ```diff
diff --git a/drivers/infiniband/hw/bng_re/bng_fw.c b/drivers/infiniband/hw/bng_re/bng_fw.c
index 803610fb9c58..7d9539113cf5 100644
--- a/drivers/infiniband/hw/bng_re/bng_fw.c
+++ b/drivers/infiniband/hw/bng_re/bng_fw.c
@@ -525,7 +525,7 @@ static irqreturn_t bng_re_creq_irq(int irq, void *dev_instance)
hwq = &... |
d3cc7cd7bc46af587747399e956cf4508221476f | Analyze and fix the following issue in the Linux kernel code: backlight: aw99706: Fix unused function warnings from suspend/resume ops | Problem Details:
When building for a platform without CONFIG_PM_SLEEP, such as s390,
there are two unused function warnings:
drivers/video/backlight/aw99706.c:436:12: error: 'aw99706_resume' defined but not used [-Werror=unused-function]
436 | static int aw99706_resume(struct device *dev)
| ^~... | ```diff
diff --git a/drivers/video/backlight/aw99706.c b/drivers/video/backlight/aw99706.c
index b7c1d24b17ac..df5b23b2f753 100644
--- a/drivers/video/backlight/aw99706.c
+++ b/drivers/video/backlight/aw99706.c
@@ -440,7 +440,7 @@ static int aw99706_resume(struct device *dev)
return aw99706_hw_init(aw);
}
-static ... |
b0a848f4a47a91a6b4d9a9fd739d047254df5a91 | Analyze and fix the following issue in the Linux kernel code: x86/bugs: Make i386 use GENERIC_BUG_RELATIVE_POINTERS | Problem Details:
Linus figured less #ifdef is more better and making x86-32 use
GENERIC_BUG_RELATIVE_POINTERS removes one layer of macro magic from
the bug.h bits.
Suggested-by: Linus Torvalds <torvalds@linuxfoundation.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> | ```diff
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index ac9692093215..31c54d6480e0 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -380,7 +380,7 @@ config GENERIC_CSUM
config GENERIC_BUG
def_bool y
depends on BUG
- select GENERIC_BUG_RELATIVE_POINTERS if X86_64
+ select GENERIC_BUG_RELATIVE_POINTERS... |
d62e4f2b9542d25d183f068033558e87e81a00a8 | Analyze and fix the following issue in the Linux kernel code: x86/bug: Fix BUG_FORMAT vs KASLR | Problem Details:
Encoding a relative NULL pointer doesn't work for KASLR, when the
whole kernel image gets shifted, the __bug_table and the target string
get shifted by the same amount and the relative offset is preserved.
However when the target is an absolute 0 value and the __bug_table
gets moved about, the end res... | ```diff
diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h
index d0a96ff5c02c..4b5ab56903bb 100644
--- a/arch/x86/include/asm/bug.h
+++ b/arch/x86/include/asm/bug.h
@@ -86,7 +86,7 @@ extern void __WARN_trap(struct bug_entry *bug, ...);
#ifdef CONFIG_DEBUG_BUGVERBOSE_DETAILED
#define WARN_CONDITION_S... |
59bfa6408214b6533d8691715cf5459e89b45b89 | Analyze and fix the following issue in the Linux kernel code: objtool: Build with disassembly can fail when including bdf.h | Problem Details:
Building objtool with disassembly support can fail when including
the bdf.h file:
In file included from tools/objtool/include/objtool/arch.h:108,
from check.c:14:
/usr/include/bfd.h:35:2: error: #error config.h must be included before this header
35 | #error config.h must b... | ```diff
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index 66397d755fe4..ad6e1ec706ce 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -87,7 +87,7 @@ BUILD_DISAS := n
ifeq ($(feature-libbfd),1)
BUILD_DISAS := y
- OBJTOOL_CFLAGS += -DDISAS
+ OBJTOOL_CFLAGS += -DDISAS -DPACKAGE="ob... |
7b78b26757e0d997b31635d76eaa46d5ef5e1431 | Analyze and fix the following issue in the Linux kernel code: gpio: shared: handle the reset-gpios corner case | Problem Details:
There's an unexpected interaction between the reset-gpio driver and the
shared GPIO support. The reset-gpio device is an auxiliary device that's
created dynamically and fulfills a similar role to the gpio-shared-proxy
driver but is limited in scope to just supporting the "reset-gpios"
property.
The sh... | ```diff
diff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c
index 3803b5c938f9..cc8646f563d2 100644
--- a/drivers/gpio/gpiolib-shared.c
+++ b/drivers/gpio/gpiolib-shared.c
@@ -253,6 +253,84 @@ static int gpio_shared_make_adev(struct gpio_device *gdev,
return 0;
}
+#if IS_ENABLED(CONFIG_RESET... |
9513f25056b22100ddffe24898c587873b0d022c | Analyze and fix the following issue in the Linux kernel code: virtio: clean up features qword/dword terms | Problem Details:
virtio pci uses word to mean "16 bits". mmio uses it to mean
"32 bits".
To avoid confusion, let's avoid the term in core virtio
altogether. Just say U64 to mean "64 bit".
Fixes: e7d4c1c5a546 ("virtio: introduce extended features")
Cc: Paolo Abeni <pabeni@redhat.com>
Acked-by: Jason Wang <jasowang@red... | ```diff
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 35ded4330431..d057ea55f5ad 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -69,7 +69,7 @@ MODULE_PARM_DESC(experimental_zcopytx, "Enable Zero Copy TX;"
#define VHOST_DMA_IS_DONE(len) ((__force u32)(len) >= (__force u32)VHOST_DMA_DONE_... |
731ca4a4cc52fd5c5ae309edcfd2d7e54ece3321 | Analyze and fix the following issue in the Linux kernel code: vdpa/pds: use %pe for ERR_PTR() in event handler registration | Problem Details:
Use %pe instead of %ps when printing ERR_PTR() values. %ps is intended
for string pointers, while %pe correctly prints symbolic error names
for error pointers returned via ERR_PTR().
This shows the returned error value more clearly.
Fixes: 67f27b8b3a34 ("pds_vdpa: subscribe to the pds_core events")
Si... | ```diff
diff --git a/drivers/vdpa/pds/vdpa_dev.c b/drivers/vdpa/pds/vdpa_dev.c
index 36f61cc96e21..43426bd971ac 100644
--- a/drivers/vdpa/pds/vdpa_dev.c
+++ b/drivers/vdpa/pds/vdpa_dev.c
@@ -51,7 +51,7 @@ static int pds_vdpa_register_event_handler(struct pds_vdpa_device *pdsv)
err = pdsc_register_notify(nb);
if (... |
f3f64c2eaffbc3169bbe1e5d1e897e6dacc839d1 | Analyze and fix the following issue in the Linux kernel code: vhost: Fix kthread worker cgroup failure handling | Problem Details:
If we fail to attach to a cgroup we are leaking the id. This adds
a new goto to free the id.
Fixes: 7d9896e9f6d0 ("vhost: Reintroduce kthread API and add mode selection")
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Chaitanya Kulkar... | ```diff
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 8570fdf2e14a..e6df5bb4932b 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -804,11 +804,13 @@ static int vhost_kthread_worker_create(struct vhost_worker *worker,
ret = vhost_attach_task_to_cgroups(worker);
if (ret)
- goto ... |
b41ca62c0019de1321d75f2b2f274a28784a41ed | Analyze and fix the following issue in the Linux kernel code: virtio: vdpa: Fix reference count leak in octep_sriov_enable() | Problem Details:
pci_get_device() will increase the reference count for the returned
pci_dev, and also decrease the reference count for the input parameter
from if it is not NULL.
If we break the loop in with 'vf_pdev' not NULL. We
need to call pci_dev_put() to decrease the reference count.
Found via static anlaysis... | ```diff
diff --git a/drivers/vdpa/octeon_ep/octep_vdpa_main.c b/drivers/vdpa/octeon_ep/octep_vdpa_main.c
index 9e8d07078606..31a02e7fd7f2 100644
--- a/drivers/vdpa/octeon_ep/octep_vdpa_main.c
+++ b/drivers/vdpa/octeon_ep/octep_vdpa_main.c
@@ -736,6 +736,7 @@ static int octep_sriov_enable(struct pci_dev *pdev, int num_v... |
f0ea2e91093ac979d07ebd033e0f45869b1d2608 | Analyze and fix the following issue in the Linux kernel code: vdpa/mlx5: Fix incorrect error code reporting in query_virtqueues | Problem Details:
When query_virtqueues() fails, the error log prints the variable err
instead of cmd->err. Since err may still be zero at this point, the
log message can misleadingly report a success value 0 even though the
command actually failed.
Even worse, once err is set to the first failure, subsequent logs
prin... | ```diff
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index a7936bd1aabe..ddaa1366704b 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -1256,7 +1256,7 @@ static int query_virtqueues(struct mlx5_vdpa_net *ndev,
int vq_idx = start_vq + i;
... |
deb55fc994e3dc38f139c0147c15fc2a9db27086 | Analyze and fix the following issue in the Linux kernel code: virtio: fix map ops comment | Problem Details:
@free will free the map handle not sync it. Fix the doc to match.
Fixes: bee8c7c24b73 ("virtio: introduce map ops in virtio core")
Message-Id: <f6ff1c7aff8401900bf362007d7fb52dfdb6a15b.1763026134.git.mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redh... | ```diff
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 1a019a1f168d..a1af2676bbe6 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -177,7 +177,7 @@ struct virtio_config_ops {
* map: metadata for performing mapping
* size: the size of the b... |
43236d8bbafff94b423afecc4a692dd90602d426 | Analyze and fix the following issue in the Linux kernel code: virtio: fix virtqueue_set_affinity() docs | Problem Details:
Rewrite the comment for better grammar and clarity.
Fixes: 75a0a52be3c2 ("virtio: introduce an API to set affinity for a virtqueue")
Message-Id: <e317e91bd43b070e5eaec0ebbe60c5749d02e2dd.1763026134.git.mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@re... | ```diff
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index e231147ff92d..1a019a1f168d 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -384,7 +384,7 @@ const char *virtio_bus_name(struct virtio_device *vdev)
* @vq: the virtqueue
* @cpu_mask: the cpu mas... |
5e88a5a97d113619b674ebfdd1d2065f2edd10eb | Analyze and fix the following issue in the Linux kernel code: virtio: standardize Returns documentation style | Problem Details:
Remove colons after "Returns" in virtio_map_ops function
documentation - both to avoid triggering an htmldoc warning
and for consistency with virtio_config_ops.
This affects map_page, alloc, need_sync, and max_mapping_size.
Fixes: bee8c7c24b73 ("virtio: introduce map ops in virtio core")
Message-Id: ... | ```diff
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 6660132258d4..e231147ff92d 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -150,7 +150,7 @@ struct virtio_config_ops {
* size: the buffer size
* dir: mapping direction
* attrs:... |
c15f42e09178d2849744ccf064200f5e7f71e688 | Analyze and fix the following issue in the Linux kernel code: virtio: fix grammar in virtio_map_ops docs | Problem Details:
Fix grammar issues in the virtio_map_ops docs:
- missing article before "transport"
- "implements" -> "implement" to match subject
Fixes: bee8c7c24b73 ("virtio: introduce map ops in virtio core")
Message-Id: <3f7bcae5a984f14b72e67e82572b110acb06fa7e.1763026134.git.mst@redhat.com>
Acked-by: Jason Wang ... | ```diff
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 78cf4119f567..6660132258d4 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -141,8 +141,8 @@ struct virtio_config_ops {
/**
* struct virtio_map_ops - operations for mapping buffer for a virtio ... |
63598fba55ab9d384818fed48dc04006cecf7be4 | Analyze and fix the following issue in the Linux kernel code: virtio: fix grammar in virtio_queue_info docs | Problem Details:
Fix grammar in the description of @ctx
Fixes: c502eb85c34e ("virtio: introduce virtio_queue_info struct and find_vqs_info() config op")
Message-Id: <a5cf2b92573200bdb1c1927e559d3930d61a4af2.1763026134.git.mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst... | ```diff
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index dbc7eff1f101..78cf4119f567 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -24,7 +24,7 @@ typedef void vq_callback_t(struct virtqueue *);
* a virtqueue unused by the driver.
* @callback:... |
7831791e77a1cd29528d4dc336ce14466aef5ba6 | Analyze and fix the following issue in the Linux kernel code: virtio: fix whitespace in virtio_config_ops | Problem Details:
The finalize_features documentation uses a tab between words.
Use space instead.
Fixes: d16c0cd27331 ("docs: driver-api: virtio: virtio on Linux")
Message-Id: <39d7685c82848dc6a876d175e33a1407f6ab3fc1.1763026134.git.mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. T... | ```diff
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 1ea5baa62141..dbc7eff1f101 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -86,7 +86,7 @@ struct virtqueue_info {
* vdev: the virtio_device
* This sends the driver feature bits to the device: i... |
361173f95ae4b726ebbbf0bd594274f5576c4abc | Analyze and fix the following issue in the Linux kernel code: virtio: fix typo in virtio_device_ready() comment | Problem Details:
"coherenct" -> "coherent"
Fixes: 8b4ec69d7e09 ("virtio: harden vring IRQ")
Message-Id: <db286e9a65449347f6584e68c9960fd5ded2b4b0.1763026134.git.mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> | ```diff
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 16001e9f9b39..1ea5baa62141 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -362,7 +362,7 @@ void virtio_device_ready(struct virtio_device *dev)
* specific set_status() method.
*
* A well b... |
f8113000855a8cc2c6d8e19b97a390f1c082285d | Analyze and fix the following issue in the Linux kernel code: virtio: fix kernel-doc for mapping/free_coherent functions | Problem Details:
Documentation build reported:
WARNING: ./drivers/virtio/virtio_ring.c:3174 function parameter 'vaddr' not described in 'virtqueue_map_free_coherent'
WARNING: ./drivers/virtio/virtio_ring.c:3308 expecting prototype for virtqueue_mapping_error(). Prototype was for virtqueue_map_mapping_error() inste... | ```diff
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 7b6205253b46..ddab68959671 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -3166,6 +3166,7 @@ EXPORT_SYMBOL_GPL(virtqueue_map_alloc_coherent);
* @vdev: the virtio device we are talking to
* @map: m... |
e40b6abe0b1247d43bc61942aa7534fca7209e44 | Analyze and fix the following issue in the Linux kernel code: virtio_vdpa: fix misleading return in void function | Problem Details:
virtio_vdpa_set_status() is declared as returning void, but it used
"return vdpa_set_status()" Since vdpa_set_status() also returns
void, the return statement is unnecessary and misleading.
Remove it.
Fixes: c043b4a8cf3b ("virtio: introduce a vDPA based transport")
Signed-off-by: Alok Tiwari <alok.a.t... | ```diff
diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c
index f9a29045eca0..0a801f67b599 100644
--- a/drivers/virtio/virtio_vdpa.c
+++ b/drivers/virtio/virtio_vdpa.c
@@ -80,7 +80,7 @@ static void virtio_vdpa_set_status(struct virtio_device *vdev, u8 status)
{
struct vdpa_device *vdpa = vd_ge... |
b72a6ddf6af225957d4b36f858d2a67b2e31fab6 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: fix mute/micmute LEDs don't work for HP 200 G2i | Problem Details:
HP 200 G2i needs quirk to make mic-mute/audio-mute working.
Signed-off-by: Dirk Su <dirk.su@canonical.com>
Link: https://patch.msgid.link/20251127025651.13627-1-dirk.su@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 325968e61b02..55c1c0496141 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -3790,6 +3790,7 @@ enum {
ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED,
ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED,
... |
5ffcb7b890f61541201461580bb6622ace405aec | Analyze and fix the following issue in the Linux kernel code: net: atlantic: fix fragment overflow handling in RX path | Problem Details:
The atlantic driver can receive packets with more than MAX_SKB_FRAGS (17)
fragments when handling large multi-descriptor packets. This causes an
out-of-bounds write in skb_add_rx_frag_netmem() leading to kernel panic.
The issue occurs because the driver doesn't check the total number of
fragments befo... | ```diff
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c b/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
index f21de0c21e52..d23d23bed39f 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
@@ -547,6 +547,11 @@ static int __aq_ring_rx_clea... |
1cd1c472343b06d6d32038636ce51bfa2251e3cf | Analyze and fix the following issue in the Linux kernel code: virtio-net: avoid unnecessary checksum calculation on guest RX | Problem Details:
Commit a2fb4bc4e2a6 ("net: implement virtio helpers to handle UDP
GSO tunneling.") inadvertently altered checksum offload behavior
for guests not using UDP GSO tunneling.
Before, tun_put_user called tun_vnet_hdr_from_skb, which passed
has_data_valid = true to virtio_net_hdr_from_skb.
After, tun_put_u... | ```diff
diff --git a/drivers/net/tun_vnet.h b/drivers/net/tun_vnet.h
index 81662328b2c7..a5f93b6c4482 100644
--- a/drivers/net/tun_vnet.h
+++ b/drivers/net/tun_vnet.h
@@ -244,7 +244,7 @@ tun_vnet_hdr_tnl_from_skb(unsigned int flags,
if (virtio_net_hdr_tnl_from_skb(skb, tnl_hdr, has_tnl_offload,
tun_vnet_is_li... |
6d66e093e0740d39a36ef742c60eec247df26f41 | Analyze and fix the following issue in the Linux kernel code: eth: fbnic: Fix counter roll-over issue | Problem Details:
Fix a potential counter roll-over issue in fbnic_mbx_alloc_rx_msgs()
when calculating descriptor slots. The issue occurs when head - tail
results in a large positive value (unsigned) and the compiler interprets
head - tail - 1 as a signed value.
Since FBNIC_IPC_MBX_DESC_LEN is a power of two, use a ma... | ```diff
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
index c87cb9ed09e7..fcd9912e7ad3 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
@@ -201,7 +201,7 @@ static int fbnic_mbx_alloc_rx_msgs(struct fbnic_dev *... |
27fd02860164bfa78cec2640dfad630d832e302c | Analyze and fix the following issue in the Linux kernel code: mptcp: clear scheduled subflows on retransmit | Problem Details:
When __mptcp_retrans() kicks-in, it schedules one or more subflows for
retransmission, but such subflows could be actually left alone if there
is no more data to retransmit and/or in case of concurrent fallback.
Scheduled subflows could be processed much later in time, i.e. when new
data will be trans... | ```diff
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 33b5dce431c2..8abb425d8b5f 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -2665,7 +2665,7 @@ static void __mptcp_retrans(struct sock *sk)
}
if (!mptcp_send_head(sk))
- return;
+ goto clear_scheduled;
goto reset_time... |
da62abaaa268357b1aa66b372ace562189a05df1 | Analyze and fix the following issue in the Linux kernel code: net: dsa: sja1105: fix SGMII linking at 10M or 100M but not passing traffic | Problem Details:
When using the SGMII PCS as a fixed-link chip-to-chip connection, it is
easy to miss the fact that traffic passes only at 1G, since that's what
any normal such connection would use.
When using the SGMII PCS connected towards an on-board PHY or an SFP
module, it is immediately noticeable that when the ... | ```diff
diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index f674c400f05b..aa2145cf29a6 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -1302,14 +1302,7 @@ static int sja1105_set_port_speed(struct sja1105_private *priv, in... |
546dbb0223102813ffb5bbcb9443a47c3183f195 | Analyze and fix the following issue in the Linux kernel code: of: Skip devicetree kunit tests when RISCV+ACPI doesn't populate root node | Problem Details:
Starting with commit 69a8b62a7aa1 ("riscv: acpi: avoid errors caused by
probing DT devices when ACPI is used"), riscv images no longer populate
devicetree if ACPI is enabled. This causes unit tests to fail which require
the root node to be set.
# Subtest: of_dtb
# module: of_test
1..2
# of_dtb... | ```diff
diff --git a/drivers/of/of_kunit_helpers.c b/drivers/of/of_kunit_helpers.c
index 7b3ed5a382aa..f6ed1af8b62a 100644
--- a/drivers/of/of_kunit_helpers.c
+++ b/drivers/of/of_kunit_helpers.c
@@ -18,8 +18,9 @@
*/
void of_root_kunit_skip(struct kunit *test)
{
- if (IS_ENABLED(CONFIG_ARM64) && IS_ENABLED(CONFIG_AC... |
651765e8d527427e1d91fb7f606c5506f437f622 | Analyze and fix the following issue in the Linux kernel code: netlink: specs: add big-endian byte-order for u32 IPv4 addresses | Problem Details:
The fix commit converted several IPv4 address attributes from binary
to u32, but forgot to specify byte-order: big-endian. Without this,
YNL tools display IPv4 addresses incorrectly due to host-endian
interpretation.
Add the missing byte-order: big-endian to all affected u32 IPv4
address fields to ens... | ```diff
diff --git a/Documentation/netlink/specs/rt-addr.yaml b/Documentation/netlink/specs/rt-addr.yaml
index abcbaa73fa9d..163a106c41bb 100644
--- a/Documentation/netlink/specs/rt-addr.yaml
+++ b/Documentation/netlink/specs/rt-addr.yaml
@@ -97,6 +97,7 @@ attribute-sets:
-
name: broadcast
type... |
4fcb8ab4a09b1855dbfd7062605dd13abd64c086 | Analyze and fix the following issue in the Linux kernel code: net: wwan: mhi: Keep modem name match with Foxconn T99W640 | Problem Details:
Correct it since M.2 device T99W640 has updated from T99W515.
We need to align it with MHI side otherwise this modem can't
get the network.
Fixes: ae5a34264354 ("bus: mhi: host: pci_generic: Fix the modem name of Foxconn T99W640")
Signed-off-by: Slark Xiao <slark_xiao@163.com>
Reviewed-by: Loic Poulai... | ```diff
diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
index c814fbd756a1..f8bc9a39bfa3 100644
--- a/drivers/net/wwan/mhi_wwan_mbim.c
+++ b/drivers/net/wwan/mhi_wwan_mbim.c
@@ -98,7 +98,7 @@ static struct mhi_mbim_link *mhi_mbim_get_link_rcu(struct mhi_mbim_context *mbim
static int mh... |
c01a6e5b2e4f21d31cf725b9f3803cb0280b1b8d | Analyze and fix the following issue in the Linux kernel code: selftests/net: packetdrill: pass send_omit_free to MSG_ZEROCOPY tests | Problem Details:
The --send_omit_free flag is needed for TCP zero copy tests, to ensure
that packetdrill doesn't free the send() buffer after the send() call.
Fixes: 1e42f73fd3c2 ("selftests/net: packetdrill: import tcp/zerocopy")
Closes: https://lore.kernel.org/netdev/20251124071831.4cbbf412@kernel.org/
Suggested-by:... | ```diff
diff --git a/tools/testing/selftests/net/packetdrill/tcp_syscall_bad_arg_sendmsg-empty-iov.pkt b/tools/testing/selftests/net/packetdrill/tcp_syscall_bad_arg_sendmsg-empty-iov.pkt
index b2b2cdf27e20..454441e7ecff 100644
--- a/tools/testing/selftests/net/packetdrill/tcp_syscall_bad_arg_sendmsg-empty-iov.pkt
+++ b... |
16c31979840399e6e5542f861c6fb18f9086f3c9 | Analyze and fix the following issue in the Linux kernel code: gfs2: No longer thaw filesystems during a withdraw | Problem Details:
Previously, when a withdraw occurred, we would wait for another node to
recover our journal. This also meant that frozen filesystem needed to
be thawed because otherwise, other nodes wouldn't be able to recover the
filesystem. With the reversal of commit 601ef0d52e96 ("gfs2: Force
withdraw to replay ... | ```diff
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 0c398866dbb4..f6cd907b3ec6 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -817,20 +817,6 @@ static int gfs2_thaw_super(struct super_block *sb, enum freeze_holder who,
return error;
}
-void gfs2_thaw_freeze_initiator(struct super_block *sb)
-{
- st... |
bbbf1529ea9b85072e58c164a9a5d82554ffa941 | Analyze and fix the following issue in the Linux kernel code: gfs2: New gfs2_withdraw_helper | Problem Details:
Currently, when a gfs2 filesystem is withdrawn, an "offline" uevent is
triggered that invokes gfs2-util's gfs2_withdraw_helper script. The
purpose of this script is to deactivate the filesystem's block device so
that it can be withdrawn immediately, even before all the filesystem's
caches have been di... | ```diff
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 7a6ad36413d1..d05d8fe4e456 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -537,8 +537,7 @@ struct gfs2_statfs_change_host {
#define GFS2_ERRORS_DEFAULT GFS2_ERRORS_WITHDRAW
#define GFS2_ERRORS_WITHDRAW 0
-#define GFS2_ERRORS_CONTINUE ... |
655531c95be333cb979fb58f6825ddae40455c13 | Analyze and fix the following issue in the Linux kernel code: Revert "gfs2: fix infinite loop when checking ail item count before go_inval" | Problem Details:
The current withdraw code duplicates the journal recovery code gfs2
already has for dealing with node failures, and it does so poorly. That
code was added because when releasing a lockspace, we didn't have a way
to indicate that the lockspace needs recovery. We now do have this
feature, so the curren... | ```diff
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index d78535dd76f2..2f790fe90f3b 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -678,23 +678,8 @@ __acquires(&gl->gl_lockref.lock)
goto skip_inval;
}
- if (target == LM_ST_UNLOCKED || target == LM_ST_DEFERRED) {
- /*
- * The call to go_sync should ... |
6bb7c1bf5a622818e00480448ff661c72969bcdc | Analyze and fix the following issue in the Linux kernel code: Revert "gfs2: fix a deadlock on withdraw-during-mount" | Problem Details:
The current withdraw code duplicates the journal recovery code gfs2
already has for dealing with node failures, and it does so poorly. That
code was added because when releasing a lockspace, we didn't have a way
to indicate that the lockspace needs recovery. We now do have this
feature, so the curren... | ```diff
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 1eb637f6cf70..991e514bfeed 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -663,16 +663,6 @@ out:
clear_bit(GLF_LOCK, &gl->gl_flags);
}
-static bool is_system_glock(struct gfs2_glock *gl)
-{
- struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
- struct gf... |
9c4a3de6cd5b46aa743c460b86eb58fe5f93daec | Analyze and fix the following issue in the Linux kernel code: gfs2: Asynchronous withdraw | Problem Details:
So far, withdraws are carried out in the context of the calling task.
When another task tries to withdraw while a withdraw is already
underway, that task blocks as well. Change that to carry out withdraws
asynchronously in workqueue context and don't block the task triggering
the withdraw anymore.
Fi... | ```diff
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 5a0ea416cfda..db0e72adb999 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -716,6 +716,7 @@ struct gfs2_sbd {
struct gfs2_glock *sd_rename_gl;
struct gfs2_glock *sd_freeze_gl;
struct work_struct sd_freeze_work;
+ struct work_struct sd_withdraw... |
dff1fb6d8b7abe5b1119fa060f5d6b3370bf10ac | Analyze and fix the following issue in the Linux kernel code: gfs2: Fix "gfs2: Switch to wait_event in gfs2_quotad" | Problem Details:
Commit e4a8b5481c59a ("gfs2: Switch to wait_event in gfs2_quotad") broke
cyclic statfs syncing, so the numbers reported by "df" could easily get
completely out of sync with reality. Fix this by reverting part of
commit e4a8b5481c59a for now.
A follow-up commit will clean this code up later.
Signed-o... | ```diff
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 2298e06797ac..f2df01f801b8 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -1616,7 +1616,7 @@ int gfs2_quotad(void *data)
t = min(quotad_timeo, statfs_timeo);
- t = wait_event_freezable_timeout(sdp->sd_quota_wait,
+ t -= wait_event_freezable_ti... |
5b351583a327f59438bb87832b8eedfa972e2c3d | Analyze and fix the following issue in the Linux kernel code: gfs2: Minor cosmetic remote delete cleanups | Problem Details:
Rename gfs2_try_evict() to gfs2_try_to_evict(). The GIF_DEFER_DELETE
flag has been superceded by the GLF_DEFER_DELETE flag, so fix a
left-over comment. Add a clarifying comment to delete_work_func().
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> | ```diff
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index aeeef9c3a6b7..d0f7817e300a 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -966,14 +966,14 @@ static struct gfs2_inode *gfs2_grab_existing_inode(struct gfs2_glock *gl)
return ip;
}
-static void gfs2_try_evict(struct gfs2_glock *gl)
+static void gfs... |
64c10ed9274bc46416f502afea48b4ae11279669 | Analyze and fix the following issue in the Linux kernel code: gfs2: fix remote evict for read-only filesystems | Problem Details:
When a node tries to delete an inode, it first requests exclusive access
to the iopen glock. This triggers demote requests on all remote nodes
currently holding the iopen glock. To satisfy those requests, the
remote nodes evict the inode in question, or they poke the corresponding
inode glock to sign... | ```diff
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index 0c0a80b3baca..0c68ab4432b0 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -630,8 +630,7 @@ static void iopen_go_callback(struct gfs2_glock *gl, bool remote)
struct gfs2_inode *ip = gl->gl_object;
struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
- if (!... |
af7273cc7ae01f5b3e34e62f59588ce79fe50f79 | Analyze and fix the following issue in the Linux kernel code: selftests/net: initialize char variable to null | Problem Details:
char variable in 'so_txtime.c' & 'txtimestamp.c' were left uninitilized
when switch default case taken. which raises following warning.
txtimestamp.c:240:2: warning: variable 'tsname' is used uninitialized
whenever switch default is taken [-Wsometimes-uninitialized]
so_txtime.c:210:3: warning: var... | ```diff
diff --git a/tools/testing/selftests/net/so_txtime.c b/tools/testing/selftests/net/so_txtime.c
index 8457b7ccbc09..b76df1efc2ef 100644
--- a/tools/testing/selftests/net/so_txtime.c
+++ b/tools/testing/selftests/net/so_txtime.c
@@ -174,7 +174,7 @@ static int do_recv_errqueue_timeout(int fdt)
msg.msg_controllen... |
779bcdd4b9ae6566f309043c53c946e8ac0015fd | Analyze and fix the following issue in the Linux kernel code: vhost: rewind next_avail_head while discarding descriptors | Problem Details:
When discarding descriptors with IN_ORDER, we should rewind
next_avail_head otherwise it would run out of sync with
last_avail_idx. This would cause driver to report
"id X is not a head".
Fixing this by returning the number of descriptors that is used for
each buffer via vhost_get_vq_desc_n() so calle... | ```diff
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 35ded4330431..8f7f50acb6d6 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -592,14 +592,15 @@ static void vhost_net_busy_poll(struct vhost_net *net,
static int vhost_net_tx_get_vq_desc(struct vhost_net *net,
struct vhost_net_vi... |
076381c261374c587700b3accf410bdd2dba334e | Analyze and fix the following issue in the Linux kernel code: libceph: fix potential use-after-free in have_mon_and_osd_map() | Problem Details:
The wait loop in __ceph_open_session() can race with the client
receiving a new monmap or osdmap shortly after the initial map is
received. Both ceph_monc_handle_map() and handle_one_map() install
a new map immediately after freeing the old one
kfree(monc->monmap);
monc->monmap = monmap;
... | ```diff
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
index 4c6441536d55..285e981730e5 100644
--- a/net/ceph/ceph_common.c
+++ b/net/ceph/ceph_common.c
@@ -785,42 +785,53 @@ void ceph_reset_client_addr(struct ceph_client *client)
}
EXPORT_SYMBOL(ceph_reset_client_addr);
-/*
- * true if we have the mo... |
7c11c56eb32eae96893eebafdbe3decadefe88ad | Analyze and fix the following issue in the Linux kernel code: ext4: align max orphan file size with e2fsprogs limit | Problem Details:
Kernel commit 0a6ce20c1564 ("ext4: verify orphan file size is not too big")
limits the maximum supported orphan file size to 8 << 20.
However, in e2fsprogs, the orphan file size is set to 32–512 filesystem
blocks when creating a filesystem.
With 64k block size, formatting an ext4 fs >32G gives an orp... | ```diff
diff --git a/fs/ext4/orphan.c b/fs/ext4/orphan.c
index 82d5e7501455..fb57bba0d19d 100644
--- a/fs/ext4/orphan.c
+++ b/fs/ext4/orphan.c
@@ -8,6 +8,8 @@
#include "ext4.h"
#include "ext4_jbd2.h"
+#define EXT4_MAX_ORPHAN_FILE_BLOCKS 512
+
static int ext4_orphan_file_add(handle_t *handle, struct inode *inode)
... |
4ada1e4f8937f1ae6b620e7b1c76e02b9b3a15be | Analyze and fix the following issue in the Linux kernel code: fs/ext4: fix typo in comment | Problem Details:
Correct 'metdata' -> 'metadata' in comment.
Signed-off-by: Haodong Tian <tianhd25@mails.tsinghua.edu.cn>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Message-ID: <20251112155916.3007639-1-tianhd25@mails.tsinghua.edu.cn>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | ```diff
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index c9329ed5c094..8040c731b3e4 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -752,7 +752,7 @@ ext4_fsblk_t ext4_new_meta_blocks(handle_t *handle, struct inode *inode,
*count = ar.len;
/*
* Account for the allocated meta blocks. We will never
... |
d9ee3ff810f1cc0e253c9f2b17b668b973cb0e06 | Analyze and fix the following issue in the Linux kernel code: ext4: improve integrity checking in __mb_check_buddy by enhancing order-0 validation | Problem Details:
When the MB_CHECK_ASSERT macro is enabled, we found that the
current validation logic in __mb_check_buddy has a gap in
detecting certain invalid buddy states, particularly related
to order-0 (bitmap) bits.
The original logic consists of three steps:
1. Validates higher-order buddies: if a higher-order... | ```diff
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 194a9f995c36..65335248825c 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -682,6 +682,24 @@ do { \
} \
} while (0)
+/*
+ * Perform buddy integrity check with the following steps:
+ *
+ * 1. Top-down validation (from highest ... |
3f7a79d05c692c7cfec70bf104b1b3c3d0ce6247 | Analyze and fix the following issue in the Linux kernel code: ext4: fix incorrect group number assertion in mb_check_buddy | Problem Details:
When the MB_CHECK_ASSERT macro is enabled, an assertion failure can
occur in __mb_check_buddy when checking preallocated blocks (pa) in
a block group:
Assertion failure in mb_free_blocks() : "groupnr == e4b->bd_group"
This happens when a pa at the very end of a block group (e.g.,
pa_pstart=32765, pa_... | ```diff
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 9087183602e4..194a9f995c36 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -768,6 +768,8 @@ static void __mb_check_buddy(struct ext4_buddy *e4b, char *file,
ext4_group_t groupnr;
struct ext4_prealloc_space *pa;
pa = list_entry(cur, stru... |
0cd8feea8777f8d9b9a862b89c688b049a5c8475 | Analyze and fix the following issue in the Linux kernel code: ext4: add i_data_sem protection in ext4_destroy_inline_data_nolock() | Problem Details:
Fix a race between inline data destruction and block mapping.
The function ext4_destroy_inline_data_nolock() changes the inode data
layout by clearing EXT4_INODE_INLINE_DATA and setting EXT4_INODE_EXTENTS.
At the same time, another thread may execute ext4_map_blocks(), which
tests EXT4_INODE_EXTENTS t... | ```diff
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index b48c7dbe76a2..1f6bc05593df 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -451,9 +451,13 @@ static int ext4_destroy_inline_data_nolock(handle_t *handle,
if (!ei->i_inline_off)
return 0;
+ down_write(&ei->i_data_sem);
+
error = ext4_get_ino... |
4091c8206cfd2e3bb529ef260887296b90d9b6a2 | Analyze and fix the following issue in the Linux kernel code: ext4: clear i_state_flags when alloc inode | Problem Details:
i_state_flags used on 32-bit archs, need to clear this flag when
alloc inode.
Find this issue when umount ext4, sometimes track the inode as orphan
accidently, cause ext4 mesg dump.
Fixes: acf943e9768e ("ext4: fix checks for orphan inodes")
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: B... | ```diff
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index ba4fd9aba1c1..b20a1bf866ab 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -1293,7 +1293,6 @@ got:
ei->i_csum_seed = ext4_chksum(csum, (__u8 *)&gen, sizeof(gen));
}
- ext4_clear_state_flags(ei); /* Only relevant on 32-bit archs */
ext4_set_... |
6abfe107894af7e8ce3a2e120c619d81ee764ad5 | Analyze and fix the following issue in the Linux kernel code: jbd2: fix the inconsistency between checksum and data in memory for journal sb | Problem Details:
Copying the file system while it is mounted as read-only results in
a mount failure:
[~]# mkfs.ext4 -F /dev/sdc
[~]# mount /dev/sdc -o ro /mnt/test
[~]# dd if=/dev/sdc of=/dev/sda bs=1M
[~]# mount /dev/sda /mnt/test1
[ 1094.849826] JBD2: journal checksum error
[ 1094.850927] EXT4-fs (sda): Could not lo... | ```diff
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 2fe1786a8f1b..c973162d5b31 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -2354,6 +2354,12 @@ int jbd2_journal_set_features(journal_t *journal, unsigned long compat,
sb->s_feature_compat |= cpu_to_be32(compat);
sb->s_feature_ro_compat |=... |
ee5a977b4e771cc181f39d504426dbd31ed701cc | Analyze and fix the following issue in the Linux kernel code: ext4: fix string copying in parse_apply_sb_mount_options() | Problem Details:
strscpy_pad() can't be used to copy a non-NUL-term string into a NUL-term
string of possibly bigger size. Commit 0efc5990bca5 ("string.h: Introduce
memtostr() and memtostr_pad()") provides additional information in that
regard. So if this happens, the following warning is observed:
strnlen: detected... | ```diff
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 7de15249e826..d1ba894c0e0a 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2476,7 +2476,7 @@ static int parse_apply_sb_mount_options(struct super_block *sb,
struct ext4_fs_context *m_ctx)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
- char s_moun... |
986835bf4d11032bba4ab8414d18fce038c61bb4 | Analyze and fix the following issue in the Linux kernel code: jbd2: avoid bug_on in jbd2_journal_get_create_access() when file system corrupted | Problem Details:
There's issue when file system corrupted:
------------[ cut here ]------------
kernel BUG at fs/jbd2/transaction.c:1289!
Oops: invalid opcode: 0000 [#1] SMP KASAN PTI
CPU: 5 UID: 0 PID: 2031 Comm: mkdir Not tainted 6.18.0-rc1-next
RIP: 0010:jbd2_journal_get_create_access+0x3b6/0x4d0
RSP: 0018:ffff88811... | ```diff
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 3a866fc87e7a..653ee540c4a1 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1284,14 +1284,23 @@ int jbd2_journal_get_create_access(handle_t *handle, struct buffer_head *bh)
* committing transaction's lists, but it HAS to be in... |
d0d08f4bd7f667dc7a65cd7133c0a94a6f02aca3 | Analyze and fix the following issue in the Linux kernel code: dma-direct: Fix missing sg_dma_len assignment in P2PDMA bus mappings | Problem Details:
Prior to commit a25e7962db0d7 ("PCI/P2PDMA: Refactor the p2pdma mapping
helpers"), P2P segments were mapped using the pci_p2pdma_map_segment()
helper. This helper was responsible for populating sg->dma_address,
marking the bus address, and also setting sg_dma_len(sg).
The refactor[1] removed this help... | ```diff
diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c
index 1f9ee9759426..f973e7e73c90 100644
--- a/kernel/dma/direct.c
+++ b/kernel/dma/direct.c
@@ -481,6 +481,7 @@ int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, int nents,
case PCI_P2PDMA_MAP_BUS_ADDR:
sg->dma_address = pci_p2pdma_b... |
1650a1b6cb1ae6cb99bb4fce21b30ebdf9fc238e | Analyze and fix the following issue in the Linux kernel code: fgraph: Check ftrace_pids_enabled on registration for early filtering | Problem Details:
When registering ftrace_graph, check if ftrace_pids_enabled is active.
If enabled, assign entryfunc to fgraph_pid_func to ensure filtering
is performed before executing the saved original entry function.
Cc: stable@vger.kernel.org
Cc: <wang.yaxin@zte.com.cn>
Cc: <mhiramat@kernel.org>
Cc: <mark.rutland... | ```diff
diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c
index d6222bb99d1d..599f2939cd94 100644
--- a/kernel/trace/fgraph.c
+++ b/kernel/trace/fgraph.c
@@ -1377,6 +1377,13 @@ int register_ftrace_graph(struct fgraph_ops *gops)
ftrace_graph_active++;
+ /* Always save the function, and reset at unregister... |
b5d6d3f73d0bac4a7e3a061372f6da166fc6ee5c | Analyze and fix the following issue in the Linux kernel code: fgraph: Initialize ftrace_ops->private for function graph ops | Problem Details:
The ftrace_pids_enabled(op) check relies on op->private being properly
initialized, but fgraph_ops's underlying ftrace_ops->private was left
uninitialized. This caused ftrace_pids_enabled() to always return false,
effectively disabling PID filtering for function graph tracing.
Fix this by copying src_... | ```diff
diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c
index 484ad7a18463..d6222bb99d1d 100644
--- a/kernel/trace/fgraph.c
+++ b/kernel/trace/fgraph.c
@@ -1019,6 +1019,7 @@ void fgraph_init_ops(struct ftrace_ops *dst_ops,
mutex_init(&dst_ops->local_hash.regex_lock);
INIT_LIST_HEAD(&dst_ops->subop_list... |
ad8cccc24887655ebf0a3f459d38d1fb683df46a | Analyze and fix the following issue in the Linux kernel code: Fix Intel Dollar Cove TI battery driver 32-bit build error | Problem Details:
The driver is doing a 64-bit divide, rather than using the proper
helpers, causing link errors on i386 allyesconfig builds:
x86_64-linux-ld: drivers/power/supply/intel_dc_ti_battery.o: in function `dc_ti_battery_get_voltage_and_current_now':
intel_dc_ti_battery.c:(.text+0x5c): undefined reference ... | ```diff
diff --git a/drivers/power/supply/intel_dc_ti_battery.c b/drivers/power/supply/intel_dc_ti_battery.c
index 56b0c92e9d28..67a75281b0ac 100644
--- a/drivers/power/supply/intel_dc_ti_battery.c
+++ b/drivers/power/supply/intel_dc_ti_battery.c
@@ -127,7 +127,8 @@ struct dc_ti_battery_chip {
static int dc_ti_battery... |
23c0e9cc76bf39c10a1c1927345dfdbc54947a97 | Analyze and fix the following issue in the Linux kernel code: tracing: Show the tracer options in boot-time created instance | Problem Details:
Since tracer_init_tracefs_work_func() only updates the tracer options
for the global_trace, the instances created by the kernel cmdline
do not have those options.
Fix to update tracer options for those boot-time created instances
to show those options.
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Math... | ```diff
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 59cd4ed8af6d..032bdedca5d9 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -10228,11 +10228,14 @@ static __init int __update_tracer_options(struct trace_array *tr)
return ret;
}
-static __init void update_tracer_options(struct t... |
7a6735cc9b4c0b5cd6fa00c32217db8929a8c18f | Analyze and fix the following issue in the Linux kernel code: ftrace: Avoid redundant initialization in register_ftrace_direct | Problem Details:
The FTRACE_OPS_FL_INITIALIZED flag is cleared in register_ftrace_direct,
which can make it initialized by ftrace_ops_init() even if it is already
initialized. It seems that there is no big deal here, but let's still fix
it.
Link: https://patch.msgid.link/20251110121808.1559240-1-dongml2@chinatelecom.c... | ```diff
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 7c3bbebeec7a..b4510a6dbf42 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -6069,7 +6069,7 @@ int register_ftrace_direct(struct ftrace_ops *ops, unsigned long addr)
new_hash = NULL;
ops->func = call_direct_funcs;
- ops->fla... |
49c1364c7ca3577037e5ded23c30e3248434c561 | Analyze and fix the following issue in the Linux kernel code: tracing: Remove unused variable in tracing_trace_options_show() | Problem Details:
The flags and opts used in tracing_trace_options_show() now come directly
from the trace array "current_trace_flags" and not the current_trace. The
variable "trace" was still being assigned to tr->current_trace but never
used. This caused a warning in clang.
Cc: Masami Hiramatsu <mhiramat@kernel.org>
... | ```diff
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 8ae95800592d..59cd4ed8af6d 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -5167,7 +5167,6 @@ static int tracing_trace_options_show(struct seq_file *m, void *v)
struct tracer_opt *trace_opts;
struct trace_array *tr = m->private;
... |
ac87b220a6e9530d752ab5718acc7776f9924702 | Analyze and fix the following issue in the Linux kernel code: fgraph: Make fgraph_no_sleep_time signed | Problem Details:
The variable fgraph_no_sleep_time changed from being a boolean to being a
counter. A check is made to make sure that it never goes below zero. But
the variable being unsigned makes the check always fail even if it does go
below zero.
Make the variable a signed int so that checking it going below zero ... | ```diff
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 58be6d741d72..da5d9527ebd6 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -1113,7 +1113,7 @@ static inline void ftrace_graph_addr_finish(struct fgraph_ops *gops, struct ftra
#endif /* CONFIG_DYNAMIC_FTRACE */
extern unsigned int... |
32115734c0ed8b463d1020e8da47968735f882c0 | Analyze and fix the following issue in the Linux kernel code: Increase the default 32-bit build frame size warning limit to 1280 bytes | Problem Details:
That was already the limit with KASAN enabled, and the 32-bit x86 build
ends up having a couple of drm cases that have stack frames _just_ over
1kB on my allmodconfig test. So the minimal fix for this build issue
for now is to just bump the limit and make it independent of KASAN.
[ Side note: XTENSA ... | ```diff
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 3034e294d50d..713cc94caa02 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -445,8 +445,7 @@ config FRAME_WARN
default 2048 if GCC_PLUGIN_LATENT_ENTROPY
default 2048 if PARISC
default 1536 if (!64BIT && XTENSA)
- default 1280 if KASAN && !6... |
688b745401ab16e2e1a3b504863f0a45fd345638 | Analyze and fix the following issue in the Linux kernel code: bpf: Fix exclusive map memory leak | Problem Details:
When excl_prog_hash is 0 and excl_prog_hash_size is non-zero, the map also
needs to be freed. Otherwise, the map memory will not be reclaimed, just
like the memory leak problem reported by syzbot [1].
syzbot reported:
BUG: memory leak
backtrace (crc 7b9fb9b4):
map_create+0x322/0x11e0 kernel/bpf/... | ```diff
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index cef8963d69f9..d5851800b3de 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -1586,7 +1586,8 @@ static int map_create(union bpf_attr *attr, bpfptr_t uattr)
goto free_map;
}
} else if (attr->excl_prog_hash_size) {
- return -EI... |
e61462232a58bddd818fa6a913a9a2e76fd3634f | Analyze and fix the following issue in the Linux kernel code: selftests/landlock: Fix makefile header list | Problem Details:
Make all headers part of make's dependencies computations.
Otherwise, updating audit.h, common.h, scoped_base_variants.h,
scoped_common.h, scoped_multiple_domain_variants.h, or wrappers.h,
re-running make and running selftests could lead to testing stale headers.
Fixes: 6a500b22971c ("selftests/landlo... | ```diff
diff --git a/tools/testing/selftests/landlock/Makefile b/tools/testing/selftests/landlock/Makefile
index a3f449914bf9..044b83bde16e 100644
--- a/tools/testing/selftests/landlock/Makefile
+++ b/tools/testing/selftests/landlock/Makefile
@@ -4,7 +4,7 @@
CFLAGS += -Wall -O2 $(KHDR_INCLUDES)
-LOCAL_HDRS += comm... |
f4d3ef2dd0e3900693805cec3e4cbf8da4928b3d | Analyze and fix the following issue in the Linux kernel code: landlock: Minor comments improvements | Problem Details:
This patch contains some small comment changes. The first three
comments for ruleset.c, I sort of made along the way while working on /
trying to understand Landlock, and the one from ruleset.h was from the
hashtable patch but extracted here. In fs.c, one comment which I found
would have been helpful... | ```diff
diff --git a/security/landlock/fs.c b/security/landlock/fs.c
index d9c12b993fa7..97cb7ba4eea4 100644
--- a/security/landlock/fs.c
+++ b/security/landlock/fs.c
@@ -714,7 +714,8 @@ static void test_is_eacces_with_write(struct kunit *const test)
* is_access_to_paths_allowed - Check accesses for requests with a c... |
834ebb5678d75d844f5d4f44ede78724d8c96630 | Analyze and fix the following issue in the Linux kernel code: perf tools: Don't read build-ids from non-regular files | Problem Details:
Simplify the build ID reading code by removing the non-blocking option.
Having to pass the correct option to this function was fragile and a
mistake would result in a hang, see the linked fix. Furthermore,
compressed files are always opened blocking anyway, ignoring the
non-blocking option.
We also do... | ```diff
diff --git a/tools/perf/bench/inject-buildid.c b/tools/perf/bench/inject-buildid.c
index 12387ea88b9a..aad572a78d7f 100644
--- a/tools/perf/bench/inject-buildid.c
+++ b/tools/perf/bench/inject-buildid.c
@@ -85,7 +85,7 @@ static int add_dso(const char *fpath, const struct stat *sb __maybe_unused,
if (typeflag ... |
c6a45ee7607de3a350008630f4369b1b5ac80884 | Analyze and fix the following issue in the Linux kernel code: ublk: prevent invalid access with DEBUG | Problem Details:
ublk_ch_uring_cmd_local() may jump to the out label before
initialising the io pointer. This will cause trouble if DEBUG is
defined, because the pr_devel() call dereferences io. Clang reports:
drivers/block/ublk_drv.c:2403:6: error: variable 'io' is used uninitialized whenever 'if' condition is true [... | ```diff
diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index 75f210523e52..09718a68137c 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -2301,7 +2301,7 @@ static int ublk_ch_uring_cmd_local(struct io_uring_cmd *cmd,
u16 buf_idx = UBLK_INVALID_BUF_IDX;
struct ublk_device *ub... |
87c75fa75559f5501b5a03caf442f18899e388be | Analyze and fix the following issue in the Linux kernel code: perf pmu: fix duplicate conditional statement | Problem Details:
Remove duplicate check for PERF_PMU_TYPE_DRM_END in perf_pmu__kind.
Fixes: f0feb21e0a10 ("perf pmu: Add PMU kind to simplify differentiating")
Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Closes: https://lore.kernel.org/linux-perf-users/CA+G8Dh+wLx+Fv... | ```diff
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index 5738e88fbb54..8f11bfe8ed6d 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -332,8 +332,6 @@ static inline enum pmu_kind perf_pmu__kind(const struct perf_pmu *pmu)
return PERF_PMU_KIND_PE;
if (type <= PERF_PMU_TYPE_DRM_END)
... |
ca079ec3ebed19a12c1bf080496dacbc6fdfbb39 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: remoteproc: qcom,sc8280xp-pas: Fix CDSP power desc | Problem Details:
The power requirements for the CDSP instances on SC8280XP aren't fully
described, with only one of the three present. Fix that.
Fixes: ee651cd1e944 ("dt-bindings: remoteproc: qcom: pas: Add sc8280xp adsp and nsp pair")
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Krzyszto... | ```diff
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml
index 96d53baf6e00..5dbda3a55047 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml
+++ b/Documentation/devicetree/bindings/remotep... |
7fa666ab07ba9e08f52f357cb8e1aad753e83ac6 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix cyan_skillfish2 gpu info fw handling | Problem Details:
If the board supports IP discovery, we don't need to
parse the gpu info firmware.
Backport to 6.18.
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4721
Fixes: fa819e3a7c1e ("drm/amdgpu: add support for cyan skillfish gpu_info")
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry ... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 076bbc09f30c..96b6738e6252 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2638,6 +2638,8 @@ static int amdgpu_device_parse_gpu_info_fw(struct a... |
3ce62c189693e8ed7b3abe551802bbc67f3ace54 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Check NULL before accessing | Problem Details:
[WHAT]
IGT kms_cursor_legacy's long-nonblocking-modeset-vs-cursor-atomic
fails with NULL pointer dereference. This can be reproduced with
both an eDP panel and a DP monitors connected.
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor read access in kernel mode
#PF: er... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
index 9ac2d41f8fca..0a46e834357a 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -705,9 +705,14 @@ bool dc_stream_get_scanoutpos(co... |
a857d99201cc4eb3cb78b9dcb6f1d027ef3ae699 | Analyze and fix the following issue in the Linux kernel code: s390/dasd: Use scnprintf() instead of sprintf() | Problem Details:
Use scnprintf() instead of sprintf() for those cases where the
destination is an array and the size of the array is known at compile
time.
This prevents theoretical buffer overflows, but also avoids that people
again and again spend time to figure out if the code is actually safe.
Signed-off-by: Jan ... | ```diff
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c
index ddbdf1f85d44..73972900fc55 100644
--- a/drivers/s390/block/dasd_devmap.c
+++ b/drivers/s390/block/dasd_devmap.c
@@ -355,7 +355,8 @@ static int __init dasd_parse_range(const char *range)
/* each device in dasd= parameter sho... |
c943bfc6afb8d0e781b9b7406f36caa8bbf95cb9 | Analyze and fix the following issue in the Linux kernel code: s390/dasd: Fix gendisk parent after copy pair swap | Problem Details:
After a copy pair swap the block device's "device" symlink points to
the secondary CCW device, but the gendisk's parent remained the
primary, leaving /sys/block/<dasdx> under the wrong parent.
Move the gendisk to the secondary's device with device_move(), keeping
the sysfs topology consistent after th... | ```diff
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 88fa17aea2ec..ec0c62e5ef73 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -6150,6 +6150,7 @@ static int dasd_eckd_copy_pair_swap(struct dasd_device *device, char *prim_busid
struct dasd_copy... |
17e7972979e147cc51d4a165e6b6b0f93273ca68 | Analyze and fix the following issue in the Linux kernel code: ACPI: processor_core: fix map_x2apic_id for amd-pstate on am4 | Problem Details:
On all AMD AM4 systems I have seen, e.g ASUS X470-i, Pro WS X570 Ace
and equivalent Gigabyte, amd-pstate does not initialize when the
x2apic is enabled in the BIOS. Kernel debug messages include:
[ 0.315438] acpi LNXCPU:00: Failed to get CPU physical ID.
[ 0.354756] ACPI CPPC: No CPC descriptor ... | ```diff
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 9b6b71a2ffb5..a4498357bd16 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -54,7 +54,7 @@ static int map_x2apic_id(struct acpi_subtable_header *entry,
if (!(apic->lapic_flags & ACPI_MADT_ENABLED)... |
2f88425ef590b7fcc2324334b342e048edc144a9 | Analyze and fix the following issue in the Linux kernel code: hwmon: sy7636a: Fix regulator_enable resource leak on error path | Problem Details:
In sy7636a_sensor_probe(), regulator_enable() is called but if
devm_hwmon_device_register_with_info() fails, the function returns
without calling regulator_disable(), leaving the regulator enabled
and leaking the reference count.
Switch to devm_regulator_get_enable() to automatically
manage the regula... | ```diff
diff --git a/drivers/hwmon/sy7636a-hwmon.c b/drivers/hwmon/sy7636a-hwmon.c
index a12fc0ce70e7..d51daaf63d63 100644
--- a/drivers/hwmon/sy7636a-hwmon.c
+++ b/drivers/hwmon/sy7636a-hwmon.c
@@ -66,18 +66,13 @@ static const struct hwmon_chip_info sy7636a_chip_info = {
static int sy7636a_sensor_probe(struct platfor... |
30065e73d7c018cf2e1bec68e2d6ffafc17b3c25 | Analyze and fix the following issue in the Linux kernel code: nvdimm: Prevent integer overflow in ramdax_get_config_data() | Problem Details:
The "cmd->in_offset" variable comes from the user via the __nd_ioctl()
function. The problem is that the "cmd->in_offset + cmd->in_length"
addition could have an integer wrapping issue if cmd->in_offset is close
to UINT_MAX . Both "cmd->in_offset" and "cmd->in_length" are u32
variables.
Fixes: 43bc0... | ```diff
diff --git a/drivers/nvdimm/ramdax.c b/drivers/nvdimm/ramdax.c
index 63cf05791829..954cb7919807 100644
--- a/drivers/nvdimm/ramdax.c
+++ b/drivers/nvdimm/ramdax.c
@@ -143,7 +143,7 @@ static int ramdax_get_config_data(struct nvdimm *nvdimm, int buf_len,
return -EINVAL;
if (struct_size(cmd, out_buf, cmd->in_... |
5427e32fa3a0ba9a016db83877851ed277b065fb | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix cyan_skillfish2 gpu info fw handling | Problem Details:
If the board supports IP discovery, we don't need to
parse the gpu info firmware.
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4721
Fixes: fa819e3a7c1e ("drm/amdgpu: add support for cyan skillfish gpu_info")
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index a7594ae44b20..a1817b4b5173 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2665,6 +2665,8 @@ static int amdgpu_device_parse_gpu_info_fw(struct a... |
93c19634f72fb32284e5775b44e4076c059d8e67 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix CPER ring debugfs read buffer overflow risk | Problem Details:
The CPER ring debugfs read code always writes a 12-byte header when the
file is read for the first time (*offset == 0):
copy_to_user(buf, ring_header, 12);
But the code never checks whether the user buffer (@size) is at least
12 bytes long. After writing the 12-byte header, the code then gives th... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
index cd8873c6931a..c596b6df2e2d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
@@ -520,9 +520,14 @@ static ssize_t amdgpu_ras_cper_debugfs_read(struct file *f, ... |
089702632f1dd38fadc9af13816485d6aa518dbb | Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: assign AID to uuid in topology for SPX mode | Problem Details:
XCD id is assigned to uuid, which causes some performance
drop in SPX mode, assigning AID back will resolve the
issue.
Fixes: 3a75edf93aae ("drm/amdkfd: set uuid for each partition in topology")
Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswan... | ```diff
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index 5c98746eb72d..811636af14ea 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -530,7 +530,9 @@ static ssize_t node_show(struct kobject *kobj, struct att... |
83d161194c1b7c0f75ca89d5f986cb37d9956982 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Check ATOM_DEVICE_CRT2_SUPPORT in dc_load_detection | Problem Details:
[WHY & HOW]
Fix the typo of the else-if condition from ATOM_DEVICE_CRT1_SUPPORT to
ATOM_DEVICE_CRT2_SUPPORT.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
index 4120d6c4c5e4..d1471f34e419 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
@@ -805,7 +805,7 @@ static enum bp_result bio... |
0563d172b687c60513e144d3458b9eb8982eb39b | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix dereference-before-check for dc_link | Problem Details:
The function dereferences amdgpu_dm_connector->dc_link early to
initialize verified_link_cap and dc, but later still checks
amdgpu_dm_connector->dc_link for NULL in the analog path.
This late NULL check is redundant, introduce a local dc_link pointer,
use it consistently, and drop the superfluous NULL... | ```diff
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 020f5a4f6463..6287cc1bd4cc 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -8854,11 +8854,11 @@ static int amdgpu_dm_... |
1a79482699b4d1e43948d14f0c7193dc1dcad858 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix logical vs bitwise bug in get_embedded_panel_info_v2_1() | Problem Details:
The .H_SYNC_POLARITY and .V_SYNC_POLARITY variables are 1 bit bitfields
of a u32. The ATOM_HSYNC_POLARITY define is 0x2 and the
ATOM_VSYNC_POLARITY is 0x4. When we do a bitwise negate of 0, 2, or 4
then the last bit is always 1 so this code always sets .H_SYNC_POLARITY
and .V_SYNC_POLARITY to true.
... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index 04eb647acc4e..550a9f1d03f8 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -1480,10 +1480,10 @@ static enum bp_re... |
621e55f1919640acab25383362b96e65f2baea3c | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Check NULL before accessing | Problem Details:
[WHAT]
IGT kms_cursor_legacy's long-nonblocking-modeset-vs-cursor-atomic
fails with NULL pointer dereference. This can be reproduced with
both an eDP panel and a DP monitors connected.
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor read access in kernel mode
#PF: er... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
index 6d309c320253..129cd5f84983 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -737,9 +737,14 @@ bool dc_stream_get_scanoutpos(co... |
e60573b5980219ad09bb78a014d2fa8664337cf1 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: free job fences on failure in amdgpu_job_alloc_with_ib | Problem Details:
Otherwise we're leaking memory.
Fixes: db36632ea51e ("drm/amdgpu: clean up and unify hw fence handling")
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-o... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
index 0707d2c2326f..0a0dcbf0798d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
@@ -246,6 +246,8 @@ int amdgpu_job_alloc_with_ib(struct amdgpu_device *adev,
if (r)... |
723c1dd3629d2d6eb319247d4eaba9f7b78319fa | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: clear job on failure in amdgpu_job_alloc(_with_ib) | Problem Details:
If memory is freed we need to nullify the pointer or the caller
might call kfree again (eg: amdgpu_cs_parser_fini calls kfree on
all non-null job pointers).
Fixes: db36632ea51e ("drm/amdgpu: clean up and unify hw fence handling")
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@am... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
index 7d8ef7ae10c2..0707d2c2326f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
@@ -224,6 +224,7 @@ err_fence:
kfree((*job)->hw_fence);
err_job:
kfree(*job);
+ ... |
d6f4941f1b4f3e701e422dfbfee024264294f91f | Analyze and fix the following issue in the Linux kernel code: drivers: hid: renegotiate resolution multipliers with device after reset | Problem Details:
The scroll resolution multipliers are set in the context of
hidinput_connect(), which is only called at probe time: when the host
changes the value on the device with a SET_REPORT(FEATURE), and the device
accepts it, these multipliers are stored on the host side, and used to
calculate the final scroll ... | ```diff
diff --git a/drivers/hid/hid-generic.c b/drivers/hid/hid-generic.c
index 9e04c6d0fcc8..c2de916747de 100644
--- a/drivers/hid/hid-generic.c
+++ b/drivers/hid/hid-generic.c
@@ -70,6 +70,14 @@ static int hid_generic_probe(struct hid_device *hdev,
return hid_hw_start(hdev, HID_CONNECT_DEFAULT);
}
+static int h... |
baa120439ac0c803a9962df838eeda28846bc93a | Analyze and fix the following issue in the Linux kernel code: HID: evision: Fix Report Descriptor for Evision Wireless Receiver 320f:226f | Problem Details:
The mouse portion of the device's Report Descriptor declares 5 buttons but only
declares 3 usages (Button 1 through Button 3). As a result events for the 2
side buttons are not generated.
Detect and repair the Report Descriptor if necessary by changing the Usage
Maximum value from Button 3 to Button ... | ```diff
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 986de05a9787..5eff5058ec56 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -383,6 +383,7 @@ config HID_EVISION
help
Support for some EVision keyboards. Note that this is needed only when
applying customization using userspace progr... |
a53e356df548f6b0e82529ef3cc6070f42622189 | Analyze and fix the following issue in the Linux kernel code: rpmsg: glink: fix rpmsg device leak | Problem Details:
While testing rpmsg-char interface it was noticed that duplicate sysfs
entries are getting created and below warning is noticed.
Reason for this is that we are leaking rpmsg device pointer, setting it
null without actually unregistering device.
Any further attempts to unregister fail because rpdev is ... | ```diff
diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index 820a6ca5b1d7..3a15d9d10808 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -1399,6 +1399,7 @@ static void qcom_glink_destroy_ept(struct rpmsg_endpoint *ept)
{
struct glink_channe... |
a4d01f3b02d0afb5e4497a1ec5d48da2a326d468 | Analyze and fix the following issue in the Linux kernel code: hwmon: (adm1026) Convert macros to functions to avoid TOCTOU | Problem Details:
The macro FAN_FROM_REG evaluates its arguments multiple times. When used
in lockless contexts involving shared driver data, this causes
Time-of-Check to Time-of-Use (TOCTOU) race conditions.
Convert the macro to a static function. This guarantees that arguments
are evaluated only once (pass-by-value),... | ```diff
diff --git a/drivers/hwmon/adm1026.c b/drivers/hwmon/adm1026.c
index 80d09b017d3b..c38c932e5d2a 100644
--- a/drivers/hwmon/adm1026.c
+++ b/drivers/hwmon/adm1026.c
@@ -197,8 +197,16 @@ static int adm1026_scaling[] = { /* .001 Volts */
#define FAN_TO_REG(val, div) ((val) <= 0 ? 0xff : \
clamp_val(1350000 /... |
9eb4fb93069a889aae955c2fbf78f9eb34ac4562 | Analyze and fix the following issue in the Linux kernel code: hwmon: (adm1029) Add locking to avoid TOCTOU | Problem Details:
The function fan_show checks shared data for zero or invalid values
before using it as a divisor. These accesses are currently lockless. If
the data changes to zero between the check and the division, it causes a
divide-by-zero error.
Explicitly acquire the update lock around these checks and calculat... | ```diff
diff --git a/drivers/hwmon/adm1029.c b/drivers/hwmon/adm1029.c
index 761c13092488..71eea8ae51b9 100644
--- a/drivers/hwmon/adm1029.c
+++ b/drivers/hwmon/adm1029.c
@@ -171,14 +171,17 @@ fan_show(struct device *dev, struct device_attribute *devattr, char *buf)
struct adm1029_data *data = adm1029_update_device(d... |
be89cf786d36f44d7765c572296fc9299afa428c | Analyze and fix the following issue in the Linux kernel code: hwmon: (lm87) Convert macros to functions to avoid TOCTOU | Problem Details:
The macro FAN_FROM_REG evaluates its arguments multiple times. When used
in lockless contexts involving shared driver data, this causes
Time-of-Check to Time-of-Use (TOCTOU) race conditions.
Convert the macro to a static function. This guarantees that arguments
are evaluated only once (pass-by-value),... | ```diff
diff --git a/drivers/hwmon/lm87.c b/drivers/hwmon/lm87.c
index d2d970e73c61..37bf2d1d3d09 100644
--- a/drivers/hwmon/lm87.c
+++ b/drivers/hwmon/lm87.c
@@ -116,8 +116,14 @@ static u8 LM87_REG_TEMP_LOW[3] = { 0x3A, 0x38, 0x2C };
(((val) < 0 ? (val) - 500 : \
(val) + 500) / 1000))
-#define FAN_FROM... |
0c922106d7a58d106c6a5c52a741ae101cfaf088 | Analyze and fix the following issue in the Linux kernel code: net/sched: em_canid: fix uninit-value in em_canid_match | Problem Details:
Use pskb_may_pull() to ensure a complete CAN frame is present in the
linear data buffer before reading the CAN ID. A simple skb->len check
is insufficient because it only verifies the total data length but does
not guarantee the data is present in skb->data (it could be in
fragments).
pskb_may_pull() ... | ```diff
diff --git a/net/sched/em_canid.c b/net/sched/em_canid.c
index 5337bc462755..2d27f91d8441 100644
--- a/net/sched/em_canid.c
+++ b/net/sched/em_canid.c
@@ -99,6 +99,9 @@ static int em_canid_match(struct sk_buff *skb, struct tcf_ematch *m,
int i;
const struct can_filter *lp;
+ if (!pskb_may_pull(skb, CAN_MT... |
6d849ff573722afcf5508d2800017bdd40f27eb9 | Analyze and fix the following issue in the Linux kernel code: can: rcar_canfd: Fix CAN-FD mode as default | Problem Details:
The commit 5cff263606a1 ("can: rcar_canfd: Fix controller mode setting")
has aligned with the flow mentioned in the hardware manual for all SoCs
except R-Car Gen3 and RZ/G2L SoCs. On R-Car Gen4 and RZ/G3E SoCs, due to
the wrong logic in the commit[1] sets the default mode to FD-Only mode
instead of CAN... | ```diff
diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c
index 45d36adb51b7..4c0d7d26df9f 100644
--- a/drivers/net/can/rcar/rcar_canfd.c
+++ b/drivers/net/can/rcar/rcar_canfd.c
@@ -709,6 +709,11 @@ static void rcar_canfd_set_bit_reg(void __iomem *addr, u32 val)
rcar_canfd_update(val,... |
36dcfa468525336fc33cfa88f2a5514fc9cc0666 | Analyze and fix the following issue in the Linux kernel code: HID: logitech-dj: Fix probe failure when used with KVM | Problem Details:
Since commit 6f20d3261265 ("HID: logitech-dj: Fix error handling in
logi_dj_recv_switch_to_dj_mode()") logi_dj_recv_switch_to_dj_mode()
will return an error when the hid_hw_raw_request() call to enable
[dis]connect events fails.
This can happen when used with a KVM like the Aten CS1784a and the PC
doe... | ```diff
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 3b5412541c92..fd1ea6f62068 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -148,6 +148,7 @@ struct dj_receiver_dev {
struct kfifo notif_fifo;
unsigned long last_query; /* in jiffies */
bool r... |
ca389a55d8b2d86a817433bf82e0602b68c4d541 | Analyze and fix the following issue in the Linux kernel code: HID: logitech-dj: Remove duplicate error logging | Problem Details:
logi_dj_recv_query_paired_devices() and logi_dj_recv_switch_to_dj_mode()
both have 2 callers which all log an error if the function fails. Move
the error logging to inside these 2 functions to remove the duplicated
error logging in the callers.
While at it also move the logi_dj_recv_send_report() call... | ```diff
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index cce54dd9884a..3b5412541c92 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -805,7 +805,6 @@ static void delayedwork_callback(struct work_struct *work)
struct dj_workitem workitem;
unsigned long... |
382b1e8f30f779af8d6d33268e53df7de579ef3c | Analyze and fix the following issue in the Linux kernel code: kernfs: fix memory leak of kernfs_iattrs in __kernfs_new_node | Problem Details:
There exists a memory leak of kernfs_iattrs contained as an element
of kernfs_node allocated in __kernfs_new_node(). __kernfs_setattr()
allocates kernfs_iattrs as a sub-object, and the LSM security check
incorrectly errors out and does not free the kernfs_iattrs sub-object.
Make an additional error ou... | ```diff
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index a670ba3e565e..5c0efd6b239f 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -675,11 +675,14 @@ static struct kernfs_node *__kernfs_new_node(struct kernfs_root *root,
if (parent) {
ret = security_kernfs_init_security(parent, kn);
if (ret)
- goto... |
cbe1d77ed84ae9ab3355d61aca0c30d561a61d5a | Analyze and fix the following issue in the Linux kernel code: hangcheck-timer: fix coding style spacing | Problem Details:
Fix minor styling issues for proper compliance to the kernel coding
style.
Signed-off-by: Clint George <clintbgeorge@gmail.com>
Link: https://patch.msgid.link/20251111151340.9162-4-clintbgeorge@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/char/hangcheck-timer.c b/drivers/char/hangcheck-timer.c
index ff141fdb437a..231cbf7b300f 100644
--- a/drivers/char/hangcheck-timer.c
+++ b/drivers/char/hangcheck-timer.c
@@ -69,7 +69,8 @@ MODULE_VERSION(VERSION_STR);
static int __init hangcheck_parse_tick(char *str)
{
int par;
- if (get... |
75d19e368640f69a3c8532001ec99685d0e2ce89 | Analyze and fix the following issue in the Linux kernel code: hangcheck-timer: replace printk(KERN_CRIT) with pr_crit | Problem Details:
Replace printk(KERN_CRIT ...) with pr_crit(...) and printk() with
pr_debug(). The change aims to make logging more consistent and
readable.
Signed-off-by: Clint George <clintbgeorge@gmail.com>
Link: https://patch.msgid.link/20251111151340.9162-2-clintbgeorge@gmail.com
Signed-off-by: Greg Kroah-Hartman... | ```diff
diff --git a/drivers/char/hangcheck-timer.c b/drivers/char/hangcheck-timer.c
index 497fc167cb8c..21ef8a6a0463 100644
--- a/drivers/char/hangcheck-timer.c
+++ b/drivers/char/hangcheck-timer.c
@@ -126,23 +126,23 @@ static void hangcheck_fire(struct timer_list *unused)
if (tsc_diff > hangcheck_tsc_margin) {
... |
4d4e746aa9f0f07261dcb41e4f51edb98723dcaa | Analyze and fix the following issue in the Linux kernel code: dt-bindings: slimbus: fix warning from example | Problem Details:
Fix below warnings generated dt_bindings_check for examples in the
bindings.
Documentation/devicetree/bindings/slimbus/slimbus.example.dtb:
slim@28080000 (qcom,slim-ngd-v1.5.0): 'audio-codec@1,0' does not match
any of the regexes: '^pinctrl-[0-9]+$', '^slim@[0-9a-f]+$'
from schema $id:
http://... | ```diff
diff --git a/Documentation/devicetree/bindings/slimbus/slimbus.yaml b/Documentation/devicetree/bindings/slimbus/slimbus.yaml
index 89017d9cda10..5a941610ce4e 100644
--- a/Documentation/devicetree/bindings/slimbus/slimbus.yaml
+++ b/Documentation/devicetree/bindings/slimbus/slimbus.yaml
@@ -75,16 +75,22 @@ examp... |
6d5925b667e4ed9e77c8278cc215191d29454a3f | Analyze and fix the following issue in the Linux kernel code: intel_th: Fix error handling in intel_th_output_open | Problem Details:
intel_th_output_open() calls bus_find_device_by_devt() which
internally increments the device reference count via get_device(), but
this reference is not properly released in several error paths. When
device driver is unavailable, file operations cannot be obtained, or
the driver's open method fails, t... | ```diff
diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c
index ba7c8b184cbc..591b7c12aae5 100644
--- a/drivers/hwtracing/intel_th/core.c
+++ b/drivers/hwtracing/intel_th/core.c
@@ -810,13 +810,17 @@ static int intel_th_output_open(struct inode *inode, struct file *file)
int err;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.