id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
58548b91101f0a8772d1fe992cac7cd3226a471e | Analyze and fix the following issue in the Linux kernel code: drm/xe: Defer gt->mmio initialization until after multi-tile setup | Problem Details:
With the recent xe_mmio redesign, tiles and GTs each have their own MMIO
accessor, with the GT inheriting some of the information (such as the
iomap pointer) from their containing tile. Given that non-root tiles
get initialized later than the root tile (and currently after the point
at which GT MMIO i... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 38eade07a004..709acea5c388 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -654,6 +654,13 @@ int xe_device_probe(struct xe_device *xe)
err = xe_gt_init_early(gt);
if (err)
return err;... |
17d32430361898932678fc6d77e448f260c8a3a8 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Revert "drm/i915: Disable DSB in Xe KMD" | Problem Details:
This reverts commit c27f010aa1884276ee5dae72034d84987060c769.
After fix from [1] dsb timeout issue is not reproducible on local testing
with xe driver. Checking CI result to confirm and not for review.
[1] https://patchwork.freedesktop.org/series/130783/
Signed-off-by: Animesh Manna <animesh.manna@i... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index da24e041d269..e0c628d1fe7d 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -706,10 +706,6 @@ struct intel_dsb *intel_dsb_prepare(struct intel_atomic_stat... |
71a3161e9d7d2229cb4eefd4c49effb97caf3db3 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix DSB buffer coherency | Problem Details:
Add the scanout flag to force WC caching, and add the memory barrier
where needed.
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240913114754.7956-2-maarten.lankhorst@linux.intel.com
S... | ```diff
diff --git a/drivers/gpu/drm/xe/display/xe_dsb_buffer.c b/drivers/gpu/drm/xe/display/xe_dsb_buffer.c
index f99d901a3214..f95375451e2f 100644
--- a/drivers/gpu/drm/xe/display/xe_dsb_buffer.c
+++ b/drivers/gpu/drm/xe/display/xe_dsb_buffer.c
@@ -48,11 +48,12 @@ bool intel_dsb_buffer_create(struct intel_crtc *crtc,... |
ec2d1539e159f53eae708e194c449cfefa004994 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Restore pci state upon resume | Problem Details:
The pci state was saved, but not restored. Restore
right after the power state transition request like
every other driver.
v2: Use right fixes tag, since this was there initialy, but
accidentally removed.
Fixes: f6761c68c0ac ("drm/xe/display: Improve s2idle handling.")
Cc: Maarten Lankhorst <maar... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index a1d08e20cd34..2c2d269ebe8e 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -944,6 +944,8 @@ static int xe_pci_resume(struct device *dev)
if (err)
return err;
+ pci_restore_state(pdev);
+
err = pci... |
9a98dd48b6d834d7a3fe5e8e7b8c3a1d006f9685 | Analyze and fix the following issue in the Linux kernel code: wifi: mwifiex: Use IRQF_NO_AUTOEN flag in request_irq() | Problem Details:
disable_irq() after request_irq() still has a time gap in which
interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will
disable IRQ auto-enable when request IRQ.
Fixes: 853402a00823 ("mwifiex: Enable WoWLAN for both sdio and pcie")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Acked-by: ... | ```diff
diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
index 96d1f6039fbc..855019fe5485 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.c
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
@@ -1679,7 +1679,8 @@ static void mwifiex_probe_of(struct mwifiex_ada... |
bcd1371bd85e560ccc9159b7747f94bfe43b77a6 | Analyze and fix the following issue in the Linux kernel code: wifi: p54: Use IRQF_NO_AUTOEN flag in request_irq() | Problem Details:
disable_irq() after request_irq() still has a time gap in which
interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will
disable IRQ auto-enable when request IRQ.
Fixes: cd8d3d321285 ("p54spi: p54spi driver")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@k... | ```diff
diff --git a/drivers/net/wireless/intersil/p54/p54spi.c b/drivers/net/wireless/intersil/p54/p54spi.c
index d33a994906a7..27f44a9f0bc1 100644
--- a/drivers/net/wireless/intersil/p54/p54spi.c
+++ b/drivers/net/wireless/intersil/p54/p54spi.c
@@ -624,7 +624,7 @@ static int p54spi_probe(struct spi_device *spi)
gpi... |
34b69548108480ebb36cb6a067974a88ec745897 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: do not increase mcu skb refcount if retry is not supported | Problem Details:
If mcu_skb_prepare_msg is not implemented, incrementing skb refcount does not
work for mcu message retry. In some cases (e.g. on SDIO), shared skbs can trigger
a BUG_ON, crashing the system.
Fix this by only incrementing refcount if retry is actually supported.
Fixes: 3688c18b65ae ("wifi: mt76: mt7915... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mcu.c b/drivers/net/wireless/mediatek/mt76/mcu.c
index 98da82b74094..3353012e8542 100644
--- a/drivers/net/wireless/mediatek/mt76/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mcu.c
@@ -84,13 +84,16 @@ int mt76_mcu_skb_send_and_get_msg(struct mt76_dev *dev, struc... |
5575058ba95bb016243e54e5ca3371b9884ded56 | Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: coex: add debug message of link counts on 2/5GHz bands for wl_info v7 | Problem Details:
The counts will be used by MLO, and it is ongoing to add the code, so add
debug message in todo part to avoid warnings reported by clang:
coex.c:6323:23: warning:
variable 'cnt_2g' set but not used [-Wunused-but-set-variable]
6323 | u8 i, mode, cnt = 0, cnt_2g = 0, cnt_5g = 0, ...
| ... | ```diff
diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c
index df51b29142aa..8d27374db83c 100644
--- a/drivers/net/wireless/realtek/rtw89/coex.c
+++ b/drivers/net/wireless/realtek/rtw89/coex.c
@@ -6445,6 +6445,8 @@ static void _update_wl_info_v7(struct rtw89_dev *rtwdev... |
0e58637eb968c636725dcd6c7055249b4e5326fb | Analyze and fix the following issue in the Linux kernel code: spi: airoha: fix airoha_snand_{write,read}_data data_len estimation | Problem Details:
Fix data length written and read in airoha_snand_write_data and
airoha_snand_read_data routines respectively if it is bigger than
SPI_MAX_TRANSFER_SIZE.
Fixes: a403997c1201 ("spi: airoha: add SPI-NAND Flash controller driver")
Tested-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Lorenzo ... | ```diff
diff --git a/drivers/spi/spi-airoha-snfi.c b/drivers/spi/spi-airoha-snfi.c
index be3e4ac42153..c71be702cf6f 100644
--- a/drivers/spi/spi-airoha-snfi.c
+++ b/drivers/spi/spi-airoha-snfi.c
@@ -405,7 +405,7 @@ static int airoha_snand_write_data(struct airoha_snand_ctrl *as_ctrl, u8 cmd,
for (i = 0; i < len; i +=... |
2e6bbfe7b0c0607001b784082c2685b134174fac | Analyze and fix the following issue in the Linux kernel code: spi: airoha: fix dirmap_{read,write} operations | Problem Details:
SPI_NFI_READ_FROM_CACHE_DONE bit must be written at the end of
dirmap_read operation even if it is already set.
In the same way, SPI_NFI_LOAD_TO_CACHE_DONE bit must be written at the
end of dirmap_write operation even if it is already set.
For this reason use regmap_write_bits() instead of regmap_set_b... | ```diff
diff --git a/drivers/spi/spi-airoha-snfi.c b/drivers/spi/spi-airoha-snfi.c
index 9d97ec98881c..be3e4ac42153 100644
--- a/drivers/spi/spi-airoha-snfi.c
+++ b/drivers/spi/spi-airoha-snfi.c
@@ -739,8 +739,13 @@ static ssize_t airoha_snand_dirmap_read(struct spi_mem_dirmap_desc *desc,
if (err)
return err;
- ... |
2f02b5af3a4482b216e6a466edecf6ba8450fa45 | Analyze and fix the following issue in the Linux kernel code: drbd: Fix atomicity violation in drbd_uuid_set_bm() | Problem Details:
The violation of atomicity occurs when the drbd_uuid_set_bm function is
executed simultaneously with modifying the value of
device->ldev->md.uuid[UI_BITMAP]. Consider a scenario where, while
device->ldev->md.uuid[UI_BITMAP] passes the validity check when its
value is not zero, the value of device->ldev... | ```diff
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 449123eb54bf..0d74d75260ef 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -3399,10 +3399,12 @@ void drbd_uuid_new_current(struct drbd_device *device) __must_hold(local)
void drbd_uuid_set_bm(... |
cb2deca056d579fe008c8d0a4ceb04d2b368fe42 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: fix mute/micmute LED for HP mt645 G8 | Problem Details:
The HP Elite mt645 G8 Mobile Thin Client uses an ALC236 codec
and needs the ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk
to enable the mute and micmute LED functionality.
This patch adds the system ID of the HP Elite mt645 G8
to the `alc269_fixup_tbl` in `patch_realtek.c`
to enable the required quirk.
... | ```diff
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 4ca66234e561..9471396bbca6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -10490,6 +10490,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8ca2, "HP ZBook Po... |
6c10ba06bb1b48acce6d4d9c1e33beb9954f1788 | Analyze and fix the following issue in the Linux kernel code: drm/xe/oa: Fix overflow in oa batch buffer | Problem Details:
By default xe_bb_create_job() appends a MI_BATCH_BUFFER_END to batch
buffer, this is not a problem if batch buffer is only used once but
oa reuses the batch buffer for the same metric and at each call
it appends a MI_BATCH_BUFFER_END, printing the warning below and then
overflowing.
[ 381.072016] ---... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_bb.c b/drivers/gpu/drm/xe/xe_bb.c
index a13e0b3a169e..ef777dbdf4ec 100644
--- a/drivers/gpu/drm/xe/xe_bb.c
+++ b/drivers/gpu/drm/xe/xe_bb.c
@@ -65,7 +65,8 @@ __xe_bb_create_job(struct xe_exec_queue *q, struct xe_bb *bb, u64 *addr)
{
u32 size = drm_suballoc_size(bb->bo);
-... |
69bbe3adf36de47315498c9384f99a1ff9171694 | Analyze and fix the following issue in the Linux kernel code: drm/xe/client: add missing bo locking in show_meminfo() | Problem Details:
bo_meminfo() wants to inspect bo state like tt and the ttm resource,
however this state can change at any point leading to stuff like NPD and
UAF, if the bo lock is not held. Grab the bo lock when calling
bo_meminfo(), ensuring we drop any spinlocks first. In the case of
object_idr we now also need to ... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
index badfa045ead8..95a05c5bc897 100644
--- a/drivers/gpu/drm/xe/xe_drm_client.c
+++ b/drivers/gpu/drm/xe/xe_drm_client.c
@@ -10,6 +10,7 @@
#include <linux/slab.h>
#include <linux/types.h>
+#include "xe_assert.h"
#include ... |
99b1f7493bfa757b03d41ee6d7f7d00f81fcba5d | Analyze and fix the following issue in the Linux kernel code: drm/xe/client: fix deadlock in show_meminfo() | Problem Details:
There is a real deadlock as well as sleeping in atomic() bug in here, if
the bo put happens to be the last ref, since bo destruction wants to
grab the same spinlock and sleeping locks. Fix that by dropping the ref
using xe_bo_put_deferred(), and moving the final commit outside of the
lock. Dropping th... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
index e64f4b645e2e..badfa045ead8 100644
--- a/drivers/gpu/drm/xe/xe_drm_client.c
+++ b/drivers/gpu/drm/xe/xe_drm_client.c
@@ -196,6 +196,7 @@ static void show_meminfo(struct drm_printer *p, struct drm_file *file)
struct xe_dr... |
ee06c09ded3c2f722be4e240ed06287e23596bda | Analyze and fix the following issue in the Linux kernel code: drm/xe/vram: fix ccs offset calculation | Problem Details:
Spec says SW is expected to round up to the nearest 128K, if not already
aligned for the CC unit view of CCS. We are seeing the assert sometimes
pop on BMG to tell us that there is a hole between GSM and CCS, as well
as popping other asserts with having a vram size with strange alignment,
which is like... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_vram.c b/drivers/gpu/drm/xe/xe_vram.c
index 5bcd59190353..80ba2fc78837 100644
--- a/drivers/gpu/drm/xe/xe_vram.c
+++ b/drivers/gpu/drm/xe/xe_vram.c
@@ -182,6 +182,7 @@ static inline u64 get_flat_ccs_offset(struct xe_gt *gt, u64 tile_size)
offset = offset_hi << 32; /* HW vie... |
7ab9ebc580617831355843f19224f1e31bb8e983 | Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Fix GUC_{SUBMIT,FIRMWARE}_VER helper macros | Problem Details:
Those macros rely on non-existing MAKE_VER_STRUCT macro, while the
correct one that should be used is named MAKE_GUC_VER_STRUCT.
Fixes: 4eb0aab6e443 ("drm/xe/guc: Bump minimum required GuC version to v70.29.2")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Julia Filipchuk <julia.fil... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc.h b/drivers/gpu/drm/xe/xe_guc.h
index c3e6b51f7a09..42116b167c98 100644
--- a/drivers/gpu/drm/xe/xe_guc.h
+++ b/drivers/gpu/drm/xe/xe_guc.h
@@ -18,8 +18,10 @@
*/
#define MAKE_GUC_VER(maj, min, pat) (((maj) << 16) | ((min) << 8) | (pat))
#define MAKE_GUC_VER_STRUCT(ver)... |
d2b537b3e533f28e0d97293fe9293161fe8cd137 | Analyze and fix the following issue in the Linux kernel code: exfat: fix memory leak in exfat_load_bitmap() | Problem Details:
If the first directory entry in the root directory is not a bitmap
directory entry, 'bh' will not be released and reassigned, which
will cause a memory leak.
Fixes: 1e49a94cf707 ("exfat: add bitmap operations")
Cc: stable@vger.kernel.org
Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: A... | ```diff
diff --git a/fs/exfat/balloc.c b/fs/exfat/balloc.c
index 0356c88252bd..ce9be95c9172 100644
--- a/fs/exfat/balloc.c
+++ b/fs/exfat/balloc.c
@@ -91,11 +91,8 @@ int exfat_load_bitmap(struct super_block *sb)
return -EIO;
type = exfat_get_entry_type(ep);
- if (type == TYPE_UNUSED)
- break;
- if (ty... |
f168c000d27f8134160d4a52dfc474a948a3d7e9 | Analyze and fix the following issue in the Linux kernel code: tpm: export tpm2_sessions_init() to fix ibmvtpm building | Problem Details:
Commit 08d08e2e9f0a ("tpm: ibmvtpm: Call tpm2_sessions_init() to
initialize session support") adds call to tpm2_sessions_init() in ibmvtpm,
which could be built as a module. However, tpm2_sessions_init() wasn't
exported, causing libmvtpm to fail to build as a module:
ERROR: modpost: "tpm2_sessions_ini... | ```diff
diff --git a/drivers/char/tpm/tpm2-sessions.c b/drivers/char/tpm/tpm2-sessions.c
index d3521aadd43e..44f60730cff4 100644
--- a/drivers/char/tpm/tpm2-sessions.c
+++ b/drivers/char/tpm/tpm2-sessions.c
@@ -1362,4 +1362,5 @@ int tpm2_sessions_init(struct tpm_chip *chip)
return rc;
}
+EXPORT_SYMBOL(tpm2_session... |
e3aaebcbb7c6b403416f442d1de70d437ce313a7 | Analyze and fix the following issue in the Linux kernel code: tpm: Clean up TPM space after command failure | Problem Details:
tpm_dev_transmit prepares the TPM space before attempting command
transmission. However if the command fails no rollback of this
preparation is done. This can result in transient handles being leaked
if the device is subsequently closed with no further commands performed.
Fix this by flushing the spac... | ```diff
diff --git a/drivers/char/tpm/tpm-dev-common.c b/drivers/char/tpm/tpm-dev-common.c
index 30b4c288c1bb..c3fbbf4d3db7 100644
--- a/drivers/char/tpm/tpm-dev-common.c
+++ b/drivers/char/tpm/tpm-dev-common.c
@@ -47,6 +47,8 @@ static ssize_t tpm_dev_transmit(struct tpm_chip *chip, struct tpm_space *space,
if (!re... |
7f1b63f981b8284c6d8238cb49b5cb156d9a833e | Analyze and fix the following issue in the Linux kernel code: btrfs: fix use-after-free on rbtree that tracks inodes for auto defrag | Problem Details:
When cleaning up defrag inodes at btrfs_cleanup_defrag_inodes(), called
during remount and unmount, we are freeing every node from the rbtree
that tracks inodes for auto defrag using
rbtree_postorder_for_each_entry_safe(), which doesn't modify the tree
itself. So once we unlock the lock that protects t... | ```diff
diff --git a/fs/btrfs/defrag.c b/fs/btrfs/defrag.c
index acf1f39e45d0..b95ef44c326b 100644
--- a/fs/btrfs/defrag.c
+++ b/fs/btrfs/defrag.c
@@ -213,6 +213,8 @@ void btrfs_cleanup_defrag_inodes(struct btrfs_fs_info *fs_info)
&fs_info->defrag_inodes, rb_node)
kmem_cache_free(btrfs_inode_defrag_cachep... |
b0b595e61d97de61c15b379b754b2caa90e83e5c | Analyze and fix the following issue in the Linux kernel code: btrfs: tree-checker: fix the wrong output of data backref objectid | Problem Details:
[BUG]
There are some reports about invalid data backref objectids, the report
looks like this:
BTRFS critical (device sda): corrupt leaf: block=333654787489792 slot=110 extent bytenr=333413935558656 len=65536 invalid data ref objectid value 2543
The data ref objectid is the inode number inside the ... | ```diff
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 634d69964fe4..7b50263723bc 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -1517,7 +1517,7 @@ static int check_extent_item(struct extent_buffer *leaf,
dref_objectid > BTRFS_LAST_FREE_OBJECTID)) {
extent_err... |
7ee85f5515e86a4e2a2f51969795920733912bad | Analyze and fix the following issue in the Linux kernel code: btrfs: fix race setting file private on concurrent lseek using same fd | Problem Details:
When doing concurrent lseek(2) system calls against the same file
descriptor, using multiple threads belonging to the same process, we have
a short time window where a race happens and can result in a memory leak.
The race happens like this:
1) A program opens a file descriptor for a file and then sp... | ```diff
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index 9a4b7c119318..e152fde888fc 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
@@ -152,6 +152,7 @@ struct btrfs_inode {
* logged_trans), to access/update delalloc_bytes, new_delalloc_bytes,
* defrag_bytes, disk_i_size, outstan... |
11c2dbd7f2415731ac8213d3de0dbd5f5dd0ddc7 | Analyze and fix the following issue in the Linux kernel code: selftests: riscv: Allow mmap test to compile on 32-bit | Problem Details:
Macros needed for 32-bit compilations were hidden behind 64-bit riscv
ifdefs. Fix the 32-bit compilations by moving macros to allow the
memory_layout test to run on 32-bit.
Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Fixes: 73d05262a2ca ("selftests: riscv: Generalize mm selftests")
Link: htt... | ```diff
diff --git a/tools/testing/selftests/riscv/mm/mmap_test.h b/tools/testing/selftests/riscv/mm/mmap_test.h
index 3b29ca3bb3d4..1c3313c201d5 100644
--- a/tools/testing/selftests/riscv/mm/mmap_test.h
+++ b/tools/testing/selftests/riscv/mm/mmap_test.h
@@ -48,11 +48,11 @@ uint32_t random_addresses[] = {
};
#endif
... |
61850725779709369c7e907ae8c7c75dc7cec4f3 | Analyze and fix the following issue in the Linux kernel code: i3c: master: svc: Fix use after free vulnerability in svc_i3c_master Driver Due to Race Condition | Problem Details:
In the svc_i3c_master_probe function, &master->hj_work is bound with
svc_i3c_master_hj_work, &master->ibi_work is bound with
svc_i3c_master_ibi_work. And svc_i3c_master_ibi_work can start the
hj_work, svc_i3c_master_irq_handler can start the ibi_work.
If we remove the module which will call svc_i3c_m... | ```diff
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index 423db3dca257..a7bfc678153e 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -1840,6 +1840,7 @@ static void svc_i3c_master_remove(struct platform_device *pdev)
{
struct svc... |
609366e7a06d035990df78f1562291c3bf0d4a12 | Analyze and fix the following issue in the Linux kernel code: i3c: master: cdns: Fix use after free vulnerability in cdns_i3c_master Driver Due to Race Condition | Problem Details:
In the cdns_i3c_master_probe function, &master->hj_work is bound with
cdns_i3c_master_hj. And cdns_i3c_master_interrupt can call
cnds_i3c_master_demux_ibis function to start the work.
If we remove the module which will call cdns_i3c_master_remove to
make cleanup, it will free master->base through i3c_... | ```diff
diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c-master-cdns.c
index ee555255f1a2..fe4d59833ad5 100644
--- a/drivers/i3c/master/i3c-master-cdns.c
+++ b/drivers/i3c/master/i3c-master-cdns.c
@@ -1667,6 +1667,7 @@ static void cdns_i3c_master_remove(struct platform_device *pdev)
{
struc... |
e3accac1a976e65491a9b9fba82ce8ddbd3d2389 | Analyze and fix the following issue in the Linux kernel code: block: Fix elv_iosched_local_module handling of "none" scheduler | Problem Details:
Commit 734e1a860312 ("block: Prevent deadlocks when switching
elevators") introduced the function elv_iosched_load_module() to allow
loading an elevator module outside of elv_iosched_store() with the
target device queue not frozen, to avoid deadlocks. However, the "none"
scheduler does not have a modul... | ```diff
diff --git a/block/elevator.c b/block/elevator.c
index c355b55d0107..4122026b11f1 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -715,7 +715,9 @@ int elv_iosched_load_module(struct gendisk *disk, const char *buf,
strscpy(elevator_name, buf, sizeof(elevator_name));
- return request_module("%s-iosc... |
0eb0bd21e8382d10be8108952a0bb819915e1e2d | Analyze and fix the following issue in the Linux kernel code: LoongArch: Remove STACK_FRAME_NON_STANDARD(do_syscall) | Problem Details:
For now, we can remove STACK_FRAME_NON_STANDARD(do_syscall) because
there is no objtool warning "do_syscall+0x11c: return with modified
stack frame", then there is handle_syscall() which is the previous
frame of do_syscall() in the call trace when executing the command
"echo l > /proc/sysrq-trigger".
... | ```diff
diff --git a/arch/loongarch/kernel/syscall.c b/arch/loongarch/kernel/syscall.c
index ba5d0930a74f..168bd97540f8 100644
--- a/arch/loongarch/kernel/syscall.c
+++ b/arch/loongarch/kernel/syscall.c
@@ -79,7 +79,3 @@ void noinstr __no_stack_protector do_syscall(struct pt_regs *regs)
syscall_exit_to_user_mode(re... |
a7e0837724562ea8c1d869dd1a5cb1119ef651c3 | Analyze and fix the following issue in the Linux kernel code: LoongArch: Set AS_HAS_THIN_ADD_SUB as y if AS_IS_LLVM | Problem Details:
When building kernel with "make CC=clang defconfig", LLVM Assembler is
used due to LLVM_IAS=0 is not specified, then AS_HAS_THIN_ADD_SUB is not
set, thus objtool can not be built after enable it for Clang.
config AS_HAS_THIN_ADD_SUB is to check whether -mthin-add-sub option is
available to know R_LARC... | ```diff
diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index 8dff6ddaf9c5..34531dc8a61f 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -266,7 +266,7 @@ config AS_HAS_FCSR_CLASS
def_bool $(as-instr,movfcsr2gr \$t0$(comma)\$fcsr0)
config AS_HAS_THIN_ADD_SUB
- def_bool $(cc-option,-... |
28b0ef922738b74335c20b8ed4bf8e259353a3a3 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix missing check pcie_p2p module param | Problem Details:
The module param pcie_p2p should be checked for kfd p2p feature, so add it.
Fixes: 75f0efbc4b3b ("drm/amdgpu: Take IOMMU remapping into account for p2p checks")
Signed-off-by: Bob Zhou <bob.zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deuch... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index f4628412dac4..afb643e03d3c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -6189,7 +6189,7 @@ bool amdgpu_device_is_peer_accessible(struct amdgpu... |
52755373ea6197dac40b9804ce967611b5e989bf | Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: clean up code for interrupt v10 | Problem Details:
Variable hub_inst is unused.
Fixes: e28604d8337e ("drm/amdkfd: Drop poison hanlding from gfx v10")
Signed-off-by: Jesse Zhang <jesse.zhang@amd.com>
Reviewed-by: Tim Huang <tim.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ```diff
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c
index bb8cbfc39b90..37b69fe0ede3 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c
@@ -306,23 +306,8 @@ static void event_interrupt_... |
983f12149942a58c66e9db7638a10667aae0d958 | Analyze and fix the following issue in the Linux kernel code: RISC-V: Implement kgdb_roundup_cpus() to enable future NMI Roundup | Problem Details:
Until now, the generic weak kgdb_roundup_cpus() has been used for kgdb on
RISCV. A custom one allows to debug CPUs that are stuck with interrupts
disabled with NMI support in the future. And using an IPI is better than
the generic one since it avoids the potential situation described in the
generic kgd... | ```diff
diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c
index 9b047899791c..c180a647a30e 100644
--- a/arch/riscv/kernel/smp.c
+++ b/arch/riscv/kernel/smp.c
@@ -13,6 +13,7 @@
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/kexec.h>
+#include <linux/kgdb.h>
#include <linux/percpu... |
39190ac7cff1fd15135fa8e658030d9646fdb5f2 | Analyze and fix the following issue in the Linux kernel code: powerpc/atomic: Use YZ constraints for DS-form instructions | Problem Details:
The 'ld' and 'std' instructions require a 4-byte aligned displacement
because they are DS-form instructions. But the "m" asm constraint
doesn't enforce that.
That can lead to build errors if the compiler chooses a non-aligned
displacement, as seen with GCC 14:
/tmp/ccuSzwiR.s: Assembler messages:
... | ```diff
diff --git a/arch/powerpc/include/asm/asm-compat.h b/arch/powerpc/include/asm/asm-compat.h
index b0b209c1df50..f48e644900a2 100644
--- a/arch/powerpc/include/asm/asm-compat.h
+++ b/arch/powerpc/include/asm/asm-compat.h
@@ -37,6 +37,12 @@
#define STDX_BE stringify_in_c(stdbrx)
#endif
+#ifdef CONFIG_CC_IS_CLA... |
95c588f69ee5bf5ba5884ca156ac9d5c9309f6da | Analyze and fix the following issue in the Linux kernel code: watchdog: rzv2h_wdt: Add missing MODULE_LICENSE tag to fix modpost error | Problem Details:
Add the missing `MODULE_LICENSE()` tag to the `rzv2h_wdt` driver, which
resolves the following modpost error when built as a module:
ERROR: modpost: missing MODULE_LICENSE() in drivers/watchdog/rzv2h_wdt.o
Fixes: f6febd0a30b6 ("watchdog: Add Watchdog Timer driver for RZ/V2H(P)")
Reported-by: Step... | ```diff
diff --git a/drivers/watchdog/rzv2h_wdt.c b/drivers/watchdog/rzv2h_wdt.c
index 2da7a631fb2a..1d1b17312747 100644
--- a/drivers/watchdog/rzv2h_wdt.c
+++ b/drivers/watchdog/rzv2h_wdt.c
@@ -270,3 +270,4 @@ static struct platform_driver rzv2h_wdt_driver = {
module_platform_driver(rzv2h_wdt_driver);
MODULE_AUTHOR(... |
318580ad7f2828f6269e0b8819e943ddedda3375 | Analyze and fix the following issue in the Linux kernel code: hugetlbfs: support tracepoint | Problem Details:
Add basic tracepoints for {alloc, evict, free}_inode, setattr and
fallocate. These can help users to debug hugetlbfs more conveniently.
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Link: https://lore.kernel.org/r/20240829064110.67884-2-lihongbo22@huawei.com
Reviewed-by: Steven Rostedt (Google) <ro... | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index 0c94ec0ca478..5e628017cbaa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10367,6 +10367,7 @@ F: Documentation/mm/hugetlbfs_reserv.rst
F: Documentation/mm/vmemmap_dedup.rst
F: fs/hugetlbfs/
F: include/linux/hugetlb.h
+F: include/trace/events/hugetlbfs.h
F: mm/hug... |
e620799c414a035dea1208bcb51c869744931dbb | Analyze and fix the following issue in the Linux kernel code: list: test: fix tests for list_cut_position() | Problem Details:
Fix test for list_cut_position*() for the missing check of integer "i"
after the second loop. The variable should be checked for second time to
make sure both lists after the cut operation are formed as expected.
Link: https://lkml.kernel.org/r/20240910043531.71343-1-richard120310@gmail.com
Signed-of... | ```diff
diff --git a/lib/list-test.c b/lib/list-test.c
index 37cbc33e9fdb..8d1d47a9fe9e 100644
--- a/lib/list-test.c
+++ b/lib/list-test.c
@@ -404,10 +404,13 @@ static void list_test_list_cut_position(struct kunit *test)
KUNIT_EXPECT_EQ(test, i, 2);
+ i = 0;
list_for_each(cur, &list1) {
KUNIT_EXPECT_PTR_EQ(t... |
684826f8271ad97580b138b9ffd462005e470b99 | Analyze and fix the following issue in the Linux kernel code: zram: free secondary algorithms names | Problem Details:
We need to kfree() secondary algorithms names when reset zram device that
had multi-streams, otherwise we leak memory.
[senozhatsky@chromium.org: kfree(NULL) is legal]
Link: https://lkml.kernel.org/r/20240917013021.868769-1-senozhatsky@chromium.org
Link: https://lkml.kernel.org/r/20240911025600.3681... | ```diff
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 1f1bf175a6c3..0207a7fc0a97 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -2112,6 +2112,11 @@ static void zram_destroy_comps(struct zram *zram)
zram->num_active_comps--;
}
+ for (prio = ZRA... |
6d27a31ef195951c9b03098edfdf986549a213b7 | Analyze and fix the following issue in the Linux kernel code: uprobes: introduce the global struct vm_special_mapping xol_mapping | Problem Details:
Currently each xol_area has its own instance of vm_special_mapping, this
is suboptimal and ugly. Kill xol_area->xol_mapping and add a single
global instance of vm_special_mapping, the ->fault() method can use
area->pages rather than xol_mapping->pages.
As a side effect this fixes the problem introduc... | ```diff
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 73cc47708679..a478e028043f 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -99,7 +99,6 @@ struct xol_area {
atomic_t slot_count; /* number of in-use slots */
unsigned long *bitmap; /* 0 = free slot */
- struct... |
9d57090e73d5e00e946d7fdd6398c2c0bc3b5525 | Analyze and fix the following issue in the Linux kernel code: mm: fix swap_read_folio_zeromap() for large folios with partial zeromap | Problem Details:
Patch series "mm: enable large folios swap-in support", v9.
Currently, we support mTHP swapout but not swapin. This means that once
mTHP is swapped out, it will come back as small folios when swapped in.
This is particularly detrimental for devices like Android, where more than
half of the memory is... | ```diff
diff --git a/mm/page_io.c b/mm/page_io.c
index b6f1519d63b0..78bc88acee79 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -226,26 +226,6 @@ static void swap_zeromap_folio_clear(struct folio *folio)
}
}
-/*
- * Return the index of the first subpage which is not zero-filled
- * according to swap_info_struct-... |
659c55ef981bb63355a65ffc3b3b5cad562b806a | Analyze and fix the following issue in the Linux kernel code: mm/vma: return the exact errno in vms_gather_munmap_vmas() | Problem Details:
__split_vma() and mas_store_gfp() returns several types of errno on
failure so don't ignore them in vms_gather_munmap_vmas(). For example,
__split_vma() returns -EINVAL when an unaligned huge page is unmapped.
This issue is reproduced by ltp memfd_create03 test.
Don't initialise the error variable a... | ```diff
diff --git a/mm/vma.c b/mm/vma.c
index 8d1686fc8d5a..4737afcb064c 100644
--- a/mm/vma.c
+++ b/mm/vma.c
@@ -1171,13 +1171,13 @@ void vms_complete_munmap_vmas(struct vma_munmap_struct *vms,
* @vms: The vma munmap struct
* @mas_detach: The maple state tracking the detached tree
*
- * Return: 0 on success, -E... |
aa549f923f5e037a459dcd588932db9abfa8c158 | Analyze and fix the following issue in the Linux kernel code: mm: support poison recovery from do_cow_fault() | Problem Details:
Patch series "mm: hwpoison: two more poison recovery".
One more CoW path to support poison recorvery in do_cow_fault(), and the
last copy_user_highpage() user is replaced to copy_mc_user_highpage() from
copy_present_page() during fork to support poison recorvery too.
This patch (of 2):
Like commit ... | ```diff
diff --git a/mm/memory.c b/mm/memory.c
index 42674c0748cb..64421ea5a403 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -5089,10 +5089,14 @@ static vm_fault_t do_cow_fault(struct vm_fault *vmf)
if (ret & VM_FAULT_DONE_COW)
return ret;
- copy_user_highpage(vmf->cow_page, vmf->page, vmf->address, vma);
+ if ... |
99185c10d5d9214d0d0c8b7866660203e344ee3b | Analyze and fix the following issue in the Linux kernel code: resource, kunit: add test case for region_intersects() | Problem Details:
Patch series "resource: Fix region_intersects() vs
add_memory_driver_managed()", v3.
The patchset fixes a bug of region_intersects() for systems with CXL
memory. The details of the bug can be found in [1/3]. To avoid similar
bugs in the future. A kunit test case for region_intersects() is added in
... | ```diff
diff --git a/kernel/resource.c b/kernel/resource.c
index 5e76b98c9771..4c9cb0363f9a 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -1817,7 +1817,17 @@ EXPORT_SYMBOL(resource_list_free);
#ifdef CONFIG_GET_FREE_REGION
#define GFR_DESCENDING (1UL << 0)
#define GFR_REQUEST_REGION (1UL << 1)
-#define ... |
7a2369b74abf76cd3e54c45b30f6addb497f831b | Analyze and fix the following issue in the Linux kernel code: mm: z3fold: deprecate CONFIG_Z3FOLD | Problem Details:
The z3fold compressed pages allocator is rarely used, most users use
zsmalloc. The only disadvantage of zsmalloc in comparison is the
dependency on MMU, and zbud is a more common option for !MMU as it was the
default zswap allocator for a long time.
Historically, zsmalloc had worse latency than zbud ... | ```diff
diff --git a/arch/loongarch/configs/loongson3_defconfig b/arch/loongarch/configs/loongson3_defconfig
index b4252c357c8e..75b366407a60 100644
--- a/arch/loongarch/configs/loongson3_defconfig
+++ b/arch/loongarch/configs/loongson3_defconfig
@@ -96,7 +96,6 @@ CONFIG_ZPOOL=y
CONFIG_ZSWAP=y
CONFIG_ZSWAP_COMPRESSOR... |
75182022a0439788415b2dd1db3086e07aa506f7 | Analyze and fix the following issue in the Linux kernel code: mm/x86: support large pfn mappings | Problem Details:
Helpers to install and detect special pmd/pud entries. In short, bit 9 on
x86 is not used for pmd/pud, so we can directly define them the same as
the pte level. One note is that it's also used in _PAGE_BIT_CPA_TEST but
that is only used in the debug test, and shouldn't conflict in this case.
One not... | ```diff
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index b74b9ee484da..d4dbe9717e96 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -28,6 +28,7 @@ config X86_64
select ARCH_HAS_GIGANTIC_PAGE
select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
select ARCH_SUPPORTS_PER_VMA_LOCK
+ select ARCH_SUPPORTS_HUGE_PF... |
6857be5fecaebd9773ff27b6d29b6fff3b1abbce | Analyze and fix the following issue in the Linux kernel code: mm: introduce ARCH_SUPPORTS_HUGE_PFNMAP and special bits to pmd/pud | Problem Details:
Patch series "mm: Support huge pfnmaps", v2.
Overview
========
This series implements huge pfnmaps support for mm in general. Huge
pfnmap allows e.g. VM_PFNMAP vmas to map in either PMD or PUD levels,
similar to what we do with dax / thp / hugetlb so far to benefit from TLB
hits. Now we extend tha... | ```diff
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 39f6faace590..c2307a2d275d 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2643,6 +2643,30 @@ static inline pte_t pte_mkspecial(pte_t pte)
}
#endif
+#ifndef CONFIG_ARCH_SUPPORTS_PMD_PFNMAP
+static inline bool pmd_special(pmd_t pmd)
+{
+... |
22af8caff7d1ca22a1ff1a554180e53f7a6555af | Analyze and fix the following issue in the Linux kernel code: mm/madvise: process_madvise() drop capability check if same mm | Problem Details:
In commit 96cfe2c0fd23 ("mm/madvise: replace ptrace attach requirement for
process_madvise") process_madvise() was updated to require the caller to
possess the CAP_SYS_NICE capability to perform the operation, in addition
to a check against PTRACE_MODE_READ performed by mm_access().
The mm_access() fu... | ```diff
diff --git a/mm/madvise.c b/mm/madvise.c
index 89089d84f8df..6e3a137b8e50 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -1527,7 +1527,7 @@ SYSCALL_DEFINE5(process_madvise, int, pidfd, const struct iovec __user *, vec,
* Require CAP_SYS_NICE for influencing process performance. Note that
* only non-destr... |
2a1b8648d9be9f37f808a36c0f74adb8c53d06e6 | Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: ensure huge_zero_folio won't have large_rmappable flag set | Problem Details:
Ensure huge_zero_folio won't have large_rmappable flag set. So it can be
reported as thp,zero correctly through stable_page_flags().
Link: https://lkml.kernel.org/r/20240914015306.3656791-1-linmiaohe@huawei.com
Fixes: 5691753d73a2 ("mm: convert huge_zero_page to huge_zero_folio")
Signed-off-by: Miaoh... | ```diff
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 67c86a5d64a6..99b146d16a18 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -220,6 +220,8 @@ retry:
count_vm_event(THP_ZERO_PAGE_ALLOC_FAILED);
return false;
}
+ /* Ensure zero folio won't have large_rmappable flag set. */
+ folio_clear_large... |
98b74bb4d7e96b4da5ef3126511febe55b76b807 | Analyze and fix the following issue in the Linux kernel code: mm/hugetlb.c: fix UAF of vma in hugetlb fault pathway | Problem Details:
Syzbot reports a UAF in hugetlb_fault(). This happens because
vmf_anon_prepare() could drop the per-VMA lock and allow the current VMA
to be freed before hugetlb_vma_unlock_read() is called.
We can fix this by using a modified version of vmf_anon_prepare() that
doesn't release the VMA lock on failure... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index aaf508be0a2b..9a3a6e2dee97 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -6048,7 +6048,7 @@ retry_avoidcopy:
* When the original hugepage is shared one, it does not have
* anon_vma prepared.
*/
- ret = vmf_anon_prepare(vmf);
+ ret = __vmf_anon_prepare(vm... |
2a058ab3286d6475b2082b90c2d2182d2fea4b39 | Analyze and fix the following issue in the Linux kernel code: mm: change vmf_anon_prepare() to __vmf_anon_prepare() | Problem Details:
Some callers of vmf_anon_prepare() may not want us to release the per-VMA
lock ourselves. Rename vmf_anon_prepare() to __vmf_anon_prepare() and let
the callers drop the lock when desired.
Also, make vmf_anon_prepare() a wrapper that releases the per-VMA lock
itself for any callers that don't care.
T... | ```diff
diff --git a/mm/internal.h b/mm/internal.h
index b4d86436565b..a963f67d3452 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -310,7 +310,16 @@ static inline void wake_throttle_isolated(pg_data_t *pgdat)
wake_up(wqh);
}
-vm_fault_t vmf_anon_prepare(struct vm_fault *vmf);
+vm_fault_t __vmf_anon_prepare(str... |
b4afe4183ec77f230851ea139d91e5cf2644c68b | Analyze and fix the following issue in the Linux kernel code: resource: fix region_intersects() vs add_memory_driver_managed() | Problem Details:
On a system with CXL memory, the resource tree (/proc/iomem) related to
CXL memory may look like something as follows.
490000000-50fffffff : CXL Window 0
490000000-50fffffff : region0
490000000-50fffffff : dax0.0
490000000-50fffffff : System RAM (kmem)
Because drivers/dax/kmem.c calls add... | ```diff
diff --git a/kernel/resource.c b/kernel/resource.c
index 14777afb0a99..235dc77f8add 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -540,20 +540,62 @@ static int __region_intersects(struct resource *parent, resource_size_t start,
size_t size, unsigned long flags,
unsigned long de... |
6040f650c56862a4ac40b00c37ef6ab1ddfcebb5 | Analyze and fix the following issue in the Linux kernel code: zsmalloc: use unique zsmalloc caches names | Problem Details:
Each zsmalloc pool maintains several named kmem-caches for zs_handle-s and
zspage-s. On a system with multiple zsmalloc pools and CONFIG_DEBUG_VM
this triggers kmem_cache_sanity_check():
kmem_cache of name 'zspage' already exists
WARNING: at mm/slab_common.c:108 do_kmem_cache_create_usercopy+0xb5... | ```diff
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 2d3163e4da96..b572aa84823c 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -54,6 +54,7 @@
#include <linux/vmalloc.h>
#include <linux/preempt.h>
#include <linux/spinlock.h>
+#include <linux/sprintf.h>
#include <linux/shrinker.h>
#include <linux/types.h>
#i... |
c3dea3d54f4d399f8044547f0f1abdccbdfb0fee | Analyze and fix the following issue in the Linux kernel code: xen/swiotlb: fix allocated size | Problem Details:
The allocated size in xen_swiotlb_alloc_coherent() and
xen_swiotlb_free_coherent() is calculated wrong for the case of
XEN_PAGE_SIZE not matching PAGE_SIZE. Fix that.
Fixes: 7250f422da04 ("xen-swiotlb: use actually allocated size on check physical continuous")
Reported-by: Jan Beulich <jbeulich@suse.c... | ```diff
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index d7fbba8b4700..a337edcf8faf 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -147,7 +147,7 @@ xen_swiotlb_alloc_coherent(struct device *dev, size_t size,
void *ret;
/* Align the allocation to the Xen page size... |
9f40ec84a7976d95c34e7cc070939deb103652b0 | Analyze and fix the following issue in the Linux kernel code: xen/swiotlb: add alignment check for dma buffers | Problem Details:
When checking a memory buffer to be consecutive in machine memory,
the alignment needs to be checked, too. Failing to do so might result
in DMA memory not being aligned according to its requested size,
leading to error messages like:
4xxx 0000:2b:00.0: enabling device (0140 -> 0142)
4xxx 0000:2b:0... | ```diff
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 35155258a7e2..d7fbba8b4700 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -78,9 +78,15 @@ static inline int range_straddles_page_boundary(phys_addr_t p, size_t size)
{
unsigned long next_bfn, xen_pfn = XEN_PFN... |
5ac1f99fdd09d80223e8f47dffaea41a6563aace | Analyze and fix the following issue in the Linux kernel code: smb: client: fix compression heuristic functions | Problem Details:
Change is_compressible() return type to bool, use WARN_ON_ONCE(1) for
internal errors and return false for those.
Renames:
check_repeated_data -> has_repeated_data
check_ascii_bytes -> is_mostly_ascii (also refactor into a single loop)
calc_shannon_entropy -> has_low_entropy
Also wraps "wreq->Length"... | ```diff
diff --git a/fs/smb/client/compress.c b/fs/smb/client/compress.c
index 2c008e9f0206..63b5a55b7a57 100644
--- a/fs/smb/client/compress.c
+++ b/fs/smb/client/compress.c
@@ -45,7 +45,7 @@ struct bucket {
};
/**
- * calc_shannon_entropy() - Compute Shannon entropy of the sampled data.
+ * has_low_entropy() - Co... |
319e53f155907cf2c6dabc16ec9dce0179bc04d1 | Analyze and fix the following issue in the Linux kernel code: drm/panic: Fix uninitialized spinlock acquisition with CONFIG_DRM_PANIC=n | Problem Details:
It turns out that if you happen to have a kernel config where
CONFIG_DRM_PANIC is disabled and spinlock debugging is enabled, along with
KMS being enabled - we'll end up trying to acquire an uninitialized
spin_lock with drm_panic_lock() when we try to do a commit:
rvkms rvkms.0: [drm:drm_atomic_comm... | ```diff
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 43cdf39019a4..5186d2114a50 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -3015,7 +3015,7 @@ int drm_atomic_helper_swap_state(struct drm_atomic_state *state,
bool st... |
ea292363c322d82663e021c5dc532894c30d4e59 | Analyze and fix the following issue in the Linux kernel code: selftests/landlock: Test signal scoping | Problem Details:
Provide tests for the signal scoping. If the signal is 0, no signal
will be sent, but the permission of a process to send a signal will be
checked. Likewise, this test consider one signal for each signal
category: SIGTRAP, SIGURG, SIGHUP, and SIGTSTP.
Signed-off-by: Tahera Fahimi <fahimitahera@gmail... | ```diff
diff --git a/tools/testing/selftests/landlock/scoped_signal_test.c b/tools/testing/selftests/landlock/scoped_signal_test.c
new file mode 100644
index 000000000000..55d983e38fc5
--- /dev/null
+++ b/tools/testing/selftests/landlock/scoped_signal_test.c
@@ -0,0 +1,251 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ ... |
54a6e6bbf3bef25c8eb65619edde70af49bd3db0 | Analyze and fix the following issue in the Linux kernel code: landlock: Add signal scoping | Problem Details:
Currently, a sandbox process is not restricted to sending a signal (e.g.
SIGKILL) to a process outside the sandbox environment. The ability to
send a signal for a sandboxed process should be scoped the same way
abstract UNIX sockets are scoped. Therefore, we extend the "scoped"
field in a ruleset with... | ```diff
diff --git a/include/uapi/linux/landlock.h b/include/uapi/linux/landlock.h
index 70edd17bafdc..33745642f787 100644
--- a/include/uapi/linux/landlock.h
+++ b/include/uapi/linux/landlock.h
@@ -296,9 +296,12 @@ struct landlock_net_port_attr {
* - %LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET: Restrict a sandboxed process... |
644a728506c794e9e4f5fb9845ed4f7014cf46d9 | Analyze and fix the following issue in the Linux kernel code: selftests/landlock: Test inherited restriction of abstract UNIX socket | Problem Details:
A socket can be shared between multiple processes, so it can connect and
send data to them. Provide a test scenario where a sandboxed process
inherits a socket's file descriptor. The process cannot connect or send
data to the inherited socket since the process is scoped.
Test coverage for security/lan... | ```diff
diff --git a/tools/testing/selftests/landlock/scoped_abstract_unix_test.c b/tools/testing/selftests/landlock/scoped_abstract_unix_test.c
index ad97f14f97de..a6b59d2ab1b4 100644
--- a/tools/testing/selftests/landlock/scoped_abstract_unix_test.c
+++ b/tools/testing/selftests/landlock/scoped_abstract_unix_test.c
@... |
4f9a5b50d3b39027c5fdb44b33835209665fe069 | Analyze and fix the following issue in the Linux kernel code: selftests/landlock: Test UNIX sockets with any address formats | Problem Details:
Expand abstract UNIX socket restriction tests by examining different
scenarios for UNIX sockets with pathname or unnamed address formats
connection with scoped domain.
The various_address_sockets tests ensure that UNIX sockets bound to a
filesystem pathname and unnamed sockets created by socketpair ca... | ```diff
diff --git a/tools/testing/selftests/landlock/common.h b/tools/testing/selftests/landlock/common.h
index 44552d682ee3..61056fa074bb 100644
--- a/tools/testing/selftests/landlock/common.h
+++ b/tools/testing/selftests/landlock/common.h
@@ -21,6 +21,8 @@
#include "../kselftest_harness.h"
+#define TMP_DIR "tm... |
21d52e295ad2afc76bbd105da82a003b96f6ac77 | Analyze and fix the following issue in the Linux kernel code: landlock: Add abstract UNIX socket scoping | Problem Details:
Introduce a new "scoped" member to landlock_ruleset_attr that can
specify LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET to restrict connection to
abstract UNIX sockets from a process outside of the socket's domain.
Two hooks are implemented to enforce these restrictions:
unix_stream_connect and unix_may_send.
... | ```diff
diff --git a/include/uapi/linux/landlock.h b/include/uapi/linux/landlock.h
index 2c8dbc74b955..70edd17bafdc 100644
--- a/include/uapi/linux/landlock.h
+++ b/include/uapi/linux/landlock.h
@@ -44,6 +44,12 @@ struct landlock_ruleset_attr {
* flags`_).
*/
__u64 handled_access_net;
+ /**
+ * @scoped: Bitmas... |
9542130937e9dc707dd7c6b7af73326437da2d50 | Analyze and fix the following issue in the Linux kernel code: parisc: Fix itlb miss handler for 64-bit programs | Problem Details:
For an itlb miss when executing code above 4 Gb on ILP64 adjust the
iasq/iaoq in the same way isr/ior was adjusted. This fixes signal
delivery for the 64-bit static test program from
http://ftp.parisc-linux.org/src/64bit.tar.gz. Note that signals are
handled by the signal trampoline code in the 64-bi... | ```diff
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index ab23e61a6f01..ea57bcc21dc5 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -1051,8 +1051,7 @@ ENTRY_CFI(intr_save) /* for os_hpmc */
STREG %r16, PT_ISR(%r29)
STREG %r17, PT_IOR(%r29)
... |
bc6763187270154ab48715d26bc129eba34e471a | Analyze and fix the following issue in the Linux kernel code: drm/xe/rtp: Remove unneeded semicolon | Problem Details:
Fix coccicheck report with regard to unneeded semicolon. This is
currently the only case according to
make coccicheck \
MODE=report \
COCCI=scripts/coccinelle/misc/semicolon.cocci \
M=drivers/gpu/drm/xe
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-al... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
index 86c705d18c0d..b13d4d62f0b1 100644
--- a/drivers/gpu/drm/xe/xe_rtp.c
+++ b/drivers/gpu/drm/xe/xe_rtp.c
@@ -196,7 +196,7 @@ static void rtp_get_context(struct xe_rtp_process_ctx *ctx,
*gt = (*hwe)->gt;
*xe = gt_to_xe(*gt);
break... |
37173392741c425191b959acb3adf70c9a4610c0 | Analyze and fix the following issue in the Linux kernel code: drm/xe/vram: fix ccs offset calculation | Problem Details:
Spec says SW is expected to round up to the nearest 128K, if not already
aligned for the CC unit view of CCS. We are seeing the assert sometimes
pop on BMG to tell us that there is a hole between GSM and CCS, as well
as popping other asserts with having a vram size with strange alignment,
which is like... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_vram.c b/drivers/gpu/drm/xe/xe_vram.c
index 7e765b1499b1..2a623bfcda7e 100644
--- a/drivers/gpu/drm/xe/xe_vram.c
+++ b/drivers/gpu/drm/xe/xe_vram.c
@@ -182,6 +182,7 @@ static inline u64 get_flat_ccs_offset(struct xe_gt *gt, u64 tile_size)
offset = offset_hi << 32; /* HW vie... |
7acad3c442df6d5158c5b732a7a0ccf3a01d9b30 | Analyze and fix the following issue in the Linux kernel code: RDMA/nldev: Add missing break in rdma_nl_notify_err_msg() | Problem Details:
Clang warns (or errors with CONFIG_WERROR=y):
drivers/infiniband/core/nldev.c:2795:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
2795 | default:
| ^
Clang is a little more pedantic than GCC, which does not warn when
falling thro... | ```diff
diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
index 10b1411ac53d..39f89a4b8649 100644
--- a/drivers/infiniband/core/nldev.c
+++ b/drivers/infiniband/core/nldev.c
@@ -2792,6 +2792,7 @@ static void rdma_nl_notify_err_msg(struct ib_device *device, u32 port_num,
dev_warn_ratelimi... |
9f0eafe86ea0a589676209d0cff1a1ed49a037d3 | Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: fix error message in irdma_modify_qp_roce() | Problem Details:
Use a correct field max_dest_rd_atomic instead of max_rd_atomic for the
error output.
Found by Linux Verification Center (linuxtesting.org) with Svace.
Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
Signed-off-by: Vitaliy Shevtsov <v.shevtsov@maxima.ru>
Link: https://lore.ke... | ```diff
diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
index 6a107decb704..eeb932e58730 100644
--- a/drivers/infiniband/hw/irdma/verbs.c
+++ b/drivers/infiniband/hw/irdma/verbs.c
@@ -1347,7 +1347,7 @@ int irdma_modify_qp_roce(struct ib_qp *ibqp, struct ib_qp_attr *attr,
if (at... |
3de5774cb8c0638aee9d5f0431561666515a3875 | Analyze and fix the following issue in the Linux kernel code: drm/i915/irq: Rename suspend/resume functions | Problem Details:
Although these functions are used in runtime_pm, they are not
exclusively used there, so remove the misleading prefix.
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240912172539.418957... | ```diff
diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
index 8f1ea95471ef..f42f21632306 100644
--- a/drivers/gpu/drm/i915/gt/intel_reset.c
+++ b/drivers/gpu/drm/i915/gt/intel_reset.c
@@ -1233,7 +1233,7 @@ void intel_gt_reset(struct intel_gt *gt,
}
if (INTEL_INFO(gt->i91... |
43a64bd02f9369be02c4c9312fc0965f78f65ad5 | Analyze and fix the following issue in the Linux kernel code: cifs: Remove redundant setting of NETFS_SREQ_HIT_EOF | Problem Details:
Fix an upstream merge resolution issue[1]. The NETFS_SREQ_HIT_EOF flag,
and code to set it, got added via two different paths. The original path
saw it added in the netfslib read improvements[2], but it was also added,
and slightly differently, in a fix that was committed before v6.11:
1da29... | ```diff
diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c
index 95377bb91950..bb8ecbbe78af 100644
--- a/fs/smb/client/smb2pdu.c
+++ b/fs/smb/client/smb2pdu.c
@@ -4614,8 +4614,6 @@ smb2_readv_callback(struct mid_q_entry *mid)
0, cifs_trace_rw_credits_read_response_clear);
rdata->credits.value = ... |
dc1a456dc1870942d19e8cea257554d9d8d1597a | Analyze and fix the following issue in the Linux kernel code: cifs: Fix cifs readv callback merge resolution issue | Problem Details:
Fix an upstream merge resolution issue[1]. Prior to the netfs read
healpers, the SMB1 asynchronous read callback, cifs_readv_worker()
performed the cleanup for the operation in the network message processing
loop, potentially slowing down the processing of incoming SMB messages.
With commit a68c74865... | ```diff
diff --git a/fs/smb/client/cifssmb.c b/fs/smb/client/cifssmb.c
index d81da161d3ed..7f3b37120a21 100644
--- a/fs/smb/client/cifssmb.c
+++ b/fs/smb/client/cifssmb.c
@@ -1266,7 +1266,7 @@ static void cifs_readv_worker(struct work_struct *work)
struct cifs_io_subrequest *rdata =
container_of(work, struct cifs_... |
7f44beadcc11adb98220556d2ddbe9c97aa6d42d | Analyze and fix the following issue in the Linux kernel code: io_uring/sqpoll: do not put cpumask on stack | Problem Details:
Putting the cpumask on the stack is deprecated for a long time (since
2d3854a37e8), as these can be big. Given that, change the on-stack
allocation of allowed_mask to be dynamically allocated.
Fixes: f011c9cf04c0 ("io_uring/sqpoll: do not allow pinning outside of cpuset")
Signed-off-by: Felix Moessbau... | ```diff
diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c
index 7adfcf6818ff..7c79685baeb1 100644
--- a/io_uring/sqpoll.c
+++ b/io_uring/sqpoll.c
@@ -461,15 +461,22 @@ __cold int io_sq_offload_create(struct io_ring_ctx *ctx,
return 0;
if (p->flags & IORING_SETUP_SQ_AFF) {
- struct cpumask allowed_mask;
+ ... |
d242feaf81d63b25d8c1fb1a68738dc33966a376 | Analyze and fix the following issue in the Linux kernel code: pwm: stm32: Fix a typo | Problem Details:
Fix a typo in comments.
Reported-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Kreimer <algonell@gmail.com>
Link: https://lore.kernel.org/r/20240912124944.43284-1-algonell@gmail.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org> | ```diff
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c
index f85eb41cb084..eb24054f9729 100644
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -222,7 +222,7 @@ static int stm32_pwm_capture(struct pwm_chip *chip, struct pwm_device *pwm,
scale = max_arr / min(max_arr, raw_prd);
} els... |
59921a7397074e90030659bbb74aad372effdeee | Analyze and fix the following issue in the Linux kernel code: pwm: adp5585: Set OSC_EN bit to 1 when PWM state is enabled | Problem Details:
It turns out that OSC_EN bit in GERNERAL_CFG register has to be set to 1
when PWM state is enabled, otherwise PWM signal won't be generated.
Fixes: e9b503879fd2 ("pwm: adp5585: Add Analog Devices ADP5585 support")
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Laurent Pinchart <laurent.pinc... | ```diff
diff --git a/drivers/pwm/pwm-adp5585.c b/drivers/pwm/pwm-adp5585.c
index ed7e8c6bcf32..40472ac5db64 100644
--- a/drivers/pwm/pwm-adp5585.c
+++ b/drivers/pwm/pwm-adp5585.c
@@ -100,6 +100,10 @@ static int pwm_adp5585_apply(struct pwm_chip *chip,
if (ret)
return ret;
+ ret = regmap_set_bits(regmap, ADP5585_... |
a550d6ae4d73dc4b9f1a2b3ad3d8d9e355b396be | Analyze and fix the following issue in the Linux kernel code: pwm: lp3943: Fix an incorrect type in lp3943_pwm_parse_dt() | Problem Details:
The return value from the call to of_property_count_u32_elems() is int.
However, the return value is being assigned to an u32 variable
'num_outputs', so making 'num_outputs' an int.
./drivers/pwm/pwm-lp3943.c:238:6-17: WARNING: Unsigned expression compared with zero: num_outputs <= 0.
Reported-by: Ab... | ```diff
diff --git a/drivers/pwm/pwm-lp3943.c b/drivers/pwm/pwm-lp3943.c
index f0e94c9e5956..90b0733c00c1 100644
--- a/drivers/pwm/pwm-lp3943.c
+++ b/drivers/pwm/pwm-lp3943.c
@@ -218,8 +218,7 @@ static int lp3943_pwm_parse_dt(struct device *dev,
struct lp3943_platform_data *pdata;
struct lp3943_pwm_map *pwm_map;
... |
df40a23cc34c200cfde559eda7ca540f3ae7bd9e | Analyze and fix the following issue in the Linux kernel code: platform/x86: x86-android-tablets: Adjust Xiaomi Pad 2 bottom bezel touch buttons LED | Problem Details:
The "input-events" LED trigger used to turn on the backlight LEDs had to
be rewritten to use led_trigger_register_simple() + led_trigger_event()
to fix a serious locking issue.
This means it no longer supports using blink_brightness to set a per LED
brightness for the trigger and it no longer sets LED... | ```diff
diff --git a/drivers/platform/x86/x86-android-tablets/other.c b/drivers/platform/x86/x86-android-tablets/other.c
index aad7114c43c3..7db8aa58b907 100644
--- a/drivers/platform/x86/x86-android-tablets/other.c
+++ b/drivers/platform/x86/x86-android-tablets/other.c
@@ -670,7 +670,7 @@ static const struct software_... |
06c3c406850e5495bb56ccf624d0c9477e1ba901 | Analyze and fix the following issue in the Linux kernel code: drm/v3d: Appease lockdep while updating GPU stats | Problem Details:
Lockdep thinks our seqcount_t usage is unsafe because the update path can
be both from irq and worker context:
[ ] ================================
[ ] WARNING: inconsistent lock state
[ ] 6.10.3-v8-16k-numa #159 Tainted: G WC
[ ] --------------------------------
[ ] inconsistent {HARDIRQ-... | ```diff
diff --git a/drivers/gpu/drm/v3d/v3d_sched.c b/drivers/gpu/drm/v3d/v3d_sched.c
index f58c38d7de29..99ac4995b5a1 100644
--- a/drivers/gpu/drm/v3d/v3d_sched.c
+++ b/drivers/gpu/drm/v3d/v3d_sched.c
@@ -135,8 +135,31 @@ v3d_job_start_stats(struct v3d_job *job, enum v3d_queue queue)
struct v3d_stats *global_stats ... |
d7333f9d33772ba93f0144b1e3969866f80fdb9a | Analyze and fix the following issue in the Linux kernel code: dmaengine: cirrus: use snprintf() to calm down gcc 13.3.0 | Problem Details:
Even though it's a false positive (highest channel number is "9"), refer to
"struct ep93xx_edma_data edma_m2p", we can avoid new warning by using
snprintf().
drivers/dma/ep93xx_dma.c: In function 'ep93xx_dma_of_probe':
>> drivers/dma/ep93xx_dma.c:1365:51: warning: '%u' directive writing between 1 a... | ```diff
diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c
index 7de04e8ace44..8514b9ab8517 100644
--- a/drivers/dma/ep93xx_dma.c
+++ b/drivers/dma/ep93xx_dma.c
@@ -1404,9 +1404,9 @@ static struct ep93xx_dma_engine *ep93xx_dma_of_probe(struct platform_device *pde
edmac->edma = edma;
if (edma->m2m)... |
f3eeba0645dcb48c90f64ae6193148bf881429a8 | Analyze and fix the following issue in the Linux kernel code: dmaengine: ep93xx: Fix a NULL vs IS_ERR() check in probe() | Problem Details:
This was intended to be an IS_ERR() check, not a NULL check. The
ep93xx_dma_of_probe() function doesn't return NULL pointers.
Fixes: 4e8ad5ed845b ("dmaengine: cirrus: Convert to DT for Cirrus EP93xx")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Alexander Sverdlin <alexander.s... | ```diff
diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c
index 43c4241af7f5..7de04e8ace44 100644
--- a/drivers/dma/ep93xx_dma.c
+++ b/drivers/dma/ep93xx_dma.c
@@ -1504,7 +1504,7 @@ static int ep93xx_dma_probe(struct platform_device *pdev)
int ret;
edma = ep93xx_dma_of_probe(pdev);
- if (!edma)
+ i... |
7427c5b34fbe191451a48c69c392c85b648caa4f | Analyze and fix the following issue in the Linux kernel code: pinctrl: ep93xx: Fix raster pins typo | Problem Details:
Fix raster_on_sdram0_pins used in PMX_GROUP() instead of
raster_on_sdram3_pins as it should be.
Fixes: d1661439f5a3 ("pinctrl: add a Cirrus ep93xx SoC pin controller")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202409130426.1OzNAC9M-lkp@intel.com/
Sign... | ```diff
diff --git a/drivers/pinctrl/pinctrl-ep93xx.c b/drivers/pinctrl/pinctrl-ep93xx.c
index 458cb0e99c65..abafbbb8fd6a 100644
--- a/drivers/pinctrl/pinctrl-ep93xx.c
+++ b/drivers/pinctrl/pinctrl-ep93xx.c
@@ -714,7 +714,7 @@ static const struct ep93xx_pin_group ep9307_pin_groups[] = {
PMX_GROUP("i2s_on_ac97", ac97_... |
20e3aa503feb2deafd4185f50cee0da047f62e21 | Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Allow to trigger VF GuC state restore from debugfs | Problem Details:
For feature enabling and testing purposes, allow to restore saved
or replaced VF GuC state from debugfs, bypassing normal migration
flow. This is available only under strict debug config.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc:... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_debugfs.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_debugfs.c
index e990a63ec998..ccbcf6e572d0 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_debugfs.c
@@ -313,6 +313,9 @@ static const struct {
{ "stop", xe_gt_sriov_pf_... |
d620448fb5673d0705e50e3f73b890a10cfe7c80 | Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Allow to view and replace VF GuC state over debugfs | Problem Details:
For feature enabling and testing purposes, allow to view saved VF
GuC state and to replace it, but only under strict debug config.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Tomasz Lis <tomasz.lis@intel.com>
Reviewed-by: Michał Wi... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_debugfs.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_debugfs.c
index 2290ddaf9594..e990a63ec998 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_debugfs.c
@@ -17,6 +17,7 @@
#include "xe_gt_sriov_pf_control.h"
#include "xe_... |
d86e3737c7ab907690c20bcde7c1f78f42fce6c2 | Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Add functions to save and restore VF GuC state | Problem Details:
To successfully migrate a VM with attached GPU VF we also need to
migrate VF's GuC state. Add necessary functions that interacts with
GuC to save and restore a VF GuC state. We will start using them in
upcoming patches.
Since VF migration requires many more changes in the driver, enable
those function... | ```diff
diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index edfd812e0f41..8f1c5c329f79 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -129,6 +129,7 @@ xe-$(CONFIG_PCI_IOV) += \
xe_gt_sriov_pf.o \
xe_gt_sriov_pf_config.o \
xe_gt_sriov_pf_control.o \
+ xe_gt_s... |
02fdf821ed79f59c40d766a85947aa7cc25d4364 | Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Fix GUC_{SUBMIT,FIRMWARE}_VER helper macros | Problem Details:
Those macros rely on non-existing MAKE_VER_STRUCT macro, while the
correct one that should be used is named MAKE_GUC_VER_STRUCT.
Fixes: 4eb0aab6e443 ("drm/xe/guc: Bump minimum required GuC version to v70.29.2")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Julia Filipchuk <julia.fil... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc.h b/drivers/gpu/drm/xe/xe_guc.h
index c3e6b51f7a09..42116b167c98 100644
--- a/drivers/gpu/drm/xe/xe_guc.h
+++ b/drivers/gpu/drm/xe/xe_guc.h
@@ -18,8 +18,10 @@
*/
#define MAKE_GUC_VER(maj, min, pat) (((maj) << 16) | ((min) << 8) | (pat))
#define MAKE_GUC_VER_STRUCT(ver)... |
a09c17240bdf2e9fa6d0591afa9448b59785f7d4 | Analyze and fix the following issue in the Linux kernel code: io_uring/sqpoll: retain test for whether the CPU is valid | Problem Details:
A recent commit ensured that SQPOLL cannot be setup with a CPU that
isn't in the current tasks cpuset, but it also dropped testing whether
the CPU is valid in the first place. Without that, if a task passes in
a CPU value that is too high, the following KASAN splat can get
triggered:
BUG: KASAN: stack... | ```diff
diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c
index 272df9d00f45..7adfcf6818ff 100644
--- a/io_uring/sqpoll.c
+++ b/io_uring/sqpoll.c
@@ -465,6 +465,8 @@ __cold int io_sq_offload_create(struct io_ring_ctx *ctx,
int cpu = p->sq_thread_cpu;
ret = -EINVAL;
+ if (cpu >= nr_cpu_ids || !cpu_online(cp... |
cb9c2913de481dd02de19023fceabf0814fc9515 | Analyze and fix the following issue in the Linux kernel code: drm/i915/display: fix typo in the comment | Problem Details:
Correctly spelled comments make it easier for the reader to understand
the code.
Replace 'platformas' with 'platforms' in the comment &
replace 'prefere' with 'prefer' in the comment &
replace 'corresponsding' with 'corresponding' in the comment &
replace 'harizontal' with 'horizontal' in the comment.... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index 8caacdd624bd..86403a9318b0 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -426,7 +426,7 @@ static void i... |
e766e6a92410ca269161de059fff0843b8ddd65f | Analyze and fix the following issue in the Linux kernel code: RDMA/cxgb4: Added NULL check for lookup_atid | Problem Details:
The lookup_atid() function can return NULL if the ATID is
invalid or does not exist in the identifier table, which
could lead to dereferencing a null pointer without a
check in the `act_establish()` and `act_open_rpl()` functions.
Add a NULL check to prevent null pointer dereferencing.
Found by Linux ... | ```diff
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 040ba2224f9f..b3757c6a0457 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -1222,6 +1222,8 @@ static int act_establish(struct c4iw_dev *dev, struct sk_buff *skb)
int ret;
ep = loo... |
f9b56b2c31e5733c04464da1b73bafb9eff6569f | Analyze and fix the following issue in the Linux kernel code: s390: Enable KVM_S390_UCONTROL config in debug_defconfig | Problem Details:
To simplify testing enable UCONTROL KVM by default in debug kernels.
Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Link: https://lore.kernel.org/r/20240807154512.316936-11-schlameuss@linux.ibm.com
Signed-off-by: Janosch Frank <frankja... | ```diff
diff --git a/arch/s390/configs/debug_defconfig b/arch/s390/configs/debug_defconfig
index ea63a7342f5f..0c989caed19a 100644
--- a/arch/s390/configs/debug_defconfig
+++ b/arch/s390/configs/debug_defconfig
@@ -59,6 +59,7 @@ CONFIG_CMM=m
CONFIG_APPLDATA_BASE=y
CONFIG_S390_HYPFS_FS=y
CONFIG_KVM=m
+CONFIG_KVM_S390... |
5bab087507ae99250579f1d36071eb6c867065b1 | Analyze and fix the following issue in the Linux kernel code: selftests: kvm: s390: Add VM run test case | Problem Details:
Add test case running code interacting with registers within a
ucontrol VM.
* Add uc_gprs test case
The test uses the same VM setup using the fixture and debug macros
introduced in earlier patches in this series.
Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
Reviewed-by: Janosch Fra... | ```diff
diff --git a/tools/testing/selftests/kvm/s390x/ucontrol_test.c b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
index d103a92e7495..f257beec1430 100644
--- a/tools/testing/selftests/kvm/s390x/ucontrol_test.c
+++ b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
@@ -7,6 +7,7 @@
* Authors:
* Christoph S... |
39c047d4047a1242aeefa87513174b56a91080ab | Analyze and fix the following issue in the Linux kernel code: RDMA/hns: Fix ah error counter in sw stat not increasing | Problem Details:
There are several error cases where hns_roce_create_ah() returns
directly without jumping to sw stat path, thus leading to a problem
that the ah error counter does not increase.
Fixes: ee20cc17e9d8 ("RDMA/hns: Support DSCP")
Fixes: eb7854d63db5 ("RDMA/hns: Support SW stats with debugfs")
Signed-off-by... | ```diff
diff --git a/drivers/infiniband/hw/hns/hns_roce_ah.c b/drivers/infiniband/hw/hns/hns_roce_ah.c
index 3e02c474f59f..4fc5b9d5fea8 100644
--- a/drivers/infiniband/hw/hns/hns_roce_ah.c
+++ b/drivers/infiniband/hw/hns/hns_roce_ah.c
@@ -64,8 +64,10 @@ int hns_roce_create_ah(struct ib_ah *ibah, struct rdma_ah_init_att... |
ec2231b8dd2dc515912ff7816c420153b4a95e92 | Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: Fix AUX IO power enabling for eDP PSR | Problem Details:
Panel Self Refresh on eDP requires the AUX IO power to be enabled
whenever the output (main link) is enabled. This is required by the
AUX_PHY_WAKE/ML_PHY_LOCK signaling initiated by the HW automatically to
re-enable the main link after it got disabled in power saving states
(see eDP v1.4b, sections 5.1... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 00fbe9f8c03a..b1c294236cc8 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -916,7 +916,7 @@ intel_ddi_main_link_aux_domain(struct intel_digital_port *dig... |
fcd33d434d31a210bc9f209b5bfd92f3b91a2dda | Analyze and fix the following issue in the Linux kernel code: drm/i915/display: BMG supports UHBR13.5 | Problem Details:
UHBR20 is not supported by battlemage and the maximum link rate
supported is UHBR13.5
v2: Replace IS_DGFX with IS_BATTLEMAGE (Jani)
HSD: 16023263677
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Fixes: 98b1c87a5e51 ("drm/i915/xe2hpd: Set maxim... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index a1fcedfd404b..b1b512e258ab 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -531,6 +531,10 @@ static void
intel_dp_set_source_rates(struct intel_dp *intel_dp... |
9498f2e24ee0133d486667c9fa4c27ecdaadc272 | Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: Do not wait for PSR being idle on on Panel Replay | Problem Details:
We do not have ALPM on DP Panel Replay. Due to this SRD_STATUS[SRD State]
doesn't change from SRDENT_ON after Panel Replay is enabled until it gets
disabled.
On eDP Panel Replay DEEP_SLEEP is not reached.
_psr2_ready_for_pipe_update_locked is waiting DEEP_SLEEP bit getting reset.
Take these into acco... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 1f83b3b67ea6..3d8037b5401e 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -2784,13 +2784,6 @@ static int _psr1_ready_for_pipe_update_locked(struct intel... |
e6a1c4037227539373c8cf484ace83833e2ad6a2 | Analyze and fix the following issue in the Linux kernel code: drm/omap: Fix locking in omap_gem_new_dmabuf() | Problem Details:
omap_gem_new_dmabuf() creates the new gem object, and then takes and
holds the omap_obj->lock for the rest of the function. This has two
issues:
- omap_gem_free_object(), which is called in the error paths, also takes
the same lock, leading to deadlock
- Even if the above wouldn't happen, in the err... | ```diff
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
index fdae677558f3..b9c67e4ca360 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem.c
@@ -1402,8 +1402,6 @@ struct drm_gem_object *omap_gem_new_dmabuf(struct drm_device *dev, size_t size,
... |
0d76cb1148f3a65f62a18c3fe632f6cd3c2c5871 | Analyze and fix the following issue in the Linux kernel code: drm/omap: Hide sparse warnings | Problem Details:
sparse reports:
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:122:16: warning: incorrect type in argument 1 (different address spaces)
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:122:16: expected void const volatile [noderef] __iomem *addr
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:122:16: got unsigned in... | ```diff
diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
index 1aca3060333e..fcd600024136 100644
--- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
+++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
@@ -119,7 +119,7 @@ static u32 dmm_read_wa(struct dmm *dmm, u32 reg)
* earlier... |
a88fee2d67d9b78c24630a987a88ccf886b2498b | Analyze and fix the following issue in the Linux kernel code: drm/omap: Fix possible NULL dereference | Problem Details:
smatch reports:
drivers/gpu/drm/omapdrm/dss/base.c:176 omapdss_device_disconnect() error: we previously assumed 'src' could be null (see line 169)
This code is mostly from a time when omapdrm had its own display device
model. I can't honestly remember the details, and I don't think it's
worth digging... | ```diff
diff --git a/drivers/gpu/drm/omapdrm/dss/base.c b/drivers/gpu/drm/omapdrm/dss/base.c
index 5f8002f6bb7a..a4ac113e1690 100644
--- a/drivers/gpu/drm/omapdrm/dss/base.c
+++ b/drivers/gpu/drm/omapdrm/dss/base.c
@@ -139,21 +139,13 @@ static bool omapdss_device_is_connected(struct omap_dss_device *dssdev)
}
int o... |
cea9d27705d62984faf6137963c10bf26b967996 | Analyze and fix the following issue in the Linux kernel code: riscv: Remove unused _TIF_WORK_MASK | Problem Details:
Since commit f0bddf50586d ("riscv: entry: Convert to generic entry"),
_TIF_WORK_MASK is no longer used, so remove it.
Fixes: f0bddf50586d ("riscv: entry: Convert to generic entry")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Guo Ren <guoren@kernel.org>
Reviewed-by: Andy Chiu <andy.... | ```diff
diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h
index fca5c6be2b81..5b09dc874151 100644
--- a/arch/riscv/include/asm/thread_info.h
+++ b/arch/riscv/include/asm/thread_info.h
@@ -112,8 +112,4 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src);
... |
5c178472af247c7b50f962495bb7462ba453b9fb | Analyze and fix the following issue in the Linux kernel code: riscv: define ILLEGAL_POINTER_VALUE for 64bit | Problem Details:
This is used in poison.h for poison pointer offset. Based on current
SV39, SV48 and SV57 vm layout, 0xdead000000000000 is a proper value
that is not mappable, this can avoid potentially turning an oops to
an expolit.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Fixes: fbe934d69eb7 ("RISC-V: Build... | ```diff
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 4871220061c4..31d941792369 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -320,6 +320,11 @@ config GENERIC_HWEIGHT
config FIX_EARLYCON_MEM
def_bool MMU
+config ILLEGAL_POINTER_VALUE
+ hex
+ default 0 if 32BIT
+ default 0xdead0000000000... |
c8691cd0fc11197515ed148de0780d927bfca38b | Analyze and fix the following issue in the Linux kernel code: Revert "dm: requeue IO if mapping table not yet available" | Problem Details:
This reverts commit fa247089de9936a46e290d4724cb5f0b845600f5.
The following sequence of commands causes a livelock - there will be
workqueue process looping and consuming 100% CPU:
dmsetup create --notable test
truncate -s 1MiB testdata
losetup /dev/loop0 testdata
dmsetup load test --table '0 2048 li... | ```diff
diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c
index f7e9a3632eb3..499f8cc8a39f 100644
--- a/drivers/md/dm-rq.c
+++ b/drivers/md/dm-rq.c
@@ -496,8 +496,10 @@ static blk_status_t dm_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
map = dm_get_live_table(md, &srcu_idx);
if (unlikely(!map)) {
+ DMERR_LIMIT... |
25f6bd0fb016d4746025a02ed2eb9e7ce642c348 | Analyze and fix the following issue in the Linux kernel code: cifs: Show debug message when SFU Fifo type was detected | Problem Details:
For debugging purposes it is a good idea to show detected SFU type also for
Fifo. Debug message is already print for all other special types.
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com> | ```diff
diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c
index d8c39989840e..70c32b40ede0 100644
--- a/fs/smb/client/inode.c
+++ b/fs/smb/client/inode.c
@@ -541,6 +541,7 @@ cifs_sfu_type(struct cifs_fattr *fattr, const char *path,
fattr->cf_mode &= ~S_IFMT;
if (fattr->cf_eof == 0) {
+ cifs_dbg(FYI, "Fi... |
89c601ab7cb3f520d59a653ddde2dfddd50986fb | Analyze and fix the following issue in the Linux kernel code: cifs: Fix recognizing SFU symlinks | Problem Details:
SFU symlinks have 8 byte prefix: "IntxLNK\1".
So check also the last 8th byte 0x01.
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com> | ```diff
diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c
index 73e2e6c230b7..7d424e769a56 100644
--- a/fs/smb/client/inode.c
+++ b/fs/smb/client/inode.c
@@ -612,7 +612,7 @@ cifs_sfu_type(struct cifs_fattr *fattr, const char *path,
cifs_dbg(FYI, "Socket\n");
fattr->cf_mode |= S_IFSOCK;
fattr->cf_dt... |
9b4af913465cc5f903227237d833b4911430fd97 | Analyze and fix the following issue in the Linux kernel code: smb: client: compress: fix an "illegal accesses" issue | Problem Details:
Using uninitialized value "bkt" when calling "kfree"
Fixes: 13b68d44990d ("smb: client: compress: LZ77 code improvements cleanup")
Signed-off-by: Qianqiang Liu <qianqiang.liu@163.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Steve French <stfrench@microsoft.com> | ```diff
diff --git a/fs/smb/client/compress.c b/fs/smb/client/compress.c
index daf84e39861c..2c008e9f0206 100644
--- a/fs/smb/client/compress.c
+++ b/fs/smb/client/compress.c
@@ -233,7 +233,7 @@ static int collect_sample(const struct iov_iter *iter, ssize_t max, u8 *sample)
static int is_compressible(const struct iov_... |
590efcd3c75f0e1f7208cf1c8dff5452818b70f2 | Analyze and fix the following issue in the Linux kernel code: smb: client: compress: fix a potential issue of freeing an invalid pointer | Problem Details:
The dst pointer may not be initialized when calling kvfree(dst)
Fixes: 13b68d44990d9 ("smb: client: compress: LZ77 code improvements cleanup")
Signed-off-by: Qianqiang Liu <qianqiang.liu@163.com>
Signed-off-by: Steve French <stfrench@microsoft.com> | ```diff
diff --git a/fs/smb/client/compress.c b/fs/smb/client/compress.c
index 65d3d219e8bc..daf84e39861c 100644
--- a/fs/smb/client/compress.c
+++ b/fs/smb/client/compress.c
@@ -318,7 +318,7 @@ int smb_compress(struct TCP_Server_Info *server, struct smb_rqst *rq, compress_s
{
struct iov_iter iter;
u32 slen, dlen;... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.