id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
56f4856b425a30e1d8b3e41e6cde8bfba90ba5f8 | Analyze and fix the following issue in the Linux kernel code: cachefiles: Fix missing pos updates in cachefiles_ondemand_fd_write_iter() | Problem Details:
In the erofs on-demand loading scenario, read and write operations are
usually delivered through "off" and "len" contained in read req in user
mode. Naturally, pwrite is used to specify a specific offset to complete
write operations.
However, if the write(not pwrite) syscall is called multiple times i... | ```diff
diff --git a/fs/cachefiles/ondemand.c b/fs/cachefiles/ondemand.c
index bdd321017f1c..38ca6dce8ef2 100644
--- a/fs/cachefiles/ondemand.c
+++ b/fs/cachefiles/ondemand.c
@@ -77,8 +77,10 @@ static ssize_t cachefiles_ondemand_fd_write_iter(struct kiocb *kiocb,
trace_cachefiles_ondemand_fd_write(object, file_inod... |
10c35abd35aa62c9aac56898ae0c63b4d7d115e5 | Analyze and fix the following issue in the Linux kernel code: cachefiles: Fix incorrect length return value in cachefiles_ondemand_fd_write_iter() | Problem Details:
cachefiles_ondemand_fd_write_iter() function first aligns "pos" and "len"
to block boundaries. When calling __cachefiles_write(), the aligned "pos"
is passed in, but "len" is the original unaligned value(iter->count).
Additionally, the returned length of the write operation is the modified
"len" aligne... | ```diff
diff --git a/fs/cachefiles/ondemand.c b/fs/cachefiles/ondemand.c
index 470c96658385..bdd321017f1c 100644
--- a/fs/cachefiles/ondemand.c
+++ b/fs/cachefiles/ondemand.c
@@ -61,7 +61,7 @@ static ssize_t cachefiles_ondemand_fd_write_iter(struct kiocb *kiocb,
struct cachefiles_object *object = kiocb->ki_filp->priv... |
e82c936293aafb4f33b153c684c37291b3eed377 | Analyze and fix the following issue in the Linux kernel code: btrfs: send: check for read-only send root under critical section | Problem Details:
We're checking if the send root is read-only without being under the
protection of the root's root_item_lock spinlock, which is what protects
the root's flags when clearing the read-only flag, done at
btrfs_ioctl_subvol_setflags(). Furthermore, it should be done in the
same critical section that increm... | ```diff
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 3fcc8113641d..7254279c3cc9 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -8133,7 +8133,12 @@ long btrfs_ioctl_send(struct btrfs_inode *inode, const struct btrfs_ioctl_send_a
spin_unlock(&send_root->root_item_lock);
return -EPERM;
}
- if (btrfs... |
dc058f5fda091abcdccc2487b48dbbc1cdde98d0 | Analyze and fix the following issue in the Linux kernel code: btrfs: send: check for dead send root under critical section | Problem Details:
We're checking if the send root is dead without the protection of the
root's root_item_lock spinlock, which is what protects the root's flags.
The inverse, setting the dead flag on a root, is done under the protection
of that lock, at btrfs_delete_subvolume(). Also checking and updating the
root's send... | ```diff
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index cadb945bb345..3fcc8113641d 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -8125,6 +8125,14 @@ long btrfs_ioctl_send(struct btrfs_inode *inode, const struct btrfs_ioctl_send_a
* making it RW. This also protects against deletion.
*/
spin_lock(&se... |
2342d6595b608eec94187a17dc112dd4c2a812fa | Analyze and fix the following issue in the Linux kernel code: btrfs: fix warning on PTR_ERR() against NULL device at btrfs_control_ioctl() | Problem Details:
Smatch complains about calling PTR_ERR() against a NULL pointer:
fs/btrfs/super.c:2272 btrfs_control_ioctl() warn: passing zero to 'PTR_ERR'
Fix this by calling PTR_ERR() against the device pointer only if it
contains an error.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fd... | ```diff
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 7cd62307cd41..3381389ab93a 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -2254,7 +2254,10 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd,
device = btrfs_scan_one_device(vol->name, BLK_OPEN_READ, false);
if (IS_ERR_OR_... |
80b3695538275e1b2c9a572615175643454b2cb3 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix a typo in btrfs_use_zone_append | Problem Details:
REQ_OP_ZONE_APPNED -> REQ_OP_ZONE_APPEND.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com> | ```diff
diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
index dbcbf754d284..cb32966380f5 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
@@ -1739,7 +1739,7 @@ bool btrfs_use_zone_append(struct btrfs_bio *bbio)
return false;
/*
- * Using REQ_OP_ZONE_APPNED for relocation can break assumptions on the
+ * U... |
b1c5f6eda2d024c187d4d47f0310bc5a1cc8b1d3 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix wrong sizeof in btrfs_do_encoded_write() | Problem Details:
btrfs_do_encoded_write() was converted to use folios in 400b172b8cdc,
but we're still allocating based on sizeof(struct page *) rather than
sizeof(struct folio *). There's no functional change.
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Mark Harmstone <maharmstone@fb.com>
Reviewed-by: Dav... | ```diff
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 6abcfdfe7b30..42e87a0f0946 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -9438,7 +9438,7 @@ ssize_t btrfs_do_encoded_write(struct kiocb *iocb, struct iov_iter *from,
*/
disk_num_bytes = ALIGN(orig_count, fs_info->sectorsize);
nr_folios = DI... |
70958a949d852cbecc3d46127bf0b24786df0130 | Analyze and fix the following issue in the Linux kernel code: btrfs: do not clear read-only when adding sprout device | Problem Details:
If you follow the seed/sprout wiki, it suggests the following workflow:
btrfstune -S 1 seed_dev
mount seed_dev mnt
btrfs device add sprout_dev
mount -o remount,rw mnt
The first mount mounts the FS readonly, which results in not setting
BTRFS_FS_OPEN, and setting the readonly bit on the sb. The device... | ```diff
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index f5bfb4c8adb2..1cccaf9c2b0d 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2842,8 +2842,6 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info, const char *device_path
set_blocksize(device->bdev_file, BTRFS_BDEV_BLOCKSIZE);
if (... |
e7fa845010f12bb98251a2bf9dcf39fd601f9424 | Analyze and fix the following issue in the Linux kernel code: btrfs: rename extent map shrinker members from struct btrfs_fs_info | Problem Details:
The names for the members of struct btrfs_fs_info related to the extent
map shrinker are a bit too long, so rename them to be shorter by replacing
the "extent_map_" prefix with the "em_" prefix.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off... | ```diff
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 0cbc31908264..bcf6e53bc2a7 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -4291,7 +4291,7 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)
cancel_work_sync(&fs_info->async_reclaim_work);
cancel_work_sync(&fs_info->async_data_re... |
1020443840569535f6025a855958f07ea3eebf71 | Analyze and fix the following issue in the Linux kernel code: btrfs: make the extent map shrinker run asynchronously as a work queue job | Problem Details:
Currently the extent map shrinker is run synchronously for kswapd tasks
that end up calling the fs shrinker (fs/super.c:super_cache_scan()).
This has some disadvantages and for some heavy workloads with memory
pressure it can cause some delays and stalls that make a machine
unresponsive for some period... | ```diff
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 02aaee0bc4e3..8ad625a8d9f9 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2785,6 +2785,7 @@ void btrfs_init_fs_info(struct btrfs_fs_info *fs_info)
btrfs_init_scrub(fs_info);
btrfs_init_balance(fs_info);
btrfs_init_async_reclaim_work(... |
2144e1f23f986977acf0ff695a93931517c374d8 | Analyze and fix the following issue in the Linux kernel code: btrfs: correct typos in multiple comments across various files | Problem Details:
Fix some confusing spelling errors that were currently identified,
the details are as follows:
block-group.c: 2800: uncompressible ==> incompressible
extent-tree.c: 3131: EXTEMT ==> EXTENT
extent_io.c: 3124: utlizing ==> utilizing
extent_map.c: 1323: ealier ==> earlier
extent_map.c: 1325: ... | ```diff
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index 4423d8b716a5..4427c1b835e8 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -2797,7 +2797,7 @@ next:
* uncompressed data size, because the compression is only done
* when writeback triggered and we don't know how much ... |
7e06de7c83a746e58d4701e013182af133395188 | Analyze and fix the following issue in the Linux kernel code: btrfs: canonicalize the device path before adding it | Problem Details:
[PROBLEM]
Currently btrfs accepts any file path for its device, resulting some
weird situation:
# ./mount_by_fd /dev/test/scratch1 /mnt/btrfs/
The program has the following source code:
#include <fcntl.h>
#include <stdio.h>
#include <sys/mount.h>
int main(int argc, char *argv[]) {
int fd = o... | ```diff
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 5e75a4e3a5be..5895397364aa 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -732,6 +732,78 @@ const u8 *btrfs_sb_fsid_ptr(const struct btrfs_super_block *sb)
return has_metadata_uuid ? sb->metadata_uuid : sb->fsid;
}
+/*
+ * We can have ... |
2e8b6bc0ab41ce41e6dfcc204b6cc01d5abbc952 | Analyze and fix the following issue in the Linux kernel code: btrfs: avoid unnecessary device path update for the same device | Problem Details:
[PROBLEM]
It is very common for udev to trigger device scan, and every time a
mounted btrfs device got re-scan from different soft links, we will get
some of unnecessary device path updates, this is especially common
for LVM based storage:
# lvs
scratch1 test -wi-ao---- 10.00g
scratch2 test -wi-a... | ```diff
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 920df7585b0d..5e75a4e3a5be 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -732,6 +732,42 @@ const u8 *btrfs_sb_fsid_ptr(const struct btrfs_super_block *sb)
return has_metadata_uuid ? sb->metadata_uuid : sb->fsid;
}
+static bool is_same... |
928b4de66ed3b0d9a6f201ce41ab2eed6ea2e7ef | Analyze and fix the following issue in the Linux kernel code: btrfs: do not assume the full page range is not dirty in extent_writepage_io() | Problem Details:
The function extent_writepage_io() will submit the dirty sectors inside
the page for the write.
But recently to co-operate with the incoming subpage compression
enhancement, a new bitmap is introduced to
btrfs_bio_ctrl::submit_bitmap, to only avoid a subset of the dirty
range.
This is because we can ... | ```diff
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 7620d335f1ec..e5075b95cfd9 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1391,8 +1391,6 @@ static noinline_for_stack int extent_writepage_io(struct btrfs_inode *inode,
goto out;
submitted_io = true;
}
-
- btrfs_folio_asse... |
a4ef54dbb576032ba31a646a5ffc8a26a83cb92c | Analyze and fix the following issue in the Linux kernel code: btrfs: make extent_range_clear_dirty_for_io() to handle sector size < page size cases | Problem Details:
For btrfs with sector size < page size (e.g. 4K sector size, 64K page
size), and enable the sector perfect compression support, then the
following dirty range can lead to problems:
0 32K 64K 96K 128K
| |///////||//////| |/|
124K
In above case,... | ```diff
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 1e4ca1e7d2e5..686d39309410 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -902,7 +902,8 @@ static int extent_range_clear_dirty_for_io(struct inode *inode, u64 start, u64 e
ret = PTR_ERR(folio);
continue;
}
- folio_clear_dirty_for_io(fo... |
90275a7762c85bde21c0884404993ed20e265d86 | Analyze and fix the following issue in the Linux kernel code: btrfs: zstd: make the compression path to handle sector size < page size | Problem Details:
Inside zstd_compress_folios(), after exhausted one input page, we need
to switch to the next page as input.
However when counting the total input bytes (@tot_in), we always increase
it by PAGE_SIZE.
For the following case, it can cause incorrect value:
0 32K 64K 96K... | ```diff
diff --git a/fs/btrfs/zstd.c b/fs/btrfs/zstd.c
index 866607fd3e58..15f8a83165a3 100644
--- a/fs/btrfs/zstd.c
+++ b/fs/btrfs/zstd.c
@@ -495,7 +495,7 @@ int zstd_compress_folios(struct list_head *ws, struct address_space *mapping,
/* Check if we need more input */
if (workspace->in_buf.pos == workspace->i... |
f6ebedb09bb276256e084196e2322562dc4aac10 | Analyze and fix the following issue in the Linux kernel code: btrfs: zlib: make the compression path to handle sector size < page size | Problem Details:
Inside zlib_compress_folios(), each time we switch the input page cache,
the @start is increased by PAGE_SIZE.
But for the incoming compression support for sector size < page size
(previously we support compression only when the range is fully page
aligned), this is not going to handle the following c... | ```diff
diff --git a/fs/btrfs/zlib.c b/fs/btrfs/zlib.c
index 100abc00b794..ddf0d5a448a7 100644
--- a/fs/btrfs/zlib.c
+++ b/fs/btrfs/zlib.c
@@ -194,7 +194,7 @@ int zlib_compress_folios(struct list_head *ws, struct address_space *mapping,
pg_off = offset_in_page(start);
cur_len = btrfs_calc_input_length(orig_en... |
67cd3f22176904e7445fea5f307f6fa2ad1d89e4 | Analyze and fix the following issue in the Linux kernel code: btrfs: split out CONFIG_BTRFS_EXPERIMENTAL from CONFIG_BTRFS_DEBUG | Problem Details:
Currently CONFIG_BTRFS_EXPERIMENTAL is not only for the extra debugging
output, but also for experimental features.
This is not ideal to distinguish planned but not yet stable features
from those purely designed for debugging.
This patch splits the following features into CONFIG_BTRFS_EXPERIMENTAL:
... | ```diff
diff --git a/fs/btrfs/Kconfig b/fs/btrfs/Kconfig
index 4fb925e8c981..fa8515598341 100644
--- a/fs/btrfs/Kconfig
+++ b/fs/btrfs/Kconfig
@@ -78,6 +78,32 @@ config BTRFS_ASSERT
If unsure, say N.
+config BTRFS_EXPERIMENTAL
+ bool "Btrfs experimental features"
+ depends on BTRFS_FS
+ default n
+ help
+ Ena... |
c186345a6b4b8ff082e5ef9515b782704dbba6be | Analyze and fix the following issue in the Linux kernel code: btrfs: make assert_rbio() to only check CONFIG_BTRFS_ASSERT | Problem Details:
According to the description, CONFIG_BTRFS_DEBUG is only for extra
debug info, meanwhile sanity checks should be managed by
CONFIG_BTRFS_ASSERT.
There is no need to check both to enable assert_rbio().
Just remove the check for CONFIG_BTRFS_DEBUG.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@w... | ```diff
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 39bec672df0c..cdd373c27784 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -1272,8 +1272,7 @@ static inline void bio_list_put(struct bio_list *bio_list)
static void assert_rbio(struct btrfs_raid_bio *rbio)
{
- if (!IS_ENABLED(CONFIG_BTRFS_DE... |
8cca35cb29f81eba3e96ec44dad8696c8a2f9138 | Analyze and fix the following issue in the Linux kernel code: btrfs: don't take dev_replace rwsem on task already holding it | Problem Details:
Running fstests btrfs/011 with MKFS_OPTIONS="-O rst" to force the usage of
the RAID stripe-tree, we get the following splat from lockdep:
BTRFS info (device sdd): dev_replace from /dev/sdd (devid 1) to /dev/sdb started
============================================
WARNING: possible recursive lockin... | ```diff
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index 83d5cdd77f29..604399e59a3d 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
@@ -641,6 +641,7 @@ static int btrfs_dev_replace_start(struct btrfs_fs_info *fs_info,
return ret;
down_write(&dev_replace->rwsem);
+ dev_replace->... |
857282b819cbaa0675aaab1e7542e2c0579f52d7 | Analyze and fix the following issue in the Linux kernel code: wifi: brcmfmac: Fix oops due to NULL pointer dereference in brcmf_sdiod_sglist_rw() | Problem Details:
This patch fixes a NULL pointer dereference bug in brcmfmac that occurs
when a high 'sd_sgentry_align' value applies (e.g. 512) and a lot of queued SKBs
are sent from the pkt queue.
The problem is the number of entries in the pre-allocated sgtable, it is
nents = max(rxglom_size, txglom_size) + max(rxg... | ```diff
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
index 17f6b33beabd..42d991d9f8cb 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
@@ -770,7 +77... |
4fa4f049dc0d9741b16c96bcbf0108c85368a2b9 | Analyze and fix the following issue in the Linux kernel code: wifi: ipw2x00: libipw_rx_any(): fix bad alignment | Problem Details:
This patch fixes incorrect code alignment.
./drivers/net/wireless/intel/ipw2x00/libipw_rx.c:871:2-3: code aligned with following code on line 882.
./drivers/net/wireless/intel/ipw2x00/libipw_rx.c:886:2-3: code aligned with following code on line 900.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>... | ```diff
diff --git a/drivers/net/wireless/intel/ipw2x00/libipw_rx.c b/drivers/net/wireless/intel/ipw2x00/libipw_rx.c
index 7e41cb7bbfe0..dc4e91f58bb4 100644
--- a/drivers/net/wireless/intel/ipw2x00/libipw_rx.c
+++ b/drivers/net/wireless/intel/ipw2x00/libipw_rx.c
@@ -867,8 +867,8 @@ void libipw_rx_any(struct libipw_devi... |
b6380944401fa4d9d48e51c963826d1137c0e5cf | Analyze and fix the following issue in the Linux kernel code: KVM: s390: selftests: correct IP.b length in uc_handle_sieic debug output | Problem Details:
The length of the interrupt parameters (IP) are:
a: 2 bytes
b: 4 bytes
Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
Link: https://lore.kernel.org/r/20241107141024.238916-6-schlameuss@linux.ibm.com
[frankja@linux.ibm.com: Fixed patch prefix]
Signed-off-by: Janosch Frank <frankja@linux... | ```diff
diff --git a/tools/testing/selftests/kvm/s390x/ucontrol_test.c b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
index 690077f2c41d..0c112319dab1 100644
--- a/tools/testing/selftests/kvm/s390x/ucontrol_test.c
+++ b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
@@ -376,7 +376,7 @@ static bool uc_handle_sie... |
2e19a3b590ebf2e351fc9d0e7c323430e65b6b6d | Analyze and fix the following issue in the Linux kernel code: wifi: brcmfmac: release 'root' node in all execution paths | Problem Details:
The fixed patch introduced an additional condition to enter the scope
where the 'root' device_node is released (!settings->board_type,
currently 'err'), which avoid decrementing the refcount with a call to
of_node_put() if that second condition is not satisfied.
Move the call to of_node_put() to the p... | ```diff
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
index ae98e371dbfd..c1f18e2fe540 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
@@ -112,9 +112,8 @@ int brcmf... |
59f82bf467c8fd42b015db2dda1ca33c520633bb | Analyze and fix the following issue in the Linux kernel code: KVM: s390: selftests: Fix whitespace confusion in ucontrol test | Problem Details:
Checkpatch thinks that we're doing a multiplication but we're obviously
not. Fix 4 instances where we adhered to wrong checkpatch advice.
Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Link: https://lore.kernel.org/r/20241107141024.238... | ```diff
diff --git a/tools/testing/selftests/kvm/s390x/ucontrol_test.c b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
index adc72ae80e8f..690077f2c41d 100644
--- a/tools/testing/selftests/kvm/s390x/ucontrol_test.c
+++ b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
@@ -370,7 +370,7 @@ static bool uc_handle_ins... |
89be2544579932a7d5cdb5e534dfd00624c5f39f | Analyze and fix the following issue in the Linux kernel code: KVM: s390: selftests: Verify reject memory region operations for ucontrol VMs | Problem Details:
Add a test case verifying KVM_SET_USER_MEMORY_REGION and
KVM_SET_USER_MEMORY_REGION2 cannot be executed on ucontrol VMs.
Executing this test case on not patched kernels will cause a null
pointer dereference in the host kernel.
This is fixed with commit:
commit 7816e58967d0 ("kvm: s390: Reject memory r... | ```diff
diff --git a/tools/testing/selftests/kvm/s390x/ucontrol_test.c b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
index ad95087cc74c..adc72ae80e8f 100644
--- a/tools/testing/selftests/kvm/s390x/ucontrol_test.c
+++ b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
@@ -440,6 +440,28 @@ static void uc_assert_di... |
0185fbc6a2d3cf3cc346d53d91ce6fc5e58c7187 | Analyze and fix the following issue in the Linux kernel code: KVM: s390: selftests: Add uc_skey VM test case | Problem Details:
Add a test case manipulating s390 storage keys from within the ucontrol
VM.
Storage key instruction (ISKE, SSKE and RRBE) intercepts and
Keyless-subset facility are disabled on first use, where the skeys are
setup by KVM in non ucontrol VMs.
Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.c... | ```diff
diff --git a/tools/testing/selftests/kvm/include/s390x/processor.h b/tools/testing/selftests/kvm/include/s390x/processor.h
index 481bd2fd6a32..33fef6fd9617 100644
--- a/tools/testing/selftests/kvm/include/s390x/processor.h
+++ b/tools/testing/selftests/kvm/include/s390x/processor.h
@@ -32,4 +32,10 @@ static inl... |
ae16b0ab3baeb5e969dd8192a185297b96cd56a9 | Analyze and fix the following issue in the Linux kernel code: KVM: s390: selftests: Add uc_map_unmap VM test case | Problem Details:
Add a test case verifying basic running and interaction of ucontrol VMs.
Fill the segment and page tables for allocated memory and map memory on
first access.
* uc_map_unmap
Store and load data to mapped and unmapped memory and use pic segment
translation handling to map memory on access.
Signed-... | ```diff
diff --git a/tools/testing/selftests/kvm/s390x/ucontrol_test.c b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
index f257beec1430..3e649b12a0b9 100644
--- a/tools/testing/selftests/kvm/s390x/ucontrol_test.c
+++ b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
@@ -16,7 +16,11 @@
#include <linux/capabilit... |
c6d0529fb70c14e3ea67ac70211ed4359bbac99d | Analyze and fix the following issue in the Linux kernel code: spi: apple: Remove unnecessary .owner for apple_spi_driver | Problem Details:
Remove .owner field if calls are used which set it automatically.
./drivers/spi/spi-apple.c:522:3-8: No need to set .owner here. The core will do it.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11799
Signed-off-by: Jiapeng Chong <jiapeng.c... | ```diff
diff --git a/drivers/spi/spi-apple.c b/drivers/spi/spi-apple.c
index 1ce91cea89be..d4b126c8701a 100644
--- a/drivers/spi/spi-apple.c
+++ b/drivers/spi/spi-apple.c
@@ -519,7 +519,6 @@ static struct platform_driver apple_spi_driver = {
.probe = apple_spi_probe,
.driver = {
.name = "apple-spi",
- .owner = ... |
f8da001ae7af0abd9f6250c02c01a1121074ca60 | Analyze and fix the following issue in the Linux kernel code: ASoC: audio-graph-card2: Purge absent supplies for device tree nodes | Problem Details:
The audio graph card doesn't mark its subnodes such as multi {}, dpcm {}
and c2c {} as not requiring any suppliers. This causes a hang as Linux
waits for these phantom suppliers to show up on boot.
Make it clear these nodes have no suppliers.
Example error message:
[ 15.208558] platform 2034000.i2s:... | ```diff
diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c
index 4ad3d1b0714f..93eee40cec76 100644
--- a/sound/soc/generic/audio-graph-card2.c
+++ b/sound/soc/generic/audio-graph-card2.c
@@ -270,16 +270,19 @@ static enum graph_type __graph_get_type(struct device_node *lnk)
if... |
e987e22e9229d70c2083a91cc61269b2c4924955 | Analyze and fix the following issue in the Linux kernel code: drm/v3d: Fix performance counter source settings on V3D 7.x | Problem Details:
When the new register addresses were introduced for V3D 7.x, we added
new masks for performance counter sources on V3D 7.x. Nevertheless,
we never apply these new masks when setting the sources.
Fix the performance counter source settings on V3D 7.x by introducing
a new macro, `V3D_SET_FIELD_VER`, wh... | ```diff
diff --git a/drivers/gpu/drm/v3d/v3d_debugfs.c b/drivers/gpu/drm/v3d/v3d_debugfs.c
index 19e3ee7ac897..76816f2551c1 100644
--- a/drivers/gpu/drm/v3d/v3d_debugfs.c
+++ b/drivers/gpu/drm/v3d/v3d_debugfs.c
@@ -237,8 +237,8 @@ static int v3d_measure_clock(struct seq_file *m, void *unused)
if (v3d->ver >= 40) {
... |
9a884bdb6e9560c6da44052d5248e89d78c983a6 | Analyze and fix the following issue in the Linux kernel code: iio: magnetometer: fix if () scoped_guard() formatting | Problem Details:
Add mising braces after an if condition that contains scoped_guard().
This style is both preferred and necessary here, to fix warning after
scoped_guard() change in commit fcc22ac5baf0 ("cleanup: Adjust
scoped_guard() macros to avoid potential warning") to have if-else inside
of the macro. Current (no... | ```diff
diff --git a/drivers/iio/magnetometer/af8133j.c b/drivers/iio/magnetometer/af8133j.c
index d81d89af6283..acd291f3e792 100644
--- a/drivers/iio/magnetometer/af8133j.c
+++ b/drivers/iio/magnetometer/af8133j.c
@@ -312,10 +312,11 @@ static int af8133j_set_scale(struct af8133j_data *data,
* When suspended, just s... |
2e71e8bc6f02275a67bcb882779ab6d21abc68c4 | Analyze and fix the following issue in the Linux kernel code: perf/x86/amd/uncore: Avoid a false positive warning about snprintf truncation in amd_uncore_umc_ctx_init | Problem Details:
Fix the following warning:
CC [M] arch/x86/events/amd/uncore.o
arch/x86/events/amd/uncore.c: In function ‘amd_uncore_umc_ctx_init’:
arch/x86/events/amd/uncore.c:951:52: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 8 [-Wformat-truncation=]
s... | ```diff
diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/uncore.c
index 0bfde2ea5cb8..49c26ce2b115 100644
--- a/arch/x86/events/amd/uncore.c
+++ b/arch/x86/events/amd/uncore.c
@@ -916,7 +916,8 @@ int amd_uncore_umc_ctx_init(struct amd_uncore *uncore, unsigned int cpu)
u8 group_num_pmcs[UNCORE_GROUP_MAX... |
5c2e7736e20d9b348a44cafbfa639fe2653fbc34 | Analyze and fix the following issue in the Linux kernel code: rust: helpers: Avoid raw_spin_lock initialization for PREEMPT_RT | Problem Details:
When PREEMPT_RT=y, spin locks are mapped to rt_mutex types, so using
spinlock_check() + __raw_spin_lock_init() to initialize spin locks is
incorrect, and would cause build errors.
Introduce __spin_lock_init() to initialize a spin lock with lockdep
rquired information for PREEMPT_RT builds, and use it ... | ```diff
diff --git a/include/linux/spinlock_rt.h b/include/linux/spinlock_rt.h
index f9f14e135be7..f6499c37157d 100644
--- a/include/linux/spinlock_rt.h
+++ b/include/linux/spinlock_rt.h
@@ -16,22 +16,21 @@ static inline void __rt_spin_lock_init(spinlock_t *lock, const char *name,
}
#endif
-#define spin_lock_init(s... |
60f0108bccc8382ef131b6c4c9a8c0c5644fffd3 | Analyze and fix the following issue in the Linux kernel code: rtc: bbnsm: add remove hook | Problem Details:
Without remove hook to clear wake irq, there will be kernel dump when
doing module test.
"bbnsm_rtc 44440000.bbnsm:rtc: wake irq already initialized"
Add remove hook to clear wake irq and set wakeup to false.
Fixes: eb7b85853c38 ("rtc: bbnsm: Add the bbnsm rtc support")
Signed-off-by: Peng Fan <peng.... | ```diff
diff --git a/drivers/rtc/rtc-nxp-bbnsm.c b/drivers/rtc/rtc-nxp-bbnsm.c
index acbfbeb8b070..fa3b0328c7a2 100644
--- a/drivers/rtc/rtc-nxp-bbnsm.c
+++ b/drivers/rtc/rtc-nxp-bbnsm.c
@@ -197,13 +197,28 @@ static int bbnsm_rtc_probe(struct platform_device *pdev)
if (ret) {
dev_err(&pdev->dev, "failed to request... |
f8f6224948d83792e9eef798d8a2407e91a51331 | Analyze and fix the following issue in the Linux kernel code: mtd: spi-nor: winbond: add "w/ and w/o SFDP" comment | Problem Details:
Commit d35df77707bf ("mtd: spi-nor: winbond: fix w25q128 regression")
upstream fixed a regression for flavors of 0xef4018 flash that don't
define SFDP tables. Add a comment on the flash definition highlighting
that there are flavors of flashes with and without SFDP support.
It spares developers searchi... | ```diff
diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
index 9f7ce5763e71..8d0a00d69e12 100644
--- a/drivers/mtd/spi-nor/winbond.c
+++ b/drivers/mtd/spi-nor/winbond.c
@@ -129,6 +129,7 @@ static const struct flash_info winbond_nor_parts[] = {
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | ... |
3b6b99ef15ea37635604992ede9ebcccef38a239 | Analyze and fix the following issue in the Linux kernel code: ovl: properly handle large files in ovl_security_fileattr | Problem Details:
dentry_open in ovl_security_fileattr fails for any file
larger than 2GB if open method of the underlying filesystem
calls generic_file_open (e.g. fusefs).
The issue can be reproduce using the following script:
(passthrough_ll is an example app from libfuse).
$ D=/opt/test/mnt
$ mkdir -p ${D}/{sou... | ```diff
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index 35fd3e3e1778..baa54c718bd7 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -616,8 +616,13 @@ static int ovl_security_fileattr(const struct path *realpath, struct fileattr *f
struct file *file;
unsigned int cmd;
int err;
+ unsig... |
b08d1274e3fe70eb3e9b13e8af835032bf792f7e | Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: demote source OUI read/write failure logging to debug | Problem Details:
Commit 1f12d63a14d7 ("drm/i915/dp: Write the source OUI for non-eDP
sinks as well") started writing source OUI for non-eDP sinks as well,
increasing the possibilities of hitting read/write failures either due
to the sink behaviour or hotplug or whatever.
Even before that, commit 3fb0501f0c07 ("drm/i91... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 5b918363df16..95c71e425fbe 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -3432,7 +3432,7 @@ void intel_dp_sink_disable_decompression(struct intel_atomic_st... |
4e4d9c72c946b77f0278988d0bf1207fa1b2cd0f | Analyze and fix the following issue in the Linux kernel code: kasan: delete CONFIG_KASAN_MODULE_TEST | Problem Details:
Since we've migrated all tests to the KUnit framework, we can delete
CONFIG_KASAN_MODULE_TEST and mentioning of it in the documentation as
well.
I've used the online translator to modify the non-English documentation.
[snovitoll@gmail.com: fix indentation in translation]
Link: https://lkml.kernel.o... | ```diff
diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst
index d7de44f5339d..0a1418ab72fd 100644
--- a/Documentation/dev-tools/kasan.rst
+++ b/Documentation/dev-tools/kasan.rst
@@ -511,19 +511,14 @@ Tests
~~~~~
There are KASAN tests that allow verifying that KASAN works and can det... |
ae193dd79398970ee760e0c8129ac42ef8f5c6ff | Analyze and fix the following issue in the Linux kernel code: kasan: move checks to do_strncpy_from_user | Problem Details:
Patch series "kasan: migrate the last module test to kunit", v4.
copy_user_test() is the last KUnit-incompatible test with
CONFIG_KASAN_MODULE_TEST requirement, which we are going to migrate to
KUnit framework and delete the former test and Kconfig as well.
In this patch series:
- [1/3] move kasan_... | ```diff
diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c
index 989a12a67872..6dc234913dd5 100644
--- a/lib/strncpy_from_user.c
+++ b/lib/strncpy_from_user.c
@@ -120,6 +120,9 @@ long strncpy_from_user(char *dst, const char __user *src, long count)
if (unlikely(count <= 0))
return 0;
+ kasan_check_wr... |
e7ac4daeed91a25382091e73818ea0cddb1afd5e | Analyze and fix the following issue in the Linux kernel code: mm: count zeromap read and set for swapout and swapin | Problem Details:
When the proportion of folios from the zeromap is small, missing their
accounting may not significantly impact profiling. However, it's easy to
construct a scenario where this becomes an issue—for example, allocating
1 GB of memory, writing zeros from userspace, followed by MADV_PAGEOUT,
and then swap... | ```diff
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 69af2173555f..6d02168d78be 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -1599,6 +1599,15 @@ The following nested keys are defined.
pglazyfreed (npn)
... |
2642084f26b5a5e9353fa530efb30f49e752185d | Analyze and fix the following issue in the Linux kernel code: bcachefs: Allow for unknown key types in backpointers fsck | Problem Details:
We can't assume that btrees only contain keys of a given type - even if
they only have a single key type listed in the allowed key types for
that btree; this is a forwards compatibility issue.
Reported-by: syzbot+a27c3aaa3640dd3e1dfb@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overs... | ```diff
diff --git a/fs/bcachefs/backpointers.c b/fs/bcachefs/backpointers.c
index ed344400c8bd..654a58132a4d 100644
--- a/fs/bcachefs/backpointers.c
+++ b/fs/bcachefs/backpointers.c
@@ -952,9 +952,13 @@ int bch2_check_extents_to_backpointers(struct bch_fs *c)
static int check_one_backpointer(struct btree_trans *trans... |
0b6ec0c5ac6c9e80a6157cbc5631802c81a674d7 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix assertion pop in topology repair | Problem Details:
Fixes: baefd3f849ed ("bcachefs: btree_cache.freeable list fixes")
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/btree_gc.c b/fs/bcachefs/btree_gc.c
index 0ca3feeb42c8..81dcf9e512c0 100644
--- a/fs/bcachefs/btree_gc.c
+++ b/fs/bcachefs/btree_gc.c
@@ -182,7 +182,7 @@ static int set_node_max(struct bch_fs *c, struct btree *b, struct bpos new_max)
bch2_btree_node_drop_keys_outside_node(b);
mute... |
172bf5ed04cb6c9e66d58de003938ed5c8756570 | Analyze and fix the following issue in the Linux kernel code: cpufreq: mediatek-hw: Fix wrong return value in mtk_cpufreq_get_cpu_power() | Problem Details:
mtk_cpufreq_get_cpu_power() return 0 if the policy is NULL. Then in
em_create_perf_table(), the later zero check for power is not invalid
as power is uninitialized. As Lukasz suggested, it must return -EINVAL when
the 'policy' is not found. So return -EINVAL to fix it.
Cc: stable@vger.kernel.org
Fixes... | ```diff
diff --git a/drivers/cpufreq/mediatek-cpufreq-hw.c b/drivers/cpufreq/mediatek-cpufreq-hw.c
index 8925e096d5b9..aeb5e6304542 100644
--- a/drivers/cpufreq/mediatek-cpufreq-hw.c
+++ b/drivers/cpufreq/mediatek-cpufreq-hw.c
@@ -62,7 +62,7 @@ mtk_cpufreq_get_cpu_power(struct device *cpu_dev, unsigned long *uW,
po... |
b51eb0874d8170028434fbd259e80b78ed9b8eca | Analyze and fix the following issue in the Linux kernel code: cpufreq: CPPC: Fix wrong return value in cppc_get_cpu_power() | Problem Details:
cppc_get_cpu_power() return 0 if the policy is NULL. Then in
em_create_perf_table(), the later zero check for power is not valid
as power is uninitialized. As Quentin pointed out, kernel energy model
core check the return value of active_power() first, so if the callback
failed it should tell the core.... | ```diff
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index 4e1d0c7ccb1f..c68ac76810aa 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -405,7 +405,7 @@ static int cppc_get_cpu_power(struct device *cpu_dev,
policy = cpufreq_cpu_get_raw(cpu_dev->id);
... |
be392aa80f1e5b0b65ccc2a540b9304fefcfe3d8 | Analyze and fix the following issue in the Linux kernel code: cpufreq: CPPC: Fix wrong return value in cppc_get_cpu_cost() | Problem Details:
cppc_get_cpu_cost() return 0 if the policy is NULL. Then in
em_compute_costs(), the later zero check for cost is not valid
as cost is uninitialized. As Quentin pointed out, kernel energy model
core check the return value of get_cost() first, so if the callback
failed it should tell the core. Return -EI... | ```diff
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index 956d672c6d57..4e1d0c7ccb1f 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -475,7 +475,7 @@ static int cppc_get_cpu_cost(struct device *cpu_dev, unsigned long KHz,
policy = cpufreq_cpu_get_... |
db01e46689e9a986ca6b5d2f41b57d7a81551a4f | Analyze and fix the following issue in the Linux kernel code: cpufreq: loongson3: Check for error code from devm_mutex_init() call | Problem Details:
Even if it's not critical, the avoidance of checking the error code
from devm_mutex_init() call today diminishes the point of using devm
variant of it. Tomorrow it may even leak something. Add the missed
check.
Fixes: ccf51454145b ("cpufreq: Add Loongson-3 CPUFreq driver support")
Signed-off-by: Andy ... | ```diff
diff --git a/drivers/cpufreq/loongson3_cpufreq.c b/drivers/cpufreq/loongson3_cpufreq.c
index 6b5e6798d9a2..a923e196ec86 100644
--- a/drivers/cpufreq/loongson3_cpufreq.c
+++ b/drivers/cpufreq/loongson3_cpufreq.c
@@ -346,8 +346,11 @@ static int loongson3_cpufreq_probe(struct platform_device *pdev)
{
int i, ret... |
8c776a54d9ef3e945db2fe407ad6ad4525422943 | Analyze and fix the following issue in the Linux kernel code: cpufreq: scmi: Fix cleanup path when boost enablement fails | Problem Details:
Include free_cpufreq_table in the cleanup path when boost enablement fails.
cc: stable@vger.kernel.org
Fixes: a8e949d41c72 ("cpufreq: scmi: Enable boost support")
Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> | ```diff
diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index 5892c73e129d..07d6f9a9b7c8 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -287,7 +287,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
ret = cpufreq_enable_boost_support();
... |
63a24cf8cc330e5a68ebd2e20ae200096974c475 | Analyze and fix the following issue in the Linux kernel code: m68k: coldfire/device.c: only build FEC when HW macros are defined | Problem Details:
When CONFIG_FEC is set (due to COMPILE_TEST) along with
CONFIG_M54xx, coldfire/device.c has compile errors due to
missing MCFEC_* and MCF_IRQ_FEC_* symbols.
Make the whole FEC blocks dependent on having the HW macros
defined, rather than on CONFIG_FEC itself.
This fix is very similar to commit e6e1e7... | ```diff
diff --git a/arch/m68k/coldfire/device.c b/arch/m68k/coldfire/device.c
index 7dab46728aed..b6958ec2a220 100644
--- a/arch/m68k/coldfire/device.c
+++ b/arch/m68k/coldfire/device.c
@@ -93,7 +93,7 @@ static struct platform_device mcf_uart = {
.dev.platform_data = mcf_uart_platform_data,
};
-#if IS_ENABLED(CON... |
f212140962c93cd5da43283a18e31681540fc23d | Analyze and fix the following issue in the Linux kernel code: m68k: mcfgpio: Fix incorrect register offset for CONFIG_M5441x | Problem Details:
Fix a typo in the CONFIG_M5441x preprocessor condition, where the GPIO
register offset was incorrectly set to 8 instead of 0. This prevented
proper GPIO configuration for m5441x targets.
Fixes: bea8bcb12da0 ("m68knommu: Add support for the Coldfire m5441x.")
Signed-off-by: Jean-Michel Hautbois <jeanmi... | ```diff
diff --git a/arch/m68k/include/asm/mcfgpio.h b/arch/m68k/include/asm/mcfgpio.h
index 019f24439546..9c91ecdafc45 100644
--- a/arch/m68k/include/asm/mcfgpio.h
+++ b/arch/m68k/include/asm/mcfgpio.h
@@ -136,7 +136,7 @@ static inline void gpio_free(unsigned gpio)
* read-modify-write as well as those controlled by ... |
75c1fd41a671a0843b89d1526411a837a7163fa2 | Analyze and fix the following issue in the Linux kernel code: rust: fix size_t in bindgen prototypes of C builtins | Problem Details:
Without `-fno-builtin`, for functions like memcpy/memmove (and many
others), bindgen seems to be using the clang-provided prototype. This
prototype is ABI-wise compatible, but the issue is that it does not have
the same information as the source code w.r.t. typedefs.
For example, bindgen generates the... | ```diff
diff --git a/rust/Makefile b/rust/Makefile
index 6daaa4dc21db..fcec0e1d9762 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -264,7 +264,11 @@ else
bindgen_c_flags_lto = $(bindgen_c_flags)
endif
-bindgen_c_flags_final = $(bindgen_c_flags_lto) -D__BINDGEN__
+# `-fno-builtin` is passed to avoid `bindgen` fro... |
ccae49e5cf6ebda1a7fa5d2ca99500987c7420c4 | Analyze and fix the following issue in the Linux kernel code: hwmon: (nct6775) Add 665-ACE/600M-CL to ASUS WMI monitoring list | Problem Details:
Boards such as
* Pro WS 665-ACE
* Pro WS 600M-CL
have got a nct6775 chip, but by default there's no use of it
because of resource conflict with WMI method.
Add affected boards to the WMI monitoring list.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Co-developed-by: Tommy Giesler <tommy.gi... | ```diff
diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c
index 096f1daa8f2b..1218a3b449a8 100644
--- a/drivers/hwmon/nct6775-platform.c
+++ b/drivers/hwmon/nct6775-platform.c
@@ -1350,6 +1350,8 @@ static const char * const asus_msi_boards[] = {
"Pro H610M-CT D4",
"Pro H610T D4",
"P... |
edeed7b6666cd02bd7e370b47573d95bc9b0f51c | Analyze and fix the following issue in the Linux kernel code: hwmon: (max31827) Fix spelling errors reported by codespell | Problem Details:
Below mentioned spelling errors reported by codesepll
were fixed:
respresents ==> represents
signifcant ==> significant
bandwitdh ==> bandwidth
Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
Message-ID: <20241001011521.80982-1-everestkc@everestkc.com.np>
Signed-off-by: Guenter Roeck <linu... | ```diff
diff --git a/Documentation/hwmon/max31827.rst b/Documentation/hwmon/max31827.rst
index 9c11a9518c67..6cc5088b26b7 100644
--- a/Documentation/hwmon/max31827.rst
+++ b/Documentation/hwmon/max31827.rst
@@ -136,7 +136,7 @@ PEC Support
When reading a register value, the PEC byte is computed and sent by the chip.
... |
ace149e0830c380ddfce7e466fe860ca502fe4ee | Analyze and fix the following issue in the Linux kernel code: filemap: Fix bounds checking in filemap_read() | Problem Details:
If the caller supplies an iocb->ki_pos value that is close to the
filesystem upper limit, and an iterator with a count that causes us to
overflow that limit, then filemap_read() enters an infinite loop.
This behaviour was discovered when testing xfstests generic/525 with the
"localio" optimisation for... | ```diff
diff --git a/mm/filemap.c b/mm/filemap.c
index 36d22968be9a..56fa431c52af 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2625,7 +2625,7 @@ ssize_t filemap_read(struct kiocb *iocb, struct iov_iter *iter,
if (unlikely(!iov_iter_count(iter)))
return 0;
- iov_iter_truncate(iter, inode->i_sb->s_maxbytes);
+... |
b6cd7adec0cf03f0aefc55676e71dd721cbc71a8 | Analyze and fix the following issue in the Linux kernel code: rtc: st-lpc: Use IRQF_NO_AUTOEN flag in request_irq() | Problem Details:
If request_irq() fails in st_rtc_probe(), there is no need to enable
the irq, and if it succeeds, 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: b5b2bdfc2893 ("rtc: st: A... | ```diff
diff --git a/drivers/rtc/rtc-st-lpc.c b/drivers/rtc/rtc-st-lpc.c
index d492a2d26600..c6d4522411b3 100644
--- a/drivers/rtc/rtc-st-lpc.c
+++ b/drivers/rtc/rtc-st-lpc.c
@@ -218,15 +218,14 @@ static int st_rtc_probe(struct platform_device *pdev)
return -EINVAL;
}
- ret = devm_request_irq(&pdev->dev, rtc->ir... |
5127135f738e3d7513fa416ac65b203698d4192d | Analyze and fix the following issue in the Linux kernel code: rtc: Makefile: Replace spaces with tab. | Problem Details:
Fix a style error.
Signed-off-by: Tóth János <gomba007@gmail.com>
Link: https://lore.kernel.org/r/20240930-rtc-makefile-spaces-v1-1-e936e0a7b02a@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> | ```diff
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 184d2f3cf743..b0dc6b648570 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -165,7 +165,7 @@ obj-$(CONFIG_RTC_DRV_S5M) += rtc-s5m.o
obj-$(CONFIG_RTC_DRV_SA1100) += rtc-sa1100.o
obj-$(CONFIG_RTC_DRV_SC27XX) += rtc-sc27xx.o
obj-$(CON... |
8f315a5c7376b2bc324d62a8400184da77f25e28 | Analyze and fix the following issue in the Linux kernel code: rtc: renesas-rtca3: Fix compilation error on RISC-V | Problem Details:
Fix the following compilation errors when building the RTCA3 for RISCV:
../drivers/rtc/rtc-renesas-rtca3.c:270:23: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
270 | tm->tm_sec = bcd2bin(FIEL... | ```diff
diff --git a/drivers/rtc/rtc-renesas-rtca3.c b/drivers/rtc/rtc-renesas-rtca3.c
index abb0f6f73906..d127933bfc8a 100644
--- a/drivers/rtc/rtc-renesas-rtca3.c
+++ b/drivers/rtc/rtc-renesas-rtca3.c
@@ -5,6 +5,7 @@
* Copyright (C) 2024 Renesas Electronics Corp.
*/
#include <linux/bcd.h>
+#include <linux/bitfie... |
6b526d17eed850352d880b93b9bf20b93006bd92 | Analyze and fix the following issue in the Linux kernel code: RDMA/hns: Fix NULL pointer derefernce in hns_roce_map_mr_sg() | Problem Details:
ib_map_mr_sg() allows ULPs to specify NULL as the sg_offset argument.
The driver needs to check whether it is a NULL pointer before
dereferencing it.
Fixes: d387d4b54eb8 ("RDMA/hns: Fix missing pagesize and alignment check in FRMR")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: http... | ```diff
diff --git a/drivers/infiniband/hw/hns/hns_roce_mr.c b/drivers/infiniband/hw/hns/hns_roce_mr.c
index b3f4327d0e64..bf30b3a65a9b 100644
--- a/drivers/infiniband/hw/hns/hns_roce_mr.c
+++ b/drivers/infiniband/hw/hns/hns_roce_mr.c
@@ -435,15 +435,16 @@ static int hns_roce_set_page(struct ib_mr *ibmr, u64 addr)
}
... |
5dbcb1c1900f45182b5651c89257c272f1f3ead7 | Analyze and fix the following issue in the Linux kernel code: RDMA/hns: Fix out-of-order issue of requester when setting FENCE | Problem Details:
The FENCE indicator in hns WQE doesn't ensure that response data from
a previous Read/Atomic operation has been written to the requester's
memory before the subsequent Send/Write operation is processed. This
may result in the subsequent Send/Write operation accessing the original
data in memory instead... | ```diff
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index d1c075fb0ad8..707e96ce222c 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -575,7 +575,7 @@ static inline int set_rc_wqe(struct hns_roce_qp *qp,
... |
44e5d21e6d3fd2a1fed7f0327cf72e99397e2eaf | Analyze and fix the following issue in the Linux kernel code: powerpc/pseries: Fix KVM guest detection for disabling hardlockup detector | Problem Details:
As per the kernel documentation[1], hardlockup detector should
be disabled in KVM guests as it may give false positives. On
PPC, hardlockup detector is enabled inside KVM guests because
disable_hardlockup_detector() is marked as early_initcall and it
relies on kvm_guest static key (is_kvm_guest()) whic... | ```diff
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 22f83fbbc762..1edc7cd68c10 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -920,6 +920,7 @@ static int __init disable_hardlockup_detector(void)
hardlockup_detector_disable();
#else
if (fir... |
fb90dca828b6070709093934c6dec56489a2d91d | Analyze and fix the following issue in the Linux kernel code: fadump: reserve param area if below boot_mem_top | Problem Details:
The param area is a memory region where the kernel places additional
command-line arguments for fadump kernel. Currently, the param memory
area is reserved in fadump kernel if it is above boot_mem_top. However,
it should be reserved if it is below boot_mem_top because the fadump
kernel already reserves... | ```diff
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 5583017bbfbc..4b371c738213 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -153,7 +153,7 @@ void __init fadump_append_bootargs(void)
if (!fw_dump.dump_active || !fw_dump.param_area_supported || !fw_d... |
f4892c68ecc1cf45e41a78820dd2eebccc945b66 | Analyze and fix the following issue in the Linux kernel code: powerpc/fadump: allocate memory for additional parameters early | Problem Details:
Memory for passing additional parameters to fadump capture kernel
is allocated during subsys_initcall level, using memblock. But
as slab is already available by this time, allocation happens via
the buddy allocator. This may work for radix MMU but is likely to
fail in most cases for hash MMU as hash MM... | ```diff
diff --git a/arch/powerpc/include/asm/fadump.h b/arch/powerpc/include/asm/fadump.h
index 3638f04447f5..a48f54dde4f6 100644
--- a/arch/powerpc/include/asm/fadump.h
+++ b/arch/powerpc/include/asm/fadump.h
@@ -19,6 +19,7 @@ extern int is_fadump_active(void);
extern int should_fadump_crash(void);
extern void cras... |
cfec8463d9a19ec043845525fe5fd675e59a8aab | Analyze and fix the following issue in the Linux kernel code: powerpc/ftrace: Fix ftrace bug with KASAN=y | Problem Details:
Booting a KASAN=y kernel with the recently added ftrace out-of-line
support causes a warning at boot:
------------[ cut here ]------------
Stub index overflow (1729 > 1728)
WARNING: CPU: 0 PID: 0 at arch/powerpc/kernel/trace/ftrace.c:209 ftrace_init_nop+0x408/0x444
...
NIP ftrace_init_nop+0x... | ```diff
diff --git a/arch/powerpc/tools/ftrace-gen-ool-stubs.sh b/arch/powerpc/tools/ftrace-gen-ool-stubs.sh
index 950a7778324b..bac186bdf64a 100755
--- a/arch/powerpc/tools/ftrace-gen-ool-stubs.sh
+++ b/arch/powerpc/tools/ftrace-gen-ool-stubs.sh
@@ -15,10 +15,11 @@ if [ -z "$is_64bit" ]; then
RELOCATION=R_PPC_ADDR32... |
de9df030ccb5d3e31ee0c715d74cd77c619748f8 | Analyze and fix the following issue in the Linux kernel code: usb: typec: ucsi: glink: be more precise on orientation-aware ports | Problem Details:
Instead of checking if any of the USB-C ports have orientation GPIO and
thus is orientation-aware, check for the GPIO for the port being
registered. There are no boards that are affected by this change at this
moment, so the patch is not marked as a fix, but it might affect other
boards in future.
Rev... | ```diff
diff --git a/drivers/usb/typec/ucsi/ucsi_glink.c b/drivers/usb/typec/ucsi/ucsi_glink.c
index 2e12758000a7..90948cd6d297 100644
--- a/drivers/usb/typec/ucsi/ucsi_glink.c
+++ b/drivers/usb/typec/ucsi/ucsi_glink.c
@@ -172,12 +172,12 @@ static int pmic_glink_ucsi_async_control(struct ucsi *__ucsi, u64 command)
sta... |
4a22918810980897393fa1776ea3877e4baf8cca | Analyze and fix the following issue in the Linux kernel code: usb: typec: ucsi: glink: fix off-by-one in connector_status | Problem Details:
UCSI connector's indices start from 1 up to 3, PMIC_GLINK_MAX_PORTS.
Correct the condition in the pmic_glink_ucsi_connector_status()
callback, fixing Type-C orientation reporting for the third USB-C
connector.
Fixes: 76716fd5bf09 ("usb: typec: ucsi: glink: move GPIO reading into connector_status callb... | ```diff
diff --git a/drivers/usb/typec/ucsi/ucsi_glink.c b/drivers/usb/typec/ucsi/ucsi_glink.c
index 3e4d88ab338e..2e12758000a7 100644
--- a/drivers/usb/typec/ucsi/ucsi_glink.c
+++ b/drivers/usb/typec/ucsi/ucsi_glink.c
@@ -185,7 +185,7 @@ static void pmic_glink_ucsi_connector_status(struct ucsi_connector *con)
struct... |
c4dab0828c13b962c8cd3c20e5d02487e0944e7d | Analyze and fix the following issue in the Linux kernel code: mei: vsc: Improve error logging in vsc_identify_silicon() | Problem Details:
vsc_identify_silicon() returns -EINVAL in various places without logging
what is going on.
And there are several bug reports about mei_vsc_hw_reset() failing with
-EINVAL before the "silicon stepping version is %u:%u" message get logged,
indicating this is coming from vsc_identify_silicon():
[ 10.9... | ```diff
diff --git a/drivers/misc/mei/vsc-fw-loader.c b/drivers/misc/mei/vsc-fw-loader.c
index 9f129bc641f6..0d7e17322869 100644
--- a/drivers/misc/mei/vsc-fw-loader.c
+++ b/drivers/misc/mei/vsc-fw-loader.c
@@ -317,28 +317,34 @@ static int vsc_identify_silicon(struct vsc_fw_loader *fw_loader)
cmd->data.dump_mem.addr ... |
77adf4b1f3e1fdb319f7ee515e5924bb77df3916 | Analyze and fix the following issue in the Linux kernel code: spmi: pmic-arb: fix return path in for_each_available_child_of_node() | Problem Details:
This loop requires explicit calls to of_node_put() upon early exits
(break, goto, return) to decrement the child refcounter and avoid memory
leaks if the child is not required out of the loop.
A more robust solution is using the scoped variant of the macro, which
automatically calls of_node_put() when... | ```diff
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index 9ba9495fcc4b..ea843159b745 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -1763,14 +1763,13 @@ static int spmi_pmic_arb_register_buses(struct spmi_pmic_arb *pmic_arb,
{
struct device *dev = &pdev->... |
5852357d553829e972eeb575b5b3e39fc573addd | Analyze and fix the following issue in the Linux kernel code: cdx: Fix cdx_mmap_resource() after constifying attr in ->mmap() | Problem Details:
Commit 94a20fb9af16 ("sysfs: treewide: constify attribute callback of
bin_attribute::mmap()") missed updating the attr parameter of
cdx_mmap_resource(), resulting in a build failure.
drivers/cdx/cdx.c: In function 'cdx_create_res_attr':
drivers/cdx/cdx.c:773:24: error: assignment to 'int (*)(struc... | ```diff
diff --git a/drivers/cdx/cdx.c b/drivers/cdx/cdx.c
index 07371cb653d3..316bd89a95ca 100644
--- a/drivers/cdx/cdx.c
+++ b/drivers/cdx/cdx.c
@@ -707,7 +707,7 @@ static const struct vm_operations_struct cdx_phys_vm_ops = {
* Return: true on success, false otherwise.
*/
static int cdx_mmap_resource(struct file... |
2496b2aaacf137250f4ca449f465e2cadaabb0e8 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: allwinner: pinephone: Add mount matrix to accelerometer | Problem Details:
The way InvenSense MPU-6050 accelerometer is mounted on the user-facing side
of the Pine64 PinePhone mainboard, which makes it rotated 90 degrees counter-
clockwise, [1] requires the accelerometer's x- and y-axis to be swapped, and
the direction of the accelerometer's y-axis to be inverted.
Rectify th... | ```diff
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index d35d747292ce..4bc6c1ef2cde 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -230,6 +230,9 @@
... |
114eae3c9fde35220cca623840817a740a2eb7b3 | Analyze and fix the following issue in the Linux kernel code: Staging: gpib: gpib_os.c - Remove unnecessary OOM message | Problem Details:
It dublicate the MM subsystem generic OOM message. This patch fixes
the following checkpatch warning.
WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: Omer Faruk BULUT <m.omerfarukbulut@gmail.com>
Link: https://lore.kernel.org/r/20241109130554.3652-1-m.omerfarukbulut@gmail.com
Si... | ```diff
diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 0285180ae1f0..405237d8cb47 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -2099,10 +2099,9 @@ void gpib_register_driver(gpib_interface_t *interface, struct module *... |
e27cd6791de6eb68a123107586df982e7b51bbae | Analyze and fix the following issue in the Linux kernel code: staging: gpib: avoid unintended sign extension | Problem Details:
The code was basically like this (assuming size_t can be u64)
var_u64 |= var_u8 << 24
var_u8 is first promoted to i32 and then the shift is done. Next, it is
promoted to u64 by first signextending to 64 bits. This is very unlikely
what was intended. So now it is first forced to u32.
var_u64 |= ... | ```diff
diff --git a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c b/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
index a6b177d7f8a0..bf05fb4a736b 100644
--- a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
+++ b/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
@@ -664,10 +664,10 @@ static ssiz... |
d0bc38d7aa1e6e53bc9f2bd56c8a30b46a697cd8 | Analyze and fix the following issue in the Linux kernel code: staging: vc04_services: Cleanup TODO entry | Problem Details:
The TODO entry "Fix behvaiour of message handling" no longer
applies due to killable completions [1]. Drop the entry from TODO list.
[1] https://lore.kernel.org/all/20240918163100.870596-1-umang.jain@ideasonboard.com/
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.o... | ```diff
diff --git a/drivers/staging/vc04_services/interface/TODO b/drivers/staging/vc04_services/interface/TODO
index 2ae75362421b..f6f24600aa86 100644
--- a/drivers/staging/vc04_services/interface/TODO
+++ b/drivers/staging/vc04_services/interface/TODO
@@ -26,12 +26,3 @@ kthreads, userspace, limitations) could be ver... |
fe0ebeafc3b723b2f8edf27ecec6d353b08397df | Analyze and fix the following issue in the Linux kernel code: staging: greybus: uart: Fix atomicity violation in get_serial_info() | Problem Details:
Our static checker found a bug where set_serial_info() uses a mutex, but
get_serial_info() does not. Fortunately, the impact of this is relatively
minor. It doesn't cause a crash or any other serious issues. However, if a
race condition occurs between set_serial_info() and get_serial_info(),
there is a... | ```diff
diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
index cdf4ebb93b10..8eab94cb06fa 100644
--- a/drivers/staging/greybus/uart.c
+++ b/drivers/staging/greybus/uart.c
@@ -596,11 +596,13 @@ static int get_serial_info(struct tty_struct *tty,
struct gb_tty *gb_tty = tty->driver_data;
... |
a10549fcce2913be7dc581562ffd8ea35653853e | Analyze and fix the following issue in the Linux kernel code: crypto: inside-secure - Fix the return value of safexcel_xcbcmac_cra_init() | Problem Details:
The commit 320406cb60b6 ("crypto: inside-secure - Replace generic aes
with libaes") replaced crypto_alloc_cipher() with kmalloc(), but did not
modify the handling of the return value. When kmalloc() returns NULL,
PTR_ERR_OR_ZERO(NULL) returns 0, but in fact, the memory allocation has
failed, and -ENOME... | ```diff
diff --git a/drivers/crypto/inside-secure/safexcel_hash.c b/drivers/crypto/inside-secure/safexcel_hash.c
index e17577b785c3..f44c08f5f5ec 100644
--- a/drivers/crypto/inside-secure/safexcel_hash.c
+++ b/drivers/crypto/inside-secure/safexcel_hash.c
@@ -2093,7 +2093,7 @@ static int safexcel_xcbcmac_cra_init(struct... |
d8920a722a8cec625267c09ed40af8fd433d7f9a | Analyze and fix the following issue in the Linux kernel code: crypto: qat - Fix missing destroy_workqueue in adf_init_aer() | Problem Details:
The adf_init_aer() won't destroy device_reset_wq when alloc_workqueue()
for device_sriov_wq failed. Add destroy_workqueue for device_reset_wq to
fix this issue.
Fixes: 4469f9b23468 ("crypto: qat - re-enable sriov after pf reset")
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Signed-off-by: Herbert Xu... | ```diff
diff --git a/drivers/crypto/intel/qat/qat_common/adf_aer.c b/drivers/crypto/intel/qat/qat_common/adf_aer.c
index ec7913ab00a2..4cb8bd83f570 100644
--- a/drivers/crypto/intel/qat/qat_common/adf_aer.c
+++ b/drivers/crypto/intel/qat/qat_common/adf_aer.c
@@ -281,8 +281,11 @@ int adf_init_aer(void)
return -EFAULT... |
a03a728e377aff530abd039542123964b165e5e9 | Analyze and fix the following issue in the Linux kernel code: crypto: rsassa-pkcs1 - Reinstate support for legacy protocols | Problem Details:
Commit 1e562deacecc ("crypto: rsassa-pkcs1 - Migrate to sig_alg backend")
enforced that rsassa-pkcs1 sign/verify operations specify a hash
algorithm. That is necessary because per RFC 8017 sec 8.2, a hash
algorithm identifier must be prepended to the hash before generating or
verifying the signature (... | ```diff
diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
index c98c1588802b..bbd07a9022e6 100644
--- a/crypto/asymmetric_keys/public_key.c
+++ b/crypto/asymmetric_keys/public_key.c
@@ -93,7 +93,7 @@ software_key_determine_akcipher(const struct public_key *pkey,
pkey->pke... |
b2113edaa9afa1c405609b3dca18a9434d28b6c5 | Analyze and fix the following issue in the Linux kernel code: s390/dasd: Fix typo in comment | Problem Details:
Fix typo in comment:
requeust->request,
Removve->Remove,
notthing->nothing.
Signed-off-by: Yu Jiaoliang <yujiaoliang@vivo.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Link: https://lore.kernel.org/r/20241108133913.3068782-3-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk> | ```diff
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 42a4a996defb..3ed642f4f00d 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -2117,7 +2117,7 @@ int dasd_flush_device_queue(struct dasd_device *device)
case DASD_CQR_IN_IO:
rc = device->discipline->term_IO(cq... |
7f5435b2a5ce6de8f53b65900a0e57a158e2e027 | Analyze and fix the following issue in the Linux kernel code: s390/dasd: fix redundant /proc/dasd* entries removal | Problem Details:
In case of an early failure in dasd_init, dasd_proc_init is never
called and /proc/dasd* files are never created. That can happen, for
example, if an incompatible or incorrect argument is provided to the
dasd_mod.dasd= kernel parameter.
However, the attempted removal of /proc/dasd* files causes 8 war... | ```diff
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c
index 0faaa437d9be..48e12e81df00 100644
--- a/drivers/s390/block/dasd_proc.c
+++ b/drivers/s390/block/dasd_proc.c
@@ -350,6 +350,7 @@ dasd_proc_init(void)
remove_proc_entry("devices", dasd_proc_root_entry);
out_nodevices:
remove_... |
8e604cac499248c75ad3a26695a743ff879ded5c | Analyze and fix the following issue in the Linux kernel code: loop: fix type of block size | Problem Details:
PAGE_SIZE may be 64K, and the max block size can be PAGE_SIZE, so any
variable for holding block size can't be defined as 'unsigned short'.
Unfortunately commit 473516b36193 ("loop: use the atomic queue limits
update API") passes 'bsize' with type of 'unsigned short' to
loop_reconfigure_limits(), and ... | ```diff
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index f21f4254b038..fe9bb4fb5f1b 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -173,7 +173,7 @@ static loff_t get_loop_size(struct loop_device *lo, struct file *file)
static bool lo_bdev_can_use_dio(struct loop_device *lo,
struct blo... |
8f52caf9d231e77412766b48e5630a647e5ef774 | Analyze and fix the following issue in the Linux kernel code: Revert "fs: nfs: fix missing refcnt by replacing folio_set_private by folio_attach_private" | Problem Details:
This reverts commit 03e02b94171b1985dd0aa184296fe94425b855a3.
As was pointed out during code review, there is no need to use
folio_attach_private()/folio_detach_private() when a refcount to the
folio is already carried by the struct nfs_page.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspac... | ```diff
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index ead2dc55952d..2da00987d9ed 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -772,7 +772,8 @@ static void nfs_inode_add_request(struct nfs_page *req)
nfs_lock_request(req);
spin_lock(&mapping->i_private_lock);
set_bit(PG_MAPPED, &req->wb_flags);
- folio... |
3287673c1d26f94845ef958090c583c46054b70d | Analyze and fix the following issue in the Linux kernel code: power: supply: pmu_battery: Set power supply type to BATTERY | Problem Details:
If the power supply type is not set it defaults to "Unknown" and upower
does not recognise it. In turn battery monitor applications do not see a
battery. Setting to POWER_SUPPLY_TYPE_BATTERY fixes this.
Signed-off-by: Ed Robbins <edd.robbins@gmail.com>
Link: https://lore.kernel.org/r/IOFJLS.120OJ5KJG9... | ```diff
diff --git a/drivers/power/supply/pmu_battery.c b/drivers/power/supply/pmu_battery.c
index eaab7500d99b..ed83c5e05ca3 100644
--- a/drivers/power/supply/pmu_battery.c
+++ b/drivers/power/supply/pmu_battery.c
@@ -170,6 +170,7 @@ static int __init pmu_bat_init(void)
pbat->bat_desc.properties = pmu_bat_props;
... |
650703bc4ed3edf841e851c99ab8e7ba9e5262a3 | Analyze and fix the following issue in the Linux kernel code: nfs/localio: must clear res.replen in nfs_local_read_done | Problem Details:
Otherwise memory corruption can occur due to NFSv3 LOCALIO reads
leaving garbage in res.replen:
- nfs3_read_done() copies that into server->read_hdrsize; from there
nfs3_proc_read_setup() copies it to args.replen in new requests.
- nfs3_xdr_enc_read3args() passes that to rpc_prepare_reply_pages()
w... | ```diff
diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c
index 81bb908ab890..4b8618cf114c 100644
--- a/fs/nfs/localio.c
+++ b/fs/nfs/localio.c
@@ -351,6 +351,12 @@ nfs_local_read_done(struct nfs_local_kiocb *iocb, long status)
nfs_local_pgio_done(hdr, status);
+ /*
+ * Must clear replen otherwise NFSv3 data corr... |
ab1c793f457f740ab7108cc0b1340a402dbf484d | Analyze and fix the following issue in the Linux kernel code: drm/rockchip: vop: Fix a dereferenced before check warning | Problem Details:
The 'state' can't be NULL, we should check crtc_state.
Fix warning:
drivers/gpu/drm/rockchip/rockchip_drm_vop.c:1096
vop_plane_atomic_async_check() warn: variable dereferenced before check
'state' (see line 1077)
Fixes: 5ddb0bd4ddc3 ("drm/atomic: Pass the full state to planes async atomic check and u... | ```diff
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index f161f40d8ce4..69900138295b 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -1093,10 +1093,10 @@ static int vop_plane_atomic_async_check(struc... |
712ec5de382d009396ced509e75b392d28871aa4 | Analyze and fix the following issue in the Linux kernel code: drm/rockchip: vop2: Don't spam logs in atomic update | Problem Details:
Demote the error message to drm_dbg_kms to only print the message
if the respective debug messages are enabled.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20241028074140.382199-1-andyshrk@163.com | ```diff
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
index 9873172e3fd3..312ca816c646 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
@@ -1271,8 +1271,9 @@ static void vop2_plane_atomic_update(struct... |
666e1960464140cc4bc9203c203097e70b54c95a | Analyze and fix the following issue in the Linux kernel code: drm/rockchip: cdn-dp: Use drm_connector_helper_hpd_irq_event() | Problem Details:
The code for detecting and updating the connector status in
cdn_dp_pd_event_work() has a number of problems.
- It does not aquire the locks to call the detect helper and update
the connector status. These are struct drm_mode_config.connection_mutex
and struct drm_mode_config.mutex.
- It does not use ... | ```diff
diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index b04538907f95..f576b1aa86d1 100644
--- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
@@ -947,9 +947,6 @@ static void cdn_dp_pd_event_work(struct work_struct *work)
{
struc... |
e68da664d379f352d41d7955712c44e0a738e4ab | Analyze and fix the following issue in the Linux kernel code: net: vertexcom: mse102x: Fix tx_bytes calculation | Problem Details:
The tx_bytes should consider the actual size of the Ethernet frames
without the SPI encapsulation. But we still need to take care of
Ethernet padding.
Fixes: 2f207cbf0dd4 ("net: vertexcom: Add MSE102x SPI support")
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://patch.msgid.link/20241108... | ```diff
diff --git a/drivers/net/ethernet/vertexcom/mse102x.c b/drivers/net/ethernet/vertexcom/mse102x.c
index 2c37957478fb..89dc4c401a8d 100644
--- a/drivers/net/ethernet/vertexcom/mse102x.c
+++ b/drivers/net/ethernet/vertexcom/mse102x.c
@@ -437,13 +437,15 @@ static void mse102x_tx_work(struct work_struct *work)
mse... |
a6250aa251eacaf3ebfcfe152a96a727fd483ecd | Analyze and fix the following issue in the Linux kernel code: sched_ext: Handle cases where pick_task_scx() is called without preceding balance_scx() | Problem Details:
sched_ext dispatches tasks from the BPF scheduler from balance_scx() and
thus every pick_task_scx() call must be preceded by balance_scx(). While
this usually holds, due to a bug, there are cases where the fair class's
balance() returns true indicating that it has tasks to run on the CPU and
thus termi... | ```diff
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index aeb595514461..a910a5b4c274 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5914,12 +5914,15 @@ static void prev_balance(struct rq *rq, struct task_struct *prev,
#ifdef CONFIG_SCHED_CLASS_EXT
/*
- * SCX requires a balance() call be... |
72b85bf6a7f6f6c38c39a1e5b04bc1da1bf5016e | Analyze and fix the following issue in the Linux kernel code: sched_ext: scx_bpf_dispatch_from_dsq_set_*() are allowed from unlocked context | Problem Details:
4c30f5ce4f7a ("sched_ext: Implement scx_bpf_dispatch[_vtime]_from_dsq()")
added four kfuncs for dispatching while iterating. They are allowed from the
dispatch and unlocked contexts but two of the kfuncs were only added in the
dispatch section. Add missing declarations in the unlocked section.
Signed-... | ```diff
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 0c68ace02e4b..5dcb0c1c49ea 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -6766,6 +6766,8 @@ __bpf_kfunc_end_defs();
BTF_KFUNCS_START(scx_kfunc_ids_unlocked)
BTF_ID_FLAGS(func, scx_bpf_create_dsq, KF_SLEEPABLE)
+BTF_ID_FLAGS(func, scx_b... |
cf6d9fe09185aa7e296c24385940f29a1364e87d | Analyze and fix the following issue in the Linux kernel code: tc: fix typo probabilty in tc.yaml doc | Problem Details:
Fix spelling of "probability" in tc.yaml documentation. This corrects
the max-P field description in struct tc_sfq_qopt_v1.
Signed-off-by: Abhinav Saxena <xandfury@gmail.com>
Link: https://patch.msgid.link/20241108195642.139315-1-xandfury@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org> | ```diff
diff --git a/Documentation/netlink/specs/tc.yaml b/Documentation/netlink/specs/tc.yaml
index b02d59a0349c..aacccea5dfe4 100644
--- a/Documentation/netlink/specs/tc.yaml
+++ b/Documentation/netlink/specs/tc.yaml
@@ -622,7 +622,7 @@ definitions:
-
name: max-P
type: u32
- doc: proba... |
eb72e7fcc83987d5d5595b43222f23b295d5de7f | Analyze and fix the following issue in the Linux kernel code: sctp: fix possible UAF in sctp_v6_available() | Problem Details:
A lockdep report [1] with CONFIG_PROVE_RCU_LIST=y hints
that sctp_v6_available() is calling dev_get_by_index_rcu()
and ipv6_chk_addr() without holding rcu.
[1]
=============================
WARNING: suspicious RCU usage
6.12.0-rc5-virtme #1216 Tainted: G W
-----------------------------
net... | ```diff
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index f7b809c0d142..38e2fbdcbeac 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -683,7 +683,7 @@ static int sctp_v6_available(union sctp_addr *addr, struct sctp_sock *sp)
struct sock *sk = &sp->inet.sk;
struct net *net = sock_net(sk);
struct net_device... |
2b08dfcc2ce7b013d89f58885e674fb7788c7ac9 | Analyze and fix the following issue in the Linux kernel code: mISDN: Fix typos | Problem Details:
Fix typos:
- syncronized -> synchronized
- interfacs -> interface
- otherwhise -> otherwise
- ony -> only
- busses -> buses
- maxinum -> maximum
Via codespell.
Reported-by: Simon Horman <horms@kernel.org>
Signed-off-by: Andrew Kreimer <algonell@gmail.com>
Reviewed-by: Simon Horman <horms@... | ```diff
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index e5a483fd9ad8..45ff0e198f8f 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -25,8 +25,8 @@
* Bit 8 = 0x00100 = uLaw (instead of aLaw)
* Bit 9 = 0x0020... |
2bf7692eadc5e569d334c66d4a816301822c536e | Analyze and fix the following issue in the Linux kernel code: perf bpf-prologue: Remove unused file | Problem Details:
Commit 4a73fca22692 ("perf bpf-prologue: Remove unused file") missed
cleaning up the header file. The code was unnecessary as Commit
3d6dfae88917 ("perf parse-events: Remove BPF event support") removed
building bpf-prologue.c.
Fixes: 4a73fca22692 ("perf bpf-prologue: Remove unused file")
Reviewed-by: ... | ```diff
diff --git a/tools/perf/util/bpf-prologue.h b/tools/perf/util/bpf-prologue.h
deleted file mode 100644
index 66dcf751ef65..000000000000
--- a/tools/perf/util/bpf-prologue.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright (C) 2015, He Kuang <hekuang@huawei.com>
- * Copyrig... |
2fdb05dc0931250574f0cb0ebeb5ed8e20f4a889 | Analyze and fix the following issue in the Linux kernel code: NFSv4.0: Fix a use-after-free problem in the asynchronous open() | Problem Details:
Yang Erkun reports that when two threads are opening files at the same
time, and are forced to abort before a reply is seen, then the call to
nfs_release_seqid() in nfs4_opendata_free() can result in a
use-after-free of the pointer to the defunct rpc task of the other
thread.
The fix is to ensure that ... | ```diff
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 9d40319e063d..405f17e6e0b4 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2603,12 +2603,14 @@ static void nfs4_open_release(void *calldata)
struct nfs4_opendata *data = calldata;
struct nfs4_state *state = NULL;
+ /* In case of error, no... |
c968fd23c68e9929ab6cad4faffc8ea603e98e5d | Analyze and fix the following issue in the Linux kernel code: NFSv4.0: Fix the wake up of the next waiter in nfs_release_seqid() | Problem Details:
There is no need to wake up another waiter on the seqid list unless the
seqid being removed is at the head of the list, and so is relinquishing
control of the sequence counter to the next entry.
Reviewed-by: Yang Erkun <yangerkun@huawei.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.... | ```diff
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index dafd61186557..9a9f60a2291b 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1083,14 +1083,12 @@ void nfs_release_seqid(struct nfs_seqid *seqid)
return;
sequence = seqid->sequence;
spin_lock(&sequence->lock);
- list_del_init(&seqid->li... |
f39489fea677ad78ca4ce1ab2d204a6639b868dc | Analyze and fix the following issue in the Linux kernel code: sched_ext: add a missing rcu_read_lock/unlock pair at scx_select_cpu_dfl() | Problem Details:
When getting an LLC CPU mask in the default CPU selection policy,
scx_select_cpu_dfl(), a pointer to the sched_domain is dereferenced
using rcu_read_lock() without holding rcu_read_lock(). Such an unprotected
dereference often causes the following warning and can cause an invalid
memory access in the w... | ```diff
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index f1a185ab5fbc..0c68ace02e4b 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -3342,6 +3342,12 @@ static s32 scx_select_cpu_dfl(struct task_struct *p, s32 prev_cpu,
*found = false;
+
+ /*
+ * This is necessary to protect llc_cpus.
+ */
... |
ecf2b43018da9579842c774b7f35dbe11b5c38dd | Analyze and fix the following issue in the Linux kernel code: media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format | Problem Details:
This can lead to out of bounds writes since frames of this type were not
taken into account when calculating the size of the frames buffer in
uvc_parse_streaming.
Fixes: c0efd232929c ("V4L/DVB (8145a): USB Video Class driver")
Signed-off-by: Benoit Sevens <bsevens@google.com>
Cc: stable@vger.kernel.or... | ```diff
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index f0febdc08c2d..2bba7123ea5e 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -371,7 +371,7 @@ static int uvc_parse_format(struct uvc_device *dev,
* Parse the frame descriptors.... |
42d85557527266804579bc5d20c101d93f6be3c6 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: correct analog audio name on Indiedroid Nova | Problem Details:
Correct the audio name for the Indiedroid Nova from
rockchip,es8388-codec to rockchip,es8388. This name change corrects a
kernel log error of "ASoC: driver name too long 'rockchip,es8388-codec'
-> 'rockchip_es8388'".
Fixes: 3900160e164b ("arm64: dts: rockchip: Add Indiedroid Nova board")
Signed-off-by... | ```diff
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
index d8c50fdcca3b..a4b930f6987f 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
@@ -62,7 +62,7 @@... |
0e1168f8f2bfb43dd29a8d224d0a4d3ffccd47d9 | Analyze and fix the following issue in the Linux kernel code: iio: adc: ad7380: fix oversampling formula | Problem Details:
The formula in the datasheet for oversampling time conversion seems to
be valid when device is at full speed using the maximum number of SDO
lines. The driver currently support only 1 SDO line. The correct formula
is: t_convert = T_CONVERT_0_NS + T_CONVERT_X_NS*(x -
1)*num_channel/number_of_sdo_lines.
... | ```diff
diff --git a/drivers/iio/adc/ad7380.c b/drivers/iio/adc/ad7380.c
index fb728570debe..e5eececaaf50 100644
--- a/drivers/iio/adc/ad7380.c
+++ b/drivers/iio/adc/ad7380.c
@@ -77,6 +77,12 @@
#define T_CONVERT_X_NS 500 /* xth conversion start time (oversampling) */
#define T_POWERUP_US 5000 /* Power up */
+/*
+... |
35de42cdfb64af8357b8c531cc2dad28bde5c712 | Analyze and fix the following issue in the Linux kernel code: perf build: Include libtraceevent headers directly indicated by pkg-config | Problem Details:
Currently the libtraceevent's found by pkg-config, which give the
include path as:
[root@localhost tmp]# pkg-config --cflags libtraceevent
-I/usr/local/include/traceevent
So we should include the libtraceevent headers directly without
"traceevent/" prefix. Update all the users.
Fixes: 0f0e1f4456... | ```diff
diff --git a/tools/build/feature/test-libtraceevent.c b/tools/build/feature/test-libtraceevent.c
index 416b11ffd4b4..804ad80dbbd9 100644
--- a/tools/build/feature/test-libtraceevent.c
+++ b/tools/build/feature/test-libtraceevent.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-#include <traceevent/trace-... |
f2a6b8e396666d97ada8e8759dfb6a69d8df6380 | Analyze and fix the following issue in the Linux kernel code: drm/xe: improve hibernation on igpu | Problem Details:
The GGTT looks to be stored inside stolen memory on igpu which is not
treated as normal RAM. The core kernel skips this memory range when
creating the hibernation image, therefore when coming back from
hibernation the GGTT programming is lost. This seems to cause issues
with broken resume where GuC FW... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index 8286cbc23721..549866da5cd1 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -952,7 +952,10 @@ int xe_bo_restore_pinned(struct xe_bo *bo)
if (WARN_ON(!xe_bo_is_pinned(bo)))
return -EINVAL;
- if (WARN_ON(x... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.