id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
e8be820134531a74daaf2c3481ff9ad54b0df0cb | Analyze and fix the following issue in the Linux kernel code: s390/tape: fix virtual vs physical address confusion | Problem Details:
Fix virtual vs physical address confusion and use new dma types and helper
functions to allow for type checking. This does not fix a bug since virtual
and physical address spaces are currently the same.
Tested-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
S... | ```diff
diff --git a/drivers/s390/char/tape.h b/drivers/s390/char/tape.h
index 4e5d5efa978f..0aba30efb483 100644
--- a/drivers/s390/char/tape.h
+++ b/drivers/s390/char/tape.h
@@ -305,7 +305,9 @@ tape_ccw_cc(struct ccw1 *ccw, __u8 cmd_code, __u16 memsize, void *cda)
ccw->cmd_code = cmd_code;
ccw->flags = CCW_FLAG_CC... |
e1f51be68d9906e652d4678c4df1d34a9d8ad9ef | Analyze and fix the following issue in the Linux kernel code: s390/cio,idal: fix virtual vs physical address confusion | Problem Details:
Fix virtual vs physical address confusion. This does not fix a bug since
virtual and physical address spaces are currently the same.
Signed-off-by: Heiko Carstens <hca@linux.ibm.com> | ```diff
diff --git a/arch/s390/include/asm/idals.h b/arch/s390/include/asm/idals.h
index 1ceefc9f6fbe..ac68c657b28c 100644
--- a/arch/s390/include/asm/idals.h
+++ b/arch/s390/include/asm/idals.h
@@ -18,6 +18,7 @@
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
+#include <asm/dma-types.h>
... |
d5cc41686990fa522ce573e5c6c7a619f10c3fd1 | Analyze and fix the following issue in the Linux kernel code: s390/virtio_ccw: fix virtual vs physical address confusion | Problem Details:
Fix virtual vs physical address confusion and use new dma types and helper
functions to allow for type checking. This does not fix a bug since virtual
and physical address spaces are currently the same.
Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Si... | ```diff
diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c
index ac67576301bf..ac77951c30c4 100644
--- a/drivers/s390/virtio/virtio_ccw.c
+++ b/drivers/s390/virtio/virtio_ccw.c
@@ -85,19 +85,19 @@ static inline unsigned long *indicators2(struct virtio_ccw_device *vcdev)
}
struct vq_inf... |
1c2be70e651306073e7ef0983b748465e93e651d | Analyze and fix the following issue in the Linux kernel code: s390/vfio_ccw: fix virtual vs physical address confusion | Problem Details:
Fix virtual vs physical address confusion. This does not fix a bug
since virtual and physical address spaces are currently the same.
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com> | ```diff
diff --git a/drivers/s390/cio/vfio_ccw_fsm.c b/drivers/s390/cio/vfio_ccw_fsm.c
index 09877b46181d..4d7988ea47ef 100644
--- a/drivers/s390/cio/vfio_ccw_fsm.c
+++ b/drivers/s390/cio/vfio_ccw_fsm.c
@@ -378,7 +378,7 @@ static void fsm_open(struct vfio_ccw_private *private,
spin_lock_irq(&sch->lock);
sch->isc ... |
8c30b25bb353734cd20f426482ebb95796fe524f | Analyze and fix the following issue in the Linux kernel code: s390/cio: fix virtual vs physical address confusion | Problem Details:
Fix virtual vs physical address confusion. This does not fix a bug
since virtual and physical address spaces are currently the same.
Signed-off-by: Heiko Carstens <hca@linux.ibm.com> | ```diff
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c
index c396ac3e3a32..e14a491700ec 100644
--- a/drivers/s390/cio/device_fsm.c
+++ b/drivers/s390/cio/device_fsm.c
@@ -68,9 +68,9 @@ static void ccw_timeout_log(struct ccw_device *cdev)
sizeof(struct tcw), 0);
} else {
print... |
99aea41a4d11506c634000e234e0e1a707bd402d | Analyze and fix the following issue in the Linux kernel code: s390/dasd_eckd: fix virtual vs physical address confusion | Problem Details:
Fix virtual vs physical address confusion. This does not fix a bug
since virtual and physical address spaces are currently the same.
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com> | ```diff
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 373c1a86c33e..698817648053 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -6239,14 +6239,14 @@ static int dasd_eckd_query_pprc_status(struct dasd_device *device,
ccw->count = sizeof(struct d... |
9a349be3ca4d670f1279bb16139d55e902e70789 | Analyze and fix the following issue in the Linux kernel code: s390/dcssblk: fix virtual vs physical address confusion | Problem Details:
Fix virtual vs physical address confusion. This does not fix a bug
since virtual and physical address spaces are currently the same.
dax_direct_access() should receive a virtual kernel address in kaddr.
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.co... | ```diff
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c
index 9c8f529b827c..cf108744d410 100644
--- a/drivers/s390/block/dcssblk.c
+++ b/drivers/s390/block/dcssblk.c
@@ -919,7 +919,7 @@ __dcssblk_direct_access(struct dcssblk_dev_info *dev_info, pgoff_t pgoff,
dev_sz = dev_info->end - dev_in... |
4e8477aeb46dfe74e829c06ea588dd00ba20c8cc | Analyze and fix the following issue in the Linux kernel code: s390/iucv: fix receive buffer virtual vs physical address confusion | Problem Details:
Fix IUCV_IPBUFLST-type buffers virtual vs physical address confusion.
This does not fix a bug since virtual and physical address spaces are
currently the same.
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Heiko Carstens ... | ```diff
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index 5b56ae6612dd..15b3a958fa08 100644
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -1081,8 +1081,7 @@ static int iucv_message_receive_iprmdata(struct iucv_path *path,
size = (size < 8) ? size : 8;
for (array = buffer; size > 0; array++) {
copy = min_t... |
50ed48c80fecbe17218afed4f8bed005c802976c | Analyze and fix the following issue in the Linux kernel code: s390/zcrypt: fix reference counting on zcrypt card objects | Problem Details:
Tests with hot-plugging crytpo cards on KVM guests with debug
kernel build revealed an use after free for the load field of
the struct zcrypt_card. The reason was an incorrect reference
handling of the zcrypt card object which could lead to a free
of the zcrypt card object while it was still in use.
T... | ```diff
diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c
index 02c503f16bc2..73fe9cd59a63 100644
--- a/drivers/s390/crypto/zcrypt_api.c
+++ b/drivers/s390/crypto/zcrypt_api.c
@@ -573,6 +573,7 @@ static inline struct zcrypt_queue *zcrypt_pick_queue(struct zcrypt_card *zc,
{
if (!zq || ... |
367c50f78451d3bd7ad70bc5c89f9ba6dec46ca9 | Analyze and fix the following issue in the Linux kernel code: s390/vtime: fix average steal time calculation | Problem Details:
Current average steal timer calculation produces volatile and inflated
values. The only user of this value is KVM so far and it uses that to
decide whether or not to yield the vCPU which is seeing steal time.
KVM compares average steal timer to a threshold and if the threshold
is past then it does not ... | ```diff
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index e0a88dcaf5cb..24a18e5ef6e8 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -210,13 +210,13 @@ void vtime_flush(struct task_struct *tsk)
virt_timer_expire();
steal = S390_lowcore.steal_timer;
- avg_steal = S390_... |
e642921dfeed1e15e73f78f2c3b6746f72b6deb2 | Analyze and fix the following issue in the Linux kernel code: octeontx2-af: Use matching wake_up API variant in CGX command interface | Problem Details:
Use wake_up API instead of wake_up_interruptible, since
wait_event_timeout API is used for waiting on command completion.
Fixes: 1463f382f58d ("octeontx2-af: Add support for CGX link management")
Signed-off-by: Linu Cherian <lcherian@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Sig... | ```diff
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
index 6c70c8498690..3c0f55b3e48e 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
@@ -1338,7 +1338,7 @@ static irqreturn_t cgx_fwi_even... |
fbec4e7fed89b579f2483041fabf9650fb0dd6bc | Analyze and fix the following issue in the Linux kernel code: soc: fsl: qbman: Use raw spinlock for cgr_lock | Problem Details:
smp_call_function always runs its callback in hard IRQ context, even on
PREEMPT_RT, where spinlocks can sleep. So we need to use a raw spinlock
for cgr_lock to ensure we aren't waiting on a sleeping task.
Although this bug has existed for a while, it was not apparent until
commit ef2a8d5478b9 ("net: d... | ```diff
diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c
index 1bf1f1ea67f0..7e9074519ad2 100644
--- a/drivers/soc/fsl/qbman/qman.c
+++ b/drivers/soc/fsl/qbman/qman.c
@@ -991,7 +991,7 @@ struct qman_portal {
/* linked-list of CSCN handlers. */
struct list_head cgr_cbs;
/* list lock */
- sp... |
584c2a9184a33a40fceee838f856de3cffa19be3 | Analyze and fix the following issue in the Linux kernel code: soc: fsl: qbman: Always disable interrupts when taking cgr_lock | Problem Details:
smp_call_function_single disables IRQs when executing the callback. To
prevent deadlocks, we must disable IRQs when taking cgr_lock elsewhere.
This is already done by qman_update_cgr and qman_delete_cgr; fix the
other lockers.
Fixes: 96f413f47677 ("soc/fsl/qbman: fix issue in qman_delete_cgr_safe()")
... | ```diff
diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c
index 739e4eee6b75..1bf1f1ea67f0 100644
--- a/drivers/soc/fsl/qbman/qman.c
+++ b/drivers/soc/fsl/qbman/qman.c
@@ -1456,11 +1456,11 @@ static void qm_congestion_task(struct work_struct *work)
union qm_mc_result *mcr;
struct qman_cgr *cg... |
300ab0dfbf3903f36b4456643d8201438e6553b1 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek - ALC236 fix volume mute & mic mute LED on some HP models | Problem Details:
Some HP laptops have received revisions that altered their board IDs
and therefore the current patches/quirks do not apply to them.
Specifically, for my Probook 440 G8, I have a board ID of 8a74.
It is necessary to add a line for that specific model.
Signed-off-by: Valentine Altair <faetalize@proton.m... | ```diff
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 4f92b19a5850..b6cd13b1775d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -9870,6 +9870,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8a30, "HP Envy 17", ... |
c6c3187d66bc4e87086036266def4170742d7214 | Analyze and fix the following issue in the Linux kernel code: lib/firmware_table: Provide buffer length argument to cdat_table_parse() | Problem Details:
There exist card implementations with a CDAT table using a fixed size
buffer, but with entries filled in that do not fill the whole table
length size. Then, the last entry in the CDAT table may not mark the
end of the CDAT table buffer specified by the length field in the CDAT
header. It can be shorter... | ```diff
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index b07f7d091d13..b976e5fc3fbc 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -253,7 +253,7 @@ int __init_or_acpilib acpi_table_parse_entries_array(
count = acpi_parse_entries_array(id, table_size,
(union fw_table_header ... |
e0c818e00443ce4a704519d85a21e3c14179e3a6 | Analyze and fix the following issue in the Linux kernel code: cxl/pci: Get rid of pointer arithmetic reading CDAT table | Problem Details:
Reading the CDAT table using DOE requires a Table Access Response
Header in addition to the CDAT entry. In current implementation this
has caused offsets with sizeof(__le32) to the actual buffers. This led
to hardly readable code and even bugs. E.g., see fix of devm_kfree()
in read_cdat_data():
commi... | ```diff
diff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c
index c8214990c230..184deff887d0 100644
--- a/drivers/cxl/core/pci.c
+++ b/drivers/cxl/core/pci.c
@@ -544,55 +544,57 @@ static int cxl_cdat_get_length(struct device *dev,
static int cxl_cdat_read_table(struct device *dev,
struct pci_doe_... |
99b52aac2d40203d0f6468325018f68e2c494c24 | Analyze and fix the following issue in the Linux kernel code: cxl: Fix the incorrect assignment of SSLBIS entry pointer initial location | Problem Details:
The 'entry' pointer in cdat_sslbis_handler() is set to header +
sizeof(common header). However, the math missed the addition of the SSLBIS
main header. It should be header + sizeof(common header) + sizeof(*sslbis).
Use a defined struct for all the SSLBIS parts in order to avoid pointer
math errors.
Th... | ```diff
diff --git a/drivers/cxl/core/cdat.c b/drivers/cxl/core/cdat.c
index 08fd0baea7a0..0363ca434ef4 100644
--- a/drivers/cxl/core/cdat.c
+++ b/drivers/cxl/core/cdat.c
@@ -389,36 +389,38 @@ EXPORT_SYMBOL_NS_GPL(cxl_endpoint_parse_cdat, CXL);
static int cdat_sslbis_handler(union acpi_subtable_headers *header, void *... |
8039804cfa7314ad50085a779923aa5469889f88 | Analyze and fix the following issue in the Linux kernel code: cxl/core: Add CXL EINJ debugfs files | Problem Details:
Export CXL helper functions in einj-cxl.c for getting/injecting
available CXL protocol error types to sysfs under kernel/debug/cxl.
The kernel/debug/cxl/einj_types file will print the available CXL
protocol errors in the same format as the available_error_types
file provided by the einj module. The
ke... | ```diff
diff --git a/Documentation/ABI/testing/debugfs-cxl b/Documentation/ABI/testing/debugfs-cxl
index fe61d372e3fa..4c0f62f881ca 100644
--- a/Documentation/ABI/testing/debugfs-cxl
+++ b/Documentation/ABI/testing/debugfs-cxl
@@ -33,3 +33,33 @@ Description:
device cannot clear poison from the address, -ENXIO is ret... |
2a750d6a5b365265dbda33330a6188547ddb5c24 | Analyze and fix the following issue in the Linux kernel code: rds: tcp: Fix use-after-free of net in reqsk_timer_handler(). | Problem Details:
syzkaller reported a warning of netns tracker [0] followed by KASAN
splat [1] and another ref tracker warning [1].
syzkaller could not find a repro, but in the log, the only suspicious
sequence was as follows:
18:26:22 executing program 1:
r0 = socket$inet6_mptcp(0xa, 0x1, 0x106)
...
connect$... | ```diff
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index 52040b0e2616..f0761f060a83 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -398,10 +398,6 @@ void tcp_twsk_purge(struct list_head *net_exit_list, int family)
/* Even if tw_refcount == 1, we must clean up kernel re... |
1c4e97dd2d3c9a3e84f7e26346aa39bc426d3249 | Analyze and fix the following issue in the Linux kernel code: tcp: Fix NEW_SYN_RECV handling in inet_twsk_purge() | Problem Details:
inet_twsk_purge() uses rcu to find TIME_WAIT and NEW_SYN_RECV
objects to purge.
These objects use SLAB_TYPESAFE_BY_RCU semantic and need special
care. We need to use refcount_inc_not_zero(&sk->sk_refcnt).
Reuse the existing correct logic I wrote for TIME_WAIT,
because both structures have common loca... | ```diff
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c
index 5befa4de5b24..e8de45d34d56 100644
--- a/net/ipv4/inet_timewait_sock.c
+++ b/net/ipv4/inet_timewait_sock.c
@@ -263,12 +263,12 @@ void __inet_twsk_schedule(struct inet_timewait_sock *tw, int timeo, bool rearm)
}
EXPORT_SYMBOL_GPL(_... |
245930617c9bd85330c78e1a70775e1f61b12f7a | Analyze and fix the following issue in the Linux kernel code: f2fs: fix to handle error paths of {new,change}_curseg() | Problem Details:
{new,change}_curseg() may return error in some special cases,
error handling should be did in their callers, and this will also
facilitate subsequent error path expansion in {new,change}_curseg().
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Reviewed-by: C... | ```diff
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 9814e5981a6a..9cda9fcfe351 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3700,10 +3700,10 @@ int f2fs_disable_cp_again(struct f2fs_sb_info *sbi, block_t unusable);
void f2fs_release_discard_addrs(struct f2fs_sb_info *sbi);
int f2fs_npages_for_summary_f... |
11bec96afbfbc4679863db55258de440d786821e | Analyze and fix the following issue in the Linux kernel code: f2fs: zone: fix to remove pow2 check condition for zoned block device | Problem Details:
Commit 2e2c6e9b72ce ("f2fs: remove power-of-two limitation of zoned
device") missed to remove pow2 check condition in init_blkz_info(),
fix it.
Fixes: 2e2c6e9b72ce ("f2fs: remove power-of-two limitation of zoned device")
Signed-off-by: Feng Song <songfeng@oppo.com>
Signed-off-by: Yongpeng Yang <yangyo... | ```diff
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 78a76583a4aa..c4c4c957a3c9 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -3868,11 +3868,6 @@ static int init_blkz_info(struct f2fs_sb_info *sbi, int devi)
return 0;
zone_sectors = bdev_zone_sectors(bdev);
- if (!is_power_of_2(zone_sectors)) {
-... |
9f0c4a46be1fe9b97dbe66d49204c1371e3ece65 | Analyze and fix the following issue in the Linux kernel code: f2fs: fix to truncate meta inode pages forcely | Problem Details:
Below race case can cause data corruption:
Thread A GC thread
- gc_data_segment
- ra_data_block
- locked meta_inode page
- f2fs_inplace_write_data
- invalidate_mapping_pages
: fail to invalidate meta_inode page
due to lock failure or dirty|writeback
status
- f2fs_submit_p... | ```diff
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index a09a9609e228..55b7d2cf030f 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -1598,8 +1598,9 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
*/
if (f2fs_sb_has_encrypt(sbi) || f2fs_sb_has_verity(sbi) ... |
2f6d721e14b69d6e1251f69fa238b48e8374e25f | Analyze and fix the following issue in the Linux kernel code: f2fs: compress: fix reserve_cblocks counting error when out of space | Problem Details:
When a file only needs one direct_node, performing the following
operations will cause the file to be unrepairable:
unisoc # ./f2fs_io compress test.apk
unisoc #df -h | grep dm-48
/dev/block/dm-48 112G 112G 1.2M 100% /data
unisoc # ./f2fs_io release_cblocks test.apk
924
unisoc # df -h | grep dm-48
/d... | ```diff
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 74c5e48fce22..dc9c6bac678d 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -3624,10 +3624,10 @@ out:
return ret;
}
-static int reserve_compress_blocks(struct dnode_of_data *dn, pgoff_t count)
+static int reserve_compress_blocks(struct dnode_of_data *dn... |
b7d797d241c154d73ec5523f87f3b06d4f299da1 | Analyze and fix the following issue in the Linux kernel code: f2fs: compress: relocate some judgments in f2fs_reserve_compress_blocks | Problem Details:
The following f2fs_io test will get a "0" result instead of -EINVAL,
unisoc # ./f2fs_io compress file
unisoc # ./f2fs_io reserve_cblocks file
0
it's not reasonable, so the judgement of
atomic_read(&F2FS_I(inode)->i_compr_blocks) should be placed after
the judgement of is_inode_flag_set(inode, FI_COMPR... | ```diff
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 4ca6c693b33a..74c5e48fce22 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -3720,9 +3720,6 @@ static int f2fs_reserve_compress_blocks(struct file *filp, unsigned long arg)
if (ret)
return ret;
- if (atomic_read(&F2FS_I(inode)->i_compr_blocks))
- got... |
8e61e3192a77e1006c1c54c022173026f7afae2c | Analyze and fix the following issue in the Linux kernel code: drm/xe/uapi: Add IP version and stepping to GT list query | Problem Details:
For modern platforms (MTL and later), both kernel and userspace drivers
are expected to apply GT programming and workarounds based on the IP
version and stepping self-reported by the GT hardware via the GMD_ID
registers. Since userspace drivers can't access these registers
directly, pass along the ver... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
index a6a20a6dd360..e80321b34918 100644
--- a/drivers/gpu/drm/xe/xe_query.c
+++ b/drivers/gpu/drm/xe/xe_query.c
@@ -12,6 +12,7 @@
#include <drm/xe_drm.h>
#include "regs/xe_engine_regs.h"
+#include "regs/xe_gt_regs.h"
#include "xe_bo... |
dea185b71bae61808c70263da5f9251e149f1e9e | Analyze and fix the following issue in the Linux kernel code: drm/nouveau: fix kerneldoc warnings | Problem Details:
kernel test robot complains about missing kerneldoc entries:
drivers-gpu-drm-nouveau-nvkm-subdev-gsp-r535.c:warning:
Function-parameter-or-struct-member-gsp-not-described-in-nvkm_gsp_radix3_sg
Signed-off-by: Timur Tabi <ttabi@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: h... | ```diff
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
index a64c81385682..c029e5dc1948 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
@@ -1432,6 +1432,10 @@ r535_gsp_msg_post_event(void *priv... |
f35c9af45ea7a4b1115b193d84858b14d13517fc | Analyze and fix the following issue in the Linux kernel code: nouveau: reset the bo resource bus info after an eviction | Problem Details:
Later attempts to refault the bo won't happen and the whole
GPU does to lunch. I think Christian's refactoring of this
code out to the driver broke this not very well tested path.
Fixes: 141b15e59175 ("drm/nouveau: move io_reserve_lru handling into the driver v5")
Cc: Christian König <christian.koenig... | ```diff
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 56dcd25db1ce..db8cbf615112 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1256,6 +1256,8 @@ out:
drm_vma_node_unmap(&nvbo->bo.base.vma_node,
bdev->dev_map... |
bea0a58695870295a315cec15a9fea6f40fe5ff3 | Analyze and fix the following issue in the Linux kernel code: assoc_array: fix the return value in assoc_array_insert_mid_shortcut() | Problem Details:
Returning the edit variable is redundant because it is dereferenced right
before it is returned. It would be better to return true.
Found by Linux Verification Center (linuxtesting.org) with Svace.
Link: https://lkml.kernel.org/r/20240307071717.5318-1-r.smirnov@omp.ru
Signed-off-by: Roman Smirnov <r... | ```diff
diff --git a/lib/assoc_array.c b/lib/assoc_array.c
index ca0b4f360c1a..388e656ac974 100644
--- a/lib/assoc_array.c
+++ b/lib/assoc_array.c
@@ -938,7 +938,7 @@ static bool assoc_array_insert_mid_shortcut(struct assoc_array_edit *edit,
edit->leaf_p = &new_n0->slots[0];
pr_devel("<--%s() = ok [split shortcu... |
adc2c8d0b36f8c97cd3bf7c1420f8d61ee08ce4d | Analyze and fix the following issue in the Linux kernel code: nilfs2: use div64_ul() instead of do_div() | Problem Details:
Fixes Coccinelle/coccicheck warnings reported by do_div.cocci.
Compared to do_div(), div64_ul() does not implicitly cast the divisor and
does not unnecessarily calculate the remainder.
Link: https://lkml.kernel.org/r/20240229210456.63234-2-thorsten.blum@toblux.com
Link: https://lkml.kernel.org/r/2024... | ```diff
diff --git a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c
index 2c57132584de..69a5cced1e84 100644
--- a/fs/nilfs2/cpfile.c
+++ b/fs/nilfs2/cpfile.c
@@ -28,7 +28,7 @@ nilfs_cpfile_get_blkoff(const struct inode *cpfile, __u64 cno)
{
__u64 tcno = cno + NILFS_MDT(cpfile)->mi_first_entry_offset - 1;
- do_div(tcno, n... |
2fd570c1d802e7d1b7df2fbc3784875686427f78 | Analyze and fix the following issue in the Linux kernel code: selftests/mm: dont fail testsuite due to a lack of hugepages | Problem Details:
Patch series "selftests/mm: Improve Hugepage Test Handling in MM
Selftests", v2.
This series addresses issues related to hugepage requirements in the MM
selftests, ensuring tests are skipped rather than failing when the
necessary hugepage count is not met.
This adjustment allows for a more graceful h... | ```diff
diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
index 02dc1c38bd76..a4f2e4d1da10 100755
--- a/tools/testing/selftests/mm/run_vmtests.sh
+++ b/tools/testing/selftests/mm/run_vmtests.sh
@@ -175,7 +175,6 @@ if [ -n "$freepgs" ] && [ -n "$hpgsize_KB" ]; then
if [... |
1412ecb3d256e5d23c6bd150e110cef6e3736844 | Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: check new folio order when split a folio | Problem Details:
A folio can only be split into lower orders.
Since there are no new_order checks in debugfs, any new_order can be
passed via debugfs into split_huge_page_to_list_to_order().
Check new_order to make sure it is smaller than input folio order.
Link: https://lkml.kernel.org/r/20240307181854.138928-1-zi.... | ```diff
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index a81a09236c16..57fca7bffd20 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -3052,6 +3052,9 @@ int split_huge_page_to_list_to_order(struct page *page, struct list_head *list,
VM_BUG_ON_FOLIO(!folio_test_locked(folio), folio);
VM_BUG_ON_FOLIO(!fol... |
b555895c313511830762dbb2f469587a822c1759 | Analyze and fix the following issue in the Linux kernel code: mm: fix list corruption in put_pages_list | Problem Details:
My recent change to put_pages_list() dereferences folio->lru.next after
returning the folio to the page allocator. Usually this is now on the pcp
list with other free folios, so we try to free an already-free folio.
This only happens with lists that have more than 15 entries, so it wasn't
immediately... | ```diff
diff --git a/mm/swap.c b/mm/swap.c
index e43a5911b170..500a09a48dfd 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -152,10 +152,10 @@ EXPORT_SYMBOL(__folio_put);
void put_pages_list(struct list_head *pages)
{
struct folio_batch fbatch;
- struct folio *folio;
+ struct folio *folio, *next;
folio_batch_init(&fb... |
47932e7048df9156e96133ee90fb3e9df68dbd15 | Analyze and fix the following issue in the Linux kernel code: mm: remove folio from deferred split list before uncharging it | Problem Details:
When freeing a large folio, we must remove it from the deferred split list
before we uncharge it as each memcg has its own deferred split list (with
associated lock) and removing a folio from the deferred split list while
holding the wrong lock will corrupt that list and cause various related
problems.... | ```diff
diff --git a/mm/swap.c b/mm/swap.c
index 6b697d33fa5b..e43a5911b170 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -1012,6 +1012,9 @@ void folios_put_refs(struct folio_batch *folios, unsigned int *refs)
free_huge_folio(folio);
continue;
}
+ if (folio_test_large(folio) &&
+ folio_test_large_rmappable... |
54b9460b0a28c4c76a7b455ec1b3b61a13e97291 | Analyze and fix the following issue in the Linux kernel code: ACPI: HMAT: Remove register of memory node for generic target | Problem Details:
For generic targets, there's no reason to call
register_memory_node_under_compute_node() with the access levels that are
only visible to HMAT handling code. Only update the attributes and rename
hmat_register_generic_target_initiators() to hmat_update_generic_target().
The original call path ends up t... | ```diff
diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c
index d6b85f0f6082..a26e7793ec4e 100644
--- a/drivers/acpi/numa/hmat.c
+++ b/drivers/acpi/numa/hmat.c
@@ -770,12 +770,12 @@ static void __hmat_register_target_initiators(struct memory_target *target,
}
}
-static void hmat_register_generic_tar... |
2ab3d705ca5d4f7ea345a21c3da41a447a549649 | Analyze and fix the following issue in the Linux kernel code: dlm: fix user space lkb refcounting | Problem Details:
This patch fixes to check on the right return value if it was the last
callback. The rv variable got overwritten by the return of
copy_result_to_user(). Fixing it by introducing a second variable for
the return value and don't let rv being overwritten.
Cc: stable@vger.kernel.org
Fixes: 61bed0baa4db ("... | ```diff
diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index 695e691b38b3..9f9b68448830 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -806,7 +806,7 @@ static ssize_t device_read(struct file *file, char __user *buf, size_t count,
struct dlm_lkb *lkb;
DECLARE_WAITQUEUE(wait, current);
struct dlm_callback *cb;
- int... |
17423360a27ae58c1850f588bdd8013bbfcd250b | Analyze and fix the following issue in the Linux kernel code: PCI/ASPM: Save L1 PM Substates Capability for suspend/resume | Problem Details:
4ff116d0d5fd ("PCI/ASPM: Save L1 PM Substates Capability for
suspend/resume") restored the L1 PM Substates Capability after resume,
which reduced power consumption by making the ASPM L1.x states work after
resume.
a7152be79b62 ("Revert "PCI/ASPM: Save L1 PM Substates Capability for
suspend/resume"") r... | ```diff
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 564e2cf2dde5..ca6673588bc0 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1623,6 +1623,8 @@ static int pci_save_pcie_state(struct pci_dev *dev)
pcie_capability_read_word(dev, PCI_EXP_LNKCTL2, &cap[i++]);
pcie_capability_read_word(dev, PCI_... |
2aa043a55b9a764c9cbde5a8c654eeaaffe224cf | Analyze and fix the following issue in the Linux kernel code: tracing/ring-buffer: Fix wait_on_pipe() race | Problem Details:
When the trace_pipe_raw file is closed, there should be no new readers on
the file descriptor. This is mostly handled with the waking and wait_index
fields of the iterator. But there's still a slight race.
CPU 0 CPU 1
----- -----
... | ```diff
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h
index 338a33db1577..dc5ae4e96aee 100644
--- a/include/linux/ring_buffer.h
+++ b/include/linux/ring_buffer.h
@@ -99,7 +99,8 @@ __ring_buffer_alloc(unsigned long size, unsigned flags, struct lock_class_key *k
})
typedef bool (*ring_buffer_... |
7af9ded0c2caac0a95f33df5cb04706b0f502588 | Analyze and fix the following issue in the Linux kernel code: ring-buffer: Use wait_event_interruptible() in ring_buffer_wait() | Problem Details:
Convert ring_buffer_wait() over to wait_event_interruptible(). The default
condition is to execute the wait loop inside __wait_event() just once.
This does not change the ring_buffer_wait() prototype yet, but
restructures the code so that it can take a "cond" and "data" parameter
and will call wait_ev... | ```diff
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h
index fa802db216f9..338a33db1577 100644
--- a/include/linux/ring_buffer.h
+++ b/include/linux/ring_buffer.h
@@ -98,6 +98,7 @@ __ring_buffer_alloc(unsigned long size, unsigned flags, struct lock_class_key *k
__ring_buffer_alloc((size), (fla... |
8145f1c35fa648da662078efab299c4467b85ad5 | Analyze and fix the following issue in the Linux kernel code: ring-buffer: Fix full_waiters_pending in poll | Problem Details:
If a reader of the ring buffer is doing a poll, and waiting for the ring
buffer to hit a specific watermark, there could be a case where it gets
into an infinite ping-pong loop.
The poll code has:
rbwork->full_waiters_pending = true;
if (!cpu_buffer->shortest_full ||
cpu_buffer->shortest_fu... | ```diff
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 6ffbccb9bcf0..99fdda29ce4e 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -965,16 +965,32 @@ __poll_t ring_buffer_poll_wait(struct trace_buffer *buffer, int cpu,
poll_wait(filp, &rbwork->full_waiters, poll... |
761d9473e27f0c8782895013a3e7b52a37c8bcfc | Analyze and fix the following issue in the Linux kernel code: ring-buffer: Do not set shortest_full when full target is hit | Problem Details:
The rb_watermark_hit() checks if the amount of data in the ring buffer is
above the percentage level passed in by the "full" variable. If it is, it
returns true.
But it also sets the "shortest_full" field of the cpu_buffer that informs
writers that it needs to call the irq_work if the amount of data o... | ```diff
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index aa332ace108b..6ffbccb9bcf0 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -834,9 +834,10 @@ static bool rb_watermark_hit(struct trace_buffer *buffer, int cpu, int full)
pagebusy = cpu_buffer->reader_page =... |
23fb6bc2696119391ec3a92ccaffe50e567c515e | Analyze and fix the following issue in the Linux kernel code: ASoC: soc-core.c: Skip dummy codec when adding platforms | Problem Details:
When pcm_runtime is adding platform components it will scan all
registered components. In case of DPCM FE/BE some DAI links will
configure dummy platform. However both dummy codec and dummy platform
are using "snd-soc-dummy" as component->name. Dummy codec should be
skipped when adding platforms otherw... | ```diff
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1e94edba12eb..2ec13d1634b6 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1219,6 +1219,9 @@ static int snd_soc_add_pcm_runtime(struct snd_soc_card *card,
if (!snd_soc_is_matching_component(platform, component))
continue;
... |
9e2ab4b18ebd46813fc3459207335af4d368e323 | Analyze and fix the following issue in the Linux kernel code: ASoC: rockchip: i2s-tdm: Fix inaccurate sampling rates | Problem Details:
The sample rates set by the rockchip_i2s_tdm driver in master mode are
inaccurate up to 5% in several cases, due to the driver logic to configure
clocks and a nasty interaction with the Common Clock Framework.
To understand what happens, here is the relevant section of the clock tree
(slightly simplif... | ```diff
diff --git a/sound/soc/rockchip/rockchip_i2s_tdm.c b/sound/soc/rockchip/rockchip_i2s_tdm.c
index 860e66ec85e8..9fa020ef7eab 100644
--- a/sound/soc/rockchip/rockchip_i2s_tdm.c
+++ b/sound/soc/rockchip/rockchip_i2s_tdm.c
@@ -25,8 +25,6 @@
#define DEFAULT_MCLK_FS 256
#define CH_GRP_MAX 4 /* The max channe... |
01296b39d3515f20a1db64d3c421c592b1e264a0 | Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: don't force enable power save on non-running vdevs | Problem Details:
Currently we force enable power save on non-running vdevs, this results
in unexpected ping latency in below scenarios:
1. disable power save from userspace.
2. trigger suspend/resume.
With step 1 power save is disabled successfully and we get a good latency:
PING 192.168.1.1 (192.168.1.1) 56(84) by... | ```diff
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index a6a37d67a50a..42a6a51a6a9d 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -1231,14 +1231,7 @@ static int ath11k_mac_vif_setup_ps(struct ath11k_vif *arvif)
enabl... |
5fbdadc622a8239d2cc9d12864bcae3ce5503ffc | Analyze and fix the following issue in the Linux kernel code: drm/shmem-helper: Remove duplicate include | Problem Details:
./drivers/gpu/drm/drm_gem_shmem_helper.c: linux/module.h is included more than once.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4567
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Javier Martinez Canillas <javier... | ```diff
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
index 0ac3dddb917f..177773bcdbfd 100644
--- a/drivers/gpu/drm/drm_gem_shmem_helper.c
+++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
@@ -10,7 +10,6 @@
#include <linux/shmem_fs.h>
#include <linux/slab.h>
#include <linux/... |
e27b02e23a701e5761f1d6028643e1203a1c56de | Analyze and fix the following issue in the Linux kernel code: ssb: drop use of non-existing CONFIG_SSB_DEBUG symbol | Problem Details:
CONFIG_SSB_DEBUG is used in one header file and nowhere else, so
remove it and the now-empty inline function that contained it. Also
remove the call to the empty inline function. The empty "default:"
case is kept to prevent 2 compiler warnings:
drivers/ssb/main.c:1133:9: warning: enumeration value '... | ```diff
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index bdb6595ffd2d..8210bf28a340 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -1146,7 +1146,6 @@ u32 ssb_dma_translation(struct ssb_device *dev)
return SSB_PCI_DMA;
}
default:
- __ssb_dma_not_implemented(dev);
}
return 0;
}
diff... |
316f790ebcf94bdf59f794b7cdea4068dc676d4c | Analyze and fix the following issue in the Linux kernel code: wifi: brcmfmac: pcie: handle randbuf allocation failure | Problem Details:
The kzalloc() in brcmf_pcie_download_fw_nvram() will return null
if the physical memory has run out. As a result, if we use
get_random_bytes() to generate random bytes in the randbuf, the
null pointer dereference bug will happen.
In order to prevent allocation failure, this patch adds a separate
funct... | ```diff
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
index d7fb88bb6ae1..06698a714b52 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
@@ -1675,6 +1675,15 @... |
789c17185fb0f39560496c2beab9b57ce1d0cbe7 | Analyze and fix the following issue in the Linux kernel code: ssb: Fix potential NULL pointer dereference in ssb_device_uevent() | Problem Details:
The ssb_device_uevent() function first attempts to convert the 'dev' pointer
to 'struct ssb_device *'. However, it mistakenly dereferences 'dev' before
performing the NULL check, potentially leading to a NULL pointer
dereference if 'dev' is NULL.
To fix this issue, move the NULL check before dereferen... | ```diff
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index 9f30e0edadfe..bdb6595ffd2d 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -341,11 +341,13 @@ static int ssb_bus_match(struct device *dev, struct device_driver *drv)
static int ssb_device_uevent(const struct device *dev, struct kobj_ueven... |
cef59d1ea7170ec753182302645a0191c8aa3382 | Analyze and fix the following issue in the Linux kernel code: io_uring: clean rings on NO_MMAP alloc fail | Problem Details:
We make a few cancellation judgements based on ctx->rings, so let's
zero it afer deallocation for IORING_SETUP_NO_MMAP just like it's
done with the mmap case. Likely, it's not a real problem, but zeroing
is safer and better tested.
Cc: stable@vger.kernel.org
Fixes: 03d89a2de25bbc ("io_uring: support f... | ```diff
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 49a124daa359..e7d7a456b489 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -2788,14 +2788,15 @@ static void io_rings_free(struct io_ring_ctx *ctx)
if (!(ctx->flags & IORING_SETUP_NO_MMAP)) {
io_mem_free(ctx->rings);
io_mem_free(c... |
0a3737db8479b77f95f4bfda8e71b03c697eb56a | Analyze and fix the following issue in the Linux kernel code: io_uring/rw: return IOU_ISSUE_SKIP_COMPLETE for multishot retry | Problem Details:
If read multishot is being invoked from the poll retry handler, then we
should return IOU_ISSUE_SKIP_COMPLETE rather than -EAGAIN. If not, then
a CQE will be posted with -EAGAIN rather than triggering the retry when
the file is flagged as readable again.
Cc: stable@vger.kernel.org
Reported-by: Sargun ... | ```diff
diff --git a/io_uring/rw.c b/io_uring/rw.c
index 47e097ab5d7e..0585ebcc9773 100644
--- a/io_uring/rw.c
+++ b/io_uring/rw.c
@@ -947,6 +947,8 @@ int io_read_mshot(struct io_kiocb *req, unsigned int issue_flags)
*/
if (io_kbuf_recycle(req, issue_flags))
rw->len = 0;
+ if (issue_flags & IO_URING_F_MULTI... |
7a51a2aa2384ea8bee76698ae586a2bea5b8ddb5 | Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: Fix DSC state HW readout for SST connectors | Problem Details:
Commit a62e14598150 ("drm/i915/dp: Fix connector DSC HW state readout")
moved the DSC HW state readout to a connector specific hook, however
only added the hook for DP MST connectors, not for DP SST ones. Fix
adding the hook for SST connectors as well.
This fixes the following warn on platforms where ... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 9050437a38c6..b6d45ab41ff7 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -6625,6 +6625,7 @@ intel_dp_init_connector(struct intel_digital_port *dig_port,
... |
61609bf2b29dcb07de3aaad7d6212cc3c341192b | Analyze and fix the following issue in the Linux kernel code: dt-bindings: riscv: Add Andes PMU extension description | Problem Details:
Document the ISA string for Andes Technology performance monitor
extension which provides counter overflow interrupt and mode
filtering mechanisms.
Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahad... | ```diff
diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml
index 63d81dc895e5..468c646247aa 100644
--- a/Documentation/devicetree/bindings/riscv/extensions.yaml
+++ b/Documentation/devicetree/bindings/riscv/extensions.yaml
@@ -477,5 +477,12 @@ ... |
bc969d6cc96a2d0539576ec639f7a2a7dcf757f8 | Analyze and fix the following issue in the Linux kernel code: perf: RISC-V: Introduce Andes PMU to support perf event sampling | Problem Details:
Assign riscv_pmu_irq_num the value of (256 + 18) for the custome PMU
and add SSCOUNTOVF and SIP alternatives to ALT_SBI_PMU_OVERFLOW()
and ALT_SBI_PMU_OVF_CLEAR_PENDING() macros, respectively.
To make use of Andes PMU extension, "xandespmu" needs to be appended
to the riscv,isa-extensions for each cpu... | ```diff
diff --git a/arch/riscv/include/asm/errata_list.h b/arch/riscv/include/asm/errata_list.h
index 96025eec5631..1f2dbfb8a8bf 100644
--- a/arch/riscv/include/asm/errata_list.h
+++ b/arch/riscv/include/asm/errata_list.h
@@ -112,15 +112,6 @@ asm volatile(ALTERNATIVE( \
#define THEAD_C9XX_RV_IRQ_PMU 17
#defin... |
95113bb705157f3518cec4ff0225a922507a0f8b | Analyze and fix the following issue in the Linux kernel code: riscv: dts: renesas: r9a07g043f: Update compatible string to use Andes INTC | Problem Details:
The Andes hart-level interrupt controller (Andes INTC) allows AX45MP
cores to handle custom local interrupts, such as the performance
counter overflow interrupt.
Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Lad Prabha... | ```diff
diff --git a/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi
index a92cfcfc021b..099f3df75b42 100644
--- a/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi
+++ b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi
@@ -39,7 +39,7 @@
cpu0_intc: interrupt-controller {
#inter... |
b88727d554f0fb826e0608192f59542497ba19c5 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: riscv: Add Andes interrupt controller compatible string | Problem Details:
Add "andestech,cpu-intc" compatible string to indicate that
Andes specific local interrupt is supported on the core,
e.g. AX45MP cores have 3 types of non-standard local interrupt
which can be handled in supervisor mode:
- Slave port ECC error interrupt
- Bus write transaction error interrupt
- Perfor... | ```diff
diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml
index 9d8670c00e3b..6ccd75cbbc59 100644
--- a/Documentation/devicetree/bindings/riscv/cpus.yaml
+++ b/Documentation/devicetree/bindings/riscv/cpus.yaml
@@ -106,7 +106,11 @@ properties:
con... |
aa0162dc0dd95c3bf248e3c78068760094e8f64b | Analyze and fix the following issue in the Linux kernel code: spi: Restore delays for non-GPIO chip select | Problem Details:
SPI controller with integrated chip select handling still need to adhere
to SPI device's CS setup, hold and inactive delays. For controller
without set_cs_timing spi core shall handle the delays to avoid
duplicated delay handling in each controller driver.
Fixes a regression for the out of tree SPI con... | ```diff
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index f18738ae95f8..ff75838c1b5d 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1063,10 +1063,14 @@ static void spi_set_cs(struct spi_device *spi, bool enable, bool force)
if (spi->mode & SPI_CS_HIGH)
enable = !enable;
- if (spi_is_csgpiod(sp... |
2ae0ab0143fcc06190713ed81a6486ed0ad3c861 | Analyze and fix the following issue in the Linux kernel code: spi: lpspi: Avoid potential use-after-free in probe() | Problem Details:
fsl_lpspi_probe() is allocating/disposing memory manually with
spi_alloc_host()/spi_alloc_target(), but uses
devm_spi_register_controller(). In case of error after the latter call the
memory will be explicitly freed in the probe function by
spi_controller_put() call, but used afterwards by "devm" manag... | ```diff
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
index 11991eb12636..079035db7dd8 100644
--- a/drivers/spi/spi-fsl-lpspi.c
+++ b/drivers/spi/spi-fsl-lpspi.c
@@ -830,11 +830,11 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
is_target = of_property_read_bool((&pdev->dev)->of... |
10eb0d3314c59dd0497282b33afabddf607b3050 | Analyze and fix the following issue in the Linux kernel code: ASoC: dt-bindings: cirrus,cs42l43: Fix 'gpio-ranges' schema | Problem Details:
'gpio-ranges' is a phandle-array which is really a matrix. The schema in
cirrus,cs42l43 is incomplete as it doesn't define there's only a single
entry. Add the outer array constraints that there is a single entry.
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://msgid.link/r/20240311222554.1... | ```diff
diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs42l43.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs42l43.yaml
index 7f9d8c7a635a..99a536601cc7 100644
--- a/Documentation/devicetree/bindings/sound/cirrus,cs42l43.yaml
+++ b/Documentation/devicetree/bindings/sound/cirrus,cs42l43.yaml
@@ -1... |
65e8fbde64520001abf1c8d0e573561b4746ef38 | Analyze and fix the following issue in the Linux kernel code: dm: call the resume method on internal suspend | Problem Details:
There is this reported crash when experimenting with the lvm2 testsuite.
The list corruption is caused by the fact that the postsuspend and resume
methods were not paired correctly; there were two consecutive calls to the
origin_postsuspend function. The second call attempts to remove the
"hash_list" e... | ```diff
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 1bed115a7e8e..f1fe8828e1de 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2945,6 +2945,9 @@ static void __dm_internal_suspend(struct mapped_device *md, unsigned int suspend
static void __dm_internal_resume(struct mapped_device *md)
{
+ int r;
+ st... |
b25b8f4b8ecef0f48c05f0c3572daeabefe16526 | Analyze and fix the following issue in the Linux kernel code: dm raid: fix false positive for requeue needed during reshape | Problem Details:
An empty flush doesn't have a payload, so it should never be looked at
when considering to possibly requeue a bio for the case when a reshape
is in progress.
Fixes: 9dbd1aa3a81c ("dm raid: add reshaping support to the target")
Reported-by: Patrick Plenefisch <simonpatp@gmail.com>
Signed-off-by: Ming L... | ```diff
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index 6bb1765be1e5..b3c8920fe723 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -3329,14 +3329,14 @@ static int raid_map(struct dm_target *ti, struct bio *bio)
struct mddev *mddev = &rs->md;
/*
- * If we're reshaping to add disk(s)... |
fb13b11d53875e28e7fbf0c26b288e4ea676aa9f | Analyze and fix the following issue in the Linux kernel code: entry: Respect changes to system call number by trace_sys_enter() | Problem Details:
When a probe is registered at the trace_sys_enter() tracepoint, and that
probe changes the system call number, the old system call still gets
executed. This worked correctly until commit b6ec41346103 ("core/entry:
Report syscall correctly for trace and audit"), which removed the
re-evaluation of the s... | ```diff
diff --git a/kernel/entry/common.c b/kernel/entry/common.c
index 88cb3c88aaa5..90843cc38588 100644
--- a/kernel/entry/common.c
+++ b/kernel/entry/common.c
@@ -57,8 +57,14 @@ long syscall_trace_enter(struct pt_regs *regs, long syscall,
/* Either of the above might have changed the syscall number */
syscall =... |
289b950b8e50d2e23120081d110f3f6fae5c085f | Analyze and fix the following issue in the Linux kernel code: gpio: nomadik: remove BUG_ON() in nmk_gpio_populate_chip() | Problem Details:
Using BUG_ON() is discouraged and also the check wasn't done early
enough to prevent an out of bounds access. Check earlier and return
an error instead of calling BUG().
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/ae643df0-3a3e-4270-8dbf-be390ee4b478@moroto... | ```diff
diff --git a/drivers/gpio/gpio-nomadik.c b/drivers/gpio/gpio-nomadik.c
index 463a765620dc..5e2f9b51ece3 100644
--- a/drivers/gpio/gpio-nomadik.c
+++ b/drivers/gpio/gpio-nomadik.c
@@ -533,6 +533,11 @@ struct nmk_gpio_chip *nmk_gpio_populate_chip(struct fwnode_handle *fwnode,
}
#ifdef CONFIG_PINCTRL_NOMADIK
... |
5a94041db154bc55274c35a9cde2206efb5e9f80 | Analyze and fix the following issue in the Linux kernel code: ALSA: aaci: Delete unused variable in aaci_do_suspend | Problem Details:
The variable aaci is not used anymore and can be deleted.
Fixes: 792a6c51875c ("[ALSA] Fix PM support")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://lore.kernel.org/r/20240312-aaci-unused-v1-1-09be643f67c2@linutronix.de
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index f64896564728..c3340b8ff3da 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -739,7 +739,6 @@ static const struct snd_pcm_ops aaci_capture_ops = {
*/
static int aaci_do_suspend(struct snd_card *card)
{
- struct aaci *aaci = card->private_data;
s... |
d72cf62438d67b911212f8d4cf65d6167c1541ba | Analyze and fix the following issue in the Linux kernel code: sched/balancing: Fix a couple of outdated function names in comments | Problem Details:
The 'idle_balance()' function hasn't existed for years, and there's no
load_balance_newidle() either - both are sched_balance_newidle() today.
Reported-by: Honglei Wang <jameshongleiwang@126.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/ZfAwNufbiyt/5biu@gmail.com | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 4b3c4a181a91..a19ea290b790 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6866,7 +6866,7 @@ dequeue_throttle:
#ifdef CONFIG_SMP
-/* Working cpumask for: sched_balance_rq, load_balance_newidle. */
+/* Working cpumask for: sched_bal... |
686d148cbb5a1c2891914b8d11147d3c5556a29a | Analyze and fix the following issue in the Linux kernel code: sched/balancing: Rename find_idlest_cpu() => sched_balance_find_dst_cpu() | Problem Details:
Standardize scheduler load-balancing function names on the
sched_balance_() prefix.
Also use 'dst' instead of 'idlest', because it's not really
true that we return the 'idlest' group or CPU, we sort by
idle-exit latency and only return the idlest CPUs from the
lowest-latency set of CPUs.
The true 'id... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d0c3a091d7d1..4b3c4a181a91 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -7160,7 +7160,7 @@ sched_balance_find_dst_group_cpu(struct sched_group *group, struct task_struct *
return shallowest_idle_cpu != -1 ? shallowest_idle_cpu : lea... |
a88b17080294f735c4124acccfa2d803a6a7d46f | Analyze and fix the following issue in the Linux kernel code: sched/balancing: Rename find_idlest_group() => sched_balance_find_dst_group() | Problem Details:
Standardize scheduler load-balancing function names on the
sched_balance_() prefix.
Also use 'dst' instead of 'idlest', because it's not really
true that we return the 'idlest' group or CPU, we sort by
idle-exit latency and only return the idlest CPUs from the
lowest-latency set of CPUs.
The true 'id... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 02ff0272b2e4..d0c3a091d7d1 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -7098,7 +7098,7 @@ static int wake_affine(struct sched_domain *sd, struct task_struct *p,
}
static struct sched_group *
-find_idlest_group(struct sched_domain... |
646ebaf51c64c6416ca89765c20041363fc1b518 | Analyze and fix the following issue in the Linux kernel code: sched/balancing: Rename find_idlest_group_cpu() => sched_balance_find_dst_group_cpu() | Problem Details:
Standardize scheduler load-balancing function names on the
sched_balance_() prefix.
Also use 'dst' instead of 'idlest': while historically correct,
today it's not really true anymore that we return the 'idlest'
group or CPU, we sort by idle-exit latency and only return the
idlest CPUs from the lowest-... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index aa5ff0efcca8..02ff0272b2e4 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -7101,10 +7101,10 @@ static struct sched_group *
find_idlest_group(struct sched_domain *sd, struct task_struct *p, int this_cpu);
/*
- * find_idlest_group_cpu... |
7d058285cd77cc1411c91efd1b1673530bb1bee8 | Analyze and fix the following issue in the Linux kernel code: sched/balancing: Rename newidle_balance() => sched_balance_newidle() | Problem Details:
Standardize scheduler load-balancing function names on the
sched_balance_() prefix.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Link: https://lore.kernel.org/r/20240308111819.1101550-11-mingo@kernel.org | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 95f7092043f3..aa5ff0efcca8 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4816,7 +4816,7 @@ static inline unsigned long cfs_rq_load_avg(struct cfs_rq *cfs_rq)
return cfs_rq->avg.load_avg;
}
-static int newidle_balance(struct rq *t... |
391b7a5335c45b2bafe535cb440836ccd17515aa | Analyze and fix the following issue in the Linux kernel code: sched/balancing: Rename update_blocked_averages() => sched_balance_update_blocked_averages() | Problem Details:
Standardize scheduler load-balancing function names on the
sched_balance_() prefix.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Link: https://lore.kernel.org/r/20240308111819.1101550-10-mingo@kernel.org | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 96a81b2fa281..95f7092043f3 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9411,7 +9411,7 @@ static unsigned long task_h_load(struct task_struct *p)
}
#endif
-static void update_blocked_averages(int cpu)
+static void sched_balance_u... |
82cf921432fc184adbbb9c1bced182564876ec5e | Analyze and fix the following issue in the Linux kernel code: sched/balancing: Rename find_busiest_group() => sched_balance_find_src_group() | Problem Details:
Make two naming changes:
1)
Standardize scheduler load-balancing function names on the
sched_balance_() prefix.
2)
Similar to find_busiest_queue(), the find_busiest_group() naming
has become a bit of a misnomer: the 'busiest' qualifier to this
function was historically correct but in ... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 1cd9a18b35e0..96a81b2fa281 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9430,7 +9430,7 @@ static void update_blocked_averages(int cpu)
rq_unlock_irqrestore(rq, &rf);
}
-/********** Helpers for find_busiest_group ****************... |
f1cd2e2e79d283e315356bd403c7f928e994f057 | Analyze and fix the following issue in the Linux kernel code: sched/balancing: Rename find_busiest_queue() => sched_balance_find_src_rq() | Problem Details:
The find_busiest_queue() naming has two small quirks:
- Scheduler functions that deal with runqueues usually have a rq_ prefix
or _rq postfix, but this function has neither.
- Plus the 'busiest' qualifier to this function was historically
correct, but has become somewhat of a misnomer: in qui... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 0d2753c50be9..1cd9a18b35e0 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -10959,9 +10959,9 @@ out_balanced:
}
/*
- * find_busiest_queue - find the busiest runqueue among the CPUs in the group.
+ * sched_balance_find_src_rq - find t... |
4c3e509ea9f249458e8692f8298cceac73105948 | Analyze and fix the following issue in the Linux kernel code: sched/balancing: Rename load_balance() => sched_balance_rq() | Problem Details:
Standardize scheduler load-balancing function names on the
sched_balance_() prefix.
Also load_balance() has become somewhat of a misnomer: historically
it was the first and primary load-balancing function that was called,
but with the introduction of sched domains, it's become a lower
layer function t... | ```diff
diff --git a/Documentation/scheduler/sched-domains.rst b/Documentation/scheduler/sched-domains.rst
index 5d8e8b8b269e..5e996fe973b1 100644
--- a/Documentation/scheduler/sched-domains.rst
+++ b/Documentation/scheduler/sched-domains.rst
@@ -41,11 +41,11 @@ The latter function takes two arguments: the runqueue of ... |
14ff4dbd34f46cc6b6105f549983321241ccbba9 | Analyze and fix the following issue in the Linux kernel code: sched/balancing: Rename rebalance_domains() => sched_balance_domains() | Problem Details:
Standardize scheduler load-balancing function names on the
sched_balance_() prefix.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Link: https://lore.kernel.org/r/20240308111819.1101550-5-mingo@kernel.org | ```diff
diff --git a/Documentation/scheduler/sched-domains.rst b/Documentation/scheduler/sched-domains.rst
index c7ea05f4107b..5d8e8b8b269e 100644
--- a/Documentation/scheduler/sched-domains.rst
+++ b/Documentation/scheduler/sched-domains.rst
@@ -34,7 +34,7 @@ out of balance are tasks moved between groups.
In kernel/s... |
983be0628c061989b6cc175d2f5e429b40699fbb | Analyze and fix the following issue in the Linux kernel code: sched/balancing: Rename trigger_load_balance() => sched_balance_trigger() | Problem Details:
Standardize scheduler load-balancing function names on the
sched_balance_() prefix.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Link: https://lore.kernel.org/r/20240308111819.1101550-4-mingo@kernel.org | ```diff
diff --git a/Documentation/scheduler/sched-domains.rst b/Documentation/scheduler/sched-domains.rst
index 541d6c617971..c7ea05f4107b 100644
--- a/Documentation/scheduler/sched-domains.rst
+++ b/Documentation/scheduler/sched-domains.rst
@@ -31,7 +31,7 @@ is treated as one entity. The load of a group is defined as... |
86dd6c04ef9f213e14d60c9f64bce1cc019f816e | Analyze and fix the following issue in the Linux kernel code: sched/balancing: Rename scheduler_tick() => sched_tick() | Problem Details:
- Standardize on prefixing scheduler-internal functions defined
in <linux/sched.h> with sched_*() prefix. scheduler_tick() was
the only function using the scheduler_ prefix. Harmonize it.
- The other reason to rename it is the NOHZ scheduler tick
handling functions are already named sched_tick_*... | ```diff
diff --git a/Documentation/scheduler/sched-domains.rst b/Documentation/scheduler/sched-domains.rst
index 6577b068f921..541d6c617971 100644
--- a/Documentation/scheduler/sched-domains.rst
+++ b/Documentation/scheduler/sched-domains.rst
@@ -32,13 +32,13 @@ load of each of its member CPUs, and only when the load o... |
16f8091b49175f327120cdbbdde135d38a853ae1 | Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/pmc: Improve PKGC residency counters debug | Problem Details:
The current code only prints PKGC-10 residency when the PKGC-10
is not reached in previous 'freeze' attempt. To debug PKGC-10 issues, we
also need to know other PKGC residency counters to better triage issues.
Ex:
1. When system is stuck in PC2, it can be caused short LTR from device.
2. When system is... | ```diff
diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
index 8f9c036809c7..10c96c1a850a 100644
--- a/drivers/platform/x86/intel/pmc/core.c
+++ b/drivers/platform/x86/intel/pmc/core.c
@@ -1389,6 +1389,15 @@ static int pmc_core_probe(struct platform_device *pdev)
return -ENO... |
30f96b2cb70d882515efae4d4af698f18a65c75e | Analyze and fix the following issue in the Linux kernel code: platform/mellanox: mlxreg-hotplug: Remove redundant NULL-check | Problem Details:
Pointer item is checked fo NULL at mlxreg_hotplug_work_helper() and then
it is dereferenced to produce dev_err().
This pointer is also dereferenced before calling this function and should
never be NULL except some piece of hardware is broken as it is said in
the comment before the check. So, this check... | ```diff
diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c b/drivers/platform/mellanox/mlxreg-hotplug.c
index 5c022b258f91..0ce9fff1f7d4 100644
--- a/drivers/platform/mellanox/mlxreg-hotplug.c
+++ b/drivers/platform/mellanox/mlxreg-hotplug.c
@@ -348,20 +348,6 @@ mlxreg_hotplug_work_helper(struct mlxreg_hotplug_pri... |
1bde4afcd190e74368438ddf98d50e637ff9303f | Analyze and fix the following issue in the Linux kernel code: platform/x86: pmc_atom: Check state of PMC managed devices on s2idle | Problem Details:
For the Bay Trail or Cherry Trail SoC to enter the S0i3 power-level
at s2idle suspend requires most of the hw-blocks / devices in the SoC
to be in D3 when entering s2idle suspend.
If some devices are not in D3 then the SoC will stay in a higher
power state, consuming much more power from the battery t... | ```diff
diff --git a/drivers/platform/x86/pmc_atom.c b/drivers/platform/x86/pmc_atom.c
index 93a6414c6611..7d391bd36eae 100644
--- a/drivers/platform/x86/pmc_atom.c
+++ b/drivers/platform/x86/pmc_atom.c
@@ -6,6 +6,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#include <linux/acpi.h>
#include <linux/debugfs.h>... |
57221a07ff37ff356f9265acd228bc3c8744c8fc | Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/tpmi: Change vsec offset to u64 | Problem Details:
The vsec offset can be 64 bit long depending on the PFS start. So change
type to u64. Also use 64 bit formatting for seq_printf.
Fixes: 47731fd2865f ("platform/x86/intel: Intel TPMI enumeration driver")
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: stable@vger.kernel.org... | ```diff
diff --git a/drivers/platform/x86/intel/tpmi.c b/drivers/platform/x86/intel/tpmi.c
index e73cdea67fff..910df7c654f4 100644
--- a/drivers/platform/x86/intel/tpmi.c
+++ b/drivers/platform/x86/intel/tpmi.c
@@ -96,7 +96,7 @@ struct intel_tpmi_pfs_entry {
*/
struct intel_tpmi_pm_feature {
struct intel_tpmi_pfs_... |
8c9be42172e2a18f39c41dde3ce3e4cddaf6cf75 | Analyze and fix the following issue in the Linux kernel code: platform/x86/amd/pmf: Fix possible out-of-bound memory accesses | Problem Details:
The length of the policy buffer is not validated before accessing it,
which means that multiple out-of-bounds memory accesses can occur.
This is especially bad since userspace can load policy binaries over
debugfs.
Compile-tested only.
Fixes: 7c45534afa44 ("platform/x86/amd/pmf: Add support for PMF ... | ```diff
diff --git a/drivers/platform/x86/amd/pmf/tee-if.c b/drivers/platform/x86/amd/pmf/tee-if.c
index 71ea7eefc211..75370431a82e 100644
--- a/drivers/platform/x86/amd/pmf/tee-if.c
+++ b/drivers/platform/x86/amd/pmf/tee-if.c
@@ -249,11 +249,17 @@ static int amd_pmf_start_policy_engine(struct amd_pmf_dev *dev)
struc... |
e42dddce83a0578a518cb7078930c8269a6083af | Analyze and fix the following issue in the Linux kernel code: platform/x86/amd/pmf: Do not use readl() for policy buffer access | Problem Details:
The policy buffer is allocated using normal memory allocation
functions, so readl() should not be used on it.
Compile-tested only.
Fixes: 7c45534afa44 ("platform/x86/amd/pmf: Add support for PMF Policy Binary")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k... | ```diff
diff --git a/drivers/platform/x86/amd/pmf/tee-if.c b/drivers/platform/x86/amd/pmf/tee-if.c
index 13dd4462e1e3..58ec2c9606e1 100644
--- a/drivers/platform/x86/amd/pmf/tee-if.c
+++ b/drivers/platform/x86/amd/pmf/tee-if.c
@@ -249,8 +249,8 @@ static int amd_pmf_start_policy_engine(struct amd_pmf_dev *dev)
u32 coo... |
d1e33cd66670cd9c07258398ffe93961d2089287 | Analyze and fix the following issue in the Linux kernel code: platform/x86/amd/pmf: Fix return value of amd_pmf_start_policy_engine() | Problem Details:
amd_pmf_start_policy_engine() returns an negative error code upon
failure, so the TA_PMF_* error codes cannot be used here.
Return -EIO instead. Also stop shadowing the return code in
amd_pmf_get_pb_data().
Compile-tested only.
Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fixes: 7c455... | ```diff
diff --git a/drivers/platform/x86/amd/pmf/tee-if.c b/drivers/platform/x86/amd/pmf/tee-if.c
index 16973bebf55f..13dd4462e1e3 100644
--- a/drivers/platform/x86/amd/pmf/tee-if.c
+++ b/drivers/platform/x86/amd/pmf/tee-if.c
@@ -269,7 +269,7 @@ static int amd_pmf_start_policy_engine(struct amd_pmf_dev *dev)
} else ... |
7c8772fef2c25b951660ff31aa1d2174b45af043 | Analyze and fix the following issue in the Linux kernel code: platform/mellanox: mlxbf-pmc: fix signedness bugs | Problem Details:
These need to be signed for the error handling to work. The
mlxbf_pmc_get_event_num() function returns int so int type is correct.
Fixes: 1ae9ffd303c2 ("platform/mellanox: mlxbf-pmc: Cleanup signed/unsigned mix-up")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org... | ```diff
diff --git a/drivers/platform/mellanox/mlxbf-pmc.c b/drivers/platform/mellanox/mlxbf-pmc.c
index 746567767e5b..4ed9c7fd2b62 100644
--- a/drivers/platform/mellanox/mlxbf-pmc.c
+++ b/drivers/platform/mellanox/mlxbf-pmc.c
@@ -1505,8 +1505,9 @@ static ssize_t mlxbf_pmc_counter_show(struct device *dev,
{
struct m... |
ac2d1fd9688fcdfba5acc815fb2b13fec83e5dad | Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/pmc/arl: Put GNA device in D3 | Problem Details:
As is the case on Meteor Lake, the Gaussian & Neural Accelerator (GNA)
device is powered by BIOS to D0 by default. If no driver is loaded, this
will cause the Package C state to be limited to PC2, leading to
significant power consumption and decrease in batter life. Put the GNA
device in D3 by default... | ```diff
diff --git a/drivers/platform/x86/intel/pmc/arl.c b/drivers/platform/x86/intel/pmc/arl.c
index 683ae828276b..34b4cd23bfe5 100644
--- a/drivers/platform/x86/intel/pmc/arl.c
+++ b/drivers/platform/x86/intel/pmc/arl.c
@@ -673,6 +673,7 @@ static struct pmc_info arl_pmc_info_list[] = {
};
#define ARL_NPU_PCI_DEV... |
e6ba4acde44957dc9bdc3222b5739217a102752d | Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/pmc/lnl: Remove SSRAM support | Problem Details:
A recent PMC firmware change in Lunar Lake caused the pmc_core driver to
fail to probe. This is due to a change in the GUID for PMC telemetry coming
from the SSRAM device. Until a final release is ready this value may
change again. In the meantime, disable the SSRAM support for Lunar Lake so
the driver... | ```diff
diff --git a/drivers/platform/x86/intel/pmc/lnl.c b/drivers/platform/x86/intel/pmc/lnl.c
index abad17cdd3d7..068d72504683 100644
--- a/drivers/platform/x86/intel/pmc/lnl.c
+++ b/drivers/platform/x86/intel/pmc/lnl.c
@@ -13,21 +13,6 @@
#include "core.h"
-#define SOCM_LPM_REQ_GUID 0x11594920
-
-#define PMC_DE... |
3a5fe9305719c680ccf63216781a4d4068c8e3f3 | Analyze and fix the following issue in the Linux kernel code: sched/balancing: Fix comments (trying to) refer to NOHZ_BALANCE_KICK | Problem Details:
Fix two typos:
- There's no such thing as 'nohz_balancing_kick', the
flag is named 'BALANCE' and is capitalized: NOHZ_BALANCE_KICK.
- Likewise there's no such thing as a 'pending nohz_balance_kick'
either, the NOHZ_BALANCE_KICK flag is all upper-case.
Signed-off-by: Ingo Molnar <mingo@kerne... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 84d4791cf628..f3c03c6db3c8 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -12409,15 +12409,16 @@ out:
}
/*
- * run_rebalance_domains is triggered when needed from the scheduler tick.
- * Also triggered for nohz idle balancing (with ... |
9ab121d65e03b4dc38f207871070eb353b396b05 | Analyze and fix the following issue in the Linux kernel code: sched/debug: Allow CONFIG_SCHEDSTATS even on !KERNEL_DEBUG kernels | Problem Details:
All major Linux distributions enable CONFIG_SCHEDSTATS,
so make it more widely available.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20240308105901.1096078-6-mingo@kernel.org | ```diff
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 6c596e65de8a..ed2ad1a0cec6 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1250,7 +1250,7 @@ config SCHED_INFO
config SCHEDSTATS
bool "Collect scheduler statistics"
- depends on DEBUG_KERNEL && PROC_FS
+ depends on PROC_FS
select SCHED_I... |
11b0bfa5d463b17cac5bf6b94fea4921713530c3 | Analyze and fix the following issue in the Linux kernel code: sched/debug: Increase SCHEDSTAT_VERSION to 16 | Problem Details:
We changed the order of definitions within 'enum cpu_idle_type',
which changed the order of [CPU_MAX_IDLE_TYPES] columns in
show_schedstat().
Suggested-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: "Gautham R. Shenoy" <gautham.shenoy@amd.com>
Link: https... | ```diff
diff --git a/Documentation/scheduler/sched-stats.rst b/Documentation/scheduler/sched-stats.rst
index 03c062915998..73c412666655 100644
--- a/Documentation/scheduler/sched-stats.rst
+++ b/Documentation/scheduler/sched-stats.rst
@@ -2,6 +2,11 @@
Scheduler Statistics
====================
+Version 16 of schedst... |
02a61f325a8e62a7c76479c5f2f7ddcba16877e8 | Analyze and fix the following issue in the Linux kernel code: sched/balancing: Remove reliance on 'enum cpu_idle_type' ordering when iterating [CPU_MAX_IDLE_TYPES] arrays in show_schedstat() | Problem Details:
show_schedstat() output breaks and doesn't print all entries
if the ordering of the definitions in 'enum cpu_idle_type' is changed,
because show_schedstat() assumes that 'CPU_IDLE' is 0.
Fix it before we change the definition order & values.
[ mingo: Added changelog. ]
Signed-off-by: Shrikanth Hegde... | ```diff
diff --git a/kernel/sched/stats.c b/kernel/sched/stats.c
index 857f837f52cb..85277953cc72 100644
--- a/kernel/sched/stats.c
+++ b/kernel/sched/stats.c
@@ -150,8 +150,7 @@ static int show_schedstat(struct seq_file *seq, void *v)
seq_printf(seq, "domain%d %*pb", dcount++,
cpumask_pr_args(sched_domai... |
e006858f1a1c6e8ba8aeff67e9b15700f70174da | Analyze and fix the following issue in the Linux kernel code: nexthop: Fix splat with CONFIG_DEBUG_PREEMPT=y | Problem Details:
Locally generated packets can increment the new nexthop statistics from
process context, resulting in the following splat [1] due to preemption
being enabled. Fix by using get_cpu_ptr() / put_cpu_ptr() which will
which take care of disabling / enabling preemption.
BUG: using smp_processor_id() in pree... | ```diff
diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
index 4c6915bff31e..74928a9d1aa4 100644
--- a/net/ipv4/nexthop.c
+++ b/net/ipv4/nexthop.c
@@ -674,10 +674,11 @@ static void nh_grp_entry_stats_inc(struct nh_grp_entry *nhge)
{
struct nh_grp_entry_stats *cpu_stats;
- cpu_stats = this_cpu_ptr(nhge->stats);... |
d8a21070b6e168d3800c2962a574f16020dd2951 | Analyze and fix the following issue in the Linux kernel code: nexthop: Fix out-of-bounds access during attribute validation | Problem Details:
Passing a maximum attribute type to nlmsg_parse() that is larger than
the size of the passed policy will result in an out-of-bounds access [1]
when the attribute type is used as an index into the policy array.
Fix by setting the maximum attribute type according to the policy size,
as is already done f... | ```diff
diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
index d1669000ac1c..4c6915bff31e 100644
--- a/net/ipv4/nexthop.c
+++ b/net/ipv4/nexthop.c
@@ -3244,8 +3244,8 @@ static int nh_valid_get_del_req(const struct nlmsghdr *nlh,
static int rtm_del_nexthop(struct sk_buff *skb, struct nlmsghdr *nlh,
struct ne... |
d6170e4aaf86424c24ce06e355b4573daa891b17 | Analyze and fix the following issue in the Linux kernel code: bpf: hardcode BPF_PROG_PACK_SIZE to 2MB * num_possible_nodes() | Problem Details:
On some architectures like ARM64, PMD_SIZE can be really large in some
configurations. Like with CONFIG_ARM64_64K_PAGES=y the PMD_SIZE is
512MB.
Use 2MB * num_possible_nodes() as the size for allocations done through
the prog pack allocator. On most architectures, PMD_SIZE will be equal
to 2MB in case... | ```diff
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index bdbdc75cdcd5..297184baeb2d 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -893,7 +893,12 @@ static LIST_HEAD(pack_list);
* CONFIG_MMU=n. Use PAGE_SIZE in these cases.
*/
#ifdef PMD_SIZE
-#define BPF_PROG_PACK_SIZE (PMD_SIZE * num_possible_... |
84e95149bd341705f0eca6a7fcb955c548805002 | Analyze and fix the following issue in the Linux kernel code: nfp: flower: handle acti_netdevs allocation failure | Problem Details:
The kmalloc_array() in nfp_fl_lag_do_work() will return null, if
the physical memory has run out. As a result, if we dereference
the acti_netdevs, the null pointer dereference bugs will happen.
This patch adds a check to judge whether allocation failure occurs.
If it happens, the delayed work will be ... | ```diff
diff --git a/drivers/net/ethernet/netronome/nfp/flower/lag_conf.c b/drivers/net/ethernet/netronome/nfp/flower/lag_conf.c
index 361d7c495e2d..2c7bd6e80d99 100644
--- a/drivers/net/ethernet/netronome/nfp/flower/lag_conf.c
+++ b/drivers/net/ethernet/netronome/nfp/flower/lag_conf.c
@@ -337,6 +337,11 @@ static void ... |
79ff13e99169ddb0e2277e046dbfb112f77dfac5 | Analyze and fix the following issue in the Linux kernel code: libbpf: Add support for bpf_arena. | Problem Details:
mmap() bpf_arena right after creation, since the kernel needs to
remember the address returned from mmap. This is user_vm_start.
LLVM will generate bpf_arena_cast_user() instructions where
necessary and JIT will add upper 32-bit of user_vm_start
to such pointers.
Fix up bpf_map_mmap_sz() to compute mm... | ```diff
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 567ad367e7aa..34b722071874 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -185,6 +185,7 @@ static const char * const map_type_name[] = {
[BPF_MAP_TYPE_BLOOM_FILTER] = "bloom_filter",
[BPF_MAP_TYPE_USER_RINGBUF] ... |
b7ab4bbd0188f3985b821fa09456b11105a8dedf | Analyze and fix the following issue in the Linux kernel code: tpm,tpm_tis: Avoid warning splat at shutdown | Problem Details:
If interrupts are not activated the work struct 'free_irq_work' is not
initialized. This results in a warning splat at module shutdown.
Fix this by always initializing the work regardless of whether interrupts
are activated or not.
cc: stable@vger.kernel.org
Fixes: 481c2d14627d ("tpm,tpm_tis: Disable... | ```diff
diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index 1b350412d8a6..64c875657687 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -919,8 +919,6 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask,
int rc;
u32 int_statu... |
d5166a49508df7a60a1c437b7a33cd688f478055 | Analyze and fix the following issue in the Linux kernel code: tpm/tpm_ftpm_tee: fix all kernel-doc warnings | Problem Details:
Change @pdev to @dev in 2 places to match the function parameters.
Correct one function name in kernel-doc comment to match the function
implementation.
This prevents these warnings:
tpm_ftpm_tee.c:217: warning: Function parameter or struct member 'dev' not described in 'ftpm_tee_probe'
tpm_ftpm_tee.... | ```diff
diff --git a/drivers/char/tpm/tpm_ftpm_tee.c b/drivers/char/tpm/tpm_ftpm_tee.c
index 76adb108076c..2ea4882251cf 100644
--- a/drivers/char/tpm/tpm_ftpm_tee.c
+++ b/drivers/char/tpm/tpm_ftpm_tee.c
@@ -208,7 +208,7 @@ static int ftpm_tee_match(struct tee_ioctl_version_data *ver, const void *data)
/**
* ftpm_t... |
a290d4cb892da3e9e163a40d0ab70ed1531cdc58 | Analyze and fix the following issue in the Linux kernel code: ravb: Correct buffer size to map for R-Car Rx | Problem Details:
When creating a helper to allocate and align an skb one location where
the skb data size was updated was missed. This can lead to a warning
being printed when the memory is being unmapped as it now always unmap
the maximum frame size, instead of the size after it have been
aligned.
This was correctly ... | ```diff
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index fa48ff4aba2d..d1be030c8848 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -979,7 +979,7 @@ static bool ravb_rx_rcar(struct net_device *ndev, int *quota,... |
7f0782ca1ce9f5dcb163c3f3a626f8b23fa85b3d | Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: add mptcp_lib_verify_listener_events | Problem Details:
To avoid duplicated code in different MPTCP selftests, we can add and use
helpers defined in mptcp_lib.sh.
The helper verify_listener_events() is defined both in mptcp_join.sh and
userspace_pm.sh, export it into mptcp_lib.sh and rename it with mptcp_lib_
prefix. Use this new helper in both scripts.
S... | ```diff
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 041175ec1304..9b538a7071e7 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -2794,15 +2794,9 @@ AF_INET6=10
verify_listener... |
fd959262c1bb09eac288445ff90696087e0d063f | Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: sockopt: print every test result | Problem Details:
Only total test results are printed out in mptcp_sockopt.sh:
PASS: all packets had packet mark set
PASS: SOL_MPTCP getsockopt has expected information
PASS: TCP_INQ cmsg/ioctl -t tcp
PASS: TCP_INQ cmsg/ioctl -6 -t tcp
PASS: TCP_INQ cmsg/ioctl -r tcp
PASS: TCP_INQ cmsg/ioctl -6 -r tcp
PASS: TCP_INQ cms... | ```diff
diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
index 7c70b52e63c6..17b36c1312f4 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
@@ -113,6 +113,11 @@ check_mark()
retur... |
c9161a0f8ff96f4e1980e2e24a222cd65143edf5 | Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: connect: fix misaligned output | Problem Details:
The first [ OK ] in the output of mptcp_connect.sh misaligns with the
others:
New MPTCP socket can be blocked via sysctl [ OK ]
INFO: validating network environment with pings
INFO: Using loss of 0.85% delay 16 ms reorder 95% 70% with delay 4ms on
ns1 MPTCP -> ns1 (10.0.1.1:10000 ) M... | ```diff
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
index ab3f52434753..ce9342b241cd 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
@@ -248,11 +248,17 @@ else
set_ethtool_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.