id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
ab5fcbb1adc8e44ed027b0a73f484fbc8d528b94
Analyze and fix the following issue in the Linux kernel code: btrfs: use pgoff_t for page index variables
Problem Details: Any conversion of offsets in the logical or the physical mapping space of the pages is done by a shift and the target type should be pgoff_t (type of struct page::index). Fix the locations where it's still unsigned long. Signed-off-by: David Sterba <dsterba@suse.com>
```diff diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 6d3161bc7781..d09d622016ef 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -282,8 +282,8 @@ static noinline void end_compressed_writeback(const struct compressed_bio *cb) { struct inode *inode = &cb->bbio.inode->vfs_inode;...
fd00922abc07d01bb4c5b71a6622fe0030855f22
Analyze and fix the following issue in the Linux kernel code: btrfs: add btrfs prefix to is_fstree() and make it return bool
Problem Details: This is an exported function and therefore it should have a 'btrfs_' prefix, to make it clear it's btrfs specific, avoid future name collisions with code outside btrfs, and make its naming consistent with most other btrfs exported functions. So add a 'btrfs_' prefix to it and make it return bool inste...
```diff diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 8a54a0b6e502..d51cc692f2c5 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -721,13 +721,13 @@ static inline int btrfs_next_item(struct btrfs_root *root, struct btrfs_path *p) } int btrfs_leaf_free_space(const struct extent_buffer *leaf); -static...
27260dd1904bb409cf84709928ba9bc5506fbe8e
Analyze and fix the following issue in the Linux kernel code: btrfs: remove partial support for lowest level from btrfs_search_forward()
Problem Details: Commit 323ac95bce44 ("Btrfs: don't read leaf blocks containing only checksums during truncate") changed the condition from `level == 0` to `level == path->lowest_level`, while its original purpose was just to do some leaf node handling (calling btrfs_item_key_to_cpu()) and skip some code that doesn't f...
```diff diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 1b36ee2d8044..2997f2420719 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -4594,16 +4594,13 @@ int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root, /* * A helper function to walk down the tree starting at min_key, and...
6fc5ef7829887c5a07c733013c6158ec47aa24f9
Analyze and fix the following issue in the Linux kernel code: btrfs: add btrfs prefix to free space tree exported functions
Problem Details: A few of the free space tree exported functions have a 'btrfs_' prefix in their name, but most don't. Not only is this inconsistent, the preferred style is to have such a prefix, to avoid potential collisions in the future with other kernel code and offer a somewhat better readibility by making it obvi...
```diff diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index 5b0cb04b2b93..00e567a4cd16 100644 --- a/fs/btrfs/block-group.c +++ b/fs/btrfs/block-group.c @@ -877,7 +877,7 @@ static noinline void caching_thread(struct btrfs_work *work) */ if (btrfs_fs_compat_ro(fs_info, FREE_SPACE_TREE) && !(test...
d549391fc6845b701cffe870ee60916bf8b13094
Analyze and fix the following issue in the Linux kernel code: btrfs: rename variables for locked range in defrag_prepare_one_folio()
Problem Details: In preparation to use a helper for folio_pos + folio_size, rename the variables for the locked range so they don't use the 'folio_' prefix. As the locking ranges take inclusive end of the range (hence the "-1") this would be confusing as the folio helpers typically use exclusive end of the range. Revi...
```diff diff --git a/fs/btrfs/defrag.c b/fs/btrfs/defrag.c index 6dca263b224e..faa563ee3000 100644 --- a/fs/btrfs/defrag.c +++ b/fs/btrfs/defrag.c @@ -848,8 +848,8 @@ static struct folio *defrag_prepare_one_folio(struct btrfs_inode *inode, pgoff_t { struct address_space *mapping = inode->vfs_inode.i_mapping; gfp_t...
936f0b49dc4ac29a34a1501342a489d4fe366b9b
Analyze and fix the following issue in the Linux kernel code: btrfs: add extra warning when qgroup is marked inconsistent
Problem Details: Unlike qgroup rescan, which always shows whether it cleared the inconsistent flag, we do not have a proper way to show if qgroup is marked inconsistent. This was not a big deal before as there aren't that many locations that can mark qgroup inconsistent. But with the introduction of drop_subtree_thre...
```diff diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index a1afc549c404..7791000dcefc 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -346,13 +346,27 @@ int btrfs_verify_qgroup_counts(const struct btrfs_fs_info *fs_info, u64 qgroupid } #endif -static void qgroup_mark_inconsistent(struct btrfs_fs_inf...
2f3f1ad7f1792d0a6535a2da39d114a12902588d
Analyze and fix the following issue in the Linux kernel code: btrfs: simplify debug print helpers without enabled printk
Problem Details: The btrfs_debug() helpers depend on various config options. In case of "no_printk" we don't need to define a special helper that in the end does nothing but validates the parameters. As the default build config is to validate the parameters we can simplify it to let the debug helpers expand to nothing ...
```diff diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index bebef4bd0c65..2e0d959092f5 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -2201,7 +2201,6 @@ int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical, int ret; u64 flags; u64 size = 0; - u32 item_size; const struct extent_...
80f4fab544349a90b47a69443973d8f3f3be9334
Analyze and fix the following issue in the Linux kernel code: btrfs: switch RCU helper versions to btrfs_debug()
Problem Details: The RCU protection is now done in the plain helpers, we can remove the "_in_rcu" and "_rl_in_rcu". Reviewed-by: Daniel Vacek <neelx@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
```diff diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c index aa970fd41c4b..50b5fc1c06d7 100644 --- a/fs/btrfs/bio.c +++ b/fs/btrfs/bio.c @@ -433,7 +433,7 @@ static void btrfs_submit_dev_bio(struct btrfs_device *dev, struct bio *bio) ASSERT(btrfs_dev_is_sequential(dev, physical)); bio->bi_iter.bi_sector = zone_start...
4d4b489ef1d7913cddb26e49e26628fbfd5eeaf4
Analyze and fix the following issue in the Linux kernel code: btrfs: remove unused levels of message helpers
Problem Details: We're using the following levels: crit, err, warn, info, debug. This covers our needs and further specializations is not needed, so let's remove emerg, alert and notice. Reviewed-by: Daniel Vacek <neelx@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
```diff diff --git a/fs/btrfs/messages.h b/fs/btrfs/messages.h index 12d798802a01..f6b3989939b5 100644 --- a/fs/btrfs/messages.h +++ b/fs/btrfs/messages.h @@ -37,72 +37,48 @@ void _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...); btrfs_no_printk(fs_info, fmt, ##args) #endif -#define btrfs_e...
adc1ef55dc04a57cfafdc1f7477a7c98969e7600
Analyze and fix the following issue in the Linux kernel code: btrfs: add details to error messages at btrfs_delete_delayed_dir_index()
Problem Details: Update the error messages with: 1) Fix typo in the first one, deltiona -> deletion; 2) Remove redundant part of the first message, the part following the comma, and including all the useful information: root, inode, index and error value; 3) Update the second message to use more formal languag...
```diff diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index 6918340f4b38..1e9bec6d24f7 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -1618,7 +1618,8 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans, */ if (ret < 0) { btrfs_err(trans->fs_info, -"...
3f093ccb95f30f95b7c6014d1f0b6847299190c2
Analyze and fix the following issue in the Linux kernel code: btrfs: harden parsing of compression mount options
Problem Details: Btrfs happily but incorrectly accepts the `-o compress=zlib+foo` and similar options with any random suffix. Fix that by explicitly checking the end of the strings. Signed-off-by: Daniel Vacek <neelx@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
```diff diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 408ce5418c18..73c6c5b9b07a 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -267,9 +267,19 @@ static inline blk_mode_t btrfs_open_mode(struct fs_context *fc) return sb_open_mode(fc->sb_flags) & ~BLK_OPEN_RESTRICT_WRITES; } +static bool btrfs_mat...
06c3437f744973ade1f2391ef1c12ec37db96504
Analyze and fix the following issue in the Linux kernel code: btrfs: fix comment in reserved space warning
Problem Details: mkfs.btrfs up to v4.14 actually can leave a chunk inside the reserved space when invoked with `-m single`, fixed by 997f9977c24397eb6980bb9 ("mkfs: Prevent temporary system chunk to use space in reserved 1M range") released with v4.15. Signed-off-by: Dan Johnson <ComputerDruid@gmail.com> Reviewed-by: ...
```diff diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index f475b4b7c457..1535a425e8f9 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -7938,7 +7938,7 @@ static int verify_one_dev_extent(struct btrfs_fs_info *fs_info, } /* - * Very old mkfs.btrfs (before v4.1) will not respect the reserved + ...
55f7c65b2f69c7e4cb7aa7c1654a228ccf734fd8
Analyze and fix the following issue in the Linux kernel code: btrfs: zoned: use filesystem size not disk size for reclaim decision
Problem Details: When deciding if a zoned filesystem is reaching the threshold to reclaim data block groups, look at the size of the filesystem not to potentially total available size of all drives in the filesystem. Especially if a filesystem was created with mkfs' -b option, constraining it to only a portion of the ...
```diff diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c index 9430b34d3cbb..3fa526a0e37b 100644 --- a/fs/btrfs/zoned.c +++ b/fs/btrfs/zoned.c @@ -2523,8 +2523,8 @@ bool btrfs_zoned_should_reclaim(const struct btrfs_fs_info *fs_info) { struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; struct btrfs_device ...
4a2bf707270f897ab8077baee8ed5842a5321686
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Correct tid cleanup when tid setup fails
Problem Details: Currently, if any error occurs during ath12k_dp_rx_peer_tid_setup(), the tid value is already incremented, even though the corresponding TID is not actually allocated. Proceed to ath12k_dp_rx_peer_tid_delete() starting from unallocated tid, which might leads to freeing unallocated TID and cause potenti...
```diff diff --git a/drivers/net/wireless/ath/ath12k/dp.c b/drivers/net/wireless/ath/ath12k/dp.c index d6435dad61a1..f893fce6d9bd 100644 --- a/drivers/net/wireless/ath/ath12k/dp.c +++ b/drivers/net/wireless/ath/ath12k/dp.c @@ -84,7 +84,6 @@ int ath12k_dp_peer_setup(struct ath12k *ar, int vdev_id, const u8 *addr) ret ...
c4825d540f4beb179d552f3aa1f44f8db5095fb6
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: bring DFS support back for WCN7850
Problem Details: Due to the restrict in MAC80211 that DFS (Dynamic Frequency Selection) can't be enabled on multiple channels, commit 176f3009ae59 ("wifi: ath12k: support 2 channels for single pdev device") removes DFS support in order to support 2 channels concurrently, making AP mode not working on DFS channels [1]. ...
```diff diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 7f80c72611c8..bd1ec3b2c084 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -13365,16 +13365,12 @@ ath12k_mac_setup_radio_iface_comb(struct ath12k *ar, comb[0].beac...
9b3700b15cb581d748c3d46e7eb30ffced1642e8
Analyze and fix the following issue in the Linux kernel code: drm/panel-edp: Add disable to 100ms for MNB601LS1-4
Problem Details: For the MNB601LS1-4 panel, the T9+T10 timing does not meet the requirements of the specification, so disable is set to 100ms. Fixes: 9d8e91439fc3 ("drm/panel-edp: Add CSW MNB601LS1-4") Signed-off-by: Langyan Ye <yelangyan@huaqin.corp-partner.google.com> Reviewed-by: Douglas Anderson <dianders@chromium...
```diff diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c index 9a56e208cbdd..09170470b3ef 100644 --- a/drivers/gpu/drm/panel/panel-edp.c +++ b/drivers/gpu/drm/panel/panel-edp.c @@ -1828,6 +1828,13 @@ static const struct panel_delay delay_50_500_e200_d200_po2e335 = { .powered_on_to_en...
647fe16b46999258ce1aec41f4bdeabb4f0cc8e7
Analyze and fix the following issue in the Linux kernel code: PM: cpufreq: powernv/tracing: Move powernv_throttle trace event
Problem Details: As the trace event powernv_throttle is only used by the powernv code, move it to a separate include file and have that code directly enable it. Trace events can take up around 5K of memory when they are defined regardless if they are used or not. It wastes memory to have them defined in configurations...
```diff diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index d38526b8e063..681d687b5a18 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile @@ -21,6 +21,7 @@ obj-$(CONFIG_CPUFREQ_VIRT) += virtual-cpufreq.o # Traces CFLAGS_amd-pstate-trace.o := -I$(src) +CFLAGS_power...
a9302f8fbe8c0fd7d92e6e003ba62086b2ee1162
Analyze and fix the following issue in the Linux kernel code: dt-bindings: thermal: mediatek: Add fallback compatible string for MT7981 and MT8516
Problem Details: The ‘mediatek,mt7981-thermal’ and ‘mediatek,mt8516-thermal’ strings aren't definied in the driver. Both should have fallback compatible strings. This commit fixes this issue. Fixes: 788494ba0999 ("dt-bindings: thermal: convert Mediatek Thermal to the json-schema") Signed-off-by: Aleksander Jan Bajkows...
```diff diff --git a/Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml b/Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml index d96a2e32bd8f..7bd0955e6d04 100644 --- a/Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml +++ b/Documentation/devicetree/bindings/thermal/mediatek,th...
579bf8037b70b644a674c126a32bbb2212cf5c21
Analyze and fix the following issue in the Linux kernel code: wifi: brcmfmac: fix P2P discovery failure in P2P peer due to missing P2P IE
Problem Details: After commit bd99a3013bdc ("brcmfmac: move configuration of probe request IEs"), the probe request MGMT IE addition operation brcmf_vif_set_mgmt_ie() got moved from the brcmf_p2p_scan_prep() to the brcmf_cfg80211_scan(). Because of this, as part of the scan request handler for the P2P Discovery, vif s...
```diff diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index a324bfec0b69..b8fc387ac361 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -1...
61114910a5f6a71d0b6ea3b95082dfe031b19dfe
Analyze and fix the following issue in the Linux kernel code: e1000e: ignore uninitialized checksum word on tgp
Problem Details: As described by Vitaly Lifshits: > Starting from Tiger Lake, LAN NVM is locked for writes by SW, so the > driver cannot perform checksum validation and correction. This means > that all NVM images must leave the factory with correct checksum and > checksum valid bit set. Unfortunately some systems ha...
```diff diff --git a/drivers/net/ethernet/intel/e1000e/defines.h b/drivers/net/ethernet/intel/e1000e/defines.h index 8294a7c4f122..ba331899d186 100644 --- a/drivers/net/ethernet/intel/e1000e/defines.h +++ b/drivers/net/ethernet/intel/e1000e/defines.h @@ -638,6 +638,9 @@ /* For checksumming, the sum of all words in the...
536fd741c7ac907d63166cdae1081b1febfab613
Analyze and fix the following issue in the Linux kernel code: e1000e: disregard NVM checksum on tgp when valid checksum bit is not set
Problem Details: As described by Vitaly Lifshits: > Starting from Tiger Lake, LAN NVM is locked for writes by SW, so the > driver cannot perform checksum validation and correction. This means > that all NVM images must leave the factory with correct checksum and > checksum valid bit set. Since Tiger Lake devices were ...
```diff diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c index 364378133526..df4e7d781cb1 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c @@ -4274,6 +4274,8 @@ static s32 e1000_validate_nvm_checksum_ich8lan(...
4ff12d82dac119b4b99b5a78b5af3bf2474c0a36
Analyze and fix the following issue in the Linux kernel code: ice: Fix a null pointer dereference in ice_copy_and_init_pkg()
Problem Details: Add check for the return value of devm_kmemdup() to prevent potential null pointer dereference. Fixes: c76488109616 ("ice: Implement Dynamic Device Personalization (DDP) download") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com> Reviewed-by: Michal Swiatkowski <michal.s...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_ddp.c b/drivers/net/ethernet/intel/ice/ice_ddp.c index 59323c019544..351824dc3c62 100644 --- a/drivers/net/ethernet/intel/ice/ice_ddp.c +++ b/drivers/net/ethernet/intel/ice/ice_ddp.c @@ -2301,6 +2301,8 @@ enum ice_ddp_state ice_copy_and_init_pkg(struct ice_hw *hw,...
5a0df02999dbe838c3feed54b1d59e9445f68b89
Analyze and fix the following issue in the Linux kernel code: i40e: When removing VF MAC filters, only check PF-set MAC
Problem Details: When the PF is processing an Admin Queue message to delete a VF's MACs from the MAC filter, we currently check if the PF set the MAC and if the VF is trusted. This results in undesirable behaviour, where if a trusted VF with a PF-set MAC sets itself down (which sends an AQ message to delete the VF's M...
```diff diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index 2dbe38eb9494..7ccfc1191ae5 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -3137,10 +3137,10 @@ static int i40e_v...
50b2af451597ca6eefe9d4543f8bbf8de8aa00e7
Analyze and fix the following issue in the Linux kernel code: i40e: report VF tx_dropped with tx_errors instead of tx_discards
Problem Details: Currently the tx_dropped field in VF stats is not updated correctly when reading stats from the PF. This is because it reads from i40e_eth_stats.tx_discards which seems to be unused for per VSI stats, as it is not updated by i40e_update_eth_stats() and the corresponding register, GLV_TDPC, is not imple...
```diff diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index 88e6bef69342..2dbe38eb9494 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -5006,7 +5006,7 @@ int i40e_get_vf_sta...
ab16122115327b2a602595f539cae7e39a331d0e
Analyze and fix the following issue in the Linux kernel code: arm64: kvm, smccc: Fix vendor uuid
Problem Details: Commit 13423063c7cb ("arm64: kvm, smccc: Introduce and use API for getting hypervisor UUID") replaced the explicit register constants with the UUID_INIT macro. However, there is an endian issue, meaning the UUID generated and used in the handshake didn't match UUID prior to the commit. The change in U...
```diff diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index 784ebe4607a4..50b47eba7d01 100644 --- a/include/linux/arm-smccc.h +++ b/include/linux/arm-smccc.h @@ -113,7 +113,7 @@ /* KVM UID value: 28b46fb6-2ec5-11e9-a9ca-4b564d003a74 */ #define ARM_SMCCC_VENDOR_HYP_UID_KVM UUID_INIT(\ - 0xb66fb4...
303084ad12767db64c84ba8fcd0450aec38c8534
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Filter out HCR_EL2 bits when running in hypervisor context
Problem Details: Most HCR_EL2 bits are not supposed to affect EL2 at all, but only the guest. However, we gladly merge these bits with the host's HCR_EL2 configuration, irrespective of entering L1 or L2. This leads to some funky behaviour, such as L1 trying to inject a virtual SError for L2, and getting a taste of its...
```diff diff --git a/arch/arm64/kvm/hyp/vhe/switch.c b/arch/arm64/kvm/hyp/vhe/switch.c index 477f1580ffea..e482181c6632 100644 --- a/arch/arm64/kvm/hyp/vhe/switch.c +++ b/arch/arm64/kvm/hyp/vhe/switch.c @@ -48,8 +48,7 @@ DEFINE_PER_CPU(unsigned long, kvm_hyp_vector); static u64 __compute_hcr(struct kvm_vcpu *vcpu) ...
12702f0c38347f3825a61b7c84d1b1d7eb84dd74
Analyze and fix the following issue in the Linux kernel code: soc: fsl: qe: convert set_multiple() to returning an integer
Problem Details: The conversion to using the new GPIO line setter callbacks missed the set_multiple() in this file. Convert it to using the new callback. Fixes: 52ccf19527fd ("soc: fsl: qe: use new GPIO line value setter callbacks") Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
```diff diff --git a/drivers/soc/fsl/qe/gpio.c b/drivers/soc/fsl/qe/gpio.c index 5391cce4e6ef..710a3a03758b 100644 --- a/drivers/soc/fsl/qe/gpio.c +++ b/drivers/soc/fsl/qe/gpio.c @@ -79,8 +79,8 @@ static int qe_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) return 0; } -static void qe_gpio_set_multiple...
fcb476990beb55c958db0b5aa2e9ca772d0fc982
Analyze and fix the following issue in the Linux kernel code: usb: core: add urb->sgt parameter description
Problem Details: The parameter description of urb->sgt is lost, this will add it for completeness. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Closes: https://lore.kernel.org/all/20250711182803.1d548467@canb.auug.org.au/ Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Fixes: 488e6eaab88c ("usb: core: add dma-nonco...
```diff diff --git a/include/linux/usb.h b/include/linux/usb.h index 535ac37198a1..9d662c6abb4d 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -1455,6 +1455,10 @@ typedef void (*usb_complete_t)(struct urb *); * @sg: scatter gather buffer list, the buffer size of each element in * the list (except th...
48f9034e024a4c6e279b0d040e1f5589bb544806
Analyze and fix the following issue in the Linux kernel code: dt-bindings: serial: 8250: spacemit: set clocks property as required
Problem Details: In SpacemiT's K1 SoC, the clocks for UART are mandatory needed, so for DT, both clocks and clock-names property should be set as required. Fixes: 2c0594f9f062 ("dt-bindings: serial: 8250: support an optional second clock") Signed-off-by: Yixun Lan <dlan@gentoo.org> Acked-by: "Rob Herring (Arm)" <robh@...
```diff diff --git a/Documentation/devicetree/bindings/serial/8250.yaml b/Documentation/devicetree/bindings/serial/8250.yaml index 2766bb6ff2d1..e46bee8d25bf 100644 --- a/Documentation/devicetree/bindings/serial/8250.yaml +++ b/Documentation/devicetree/bindings/serial/8250.yaml @@ -272,7 +272,9 @@ if: - spac...
69c94feda519cb7615794123eac8981d7ac9f688
Analyze and fix the following issue in the Linux kernel code: serial: 8250_ce4100: Fix CONFIG_SERIAL_8250=n build
Problem Details: On i386, when CONFIG_X86_INTEL_CE=y # CONFIG_SERIAL_8250 is not set it will try to compile the driver and use the stub simultaneously. This breaks the build. Fix it by making sure that the driver compiles only when CONFIG_SERIAL_8250 is also enabled. On top of that ensure that CONFIG_SERIAL_8250...
```diff diff --git a/drivers/tty/serial/8250/Makefile b/drivers/tty/serial/8250/Makefile index e61dc3f4ca50..513a0941c284 100644 --- a/drivers/tty/serial/8250/Makefile +++ b/drivers/tty/serial/8250/Makefile @@ -24,7 +24,9 @@ obj-$(CONFIG_SERIAL_8250_ASPEED_VUART) += 8250_aspeed_vuart.o obj-$(CONFIG_SERIAL_8250_BCM2835...
ef68a0e1087882850628000f28078e1c4df917ee
Analyze and fix the following issue in the Linux kernel code: arm64: dts: apple: t8012-j132: Include touchbar framebuffer node
Problem Details: Apple T2 MacBookPro15,2 (j132) has a touchbar so include the framebuffer node. Cc: stable@vger.kernel.org Fixes: 4efbcb623e9bc ("arm64: dts: apple: Add T2 devices") Signed-off-by: Nick Chan <towinchenmi@gmail.com> Link: https://lore.kernel.org/stable/20250620-j132-fb-v1-1-bc6937baf0b9%40gmail.com Link...
```diff diff --git a/arch/arm64/boot/dts/apple/t8012-j132.dts b/arch/arm64/boot/dts/apple/t8012-j132.dts index 778a69be18dd..7dcac51703ff 100644 --- a/arch/arm64/boot/dts/apple/t8012-j132.dts +++ b/arch/arm64/boot/dts/apple/t8012-j132.dts @@ -7,6 +7,7 @@ /dts-v1/; #include "t8012-jxxx.dtsi" +#include "t8012-touchba...
6aaf36bb07057e7c97df7e64ed2cfe4bd56f3e6a
Analyze and fix the following issue in the Linux kernel code: arm64: dts: apple: Add bit offset to PMIC NVMEM node names
Problem Details: Now that the dt-binding has been extended to allow indicating the bit position the following warning about a duplicate unit address with W=1 can be fixed: arch/arm64/boot/dts/apple/t8103.dtsi:764.46-767.8: Warning (unique_unit_address_if_enabled): /soc/spmi@23d0d9300/pmic@f/nvmem-layout/boot-error-cou...
```diff diff --git a/arch/arm64/boot/dts/apple/t600x-die0.dtsi b/arch/arm64/boot/dts/apple/t600x-die0.dtsi index 110bc6719512..17ad9328baa1 100644 --- a/arch/arm64/boot/dts/apple/t600x-die0.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-die0.dtsi @@ -72,12 +72,12 @@ reg = <0x6001 0x1>; }; - boot_error_count...
960dda6eca2b771d1b243c13ab81bd42649b9ac4
Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: Add CIX Technology Group Co., Ltd.
Problem Details: CIX Technology Group Co., Ltd. is a high performance Arm SoC design company. Link: https://www.cixtech.com/. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Fugang Duan <fugang.duan@cixtech.com> Signed-off-by: Peter Chen <peter.chen@cixtech.com> Signed-off-by: Arnd Bergmann <a...
```diff diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 5079ca6ce1d1..5e76223e4570 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -302,6 +302,8 @@ patte...
cdfa1304657d6f23be8fd2bb0516380a3c89034e
Analyze and fix the following issue in the Linux kernel code: fs/orangefs: use snprintf() instead of sprintf()
Problem Details: sprintf() is discouraged for use with bounded destination buffers as it does not prevent buffer overflows when the formatted output exceeds the destination buffer size. snprintf() is a safer alternative as it limits the number of bytes written and ensures NUL-termination. Replace sprintf() with snprin...
```diff diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c index f7095c91660c..e463d3c73533 100644 --- a/fs/orangefs/orangefs-debugfs.c +++ b/fs/orangefs/orangefs-debugfs.c @@ -396,7 +396,7 @@ static ssize_t orangefs_debug_read(struct file *file, goto out; mutex_lock(&orangefs_debug_loc...
17133255a32275f0f042f7f432f332ff1cf5e57d
Analyze and fix the following issue in the Linux kernel code: drm/i915: replace DRM_DEBUG_SELFTEST with DRM_KUNIT_TEST
Problem Details: DRM_DEBUG_SELFTEST was removed in commit fc8d29e298cf (drm: selftest: convert drm_mm selftest to KUnit) and all functions under it were converted to KUnit, under the DRM_KUNIT_TEST option This conversion however did not occur in the Kconfig.debug file in the i915 directory. This patch replaces the se...
```diff diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug index 1852e0804942..b15b1cecb3aa 100644 --- a/drivers/gpu/drm/i915/Kconfig.debug +++ b/drivers/gpu/drm/i915/Kconfig.debug @@ -50,7 +50,7 @@ config DRM_I915_DEBUG select DRM_VGEM # used by igt/prime_vgem (dmabuf interop checks...
6c9e64e83b22405622d1f47417cdb0d20d49ca35
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix an IS_ERR() vs NULL bug in xe_tile_alloc_vram()
Problem Details: The xe_vram_region_alloc() function returns NULL on error. It never returns error pointers. Update the error checking to match. Fixes: 4b0a5f5ce784 ("drm/xe: Unify the initialization of VRAM regions") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/5449065e-97...
```diff diff --git a/drivers/gpu/drm/xe/xe_tile.c b/drivers/gpu/drm/xe/xe_tile.c index 0be0a5c57ef4..d49ba3401963 100644 --- a/drivers/gpu/drm/xe/xe_tile.c +++ b/drivers/gpu/drm/xe/xe_tile.c @@ -120,8 +120,8 @@ int xe_tile_alloc_vram(struct xe_tile *tile) return 0; vram = xe_vram_region_alloc(xe, tile->id, XE_PL...
5cc1f66cb23cccc704e3def27ad31ed479e934a5
Analyze and fix the following issue in the Linux kernel code: thunderbolt: Fix copy+paste error in match_service_id()
Problem Details: The second instance of TBSVC_MATCH_PROTOCOL_VERSION seems to have been intended to be TBSVC_MATCH_PROTOCOL_REVISION. Fixes: d1ff70241a27 ("thunderbolt: Add support for XDomain discovery protocol") Cc: stable <stable@kernel.org> Signed-off-by: Eric Biggers <ebiggers@kernel.org> Link: https://lore.kerne...
```diff diff --git a/drivers/thunderbolt/domain.c b/drivers/thunderbolt/domain.c index a3a7c8059eee..45239703745e 100644 --- a/drivers/thunderbolt/domain.c +++ b/drivers/thunderbolt/domain.c @@ -36,7 +36,7 @@ static bool match_service_id(const struct tb_service_id *id, return false; } - if (id->match_flags & TB...
7616f006db07017ef5d4ae410fca99279aaca7aa
Analyze and fix the following issue in the Linux kernel code: usb: typec: ucsi: Update power_supply on power role change
Problem Details: The current power direction of an USB-C port also influences the power_supply's online status, so a power role change should also update the power_supply. Fixes an issue on some systems where plugging in a normal USB device in for the first time after a reboot will cause upower to erroneously consider...
```diff diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index e913d099f934..5739ea2abdd1 100644 --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -1245,6 +1245,7 @@ static void ucsi_handle_connector_change(struct work_struct *work) if (change & UCSI_CONSTAT_POWER_...
1e61f6ab08786d66a11cfc51e13d6f08a6b06c56
Analyze and fix the following issue in the Linux kernel code: usb: typec: fusb302: cache PD RX state
Problem Details: This patch fixes a race condition communication error, which ends up in PD hard resets when losing the race. Some systems, like the Radxa ROCK 5B are powered through USB-C without any backup power source and use a FUSB302 chip to do the PD negotiation. This means it is quite important to avoid hard res...
```diff diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c index f2801279c4b5..a4ff2403ddd6 100644 --- a/drivers/usb/typec/tcpm/fusb302.c +++ b/drivers/usb/typec/tcpm/fusb302.c @@ -104,6 +104,7 @@ struct fusb302_chip { bool vconn_on; bool vbus_on; bool charge_on; + bool pd_rx_on; b...
a33665facf792de619e451bdbf66e86b9c6763bc
Analyze and fix the following issue in the Linux kernel code: usb: typec: ucsi: yoga-c630: add DRM dependency
Problem Details: Selecting DRM_AUX_HPD_BRIDGE is not possible from a built-in driver when CONFIG_DRM=m: WARNING: unmet direct dependencies detected for DRM_AUX_HPD_BRIDGE Depends on [m]: HAS_IOMEM [=y] && DRM [=m] && DRM_BRIDGE [=y] && OF [=y] Selected by [y]: - UCSI_LENOVO_YOGA_C630 [=y] && USB_SUPPORT [=y] && ...
```diff diff --git a/drivers/usb/typec/ucsi/Kconfig b/drivers/usb/typec/ucsi/Kconfig index 52b53bb6dfed..7fcb1e1de5d6 100644 --- a/drivers/usb/typec/ucsi/Kconfig +++ b/drivers/usb/typec/ucsi/Kconfig @@ -85,6 +85,7 @@ config CROS_EC_UCSI config UCSI_LENOVO_YOGA_C630 tristate "UCSI Interface Driver for Lenovo Yoga C63...
151c0aa896c47a4459e07fee7d4843f44c1bb18e
Analyze and fix the following issue in the Linux kernel code: usb: gadget : fix use-after-free in composite_dev_cleanup()
Problem Details: 1. In func configfs_composite_bind() -> composite_os_desc_req_prepare(): if kmalloc fails, the pointer cdev->os_desc_req will be freed but not set to NULL. Then it will return a failure to the upper-level function. 2. in func configfs_composite_bind() -> composite_dev_cleanup(): it will checks whether ...
```diff diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 0f649c747584..5b3866909b75 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -2465,6 +2465,11 @@ int composite_os_desc_req_prepare(struct usb_composite_dev *cdev, if (!cdev->os_desc_req->buf) {...
82d8cc9542b8b6588a3c7c7e3db8936243163408
Analyze and fix the following issue in the Linux kernel code: usb: chipidea: imx: Add a missing blank line
Problem Details: Fix a checkpatch warning: CHECK: Please use a blank line after function/struct/union/enum declarations Reported-by: Xu Yang <xu.yang_2@nxp.com> Acked-by: Peter Chen <peter.chen@kernel.org> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/36d1c961-319e-4457-bdc1-6...
```diff diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c index 0b8b980409bc..3d20c5e76c6a 100644 --- a/drivers/usb/chipidea/usbmisc_imx.c +++ b/drivers/usb/chipidea/usbmisc_imx.c @@ -1118,6 +1118,7 @@ static int usbmisc_imx6sx_power_lost_check(struct imx_usbmisc_data *data) else ...
d8e1ecffb4a282791be1b3d81a05541749b0db64
Analyze and fix the following issue in the Linux kernel code: usb: usblp: clean up assignment inside if conditions
Problem Details: This patch cleans up a few cases where assignments were made inside of if conditions, like if ((rv = func()) < 0) into two lines, to improve readability and be more in-line with Linux kernel coding style. It also cleans up checkpatch warnings like: ERROR: do not use assignment in if condition No fu...
```diff diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index e2527faa6592..acbefccbdb2a 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c @@ -366,7 +366,8 @@ static int usblp_check_status(struct usblp *usblp, int err) int error; mutex_lock(&usblp->mut); - if ((error = usbl...
323a80a1a5ace319a722909c006d5bdb2a35d273
Analyze and fix the following issue in the Linux kernel code: usb: gadget: uvc: Initialize frame-based format color matching descriptor
Problem Details: Fix NULL pointer crash in uvcg_framebased_make due to uninitialized color matching descriptor for frame-based format which was added in commit f5e7bdd34aca ("usb: gadget: uvc: Allow creating new color matching descriptors") that added handling for uncompressed and mjpeg format. Crash is seen when user...
```diff diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c index f131943254a4..a4a2d3dcb0d6 100644 --- a/drivers/usb/gadget/function/uvc_configfs.c +++ b/drivers/usb/gadget/function/uvc_configfs.c @@ -2916,8 +2916,15 @@ static struct config_group *uvcg_framebased_make(s...
64690a90cd7c6db16d3af8616be1f4bf8d492850
Analyze and fix the following issue in the Linux kernel code: cdc-acm: fix race between initial clearing halt and open
Problem Details: On the devices that need their endpoints to get an initial clear_halt, this needs to be done before the devices can be opened. That means it needs to be before the devices are registered. Fixes: 15bf722e6f6c0 ("cdc-acm: Add support of ATOL FPrint fiscal printers") Cc: stable <stable@kernel.org> Signed...
```diff diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index c2ecfa3c8349..5a334e370f4d 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -1520,6 +1520,12 @@ skip_countries: goto err_remove_files; } + if (quirks & CLEAR_HALT_CONDITIONS) { + /* errors intentio...
5a9fffd8a533bfb2688ec69dd6d1b6e53ef1177a
Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/pmt: fix build dependency for kunit test
Problem Details: When INTEL_PMT_TELEMETRY is in a loadable module, the discovery test cannot be built-in: x86_64-linux-ld: drivers/platform/x86/intel/pmt/discovery-kunit.o: in function `test_intel_pmt_get_regions_by_feature': discovery-kunit.c:(.text+0x29d): undefined reference to `intel_pmt_get_regions_by_feature' x8...
```diff diff --git a/drivers/platform/x86/intel/pmt/Kconfig b/drivers/platform/x86/intel/pmt/Kconfig index 785c206e1beb..7363446b7773 100644 --- a/drivers/platform/x86/intel/pmt/Kconfig +++ b/drivers/platform/x86/intel/pmt/Kconfig @@ -55,6 +55,7 @@ config INTEL_PMT_DISCOVERY config INTEL_PMT_KUNIT_TEST tristate "KUn...
9e0c433d0c05fde284025264b89eaa4ad59f0a3e
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: Fix 2.7 Gbps DP_LINK_BW value on g4x
Problem Details: On g4x we currently use the 96MHz non-SSC refclk, which can't actually generate an exact 2.7 Gbps link rate. In practice we end up with 2.688 Gbps which seems to be close enough to actually work, but link training is currently failing due to miscalculating the DP_LINK_BW value (we calcualte it directly...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 640c43bf62d4..724de7ed3c04 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -1604,6 +1604,12 @@ int intel_dp_rate_select(struct intel_dp *intel_dp, int rate) ...
cee686775f9cd4eae31f3c1f7ec24b2048082667
Analyze and fix the following issue in the Linux kernel code: iommu/vt-d: Make iotlb_sync_map a static property of dmar_domain
Problem Details: Commit 12724ce3fe1a ("iommu/vt-d: Optimize iotlb_sync_map for non-caching/non-RWBF modes") dynamically set iotlb_sync_map. This causes synchronization issues due to lack of locking on map and attach paths, racing iommufd userspace operations. Invalidation changes must precede device attachment to ensu...
```diff diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 3e774e3bb735..d1791b50f791 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -57,6 +57,8 @@ static void __init check_tylersburg_isoch(void); static int rwbf_quirk; +#define rwbf_required(iommu) (rwbf_qui...
d33bd88ac0ebb49e7f7c8f29a8c7ee9eae85d765
Analyze and fix the following issue in the Linux kernel code: ACPI: processor: perflib: Fix initial _PPC limit application
Problem Details: If the BIOS sets a _PPC frequency limit upfront, it will fail to take effect due to a call ordering issue. Namely, freq_qos_update_request() is called before freq_qos_add_request() for the given request causing the constraint update to be ignored. The call sequence in question is as follows: cpufreq...
```diff diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index 64b8d1e19594..755003bf3a45 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -173,11 +173,14 @@ void acpi_processor_ppc_init(struct cpufreq_policy *policy) { unsigned int cpu; + if (...
57d88f02eb4449d96dfee3af4b7cd4287998bdbd
Analyze and fix the following issue in the Linux kernel code: KVM: s390: Rework guest entry logic
Problem Details: In __vcpu_run() and do_vsie_run(), we enter an RCU extended quiescent state (EQS) by calling guest_enter_irqoff(), which lasts until __vcpu_run() calls guest_exit_irqoff(). However, between the two we enable interrupts and may handle interrupts during the EQS. As the IRQ entry code will not wake RCU in...
```diff diff --git a/arch/s390/include/asm/entry-common.h b/arch/s390/include/asm/entry-common.h index 35555c944630..979af986a8fe 100644 --- a/arch/s390/include/asm/entry-common.h +++ b/arch/s390/include/asm/entry-common.h @@ -59,4 +59,14 @@ static inline void arch_exit_to_user_mode_prepare(struct pt_regs *regs, #de...
ee4a2e08c10188f02fe3fb36b6beddc3c2fdb287
Analyze and fix the following issue in the Linux kernel code: entry: Add arch_in_rcu_eqs()
Problem Details: All architectures have an interruptible RCU extended quiescent state (EQS) as part of their idle sequences, where interrupts can occur without RCU watching. Entry code must account for this and wake RCU as necessary; the common entry code deals with this in irqentry_enter() by treating any interrupt fr...
```diff diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h index f94f3fdf15fc..3bf99cbad8a3 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -86,6 +86,22 @@ static __always_inline void arch_enter_from_user_mode(struct pt_regs *regs); static __always_inline void arch...
d9f595b9a65e9c9eb03e21f3db98fde158d128db
Analyze and fix the following issue in the Linux kernel code: io_uring/zcrx: fix leaking pages on sg init fail
Problem Details: If sg_alloc_table_from_pages() fails, io_import_umem() returns without cleaning up pinned pages first. Fix it. Fixes: b84621d96ee02 ("io_uring/zcrx: allocate sgtable for umem areas") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/9fd94d1bc8c316611eccfec757979918...
```diff diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index 6a983f1ab592..2d8bc4219463 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -194,8 +194,10 @@ static int io_import_umem(struct io_zcrx_ifq *ifq, ret = sg_alloc_table_from_pages(&mem->page_sg_table, pages, nr_pages, 0, nr_pages << PAGE_SHIFT, ...
6bbd3411ff87df1ca38ff32d36eb5dc673ca8021
Analyze and fix the following issue in the Linux kernel code: io_uring/zcrx: don't leak pages on account failure
Problem Details: Someone needs to release pinned pages in io_import_umem() if accounting fails. Assign them to the area but return an error, the following io_zcrx_free_area() will clean them up. Fixes: 262ab205180d2 ("io_uring/zcrx: account area memory") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: htt...
```diff diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index 6b4bdefb40c4..6a983f1ab592 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -199,15 +199,13 @@ static int io_import_umem(struct io_zcrx_ifq *ifq, mem->account_pages = io_count_account_pages(pages, nr_pages); ret = io_account_mem(ifq->ctx, mem->acco...
720df2310b89cf76c1dc1a05902536282506f8bf
Analyze and fix the following issue in the Linux kernel code: io_uring/zcrx: fix null ifq on area destruction
Problem Details: Dan reports that ifq can be null when infering arguments for io_unaccount_mem() from io_zcrx_free_area(). Fix it by always setting a correct ifq. Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202507180628.gBxrOgqr...
```diff diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index dabce3ee0e8b..6b4bdefb40c4 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -377,8 +377,7 @@ static void io_free_rbuf_ring(struct io_zcrx_ifq *ifq) static void io_zcrx_free_area(struct io_zcrx_area *area) { - if (area->ifq) - io_zcrx_unmap_area(area...
491254fff9a8dcb4af99bf2fb40f1e63a7257fd3
Analyze and fix the following issue in the Linux kernel code: drm/nouveau/nvif: fix null ptr deref on pre-fermi boards
Problem Details: Check that gpfifo.post() exists before trying to call it. Fixes: 862450a85b85 ("drm/nouveau/gf100-: track chan progress with non-WFI semaphore release") Reported-by: Jamie Heilman <jamie@audible.transient.net> Closes: https://lore.kernel.org/lkml/aElJIo9_Se6tAR1a@audible.transient.net/ Reported-by: Ru...
```diff diff --git a/drivers/gpu/drm/nouveau/nvif/chan.c b/drivers/gpu/drm/nouveau/nvif/chan.c index baa10227d51a..80c01017d642 100644 --- a/drivers/gpu/drm/nouveau/nvif/chan.c +++ b/drivers/gpu/drm/nouveau/nvif/chan.c @@ -39,6 +39,9 @@ nvif_chan_gpfifo_post(struct nvif_chan *chan) const u32 pbptr = (chan->push.cur -...
ac3dbb91e0167d017f44701dd51c1efe30d0c256
Analyze and fix the following issue in the Linux kernel code: watchdog: dw_wdt: Fix default timeout
Problem Details: The Synopsys Watchdog driver sets the default timeout to 30 seconds, but on some devices this is not a valid timeout. E.g. on RK3588 the actual timeout being used is 44 seconds instead. Once the watchdog is started the value is updated accordingly, but it would be better to expose a sensible timeout t...
```diff diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index 26efca9ae0e7..c3fbb6068c52 100644 --- a/drivers/watchdog/dw_wdt.c +++ b/drivers/watchdog/dw_wdt.c @@ -644,6 +644,8 @@ static int dw_wdt_drv_probe(struct platform_device *pdev) } else { wdd->timeout = DW_WDT_DEFAULT_SECONDS; watchdo...
b08217a257215ed9130fce93d35feba66b49bf0a
Analyze and fix the following issue in the Linux kernel code: clk: imx95-blk-ctl: Fix synchronous abort
Problem Details: When enabling runtime PM for clock suppliers that also belong to a power domain, the following crash is thrown: error: synchronous external abort: 0000000096000010 [#1] PREEMPT SMP Workqueue: events_unbound deferred_probe_work_func pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : cl...
```diff diff --git a/drivers/clk/imx/clk-imx95-blk-ctl.c b/drivers/clk/imx/clk-imx95-blk-ctl.c index cc2ee2be1819..86bdcd217531 100644 --- a/drivers/clk/imx/clk-imx95-blk-ctl.c +++ b/drivers/clk/imx/clk-imx95-blk-ctl.c @@ -342,8 +342,10 @@ static int imx95_bc_probe(struct platform_device *pdev) if (!clk_hw_data) r...
b2be1327a6ed74fbf7e1ac0bc6ca57750f7ebe07
Analyze and fix the following issue in the Linux kernel code: clk: imx: Fix an out-of-bounds access in dispmix_csr_clk_dev_data
Problem Details: When num_parents is 4, __clk_register() occurs an out-of-bounds when accessing parent_names member. Use ARRAY_SIZE() instead of hardcode number here. BUG: KASAN: global-out-of-bounds in __clk_register+0x1844/0x20d8 Read of size 8 at addr ffff800086988e78 by task kworker/u24:3/59 Hardware name: NXP...
```diff diff --git a/drivers/clk/imx/clk-imx95-blk-ctl.c b/drivers/clk/imx/clk-imx95-blk-ctl.c index 25974947ad0c..cc2ee2be1819 100644 --- a/drivers/clk/imx/clk-imx95-blk-ctl.c +++ b/drivers/clk/imx/clk-imx95-blk-ctl.c @@ -219,11 +219,15 @@ static const struct imx95_blk_ctl_dev_data lvds_csr_dev_data = { .clk_reg_off...
9744ede7099e8a69c04aa23fbea44c15bc390c04
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek - Add mute LED support for HP Pavilion 15-eg0xxx
Problem Details: The mute LED on the HP Pavilion Laptop 15-eg0xxx, which uses the ALC287 codec, didn't work. This patch fixes the issue by enabling the ALC287_FIXUP_HP_GPIO_LED quirk. Tested on a physical device, the LED now works as intended. Signed-off-by: Dawid Rezler <dawidrezler.patches@gmail.com> Cc: <stable@vg...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index f68a15831ba9..b017eeabbd7e 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -10694,6 +10694,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", AL...
b83440736864ad96f863666fea49bd14ab17547d
Analyze and fix the following issue in the Linux kernel code: RDMA/mlx5: Fix incorrect MKEY masking
Problem Details: mkey_mask is __be64 type, while MLX5_MKEY_MASK_PAGE_SIZE is declared as unsigned long long. This causes to the static checkers errors: drivers/infiniband/hw/mlx5/umr.c:663:49: warning: invalid assignment: &= drivers/infiniband/hw/mlx5/umr.c:663:49: left side has type restricted __be64 drivers/infin...
```diff diff --git a/drivers/infiniband/hw/mlx5/umr.c b/drivers/infiniband/hw/mlx5/umr.c index 054f6dae2415..7ef35cddce81 100644 --- a/drivers/infiniband/hw/mlx5/umr.c +++ b/drivers/infiniband/hw/mlx5/umr.c @@ -660,7 +660,8 @@ static void mlx5r_umr_final_update_xlt(struct mlx5_ib_dev *dev, if (!mr->ibmr.length) ...
d59ebb4549ff9bdba7abf6a5246a749e7f4a36ed
Analyze and fix the following issue in the Linux kernel code: RDMA/mlx5: Fix returned type from _mlx5r_umr_zap_mkey()
Problem Details: As Colin reported: "The variable zapped_blocks is a size_t type and is being assigned a int return value from the call to _mlx5r_umr_zap_mkey. Since zapped_blocks is an unsigned type, the error check for zapped_blocks < 0 will never be true." So separate return error and nblocks assignment. Fixe...
```diff diff --git a/drivers/infiniband/hw/mlx5/umr.c b/drivers/infiniband/hw/mlx5/umr.c index fa5c4ea685b9..054f6dae2415 100644 --- a/drivers/infiniband/hw/mlx5/umr.c +++ b/drivers/infiniband/hw/mlx5/umr.c @@ -992,6 +992,7 @@ _mlx5r_dmabuf_umr_update_pas(struct mlx5_ib_mr *mr, unsigned int flags, static int _mlx5r_um...
61ae7f8694fb4b57a8c02a1a8d2b601806afc999
Analyze and fix the following issue in the Linux kernel code: PCI: endpoint: pci-epf-vntb: Fix the incorrect usage of __iomem attribute
Problem Details: __iomem attribute is supposed to be used only with variables holding the MMIO pointer. But here, 'mw_addr' variable is just holding a 'void *' returned by pci_epf_alloc_space(). So annotating it with __iomem is clearly wrong. Hence, drop the attribute. This also fixes the below sparse warning: driv...
```diff diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c index ac83a6dc6116..83e9ab10f9c4 100644 --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c @@ -512,7 +512,7 @@ static int epf_ntb_db_bar_init(struct epf...
dba7d9dbfdc4389361ff3a910e767d3cfca22587
Analyze and fix the following issue in the Linux kernel code: soundwire: stream: restore params when prepare ports fail
Problem Details: The bus->params should be restored if the stream is failed to prepare. The issue exists since beginning. The Fixes tag just indicates the first commit that the commit can be applied to. Fixes: 17ed5bef49f4 ("soundwire: add missing newlines in dynamic debug logs") Signed-off-by: Bard Liao <yung-chuan.l...
```diff diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index a4bea742b5d9..38c9dbd35606 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -1510,7 +1510,7 @@ static int _sdw_prepare_stream(struct sdw_stream_runtime *stream, if (ret < 0) { dev_err(bus->dev, "Prepare ...
46ecfb68ddd88118dcf623f21785d78f69337631
Analyze and fix the following issue in the Linux kernel code: LoongArch: KVM: Add stat information with kernel irqchip
Problem Details: Move stat information about kernel irqchip from VM to vCPU, since all vm exiting events should be vCPU relative. And also add entry with structure kvm_vcpu_stats_desc[], so that it can display with directory /sys/kernel/debug/kvm. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Huacai Che...
```diff diff --git a/arch/loongarch/include/asm/kvm_host.h b/arch/loongarch/include/asm/kvm_host.h index a3c4cc46c892..0cecbd038bb3 100644 --- a/arch/loongarch/include/asm/kvm_host.h +++ b/arch/loongarch/include/asm/kvm_host.h @@ -50,12 +50,6 @@ struct kvm_vm_stat { struct kvm_vm_stat_generic generic; u64 pages; ...
d5fc1400a34b4ea5e8f2ce296ea12bf8c8421694
Analyze and fix the following issue in the Linux kernel code: smb/server: avoid deadlock when linking with ReplaceIfExists
Problem Details: If smb2_create_link() is called with ReplaceIfExists set and the name does exist then a deadlock will happen. ksmbd_vfs_kern_path_locked() will return with success and the parent directory will be locked. ksmbd_vfs_remove_file() will then remove the file. ksmbd_vfs_link() will then be called while t...
```diff diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c index 02ccdcc86af2..07f567ed609c 100644 --- a/fs/smb/server/smb2pdu.c +++ b/fs/smb/server/smb2pdu.c @@ -6037,7 +6037,6 @@ static int smb2_create_link(struct ksmbd_work *work, { char *link_name = NULL, *target_name = NULL, *pathname = NULL; stru...
6e253295e9c4c1dc1cf4a5eb4c0a0d9ebb68ce4b
Analyze and fix the following issue in the Linux kernel code: hwmon: (ltc4282) fix copy paste on variable name
Problem Details: The struct hwmon_chip_info was named ltc2947_chip_info which is obviously a copy paste leftover. Name it accordingly. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20250611-fix-ltc4282-repetead-write-v1-2-fe46edd08cf1@analog.com Signed-off-by: Guenter Roeck <linux@roeck-u...
```diff diff --git a/drivers/hwmon/ltc4282.c b/drivers/hwmon/ltc4282.c index f607fe8f7937..424fa9e3a099 100644 --- a/drivers/hwmon/ltc4282.c +++ b/drivers/hwmon/ltc4282.c @@ -1596,7 +1596,7 @@ static const struct hwmon_ops ltc4282_hwmon_ops = { .read_string = ltc4282_read_labels, }; -static const struct hwmon_chip...
9c62e2282900332c8b711d9f9e37af369a8ef71b
Analyze and fix the following issue in the Linux kernel code: hwmon: (gsc-hwmon) fix fan pwm setpoint show functions
Problem Details: The Linux hwmon sysfs API values for pwmX_auto_pointY_pwm represent an integer value between 0 (0%) to 255 (100%) and the pwmX_auto_pointY_temp represent millidegrees Celcius. Commit a6d80df47ee2 ("hwmon: (gsc-hwmon) fix fan pwm temperature scaling") properly addressed the incorrect scaling in the pwm...
```diff diff --git a/drivers/hwmon/gsc-hwmon.c b/drivers/hwmon/gsc-hwmon.c index 0f9af82cebec..105b9f9dbec3 100644 --- a/drivers/hwmon/gsc-hwmon.c +++ b/drivers/hwmon/gsc-hwmon.c @@ -64,7 +64,7 @@ static ssize_t pwm_auto_point_temp_show(struct device *dev, return ret; ret = regs[0] | regs[1] << 8; - return sprin...
f411b7eddde8b780a61dadea0916480f5c9edf5a
Analyze and fix the following issue in the Linux kernel code: rust: kernel: remove `fmt!`, fix clippy::uninlined-format-args
Problem Details: Rather than export a macro that delegates to `core::format_args`, simply re-export `core::format_args` as `fmt` from the prelude. This exposes clippy warnings which were previously obscured by this macro, such as: warning: variables can be used directly in the `format!` string --> ../drivers...
```diff diff --git a/drivers/cpufreq/rcpufreq_dt.rs b/drivers/cpufreq/rcpufreq_dt.rs index 30a170570c0e..4608d2286fa1 100644 --- a/drivers/cpufreq/rcpufreq_dt.rs +++ b/drivers/cpufreq/rcpufreq_dt.rs @@ -9,7 +9,6 @@ use kernel::{ cpumask::CpumaskVar, device::{Core, Device}, error::code::*, - fmt, ...
1966554b2e82b89d4f6490f430ce76a379e23f1f
Analyze and fix the following issue in the Linux kernel code: block: fix module reference leak in mq-deadline I/O scheduler
Problem Details: During probe, when the block layer registers a request queue, it defaults to the mq-deadline I/O scheduler if the device is single-queue and the mq-deadline module is available. To determine availability, the elevator_set_default() invokes elevator_find_get(), which increments the module's reference co...
```diff diff --git a/block/elevator.c b/block/elevator.c index ab22542e6cf0..a960bdc869bc 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -719,7 +719,8 @@ void elevator_set_default(struct request_queue *q) .name = "mq-deadline", .no_uevent = true, }; - int err = 0; + int err; + struct elevator_type *e; ...
d1fbe1ebf4a12cabd7945335d5e47718cb2bef99
Analyze and fix the following issue in the Linux kernel code: io_uring: fix breakage in EXPERT menu
Problem Details: Add a dependency for IO_URING for the GCOV_PROFILE_URING symbol. Without this patch the EXPERT config menu ends with "Enable IO uring support" and the menu prompts for GCOV_PROFILE_URING and IO_URING_MOCK_FILE are not subordinate to it. This causes all of the EXPERT Kconfig options that follow GCOV_PR...
```diff diff --git a/init/Kconfig b/init/Kconfig index c40a7c65fb4c..0fa05ba08442 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1790,7 +1790,7 @@ config IO_URING config GCOV_PROFILE_URING bool "Enable GCOV profiling on the io_uring subsystem" - depends on GCOV_KERNEL + depends on IO_URING && GCOV_KERNEL help ...
275ad5e7931160aca2ea7657f7be7ef3493dea79
Analyze and fix the following issue in the Linux kernel code: rust: list: remove nonexistent generic parameter in link
Problem Details: `ListLinks` does not take a `T` generic parameter, unlike `ListLinksSelfPtr`. Thus fix it, which makes it also consistent with the rest of the links in the file. Fixes: 40c53294596b ("rust: list: add macro for implementing ListItem") Reviewed-by: Tamir Duberstein <tamird@gmail.com> Link: https://lore...
```diff diff --git a/rust/kernel/list/impl_list_item_mod.rs b/rust/kernel/list/impl_list_item_mod.rs index f4c91832a875..202bc6f97c13 100644 --- a/rust/kernel/list/impl_list_item_mod.rs +++ b/rust/kernel/list/impl_list_item_mod.rs @@ -17,13 +17,13 @@ /// [`ListLinks<ID>`]: crate::list::ListLinks /// [`ListItem`]: cra...
4d9d1a08b796efd54f1e29b42bd95879109fe448
Analyze and fix the following issue in the Linux kernel code: apparmor: fix: accept2 being specifie even when permission table is presnt
Problem Details: The transition to the perms32 permission table dropped the need for the accept2 table as permissions. However accept2 can be used for flags and may be present even when the perms32 table is present. So instead of checking on version, check whether the table is present. Fixes: 2e12c5f06017 ("apparmor: ...
```diff diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c index 553e52df3aa9..7523971e37d9 100644 --- a/security/apparmor/policy_unpack.c +++ b/security/apparmor/policy_unpack.c @@ -775,7 +775,8 @@ static int unpack_pdb(struct aa_ext *e, struct aa_policydb **policy, } } - if (pdb...
f9c9dce01e9640d94a37304bddc97b738ee4ac35
Analyze and fix the following issue in the Linux kernel code: apparmor: fix documentation mismatches in val_mask_to_str and socket functions
Problem Details: This patch fixes kernel-doc warnings: 1. val_mask_to_str: - Added missing descriptions for `size` and `table` parameters. - Removed outdated str_size and chrs references. 2. Socket Functions: - Makes non-null requirements clear for socket/address args. - Standardizes return values per kernel convention...
```diff diff --git a/security/apparmor/lib.c b/security/apparmor/lib.c index 7d43f6a62404..82dbb97ad406 100644 --- a/security/apparmor/lib.c +++ b/security/apparmor/lib.c @@ -85,7 +85,7 @@ int aa_parse_debug_params(const char *str) * val_mask_to_str - convert a perm mask to its short string * @str: character buffer...
4ce7d3cf5ad846a8843f8afc78de2a8309f74f12
Analyze and fix the following issue in the Linux kernel code: apparmor: remove redundant perms.allow MAY_EXEC bitflag set
Problem Details: This section of profile_transition that occurs after x_to_label only happens if perms.allow already has the MAY_EXEC bit set, so we don't need to set it again. Fixes: 16916b17b4f8 ("apparmor: force auditing of conflicting attachment execs from confined") Signed-off-by: Ryan Lee <ryan.lee@canonical.com...
```diff diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c index f9370a63a83c..d689597f253b 100644 --- a/security/apparmor/domain.c +++ b/security/apparmor/domain.c @@ -734,10 +734,8 @@ static struct aa_label *profile_transition(const struct cred *subj_cred, * we don't need to care about clobberi...
da0edababafa444e638a0be6dd2feef0a9e529e2
Analyze and fix the following issue in the Linux kernel code: apparmor: fix kernel doc warnings for kernel test robot
Problem Details: Fix kernel doc warnings for the functions - apparmor_socket_bind - apparmor_unix_may_send - apparmor_unix_stream_connect - val_mask_to_str Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202506070127.B1bc3da4-lkp@intel.com/ Signed-off-by: John Johansen <joh...
```diff diff --git a/security/apparmor/lib.c b/security/apparmor/lib.c index f51e79cc36d4..7d43f6a62404 100644 --- a/security/apparmor/lib.c +++ b/security/apparmor/lib.c @@ -84,8 +84,8 @@ int aa_parse_debug_params(const char *str) /** * val_mask_to_str - convert a perm mask to its short string * @str: character b...
c68804199dd9d63868497a27b5da3c3cd15356db
Analyze and fix the following issue in the Linux kernel code: apparmor: Fix unaligned memory accesses in KUnit test
Problem Details: The testcase triggers some unnecessary unaligned memory accesses on the parisc architecture: Kernel: unaligned access to 0x12f28e27 in policy_unpack_test_init+0x180/0x374 (iir 0x0cdc1280) Kernel: unaligned access to 0x12f28e67 in policy_unpack_test_init+0x270/0x374 (iir 0x64dc00ce) Use the existin...
```diff diff --git a/security/apparmor/policy_unpack_test.c b/security/apparmor/policy_unpack_test.c index f070902da8fc..a7ac0ccc6cfe 100644 --- a/security/apparmor/policy_unpack_test.c +++ b/security/apparmor/policy_unpack_test.c @@ -9,6 +9,8 @@ #include "include/policy.h" #include "include/policy_unpack.h" +#incl...
c567de2c4f5fe6e079672e074e1bc6122bf7e444
Analyze and fix the following issue in the Linux kernel code: apparmor: Fix 8-byte alignment for initial dfa blob streams
Problem Details: The dfa blob stream for the aa_dfa_unpack() function is expected to be aligned on a 8 byte boundary. The static nulldfa_src[] and stacksplitdfa_src[] arrays store the initial apparmor dfa blob streams, but since they are declared as an array-of-chars the compiler and linker will only ensure a "char" (...
```diff diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index 0640a379a518..d3da9db244b0 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -2404,12 +2404,12 @@ static int __init apparmor_nf_ip_init(void) __initcall(apparmor_nf_ip_init); #endif -static char nulldfa_src[] = { +stati...
3fa0af4cc8a31d4139ee85a7b0e3d9b4f37b3093
Analyze and fix the following issue in the Linux kernel code: apparmor: shift uid when mediating af_unix in userns
Problem Details: Avoid unshifted ouids for socket file operations as observed when using AppArmor profiles in unprivileged containers with LXD or Incus. For example, root inside container and uid 1000000 outside, with `owner /root/sock rw,` profile entry for nc: /root$ nc -lkU sock & nc -U sock ==> dmesg apparmor="DE...
```diff diff --git a/security/apparmor/af_unix.c b/security/apparmor/af_unix.c index 257648a13bf8..c4e722605fcd 100644 --- a/security/apparmor/af_unix.c +++ b/security/apparmor/af_unix.c @@ -12,6 +12,7 @@ * License. */ +#include <linux/fs.h> #include <net/tcp_states.h> #include "include/audit.h" @@ -44,8 +45,...
c5bf96d20fd787e4909b755de4705d52f3458836
Analyze and fix the following issue in the Linux kernel code: apparmor: shift ouid when mediating hard links in userns
Problem Details: When using AppArmor profiles inside an unprivileged container, the link operation observes an unshifted ouid. (tested with LXD and Incus) For example, root inside container and uid 1000000 outside, with `owner /root/link l,` profile entry for ln: /root$ touch chain && ln chain link ==> dmesg apparmor...
```diff diff --git a/security/apparmor/file.c b/security/apparmor/file.c index 65e1d29af792..5504059d6101 100644 --- a/security/apparmor/file.c +++ b/security/apparmor/file.c @@ -430,9 +430,11 @@ int aa_path_link(const struct cred *subj_cred, { struct path link = { .mnt = new_dir->mnt, .dentry = new_dentry }; stru...
88fec3526e84123997ecebd6bb6778eb4ce779b7
Analyze and fix the following issue in the Linux kernel code: apparmor: make sure unix socket labeling is correctly updated.
Problem Details: When a unix socket is passed into a different confinement domain make sure its cached mediation labeling is updated to correctly reflect which domains are using the socket. Fixes: c05e705812d1 ("apparmor: add fine grained af_unix mediation") Signed-off-by: John Johansen <john.johansen@canonical.com>
```diff diff --git a/security/apparmor/af_unix.c b/security/apparmor/af_unix.c index dc25f1afe819..257648a13bf8 100644 --- a/security/apparmor/af_unix.c +++ b/security/apparmor/af_unix.c @@ -646,6 +646,67 @@ int aa_unix_peer_perm(const struct cred *subj_cred, peer_label); } +/* sk_plabel for comparison onl...
fc07839203f3b98fa9afac370aaba283afc10433
Analyze and fix the following issue in the Linux kernel code: seq_buf: Introduce KUnit tests
Problem Details: Add KUnit tests for the seq_buf API to ensure its correctness and prevent future regressions, covering the following functions: - seq_buf_init() - DECLARE_SEQ_BUF() - seq_buf_clear() - seq_buf_puts() - seq_buf_putc() - seq_buf_printf() - seq_buf_get_buf() - seq_buf_commit() $ tools/testing/kunit/kunit...
```diff diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index ebe33181b6e6..087beae1e8fb 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2460,6 +2460,15 @@ config SCANF_KUNIT_TEST If unsure, say N. +config SEQ_BUF_KUNIT_TEST + tristate "KUnit test for seq_buf" if !KUNIT_ALL_TESTS + depends on KUNI...
bcce05041b21888f10b80ea903dcfe51a25c586e
Analyze and fix the following issue in the Linux kernel code: Input: xpad - set correct controller type for Acer NGR200
Problem Details: The controller should have been set as XTYPE_XBOX360 and not XTYPE_XBOX. Also the entry is in the wrong place. Fix it. Reported-by: Vicki Pfau <vi@endrift.com> Signed-off-by: Nilton Perim Neto <niltonperimneto@gmail.com> Link: https://lore.kernel.org/r/20250708033126.26216-2-niltonperimneto@gmail.com ...
```diff diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 5d9b7007a730..1d8c579b5433 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -172,12 +172,12 @@ static const struct xpad_device { { 0x046d, 0xca88, "Logitech Compact Controller for Xbox", 0, XTYPE_...
45dd59885ca8d283f365774a82b9b785b65c8d37
Analyze and fix the following issue in the Linux kernel code: dt-bindings: clock: qcom,sm4450-dispcc: Reference qcom,gcc.yaml
Problem Details: Reference the common qcom,gcc.yaml schema to unify the common parts of the binding. Suggested-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/2...
```diff diff --git a/Documentation/devicetree/bindings/clock/qcom,sm4450-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm4450-dispcc.yaml index 378f05e5988c..d977788bdc8a 100644 --- a/Documentation/devicetree/bindings/clock/qcom,sm4450-dispcc.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,sm4450-d...
9df98d4b50bec90b9d7069691dce88d50595a872
Analyze and fix the following issue in the Linux kernel code: dt-bindings: clock: qcom,sm4450-camcc: Reference qcom,gcc.yaml
Problem Details: Reference the common qcom,gcc.yaml schema to unify the common parts of the binding. Suggested-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/2...
```diff diff --git a/Documentation/devicetree/bindings/clock/qcom,sm4450-camcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm4450-camcc.yaml index 0b340b2f3205..70f025b26736 100644 --- a/Documentation/devicetree/bindings/clock/qcom,sm4450-camcc.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,sm4450-camc...
56245968a7b71fe71b610a9431605034b10922c9
Analyze and fix the following issue in the Linux kernel code: dt-bindings: clock: qcom,mmcc: Reference qcom,gcc.yaml
Problem Details: Reference the common qcom,gcc.yaml schema to unify the common parts of the binding. Suggested-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/2...
```diff diff --git a/Documentation/devicetree/bindings/clock/qcom,mmcc.yaml b/Documentation/devicetree/bindings/clock/qcom,mmcc.yaml index 59ac288ca5f1..53ceec9673a8 100644 --- a/Documentation/devicetree/bindings/clock/qcom,mmcc.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,mmcc.yaml @@ -38,36 +38,16 @@ prope...
92b7d67614a68b03daf126d252c1cea935e9d5e5
Analyze and fix the following issue in the Linux kernel code: dt-bindings: clock: qcom,sm8150-camcc: Reference qcom,gcc.yaml
Problem Details: Reference the common qcom,gcc.yaml schema to unify the common parts of the binding. Suggested-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/2...
```diff diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8150-camcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8150-camcc.yaml index a210ec9d820c..a55e30a4975e 100644 --- a/Documentation/devicetree/bindings/clock/qcom,sm8150-camcc.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,sm8150-camc...
6ade153349c6bb990d170cecc3e8bdd8628119ab
Analyze and fix the following issue in the Linux kernel code: kasan: use vmalloc_dump_obj() for vmalloc error reports
Problem Details: Since 6ee9b3d84775 ("kasan: remove kasan_find_vm_area() to prevent possible deadlock"), more detailed info about the vmalloc mapping and the origin was dropped due to potential deadlocks. While fixing the deadlock is necessary, that patch was too quick in killing an otherwise useful feature, and did n...
```diff diff --git a/mm/kasan/report.c b/mm/kasan/report.c index b0877035491f..62c01b4527eb 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -399,7 +399,9 @@ static void print_address_description(void *addr, u8 tag, } if (is_vmalloc_addr(addr)) { - pr_err("The buggy address %px belongs to a vmalloc virt...
153ad566724fe6f57b14f66e9726d295d22e576d
Analyze and fix the following issue in the Linux kernel code: mm/ksm: fix -Wsometimes-uninitialized from clang-21 in advisor_mode_show()
Problem Details: After a recent change in clang to expose uninitialized warnings from const variables [1], there is a false positive warning from the if statement in advisor_mode_show(). mm/ksm.c:3687:11: error: variable 'output' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitializ...
```diff diff --git a/mm/ksm.c b/mm/ksm.c index 8583fb91ef13..a9d3e719e089 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -3669,10 +3669,10 @@ static ssize_t advisor_mode_show(struct kobject *kobj, { const char *output; - if (ksm_advisor == KSM_ADVISOR_NONE) - output = "[none] scan-time"; - else if (ksm_advisor == KSM_AD...
4aead50caf67e01020c8be1945c3201e8a972a27
Analyze and fix the following issue in the Linux kernel code: nilfs2: reject invalid file types when reading inodes
Problem Details: To prevent inodes with invalid file types from tripping through the vfs and causing malfunctions or assertion failures, add a missing sanity check when reading an inode from a block device. If the file type is not valid, treat it as a filesystem error. Link: https://lkml.kernel.org/r/20250710134952.2...
```diff diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 6613b8fcceb0..5cf7328d5360 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c @@ -472,11 +472,18 @@ static int __nilfs_read_inode(struct super_block *sb, inode->i_op = &nilfs_symlink_inode_operations; inode_nohighmem(inode); inode->i_mapping-...
7563fcbfd484b347b776aeed4d7dac78b30884aa
Analyze and fix the following issue in the Linux kernel code: selftests/mm: fix split_huge_page_test for folio_split() tests
Problem Details: PID_FMT does not have an offset field, so folio_split() tests are not performed. Add PID_FMT_OFFSET with an offset field and use it to perform folio_split() tests. Link: https://lkml.kernel.org/r/20250709012800.3225727-1-ziy@nvidia.com Fixes: 80a5c494c89f ("selftests/mm: add tests for folio_split(), ...
```diff diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/tools/testing/selftests/mm/split_huge_page_test.c index aa7400ed0e99..f0d9c035641d 100644 --- a/tools/testing/selftests/mm/split_huge_page_test.c +++ b/tools/testing/selftests/mm/split_huge_page_test.c @@ -31,6 +31,7 @@ uint64_t pmd_pagesize; #de...
694d6b99923eb05a8fd188be44e26077d19f0e21
Analyze and fix the following issue in the Linux kernel code: mm/zsmalloc: do not pass __GFP_MOVABLE if CONFIG_COMPACTION=n
Problem Details: Commit 48b4800a1c6a ("zsmalloc: page migration support") added support for migrating zsmalloc pages using the movable_operations migration framework. However, the commit did not take into account that zsmalloc supports migration only when CONFIG_COMPACTION is enabled. Tracing shows that zsmalloc was s...
```diff diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 999b513c7fdf..f3e2215f95eb 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -1043,6 +1043,9 @@ static struct zspage *alloc_zspage(struct zs_pool *pool, if (!zspage) return NULL; + if (!IS_ENABLED(CONFIG_COMPACTION)) + gfp &= ~__GFP_MOVABLE; + zspage->m...
9f1e8cd0b7c4c944e9921b52a6661b5eda2705ab
Analyze and fix the following issue in the Linux kernel code: mm/vmscan: fix hwpoisoned large folio handling in shrink_folio_list
Problem Details: In shrink_folio_list(), the hwpoisoned folio may be large folio, which can't be handled by unmap_poisoned_folio(). For THP, try_to_unmap_one() must be passed with TTU_SPLIT_HUGE_PMD to split huge PMD first and then retry. Without TTU_SPLIT_HUGE_PMD, we will trigger null-ptr deref of pvmw.pte. Even w...
```diff diff --git a/mm/memory-failure.c b/mm/memory-failure.c index b91a33fb6c69..225dddff091d 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1561,6 +1561,10 @@ static int get_hwpoison_page(struct page *p, unsigned long flags) return ret; } +/* + * The caller must guarantee the folio isn't large f...
a9ed4422adacce848fd368c3a7076368ead7fc18
Analyze and fix the following issue in the Linux kernel code: lib/raid6: update recov_rvv.c zero page usage
Problem Details: Update lib/raid6/recov_rvv.c, for 1857fcc84744 ("lib/raid6: replace custom zero page with ZERO_PAGE"), per Klara. Link: https://lkml.kernel.org/r/aFkUnXWtxcgOTVkw@gondor.apana.org.au Fixes: 1857fcc84744 ("lib/raid6: replace custom zero page with ZERO_PAGE") Signed-off-by: Herbert Xu <herbert@gondor.ap...
```diff diff --git a/lib/raid6/recov_rvv.c b/lib/raid6/recov_rvv.c index f29303795ccf..5d54c4b437df 100644 --- a/lib/raid6/recov_rvv.c +++ b/lib/raid6/recov_rvv.c @@ -165,10 +165,10 @@ static void raid6_2data_recov_rvv(int disks, size_t bytes, int faila, * delta p and delta q */ dp = (u8 *)ptrs[faila]; - ptrs[f...
599579e857ab8d8f97409f631090e08018f8343b
Analyze and fix the following issue in the Linux kernel code: selftests/thermal: remove duplicate newlines in perror calls
Problem Details: perror() automatically appends a newline character, so the explicit '\n' in the format strings is redundant and results in duplicate newlines in the output. Remove the redundant '\n' characters from perror() calls in workload_hint_test.c to fix the formatting. Link: https://lkml.kernel.org/r/F482FB1E...
```diff diff --git a/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c b/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c index bda006af8b1b..ba58589a1145 100644 --- a/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c +++ b/tools/testing/selftests/th...
08eabe4b9e98d940d2dd6cdb70c7a9187ca54aca
Analyze and fix the following issue in the Linux kernel code: ocfs2: avoid potential ABBA deadlock by reordering tl_inode lock
Problem Details: In ocfs2_move_extent(), tl_inode is currently locked after the global bitmap inode. However, in ocfs2_flush_truncate_log(), the lock order is reversed: tl_inode is locked first, followed by the global bitmap inode. This creates a classic ABBA deadlock scenario if two threads attempt these operations ...
```diff diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c index 369c7d27befd..cbe2f8ed8897 100644 --- a/fs/ocfs2/move_extents.c +++ b/fs/ocfs2/move_extents.c @@ -617,6 +617,8 @@ static int ocfs2_move_extent(struct ocfs2_move_extents_context *context, */ credits += OCFS2_INODE_UPDATE_CREDITS + 1; + i...
97103dcec292b8688de142f7a48bd0d46038d3f6
Analyze and fix the following issue in the Linux kernel code: squashfs: fix incorrect argument to sizeof in kmalloc_array call
Problem Details: The sizeof(void *) is the incorrect argument in the kmalloc_array call, it best to fix this by using sizeof(*cache_folios) instead. Fortunately the sizes of void* and folio* happen to be the same, so this has not shown up as a run time issue. [akpm@linux-foundation.org: fix build] Link: https://lkml....
```diff diff --git a/fs/squashfs/block.c b/fs/squashfs/block.c index b3ae3b1cc0e5..b69c294e3ef0 100644 --- a/fs/squashfs/block.c +++ b/fs/squashfs/block.c @@ -89,7 +89,7 @@ static int squashfs_bio_read_cached(struct bio *fullbio, int err = 0; #ifdef CONFIG_SQUASHFS_COMP_CACHE_FULL struct folio **cache_folios = kma...
44acc46d182ff36d40cea69db3875440fab72ba5
Analyze and fix the following issue in the Linux kernel code: ocfs2: avoid NULL pointer dereference in dx_dir_lookup_rec()
Problem Details: When a directory entry is not found, ocfs2_dx_dir_lookup_rec() prints an error message that unconditionally dereferences the 'rec' pointer. However, if 'rec' is NULL, this leads to a NULL pointer dereference and a kernel panic. Add an explicit check empty extent list to avoid dereferencing NULL 'rec'...
```diff diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index 7799f4d16ce9..8c9c4825f984 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c @@ -798,6 +798,14 @@ static int ocfs2_dx_dir_lookup_rec(struct inode *inode, } } + if (le16_to_cpu(el->l_next_free_rec) == 0) { + ret = ocfs2_error(inode->i_sb, + "Inode %l...
988f451ecb17c359cb34e360fce82039942de7bb
Analyze and fix the following issue in the Linux kernel code: ocfs2/dlm: fix "take a while" typo
Problem Details: Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Joseph Qi <jiangqi903@gmail.com> Cc: Changwei Ge <gechangwei@live.cn> Cc: Jun Piao <piaojun@huawei.com> Signed-off-by:...
```diff diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index 67fc62a49a76..00f52812dbb0 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c @@ -2632,7 +2632,7 @@ again: dlm_reco_master_ready(dlm), msecs_to_jiffies(1000)); if (!dlm_reco_master_ready(dlm)) { - ...
4efec6c0919d9081a52be50d5b5bfa32bf489c75
Analyze and fix the following issue in the Linux kernel code: samples: enhance hung_task detector test with read-write semaphore support
Problem Details: Extend the hung_task detector test module to include read-write semaphore support alongside existing mutex and semaphore tests. This module now creates additional debugfs files under <debugfs>/hung_task, namely 'rw_semaphore_read' and 'rw_semaphore_write', in addition to 'mutex' and 'semaphore'. Read...
```diff diff --git a/samples/Kconfig b/samples/Kconfig index ffef99950206..a8880c62d4c8 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -316,10 +316,9 @@ config SAMPLE_HUNG_TASK depends on DETECT_HUNG_TASK && DEBUG_FS help Build a module that provides debugfs files (e.g., mutex, semaphore, - etc.) under...
d747755917bf8ae08f490c3fe7d8e321afab8127
Analyze and fix the following issue in the Linux kernel code: panic: add 'panic_sys_info' sysctl to take human readable string parameter
Problem Details: Bitmap definition for 'panic_print' is hard to remember and decode. Add 'panic_sys_info='sysctl to take human readable string like "tasks,mem,timers,locks,ftrace,..." and translate it into bitmap. The detailed mapping is: SYS_INFO_TASKS "tasks" SYS_INFO_MEM "mem" SYS_INFO_TIMERS "timers" SYS_I...
```diff diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst index 0d08b7a2db2d..cccb06d1a6bf 100644 --- a/Documentation/admin-guide/sysctl/kernel.rst +++ b/Documentation/admin-guide/sysctl/kernel.rst @@ -899,6 +899,24 @@ So for example to print tasks and memory info on...