id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
db17ba719bceb52f0ae4ebca0e4c17d9a3bebf05
Analyze and fix the following issue in the Linux kernel code: ibmvnic: Enforce stronger sanity checks on login response
Problem Details: Ensure that all offsets in a login response buffer are within the size of the allocated response buffer. Any offsets or lengths that surpass the allocation are likely the result of an incomplete response buffer. In these cases, a full reset is necessary. When attempting to login, the ibmvnic device wi...
```diff diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 763d613adbcc..f4bb2c9ab9a4 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -5396,6 +5396,7 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq, int num_tx_pools; ...
a7dfeda6fdeccab4c7c3dce9a72c4262b9530c80
Analyze and fix the following issue in the Linux kernel code: net: mana: Fix MANA VF unload when hardware is unresponsive
Problem Details: When unloading the MANA driver, mana_dealloc_queues() waits for the MANA hardware to complete any inflight packets and set the pending send count to zero. But if the hardware has failed, mana_dealloc_queues() could wait forever. Fix this by adding a timeout to the wait. Set the timeout to 120 seconds,...
```diff diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c index a499e460594b..c2ad0921e893 100644 --- a/drivers/net/ethernet/microsoft/mana/mana_en.c +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c @@ -8,6 +8,7 @@ #include <linux/ethtool.h> #include <linux/...
438e9230d60ed8771db5770c3c795f3272ef7aae
Analyze and fix the following issue in the Linux kernel code: parisc: ucmpdi2: Fix no previous prototype for '__ucmpdi2' warning
Problem Details: Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/arch/parisc/lib/ucmpdi2.c b/arch/parisc/lib/ucmpdi2.c index 8e6014a142ef..9d8b4dbae273 100644 --- a/arch/parisc/lib/ucmpdi2.c +++ b/arch/parisc/lib/ucmpdi2.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/module.h> +#include <linux/libgcc.h> union ull_union { unsigned lo...
e09060b3b6b4661278ff8e1b7b81a37d5ea86eae
Analyze and fix the following issue in the Linux kernel code: PCI/ASPM: Use RMW accessors for changing LNKCTL
Problem Details: Don't assume that the device is fully under the control of ASPM and use RMW capability accessors which do proper locking to avoid losing concurrent updates to the register values. If configuration fails in pcie_aspm_configure_common_clock(), the function attempts to restore the old PCI_EXP_LNKCTL_CCC ...
```diff diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 3dafba0b5f41..1bf630059264 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -199,7 +199,7 @@ static void pcie_clkpm_cap_init(struct pcie_link_state *link, int blacklist) static void pcie_aspm_configure_common_clock(struct...
5f75f96c61039151c193775d776fde42477eace1
Analyze and fix the following issue in the Linux kernel code: PCI: pciehp: Use RMW accessors for changing LNKCTL
Problem Details: As hotplug is not the only driver touching LNKCTL, use the RMW capability accessor which handles concurrent changes correctly. Suggested-by: Lukas Wunner <lukas@wunner.de> Fixes: 7f822999e12a ("PCI: pciehp: Add Disable/enable link functions") Link: https://lore.kernel.org/r/20230717120503.15276-4-ilpo...
```diff diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 8711325605f0..fd713abdfb9f 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -332,17 +332,11 @@ int pciehp_check_link_status(struct controller *ctrl) static int __pciehp_link_set(struct ...
fb0171a4c01b4825e36a5584eaa84291179c64ce
Analyze and fix the following issue in the Linux kernel code: PCI: Make link retraining use RMW accessors for changing LNKCTL
Problem Details: Don't assume that the device is fully under the control of PCI core. Use RMW capability accessors in link retraining which do proper locking to avoid losing concurrent updates to the register values. Suggested-by: Lukas Wunner <lukas@wunner.de> Fixes: 4ec73791a64b ("PCI: Work around Pericom PCIe-to-P...
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 60230da957e0..f7315b13bb82 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -4927,7 +4927,6 @@ static int pcie_wait_for_link_status(struct pci_dev *pdev, int pcie_retrain_link(struct pci_dev *pdev, bool use_lt) { int rc; - u16 lnkctl; /* ...
eb3515dc99c7c85f4170b50838136b2a193f8012
Analyze and fix the following issue in the Linux kernel code: x86: Move gds_ucode_mitigated() declaration to header
Problem Details: The declaration got placed in the .c file of the caller, but that causes a warning for the definition: arch/x86/kernel/cpu/bugs.c:682:6: error: no previous prototype for 'gds_ucode_mitigated' [-Werror=missing-prototypes] Move it to a header where both sides can observe it instead. Fixes: 81ac7e5d741...
```diff diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 973db0406528..4ae2773b873d 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -731,4 +731,6 @@ bool arch_is_platform_page(u64 paddr); #define arch_is_platform_page arch_is_platform_page ...
a57c27c7ad85c420b7de44c6ee56692d51709dda
Analyze and fix the following issue in the Linux kernel code: x86/speculation: Add cpu_show_gds() prototype
Problem Details: The newly added function has two definitions but no prototypes: drivers/base/cpu.c:605:16: error: no previous prototype for 'cpu_show_gds' [-Werror=missing-prototypes] Add a declaration next to the other ones for this file to avoid the warning. Fixes: 8974eb588283b ("x86/speculation: Add Gather Data...
```diff diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 23ac87be1ff1..e006c719182b 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -72,6 +72,8 @@ extern ssize_t cpu_show_retbleed(struct device *dev, struct device_attribute *attr, char *buf); extern ssize_t cpu_show_spec_rstack_overflow...
5e70d0acf0825f439079736080350371f8d6699a
Analyze and fix the following issue in the Linux kernel code: PCI: Add locking to RMW PCI Express Capability Register accessors
Problem Details: Many places in the kernel write the Link Control and Root Control PCI Express Capability Registers without proper concurrency control and this could result in losing the changes one of the writers intended to make. Add pcie_cap_lock spinlock into the struct pci_dev and use it to protect bit changes ma...
```diff diff --git a/drivers/pci/access.c b/drivers/pci/access.c index 3c230ca3de58..0b2e90d2f04f 100644 --- a/drivers/pci/access.c +++ b/drivers/pci/access.c @@ -497,8 +497,8 @@ int pcie_capability_write_dword(struct pci_dev *dev, int pos, u32 val) } EXPORT_SYMBOL(pcie_capability_write_dword); -int pcie_capability...
7e3811521dc3934e2ecae8458676fc4a1f62bf9f
Analyze and fix the following issue in the Linux kernel code: riscv: Implement flush_cache_vmap()
Problem Details: The RISC-V kernel needs a sfence.vma after a page table modification: we used to rely on the vmalloc fault handling to emit an sfence.vma, but commit 7d3332be011e ("riscv: mm: Pre-allocate PGD entries for vmalloc/modules area") got rid of this path for 64-bit kernels, so now we need to explicitly emit ...
```diff diff --git a/arch/riscv/include/asm/cacheflush.h b/arch/riscv/include/asm/cacheflush.h index 8091b8bf4883..b93ffddf8a61 100644 --- a/arch/riscv/include/asm/cacheflush.h +++ b/arch/riscv/include/asm/cacheflush.h @@ -37,6 +37,10 @@ static inline void flush_dcache_page(struct page *page) #define flush_icache_user...
d566bea4a638ff0ae824df804bc08818bace41a5
Analyze and fix the following issue in the Linux kernel code: riscv: Do not allow vmap pud mappings for 3-level page table
Problem Details: The vmalloc_fault() path was removed and to avoid syncing the vmalloc PGD mappings, they are now preallocated. But if the kernel can use a PUD mapping (which in sv39 is actually a PGD mapping) for large vmalloc allocation, it will free the current unused preallocated PGD mapping and install a new leaf ...
```diff diff --git a/arch/riscv/include/asm/vmalloc.h b/arch/riscv/include/asm/vmalloc.h index 58d3e447f191..924d01b56c9a 100644 --- a/arch/riscv/include/asm/vmalloc.h +++ b/arch/riscv/include/asm/vmalloc.h @@ -3,12 +3,14 @@ #ifdef CONFIG_HAVE_ARCH_HUGE_VMAP +extern bool pgtable_l4_enabled, pgtable_l5_enabled; + ...
06113b7ac2dfe2eff8f1f8d901924d6710528d79
Analyze and fix the following issue in the Linux kernel code: ARM: dts: st: Add gpio-ranges for stm32f769-pinctrl
Problem Details: Since commit 913a956c4363 ("pinctrl: stm32: use dynamic allocation of GPIO base"), it's impossible to retrieve gpios from phandle, for example, mmc driver can't retrieve cd-gpios. Add missing gpio-ranges properties to fix it. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: ...
```diff diff --git a/arch/arm/boot/dts/st/stm32f769-pinctrl.dtsi b/arch/arm/boot/dts/st/stm32f769-pinctrl.dtsi index c26abc04e2ce..02c2a8b08468 100644 --- a/arch/arm/boot/dts/st/stm32f769-pinctrl.dtsi +++ b/arch/arm/boot/dts/st/stm32f769-pinctrl.dtsi @@ -8,4 +8,48 @@ &pinctrl { compatible = "st,stm32f769-pinctrl";...
756065e3f1e1733e4329b19d02c2e91021882861
Analyze and fix the following issue in the Linux kernel code: ARM: dts: st: Add gpio-ranges for stm32f746-pinctrl
Problem Details: Since commit 913a956c4363 ("pinctrl: stm32: use dynamic allocation of GPIO base"), it's impossible to retrieve gpios from phandle, for example, mmc driver can't retrieve cd-gpios. Add missing gpio-ranges properties to fix it. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: ...
```diff diff --git a/arch/arm/boot/dts/st/stm32f746-pinctrl.dtsi b/arch/arm/boot/dts/st/stm32f746-pinctrl.dtsi index 781197ef42d6..139f72b790c0 100644 --- a/arch/arm/boot/dts/st/stm32f746-pinctrl.dtsi +++ b/arch/arm/boot/dts/st/stm32f746-pinctrl.dtsi @@ -8,4 +8,48 @@ &pinctrl { compatible = "st,stm32f746-pinctrl";...
8c95006d55726eeebf3b863335accfba50d4bc8f
Analyze and fix the following issue in the Linux kernel code: fs: dlm: add plock dev tracepoints
Problem Details: I currently debug nfs plock handling and introduce those two tracepoints for getting more information about what is happening there if the user space reads plock operations from kernel and writing the result back. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teig...
```diff diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index 5c2cc8d940ef..00e1d802a81c 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c @@ -11,6 +11,8 @@ #include <linux/dlm_plock.h> #include <linux/slab.h> +#include <trace/events/dlm.h> + #include "dlm_internal.h" #include "lockspace.h" @@ -509,6 +511,8 @@ stat...
541adb0d4d10b4daf15f4b6b73c5d6b855d23eb5
Analyze and fix the following issue in the Linux kernel code: fs: dlm: debugfs for queued callbacks
Problem Details: It was useful to debug an issue with the callback queue to check if any callbacks in any lkb are for some reason not processed by the callback workqueue. The mentioned issue was fixed by commit a034c1370ded ("fs: dlm: fix DLM_IFL_CB_PENDING gets overwritten"). If there are similar issue that looks like...
```diff diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c index a1aca41c49d0..5aabcb6f0f15 100644 --- a/fs/dlm/debug_fs.c +++ b/fs/dlm/debug_fs.c @@ -18,6 +18,7 @@ #include "dlm_internal.h" #include "midcomms.h" #include "lock.h" +#include "ast.h" #define DLM_DEBUG_BUF_LEN 4096 static char debug_buf[DLM_DEBUG_B...
e717f2e8e4896f4c59a865b11d5cb957b0bfb0e1
Analyze and fix the following issue in the Linux kernel code: fs: dlm: add missing spin_unlock
Problem Details: This patch fixes commit dc52cd2eff4a ("fs: dlm: fix F_CANCELLK to cancel pending request") that we don't unlock the ops_lock in a rate case when a waiter cannot be found. This case can only happen when cancellation of plock operation was successful but no kernel waiter was being found. Fixes: dc52cd2e...
```diff diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index 943d9f8e5564..44b3aab5b709 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c @@ -398,6 +398,7 @@ int dlm_posix_cancel(dlm_lockspace_t *lockspace, u64 number, struct file *file, */ op = plock_lookup_waiter(&info); if (WARN_ON_ONCE(!op)) { + spin_unloc...
eed869aaf1305444434ad5a9a56abc45aacc0c40
Analyze and fix the following issue in the Linux kernel code: parisc: firmware: Mark pdc_result buffers local
Problem Details: This fixes a sparse warning which suggest to make those static. Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index 9cd8af5e79d7..8f37e75f2fb9 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c @@ -74,8 +74,8 @@ static DEFINE_SPINLOCK(pdc_lock); #endif -unsigned long pdc_result[NUM_PDC_RESULT] __aligned(8); -unsi...
a07c03e8064026d55d1699d161c536cc437d58d6
Analyze and fix the following issue in the Linux kernel code: parisc: firmware: Fix sparse context imbalance warnings
Problem Details: Tell sparse about correct context for pdc_cpu_rendezvous_*lock() functions. Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index 6d1c781eb1db..9cd8af5e79d7 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c @@ -334,7 +334,7 @@ int __pdc_cpu_rendezvous(void) /** * pdc_cpu_rendezvous_lock - Lock PDC while transitioning to rendezv...
dc54a52a8cd43cff4fbe8d761c98edeb857d3ad7
Analyze and fix the following issue in the Linux kernel code: parisc: signal: Fix sparse incorrect type in assignment warning
Problem Details: Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index f886ff0c75df..e8d27def6c52 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c @@ -423,7 +423,7 @@ static void check_syscallno_in_delay_branch(struct pt_regs *regs) regs->gr[31] -= 8; /* delayed branching */ ...
b873bde58578db2201b2f30ca708dcb0e35ff4b1
Analyze and fix the following issue in the Linux kernel code: parisc: ioremap: Fix sparse warnings
Problem Details: Fix sparse warning: incorrect type in assignment (different base types) expected unsigned long [usertype] addr got void *addr Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/arch/parisc/mm/ioremap.c b/arch/parisc/mm/ioremap.c index 345ff0b66499..d7ee1f43d997 100644 --- a/arch/parisc/mm/ioremap.c +++ b/arch/parisc/mm/ioremap.c @@ -27,7 +27,7 @@ */ void __iomem *ioremap(unsigned long phys_addr, unsigned long size) { - void __iomem *addr; + uintptr_t addr; struct vm...
a0f4b7879f2e14986200747d1b545e5daac8c624
Analyze and fix the following issue in the Linux kernel code: parisc: Fix lightweight spinlock checks to not break futexes
Problem Details: The lightweight spinlock checks verify that a spinlock has either value 0 (spinlock locked) and that not any other bits than in __ARCH_SPIN_LOCK_UNLOCKED_VAL is set. This breaks the current LWS code, which writes the address of the lock into the lock word to unlock it, which was an optimization to sav...
```diff diff --git a/arch/parisc/Kconfig.debug b/arch/parisc/Kconfig.debug index 1401e4c5fe5f..bf2b21b96f0b 100644 --- a/arch/parisc/Kconfig.debug +++ b/arch/parisc/Kconfig.debug @@ -2,7 +2,7 @@ # config LIGHTWEIGHT_SPINLOCK_CHECK bool "Enable lightweight spinlock checks" - depends on SMP && !DEBUG_SPINLOCK + depen...
6ebcd021c92b8e4b904552e4d87283032100796d
Analyze and fix the following issue in the Linux kernel code: btrfs: reject invalid reloc tree root keys with stack dump
Problem Details: [BUG] Syzbot reported a crash that an ASSERT() got triggered inside prepare_to_merge(). That ASSERT() makes sure the reloc tree is properly pointed back by its subvolume tree. [CAUSE] After more debugging output, it turns out we had an invalid reloc tree: BTRFS error (device loop1): reloc tree mis...
```diff diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 11b1ac716f3b..a9a2c5446c18 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1103,7 +1103,8 @@ static int btrfs_init_fs_root(struct btrfs_root *root, dev_t anon_dev) btrfs_drew_lock_init(&root->snapshot_lock); if (root->root_key.objecti...
05d7ce504545f7874529701664c90814ca645c5d
Analyze and fix the following issue in the Linux kernel code: btrfs: exit gracefully if reloc roots don't match
Problem Details: [BUG] Syzbot reported a crash that an ASSERT() got triggered inside prepare_to_merge(). [CAUSE] The root cause of the triggered ASSERT() is we can have a race between quota tree creation and relocation. This leads us to create a duplicated quota tree in the btrfs_read_fs_root() path, and since it's t...
```diff diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 25a3361caedc..46c3c1d57266 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -1916,7 +1916,39 @@ again: err = PTR_ERR(root); break; } - ASSERT(root->reloc_root == reloc_root); + + if (unlikely(root->reloc_root != relo...
773e722a98e25caf96f91aced7070c1858250ba2
Analyze and fix the following issue in the Linux kernel code: btrfs: avoid race between qgroup tree creation and relocation
Problem Details: [BUG] Syzbot reported a weird ASSERT() triggered inside prepare_to_merge(). assertion failed: root->reloc_root == reloc_root, in fs/btrfs/relocation.c:1919 ------------[ cut here ]------------ kernel BUG at fs/btrfs/relocation.c:1919! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 9...
```diff diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 9b9914e5f03d..11b1ac716f3b 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1300,6 +1300,16 @@ static struct btrfs_root *btrfs_get_root_ref(struct btrfs_fs_info *fs_info, root = btrfs_get_global_root(fs_info, objectid); if (root) retu...
12b2d64e591652a2d97dd3afa2b062ca7a4ba352
Analyze and fix the following issue in the Linux kernel code: btrfs: properly clear end of the unreserved range in cow_file_range
Problem Details: When the call to btrfs_reloc_clone_csums in cow_file_range returns an error, we jump to the out_unlock label with the extent_reserved variable set to false. The cleanup at the label will then call extent_clear_unlock_delalloc on the range from start to end. But we've already added cur_alloc_size to ...
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 49cef61f6a39..9055e19b01ef 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1654,8 +1654,6 @@ out_unlock: clear_bits, page_ops); start += cur_alloc_size; - if (start >= end) - return ret; } /* @@ -1664,9 +1662,11 @@...
5c25699871112853f231e52d51c576d5c759a020
Analyze and fix the following issue in the Linux kernel code: btrfs: don't wait for writeback on clean pages in extent_write_cache_pages
Problem Details: __extent_writepage could have started on more pages than the one it was called for. This happens regularly for zoned file systems, and in theory could happen for compressed I/O if the worker thread was executed very quickly. For such pages extent_write_cache_pages waits for writeback to complete befor...
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index c36eb4956f81..ca765d62324f 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2145,6 +2145,12 @@ retry: continue; } + if (!folio_test_dirty(folio)) { + /* Someone wrote it for us. */ + folio_unlock(folio); + conti...
effa24f689ce0948f68c754991a445a8d697d3a8
Analyze and fix the following issue in the Linux kernel code: btrfs: don't stop integrity writeback too early
Problem Details: extent_write_cache_pages stops writing pages as soon as nr_to_write hits zero. That is the right thing for opportunistic writeback, but incorrect for data integrity writeback, which needs to ensure that no dirty pages are left in the range. Thus only stop the writeback for WB_SYNC_NONE if nr_to_write...
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index a91d5ad27984..c36eb4956f81 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2164,11 +2164,12 @@ retry: } /* - * the filesystem may choose to bump up nr_to_write. + * The filesystem may choose to bump up nr_to_write. ...
369c001b7a2501326a172e0afcc30572f32018c1
Analyze and fix the following issue in the Linux kernel code: xfs: rewrite xchk_inode_is_allocated to work properly
Problem Details: Back in the mists of time[1], I proposed this function to assist the inode btree scrubbers in checking the inode btree contents against the allocation state of the inode records. The original version performed a direct lookup in the inode cache and returned the allocation status if the cached inode ha...
```diff diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c index 3ba329526266..de24532fe083 100644 --- a/fs/xfs/scrub/common.c +++ b/fs/xfs/scrub/common.c @@ -1232,38 +1232,153 @@ xchk_fsgates_enable( } /* - * Decide if this is this a cached inode that's also allocated. + * Decide if this is this a cached i...
0d2966345364ff1de74020ff280970a43e9849cc
Analyze and fix the following issue in the Linux kernel code: xfs: hide xfs_inode_is_allocated in scrub common code
Problem Details: This function is only used by online fsck, so let's move it there. In the next patch, we'll fix it to work properly and to require that the caller hold the AGI buffer locked. No major changes aside from adjusting the signature a bit. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dav...
```diff diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c index 82d2a85d6461..3ba329526266 100644 --- a/fs/xfs/scrub/common.c +++ b/fs/xfs/scrub/common.c @@ -1230,3 +1230,40 @@ xchk_fsgates_enable( sc->flags |= scrub_fsgates; } + +/* + * Decide if this is this a cached inode that's also allocated. + * + *...
a634c0a60b9c7942630b4f68b0af55c62d74b8fc
Analyze and fix the following issue in the Linux kernel code: xfs: fix agf_fllast when repairing an empty AGFL
Problem Details: xfs/139 with parent pointers enabled occasionally pops up a corruption message when online fsck force-rebuild repairs an AGFL: XFS (sde): Metadata corruption detected at xfs_agf_verify+0x11e/0x220 [xfs], xfs_agf block 0x9e0001 XFS (sde): Unmount and run xfs_repair XFS (sde): First 128 bytes of corr...
```diff diff --git a/fs/xfs/scrub/agheader_repair.c b/fs/xfs/scrub/agheader_repair.c index 6fbb31f933b4..876a2f41b063 100644 --- a/fs/xfs/scrub/agheader_repair.c +++ b/fs/xfs/scrub/agheader_repair.c @@ -627,7 +627,10 @@ xrep_agfl_update_agf( } agf->agf_flfirst = cpu_to_be32(0); agf->agf_flcount = cpu_to_be32(flco...
9ce7f9b225b6052bfe50ebf255978a1806ab0472
Analyze and fix the following issue in the Linux kernel code: xfs: clear pagf_agflreset when repairing the AGFL
Problem Details: Clear the pagf_agflreset flag when we're repairing the AGFL because we fix all the same padding problems that xfs_agfl_reset does. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
```diff diff --git a/fs/xfs/scrub/agheader_repair.c b/fs/xfs/scrub/agheader_repair.c index 3dda09b5ece5..6fbb31f933b4 100644 --- a/fs/xfs/scrub/agheader_repair.c +++ b/fs/xfs/scrub/agheader_repair.c @@ -620,8 +620,11 @@ xrep_agfl_update_agf( xfs_force_summary_recalc(sc->mp); /* Update the AGF counters. */ - if (x...
014ad53732d2bac34d21a251f3622a4da516e21b
Analyze and fix the following issue in the Linux kernel code: xfs: use per-AG bitmaps to reap unused AG metadata blocks during repair
Problem Details: The AGFL repair code uses a series of bitmaps to figure out where there are OWN_AG blocks that are not claimed by the free space and rmap btrees. These blocks become the new AGFL, and any overflow is reaped. The bitmaps current track xfs_fsblock_t even though we already know the AG number. In the las...
```diff diff --git a/fs/xfs/scrub/agheader_repair.c b/fs/xfs/scrub/agheader_repair.c index 9ad2987ed6e5..9e99486b5f20 100644 --- a/fs/xfs/scrub/agheader_repair.c +++ b/fs/xfs/scrub/agheader_repair.c @@ -445,13 +445,13 @@ out_revert: struct xrep_agfl { /* Bitmap of alleged AGFL blocks that we're not going to add. *...
5fee784ed08572732ad02af6fb0e6ef7b9c99320
Analyze and fix the following issue in the Linux kernel code: xfs: use deferred frees to reap old btree blocks
Problem Details: Use deferred frees (EFIs) to reap the blocks of a btree that we just replaced. This helps us to shrink the window in which those old blocks could be lost due to a system crash, though we try to flush the EFIs every few hundred blocks so that we don't also overflow the transaction reservations during a...
```diff diff --git a/fs/xfs/scrub/reap.c b/fs/xfs/scrub/reap.c index bc180171d0cb..9b0373dde7ab 100644 --- a/fs/xfs/scrub/reap.c +++ b/fs/xfs/scrub/reap.c @@ -26,6 +26,7 @@ #include "xfs_ag_resv.h" #include "xfs_quota.h" #include "xfs_qm.h" +#include "xfs_bmap.h" #include "scrub/scrub.h" #include "scrub/common.h" ...
d6532904a10290b94d2375ff438313e0fb9fc9f8
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: add Chandan Babu as XFS release manager
Problem Details: I nominate Chandan Babu to take over release management for the upstream kernel's XFS code. He has had sufficient experience merging backports to the 5.4 LTS tree, testing them, and sending them on to the LTS leads. NOTE: I am /not/ nominating Chandan to take on any of the other roles I have just dro...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 6a6158b0c9ae..c592cb671486 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -23329,6 +23329,7 @@ F: include/xen/arm/swiotlb-xen.h F: include/xen/swiotlb-xen.h XFS FILESYSTEM +M: Chandan Babu R <chandan.babu@oracle.com> R: Darrick J. Wong <djwong@kernel.org> L: lin...
d554046e981ad466917c52e822d20c1475d27e0d
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: drop me as XFS maintainer
Problem Details: I burned out years ago trying to juggle the roles senior developer, reviewer, tester, triager (crappily), release manager, and (at times) manager liaison. There's enough work here in this one subsystem for a team of 20 FT, but instead we're squeezed to half that. I thought if I could hold on just a b...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 0feae3b6d87c..6a6158b0c9ae 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -23329,7 +23329,7 @@ F: include/xen/arm/swiotlb-xen.h F: include/xen/swiotlb-xen.h XFS FILESYSTEM -M: Darrick J. Wong <djwong@kernel.org> +R: Darrick J. Wong <djwong@kernel.org> L: linux-xf...
56fec0051a69ace182ca3fba47be9c13038b4e3f
Analyze and fix the following issue in the Linux kernel code: ACPI: resource: Add IRQ override quirk for PCSpecialist Elimina Pro 16 M
Problem Details: The PCSpecialist Elimina Pro 16 M laptop model is a Zen laptop which needs to use the MADT IRQ settings override and which does not have an INT_SRC_OVR entry for IRQ 1 in its MADT. So this model needs a DMI quirk to enable the MADT IRQ settings override to fix its keyboard not working. Fixes: a9c4a91...
```diff diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index 8e32dd5776f5..a4d9f149b48d 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -498,6 +498,17 @@ static const struct dmi_system_id maingear_laptop[] = { { } }; +static const struct dmi_system_id pcspecialist_laptop[] = {...
c418920567ae6101826cc05cda042f71435830d0
Analyze and fix the following issue in the Linux kernel code: regulator: lp872x: Fix Wvoid-pointer-to-enum-cast warning
Problem Details: 'id' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: lp872x.c:867:5: error: cast to smaller integer type 'enum lp872x_regulator_id' from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.ker...
```diff diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c index 63aa227b1813..942f37082cb1 100644 --- a/drivers/regulator/lp872x.c +++ b/drivers/regulator/lp872x.c @@ -864,7 +864,7 @@ static struct lp872x_platform_data for (i = 0; i < num_matches; i++) { pdata->regulator_data[i].id = - (enu...
b29f42c6629bb3bd3d479592d40a7e4c73461a01
Analyze and fix the following issue in the Linux kernel code: regulator: max77857: Fix Wvoid-pointer-to-enum-cast warning
Problem Details: 'id' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: max77857-regulator.c:56:24: error: cast to smaller integer type 'enum max77857_id' from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore...
```diff diff --git a/drivers/regulator/max77857-regulator.c b/drivers/regulator/max77857-regulator.c index 44a510547318..145ad0281857 100644 --- a/drivers/regulator/max77857-regulator.c +++ b/drivers/regulator/max77857-regulator.c @@ -53,7 +53,7 @@ enum max77857_id { static bool max77857_volatile_reg(struct device *...
fddc9bb6e277b99b0410410794d156e963aa8f0b
Analyze and fix the following issue in the Linux kernel code: regulator: ltc3589: Fix Wvoid-pointer-to-enum-cast warning
Problem Details: 'variant' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: ltc3589.c:394:22: error: cast to smaller integer type 'enum ltc3589_variant' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https:/...
```diff diff --git a/drivers/regulator/ltc3589.c b/drivers/regulator/ltc3589.c index cf931b8c36dc..d892c2a5df7b 100644 --- a/drivers/regulator/ltc3589.c +++ b/drivers/regulator/ltc3589.c @@ -391,8 +391,7 @@ static int ltc3589_probe(struct i2c_client *client) i2c_set_clientdata(client, ltc3589); if (client->dev.of...
fc1f91b9231a28fba333f931a031bf776bc6ef0e
Analyze and fix the following issue in the Linux kernel code: btrfs: wait for actual caching progress during allocation
Problem Details: Recently we've been having mysterious hangs while running generic/475 on the CI system. This turned out to be something like this: Task 1 dmsetup suspend --nolockfs -> __dm_suspend -> dm_wait_for_completion -> dm_wait_for_bios_completion -> Unable to complete because of IO's on a pl...
```diff diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index 63c3b7172ba5..1e4b70f5280d 100644 --- a/fs/btrfs/block-group.c +++ b/fs/btrfs/block-group.c @@ -441,13 +441,23 @@ void btrfs_wait_block_group_cache_progress(struct btrfs_block_group *cache, u64 num_bytes) { struct btrfs_caching_contr...
5693d077595de721f9ddbf9d37f40e5409707dfe
Analyze and fix the following issue in the Linux kernel code: PM / devfreq: Fix leak in devfreq_dev_release()
Problem Details: srcu_init_notifier_head() allocates resources that need to be released with a srcu_cleanup_notifier_head() call. Reported by kmemleak. Fixes: 0fe3a66410a3 ("PM / devfreq: Add new DEVFREQ_TRANSITION_NOTIFIER notifier") Cc: <stable@vger.kernel.org> Signed-off-by: Boris Brezillon <boris.brezillon@collab...
```diff diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index db50c93c0ac3..474d81831ad3 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -764,6 +764,7 @@ static void devfreq_dev_release(struct device *dev) dev_pm_opp_put_opp_table(devfreq->opp_table); mutex_destroy(&d...
c8659bbb15cd42577a9b16a23b527436b028c8b2
Analyze and fix the following issue in the Linux kernel code: ublk: Fix signedness bug returning warning
Problem Details: There are two warnings reported by smatch: drivers/block/ublk_drv.c:445 ublk_setup_iod_zoned() warn: signedness bug returning '(-95)' drivers/block/ublk_drv.c:963 ublk_setup_iod() warn: signedness bug returning '(-5)' The type of "blk_status_t" is either be a u32 or u8, but this two functions retur...
```diff diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index b60394fe7be6..109a5b17537d 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -442,7 +442,7 @@ static int ublk_revalidate_disk_zones(struct ublk_device *ub) static blk_status_t ublk_setup_iod_zoned(struct ublk_queue *ub...
a77d289bddfe88290ff30524357434d9c708439d
Analyze and fix the following issue in the Linux kernel code: ARM: dts: stm32: fix dts check warnings on stm32mp15-scmi
Problem Details: Fix dts check warnings on stm32mp15-scmi reported by arm,scmi.yaml. Signed-off-by: Pascal Paillet <p.paillet@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
```diff diff --git a/arch/arm/boot/dts/st/stm32mp15-scmi.dtsi b/arch/arm/boot/dts/st/stm32mp15-scmi.dtsi index ad2584213d99..dc3b09f2f2af 100644 --- a/arch/arm/boot/dts/st/stm32mp15-scmi.dtsi +++ b/arch/arm/boot/dts/st/stm32mp15-scmi.dtsi @@ -34,22 +34,21 @@ #address-cells = <1>; #size-cells = <0>; - ...
6524c798b727ffdb5c7eaed2f50e8e839997df8e
Analyze and fix the following issue in the Linux kernel code: driver core: cpu: Make cpu_show_not_affected() static
Problem Details: Fix a -Wmissing-prototypes warning and add the gather_data_sampling() stub macro call for real. Fixes: 0fddfe338210 ("driver core: cpu: Unify redundant silly stubs") Closes: https://lore.kernel.org/oe-kbuild-all/202308101956.oRj1ls7s-lkp@intel.com Reported-by: kernel test robot <lkp@intel.com> Signed-...
```diff diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 054c81b65502..d7300d885822 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -509,7 +509,7 @@ static void __init cpu_dev_register_generic(void) } #ifdef CONFIG_GENERIC_CPU_VULNERABILITIES -ssize_t cpu_show_not_affected(struct device *dev, ...
b4120b69244470f6d572281993b2e39657ac31cd
Analyze and fix the following issue in the Linux kernel code: dt-bindings: mmc: Fix reference to pwr-seq-simple
Problem Details: It's a YAML file nowadays. Signed-off-by: Guido Günther <agx@sigxcpu.org> Link: https://lore.kernel.org/r/d7a0be6a2688a9829077cc21ca4a5bf9528f9eb1.1691606520.git.agx@sigxcpu.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
```diff diff --git a/Documentation/devicetree/bindings/mmc/mmc-controller.yaml b/Documentation/devicetree/bindings/mmc/mmc-controller.yaml index 86c73fd825fd..58ae298cd2fc 100644 --- a/Documentation/devicetree/bindings/mmc/mmc-controller.yaml +++ b/Documentation/devicetree/bindings/mmc/mmc-controller.yaml @@ -269,7 +26...
01948b09edc3fecf8486c57c2d2fb8b80886f3d0
Analyze and fix the following issue in the Linux kernel code: arm64/fpsimd: Only provide the length to cpufeature for xCR registers
Problem Details: For both SVE and SME we abuse the generic register field comparison support in the cpufeature code as part of our detection of unsupported variations in the vector lengths available to PEs, reporting the maximum vector lengths via ZCR_EL1.LEN and SMCR_EL1.LEN. Since these are configuration registers r...
```diff diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 89d54a5242d1..8e9a3451af4c 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -1178,9 +1178,6 @@ void sve_kernel_enable(const struct arm64_cpu_capabilities *__always_unused p) */ u64 read_zcr_features(void) {...
cbe8ded48b939b9d55d2c5589ab56caa7b530709
Analyze and fix the following issue in the Linux kernel code: x86/srso: Fix build breakage with the LLVM linker
Problem Details: The assertion added to verify the difference in bits set of the addresses of srso_untrain_ret_alias() and srso_safe_ret_alias() would fail to link in LLVM's ld.lld linker with the following error: ld.lld: error: ./arch/x86/kernel/vmlinux.lds:210: at least one side of the expression must be absolut...
```diff diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index e76813230192..ef06211bae4c 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S @@ -529,11 +529,17 @@ INIT_PER_CPU(irq_stack_backing_store); #ifdef CONFIG_CPU_SRSO /* - * GNU ld cannot do XOR so do: (A...
09f9f37c324d90102e8574856ab168c34de1916d
Analyze and fix the following issue in the Linux kernel code: Documentation/srso: Document IBPB aspect and fix formatting
Problem Details: Add a note about the dependency of the User->User mitigation on the previous Spectre v2 IBPB selection. Make the layout moar pretty. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20230809102700.29449-4-...
```diff diff --git a/Documentation/admin-guide/hw-vuln/srso.rst b/Documentation/admin-guide/hw-vuln/srso.rst index 32eb5e6db272..af59a9395662 100644 --- a/Documentation/admin-guide/hw-vuln/srso.rst +++ b/Documentation/admin-guide/hw-vuln/srso.rst @@ -42,42 +42,59 @@ The sysfs file showing SRSO mitigation status is: ...
9757300d2750ef76f139aa6f5f7eadd61a0de0d3
Analyze and fix the following issue in the Linux kernel code: pinctrl: qcom: Add intr_target_width field to support increased number of interrupt targets
Problem Details: SA8775 and newer target have added support for an increased number of interrupt targets. To implement this change, the intr_target field, which is used to configure the interrupt target in the interrupt configuration register is increased from 3 bits to 4 bits. In accordance to these updates, a new in...
```diff diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index 2585ef2b2793..115b83e2d8e6 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -1038,6 +1038,7 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type) struct gp...
7abf253afa5c72c0c7eb21f67da1d443f036737a
Analyze and fix the following issue in the Linux kernel code: platform/x86/siemens: simatic-ipc-batt: fix logical error for BX-59A
Problem Details: The variable "priv.devmode" is missing from if statement that leads to a logical error. Add the missing variable to the if condition. Fixes: c56beff20375 ("platform/x86/siemens: simatic-ipc-batt: add support for module BX-59A") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel...
```diff diff --git a/drivers/platform/x86/siemens/simatic-ipc-batt.c b/drivers/platform/x86/siemens/simatic-ipc-batt.c index 15c08c4900b8..ef28c806b383 100644 --- a/drivers/platform/x86/siemens/simatic-ipc-batt.c +++ b/drivers/platform/x86/siemens/simatic-ipc-batt.c @@ -194,7 +194,8 @@ int simatic_ipc_batt_probe(struct...
b01c1e022f7f0c327ecc7544dc44d5f80a2d2bd9
Analyze and fix the following issue in the Linux kernel code: platform/x86/siemens: simatic-ipc: fix logical error for BX-59A
Problem Details: The variable "ledmode" is missing from if statement that leads to a logical error. Add the missing variable to the if condition. Fixes: b8af77951941 ("platform/x86/siemens: simatic-ipc: add new models BX-56A/BX-59A") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbu...
```diff diff --git a/drivers/platform/x86/siemens/simatic-ipc.c b/drivers/platform/x86/siemens/simatic-ipc.c index 02c540cf4070..8ca6e277fa03 100644 --- a/drivers/platform/x86/siemens/simatic-ipc.c +++ b/drivers/platform/x86/siemens/simatic-ipc.c @@ -129,7 +129,7 @@ static int register_platform_devices(u32 station_id) ...
aca740cecbe57b12bd9c1fc632092af5ebacda0c
Analyze and fix the following issue in the Linux kernel code: fs: open block device after superblock creation
Problem Details: Currently get_tree_bdev and mount_bdev open the block device before committing to allocating a super block. That creates problems for restricting the number of writers to a device, and also leads to a unusual and not very helpful holder (the fs_type). Reorganize the super block code to first look whet...
```diff diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index 27c6597aa1be..bc99d0fb8ad4 100644 --- a/fs/cramfs/inode.c +++ b/fs/cramfs/inode.c @@ -485,12 +485,16 @@ static void cramfs_kill_sb(struct super_block *sb) { struct cramfs_sb_info *sbi = CRAMFS_SB(sb); + generic_shutdown_super(sb); + if (IS_ENABLED(...
dbbff489064d89391c4f0c7a73e77e61ce29fe96
Analyze and fix the following issue in the Linux kernel code: xfs: reformat the xfs_fs_free prototype
Problem Details: The xfs_fs_free prototype formatting is a weird mix of the classic XFS style and the Linux style. Fix it up to be consistent. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Message-Id: <20230809220545.1308228-2-hch@lst.de> Signed-off-by: Christian Bra...
```diff diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 818510243130..79c1dd9435c2 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1934,7 +1934,8 @@ xfs_fs_reconfigure( return 0; } -static void xfs_fs_free( +static void +xfs_fs_free( struct fs_context *fc) { struct xfs_mount *mp = fc->...
98c68ea0312ad629f6b05f9db762f468af805326
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Switch Dell Oasis models to use SPI
Problem Details: All I2C Dell Oasis models using CS35L41 have been changed to use SPI. In addition, System 10280cc5 is no longer required. Fixes: de90f5165b1c ("ALSA: hda/realtek: Add support for DELL Oasis 13/14/16 laptops") Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index b133ddb7583e..48e798d9de28 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -9422,11 +9422,10 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1028, 0x0cbd, "Dell Oasis ...
fb8cce69e5e56eedb35fc4d77b2f099860965859
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Add quirks for HP G11 Laptops
Problem Details: These HP G11 laptops use Realtek HDA codec combined with 2xCS35L41 Amplifiers using SPI or I2C with External Boost. Laptop 103c8c26 has been removed as this has been replaced by this new series of laptops. Fixes: 3e10f6ca76c4 ("ALSA: hda/realtek: Add quirk for HP EliteBook G10 laptops") Signed-off-by...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 44fccfb93cff..b133ddb7583e 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -9617,7 +9617,13 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x8b96, "HP", ALC236_...
f941714a7c7698eadb59bc27d34d6d6f38982705
Analyze and fix the following issue in the Linux kernel code: pinctrl: mcp23s08: check return value of devm_kasprintf()
Problem Details: devm_kasprintf() returns a pointer to dynamically allocated memory. Pointer could be NULL in case allocation fails. Check pointer validity. Identified with coccinelle (kmerr.cocci script). Fixes: 0f04a81784fe ("pinctrl: mcp23s08: Split to three parts: core, I²C, SPI") Signed-off-by: Claudiu Beznea <cl...
```diff diff --git a/drivers/pinctrl/pinctrl-mcp23s08_spi.c b/drivers/pinctrl/pinctrl-mcp23s08_spi.c index 9ae10318f6f3..ea059b9c5542 100644 --- a/drivers/pinctrl/pinctrl-mcp23s08_spi.c +++ b/drivers/pinctrl/pinctrl-mcp23s08_spi.c @@ -91,18 +91,28 @@ static int mcp23s08_spi_regmap_init(struct mcp23s08 *mcp, struct devi...
cbf871e6d8ce23dd4d458d8b7ab9d4a267e7bc03
Analyze and fix the following issue in the Linux kernel code: i3c/master: cmd_v1: Fix the exit criteria for the daa procedure
Problem Details: The exit criteria for the DAA should check if the data length is equal to 1, instead of checking if the response status is equal to 1. Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com> Link: https://lore.kernel.org/r/20230802100909.2568215-1-billy_tsai@aspeedtech.com Signed-off-by: Alexandre Bello...
```diff diff --git a/drivers/i3c/master/mipi-i3c-hci/cmd_v1.c b/drivers/i3c/master/mipi-i3c-hci/cmd_v1.c index d97c3175e0e2..6a781f89b0e4 100644 --- a/drivers/i3c/master/mipi-i3c-hci/cmd_v1.c +++ b/drivers/i3c/master/mipi-i3c-hci/cmd_v1.c @@ -339,7 +339,7 @@ static int hci_cmd_v1_daa(struct i3c_hci *hci) break; ...
a69c610e13e2b2de8a1ed2683f13e21b3200bd7a
Analyze and fix the following issue in the Linux kernel code: rtc: stm32: remove incorrect #ifdef check
Problem Details: After a previous commit changed the driver over to SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(), the suspend/resume functions must no longer be hidden behind an #ifdef: In file included from include/linux/clk.h:13, from drivers/rtc/rtc-stm32.c:8: drivers/rtc/rtc-stm32.c:927:39: error: 'stm32_rtc_s...
```diff diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c index 3ae875b19af8..3ce4b3d08155 100644 --- a/drivers/rtc/rtc-stm32.c +++ b/drivers/rtc/rtc-stm32.c @@ -891,7 +891,6 @@ static void stm32_rtc_remove(struct platform_device *pdev) device_init_wakeup(&pdev->dev, false); } -#ifdef CONFIG_PM_SLEEP ...
bf9e1bdaf125f8a18a8878f8f555ab0338da2fd0
Analyze and fix the following issue in the Linux kernel code: drm/i915: debug log when GMD ID indicates there's no display
Problem Details: Debug log similar to the device id based identification of no display. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230804084600.1005818-2-jani.nikula@intel.com
```diff diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c index 1ca67b77e6ba..c39f8a15d8aa 100644 --- a/drivers/gpu/drm/i915/display/intel_display_device.c +++ b/drivers/gpu/drm/i915/display/intel_display_device.c @@ -831,9 +831,10 @@ probe_gmdid_disp...
1435188307d128671f677eb908e165666dd83652
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix display probe for IVB Q and IVB D GT2 server
Problem Details: The current display probe is unable to differentiate between IVB Q and IVB D GT2 server, as they both have the same device id, but different subvendor and subdevice. This leads to the latter being misidentified as the former, and should just end up not having a display. However, the no display case ret...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c index 23a301a87642..1ca67b77e6ba 100644 --- a/drivers/gpu/drm/i915/display/intel_display_device.c +++ b/drivers/gpu/drm/i915/display/intel_display_device.c @@ -724,10 +724,24 @@ static const st...
806fd6d005ad7aa9e217d47063e5b12b25143402
Analyze and fix the following issue in the Linux kernel code: drm/test: drm_exec: fix memory leak on object prepare
Problem Details: drm_exec_prepare_obj() and drm_exec_prepare_array() both reserve dma-fence slots and hence a dma_resv_list without ever freeing it. Make sure to call drm_gem_private_object_fini() for each GEM object passed to drm_exec_prepare_obj()/drm_exec_prepare_array() throughout the test to fix this up. While a...
```diff diff --git a/drivers/gpu/drm/tests/drm_exec_test.c b/drivers/gpu/drm/tests/drm_exec_test.c index 3610773c22cb..563949d777dd 100644 --- a/drivers/gpu/drm/tests/drm_exec_test.c +++ b/drivers/gpu/drm/tests/drm_exec_test.c @@ -125,8 +125,6 @@ static void test_duplicates(struct kunit *test) drm_exec_fini(&exec); ...
616bceae250d0bab7ab2cbcb0791d820434ffb71
Analyze and fix the following issue in the Linux kernel code: drm/exec: use unique instead of local label
Problem Details: GCC forbids to jump to labels in loop conditions and a new clang check stumbled over this. So instead using a local label inside the loop condition use an unique label outside of it. Fixes: 09593216bff1 ("drm: execution context for GEM buffers v7") Link: https://gcc.gnu.org/onlinedocs/gcc/Statement-E...
```diff diff --git a/include/drm/drm_exec.h b/include/drm/drm_exec.h index 73205afec162..e0462361adf9 100644 --- a/include/drm/drm_exec.h +++ b/include/drm/drm_exec.h @@ -3,6 +3,7 @@ #ifndef __DRM_EXEC_H__ #define __DRM_EXEC_H__ +#include <linux/compiler.h> #include <linux/ww_mutex.h> #define DRM_EXEC_INTERRUPT...
07dd476f6116966cb2006e25fdcf48f0715115ff
Analyze and fix the following issue in the Linux kernel code: drm/shmem-helper: Reset vma->vm_ops before calling dma_buf_mmap()
Problem Details: The dma-buf backend is supposed to provide its own vm_ops, but some implementation just have nothing special to do and leave vm_ops untouched, probably expecting this field to be zero initialized (this is the case with the system_heap implementation for instance). Let's reset vma->vm_ops to NULL to kee...
```diff diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c index 4ea6507a77e5..baaf0e0feb06 100644 --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -623,7 +623,13 @@ int drm_gem_shmem_mmap(struct drm_gem_shmem_object *shmem, struct vm...
c92db3030492b8ad1d0faace7a93bbcf53850d0c
Analyze and fix the following issue in the Linux kernel code: netfilter: nft_set_hash: mark set element as dead when deleting from packet path
Problem Details: Set on the NFT_SET_ELEM_DEAD_BIT flag on this element, instead of performing element removal which might race with an ongoing transaction. Enable gc when dynamic flag is set on since dynset deletion requires garbage collection after this patch. Fixes: d0a8d877da97 ("netfilter: nft_dynset: support for ...
```diff diff --git a/net/netfilter/nft_set_hash.c b/net/netfilter/nft_set_hash.c index 2f067e4596b0..cef5df846000 100644 --- a/net/netfilter/nft_set_hash.c +++ b/net/netfilter/nft_set_hash.c @@ -249,7 +249,9 @@ static bool nft_rhash_delete(const struct nft_set *set, if (he == NULL) return false; - return rhashta...
f6c383b8c31a93752a52697f8430a71dcbc46adf
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: adapt set backend to use GC transaction API
Problem Details: Use the GC transaction API to replace the old and buggy gc API and the busy mark approach. No set elements are removed from async garbage collection anymore, instead the _DEAD bit is set on so the set element is not visible from lookup path anymore. Async GC enqueues transaction work that might be abo...
```diff diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index c28bacb9479b..fd4b5da7ac3c 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -6380,7 +6380,6 @@ static void nft_setelem_activate(struct net *net, struct nft_set *set, if (nft_setelem_is_catchall(...
5f68718b34a531a556f2f50300ead2862278da26
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: GC transaction API to avoid race with control plane
Problem Details: The set types rhashtable and rbtree use a GC worker to reclaim memory. From system work queue, in periodic intervals, a scan of the table is done. The major caveat here is that the nft transaction mutex is not held. This causes a race between control plane and GC when they attempt to delete the same e...
```diff diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 640441a2f926..7256e9c80477 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -512,6 +512,7 @@ struct nft_set_elem_expr { * * @list: table set list node * @bindings: list of set ...
40a4f49cd32dbc641c706215c1fa6c5bd051428c
Analyze and fix the following issue in the Linux kernel code: bus: ti-sysc: Fix a build warning with W=1 for sysconfig
Problem Details: Dhruva reported a build warning with W=1 for "Function parameter or member 'sysconfig' not described in 'sysc'". Let's document sysconfig to fix this. Reported-by: Dhruva Gole <d-gole@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 2e983e9492d9..9c00802e0c20 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -109,6 +109,7 @@ static const char * const clock_names[SYSC_MAX_CLOCKS] = { * @cookie: data used by legacy platform callbacks * @name: name if availab...
e1e1e9bb9d943ec690670a609a5f660ca10eaf85
Analyze and fix the following issue in the Linux kernel code: bus: ti-sysc: Fix build warning for 64-bit build
Problem Details: Fix "warning: cast from pointer to integer of different size" on 64-bit builds. Note that this is a cosmetic fix at this point as the driver is not yet used for 64-bit systems. Fixes: feaa8baee82a ("bus: ti-sysc: Implement SoC revision handling") Reviewed-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: ...
```diff diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 21fe9854703f..e9bc3894a1ec 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -3104,7 +3104,7 @@ static int sysc_init_static_data(struct sysc *ddata) match = soc_device_match(sysc_soc_match); if (match && match->data) - sysc_...
fc0f5b59adf5170f0f4c2dc20c13f558e2baf64a
Analyze and fix the following issue in the Linux kernel code: media: atomisp: csi2-bridge: Add dev_name() to acpi_handle_info() logging
Problem Details: acpi_handle_info() uses the ACPI path to the handle as prefix for messages e.g. : "\_SB_.I2C2.CAM8". This makes it hard for users to figure out which csi2-bridge messages belong to which sensor since the actual sensor drivers uses the ACPI device name (typically "HID:00") for logging. Extend the acpi...
```diff diff --git a/drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c b/drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c index df625ac2c779..e362cc9ba985 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c +++ b/drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c @@ -131,7 +131,8 @@ s...
8e3e916e23f5ab0ceb046d57f4d41d53159b8192
Analyze and fix the following issue in the Linux kernel code: media: ipu-bridge: Add a runtime-pm device-link between VCM and sensor
Problem Details: In most cases when a VCM is used there is a single integrated module with the sensor + VCM + lens. This means that the sensor and VCM often share regulators and possibly also something like a powerdown pin. In the ACPI tables this is modelled as a single ACPI device with multiple I2cSerialBus resource...
```diff diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index eb3d1bab6a83..940457940057 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -4,7 +4,10 @@ #include <linux/acpi.h> #include <linux/device.h> #include <linux/i2c.h> +#in...
11e0a7c8e04ee5f406f2baa27761746cbedcfa11
Analyze and fix the following issue in the Linux kernel code: media: ipu-bridge: Do not use on stack memory for software_node.name field
Problem Details: Commit 567f97bd381f ("media: ipu3-cio2: support multiple sensors and VCMs with same HID") introduced an on stack vcm_name and then uses this for the name field of the software_node struct used for the vcm. But the software_node struct is much longer lived then the current stack-frame, so this is no go...
```diff diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index c23c1ee30ad9..ad1f78be3aa7 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -220,7 +220,6 @@ static void ipu_bridge_create_connection_swnodes(struct ipu_bridge *bridge, ...
284be5693163343e1cf17c03917eecd1d6681bcf
Analyze and fix the following issue in the Linux kernel code: media: ipu-bridge: Fix null pointer deref on SSDB/PLD parsing warnings
Problem Details: When ipu_bridge_parse_rotation() and ipu_bridge_parse_orientation() run sensor->adev is not set yet. So if either of the dev_warn() calls about unknown values are hit this will lead to a NULL pointer deref. Set sensor->adev earlier, with a borrowed ref to avoid making unrolling on errors harder, to f...
```diff diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index bd67c3e990ea..c23c1ee30ad9 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -308,6 +308,11 @@ static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg, ...
b2fe7aeebe7fb1c05c64bd528403250e09502086
Analyze and fix the following issue in the Linux kernel code: media: i2c: imx219: Fix colorspace info
Problem Details: The IMX219 is a RAW sensor. Fix the colorspace configuration by using V4L2_COLORSPACE_RAW and adjust the quantization and transfer function values. Drop ycbcr_enc as it doesn't apply to RAW sensors. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@l...
```diff diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c index cd43a897391c..6963e24e1bc2 100644 --- a/drivers/media/i2c/imx219.c +++ b/drivers/media/i2c/imx219.c @@ -597,15 +597,12 @@ static void imx219_set_default_format(struct imx219 *imx219) fmt = &imx219->fmt; fmt->code = MEDIA_BUS_FMT_SR...
35a2991856ec3035ea3bd5dac3b199bb5a0ec9cb
Analyze and fix the following issue in the Linux kernel code: media: subdev: Add debug prints to enable/disable_streams
Problem Details: It is often useful to see when streaming for a device is being enabled or disabled. Add debug prints for this to v4l2_subdev_enable_streams() and v4l2_subdev_disable_streams(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Sig...
```diff diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index ec35e5a90cdf..b92348ad61f6 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -1989,11 +1989,16 @@ int v4l2_subdev_enable_streams(struct v4l2_subdev *sd, u32 pad, go...
6308759ec679032e9d4f74834db574077e675e62
Analyze and fix the following issue in the Linux kernel code: media: imx: imx7-media-csi: Fix frame sizes enumeration
Problem Details: Enumeration of the minimum, maximum and step values for the image width does not take hardware constraints into account. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by: Hans Verkuil <hverkuil-cisc...
```diff diff --git a/drivers/media/platform/nxp/imx7-media-csi.c b/drivers/media/platform/nxp/imx7-media-csi.c index 50f6efaaa7f2..ffe372d321b6 100644 --- a/drivers/media/platform/nxp/imx7-media-csi.c +++ b/drivers/media/platform/nxp/imx7-media-csi.c @@ -1074,6 +1074,7 @@ static int imx7_csi_video_enum_framesizes(struc...
c2c0abbe86a089ce7541fa66b5eddf7affe8e106
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: correct file entry in MEDIA DRIVERS FOR FREESCALE IMX7/8
Problem Details: Commit cd063027c304 ("media: imx: Unstage the imx8mq-mipi-csi2 driver") adds a file entry for the driver code to MEDIA DRIVERS FOR FREESCALE IMX7/8, but misses the number '2' suffix in that entry. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Correct the f...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 9bfd74da5335..0dae72a07d0d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13017,7 +13017,7 @@ F: Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml F: Documentation/devicetree/bindings/media/nxp,imx8mq-mipi-csi2.yaml F: drivers/media/platform/nxp/imx-mipi-cs...
4b60db99babad0254129ddc58e0927ffa9e93e35
Analyze and fix the following issue in the Linux kernel code: media: nxp: Fix wrong return pointer check in mxc_isi_crossbar_init()
Problem Details: It should check 'xbar->inputs', when allocate memory for it. Cc: stable@vger.kernel.org Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@idea...
```diff diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c index f7447b2f4d77..9fcfc3925733 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c @@ -483,7 +483,7 @@ i...
0ca2fbab99b12bb81fceaafe5495c00d76789a37
Analyze and fix the following issue in the Linux kernel code: arm64: defconfig: Drop CONFIG_VIDEO_IMX_MEDIA
Problem Details: CONFIG_VIDEO_IMX_MEDIA isn't needed on arm64 platforms since commit 9f257f502c2e ("media: imx: Unstage the imx7-media-csi driver") which moved the last arm64 driver depending on that Kconfig symbol out of staging. Drop it from the arm64 defconfig. Fixes: 9f257f502c2e ("media: imx: Unstage the imx7-med...
```diff diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 0777bcae9104..193693409aba 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -1129,7 +1129,6 @@ CONFIG_XEN_GNTDEV=y CONFIG_XEN_GRANT_DEV_ALLOC=y CONFIG_STAGING=y CONFIG_STAGING_MEDIA=y -CONFIG_VIDEO_I...
905f88ccebb14e42bcd19455b0d9c0d4808f1897
Analyze and fix the following issue in the Linux kernel code: media: i2c: ds90ub9x3: Fix sub-device matching
Problem Details: Commit 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching") recently changed how async sub-device matching works. This breaks the UB9x3 drivers, as they set the subdev.fwnode to an endpoint. Afaiu, the fix is simply to not set subdev.fwnode at all. Fixes: 1029939b3782 ("media:...
```diff diff --git a/drivers/media/i2c/ds90ub913.c b/drivers/media/i2c/ds90ub913.c index 80d9cf6dd945..5410ccb54057 100644 --- a/drivers/media/i2c/ds90ub913.c +++ b/drivers/media/i2c/ds90ub913.c @@ -749,19 +749,9 @@ static int ub913_subdev_init(struct ub913_data *priv) if (ret) return dev_err_probe(dev, ret, "Fail...
59353d7051d67ffe8bb6da6152074961eeb3eb6e
Analyze and fix the following issue in the Linux kernel code: media: firewire: firedtv-avc.c: replace BUG with proper, error return
Problem Details: This resolves this smatch error: drivers/media/firewire/firedtv-avc.c:602 avc_tuner_dsd() error: uninitialized symbol 'pos'. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/drivers/media/firewire/firedtv-avc.c b/drivers/media/firewire/firedtv-avc.c index 71991f8638e6..a36c28412170 100644 --- a/drivers/media/firewire/firedtv-avc.c +++ b/drivers/media/firewire/firedtv-avc.c @@ -597,7 +597,8 @@ int avc_tuner_dsd(struct firedtv *fdtv, case FIREDTV_DVB_C: pos = avc_tuner...
935ae6f8ba00aacb8ab176b990d79acdcf71d16a
Analyze and fix the following issue in the Linux kernel code: media: usb: pvrusb2: fix inconsistent indenting
Problem Details: This resolves a new smatch warning; drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3293 pvr2_hdw_get_tuner_status() warn: inconsistent indenting Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c index 75c89b07e86a..29cc207194b9 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c @@ -3285,12 +3285,14 @@ int pvr2_hdw_get_cropcap(struct pvr2_hdw *hdw, struct v4l2_cr...
74a5a66fb422759961d78a7751a1f0b6b06b80f6
Analyze and fix the following issue in the Linux kernel code: media: tegra_cec: fix the return value handle for platform_get_irq()
Problem Details: There is no possible for platform_get_irq() to return 0, and the return value of platform_get_irq() is more sensible to show the error reason. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/drivers/media/cec/platform/tegra/tegra_cec.c b/drivers/media/cec/platform/tegra/tegra_cec.c index 699c3819f3b2..7c1022cee1e8 100644 --- a/drivers/media/cec/platform/tegra/tegra_cec.c +++ b/drivers/media/cec/platform/tegra/tegra_cec.c @@ -348,8 +348,8 @@ static int tegra_cec_probe(struct platform_de...
b134b30f7f069e563a94fe4e5187d15f08419830
Analyze and fix the following issue in the Linux kernel code: media: cx23885: debug cosmetics
Problem Details: This commit is fixing the module in a way that trailing spaces at the end of the line in the debug/dmesg are gone. Signed-off-by: Mariusz Bialonczyk <manio@skyboo.net> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c index 2ce2914576cf..c8705d786cdd 100644 --- a/drivers/media/pci/cx23885/cx23885-core.c +++ b/drivers/media/pci/cx23885/cx23885-core.c @@ -554,14 +554,14 @@ void cx23885_sram_channel_dump(struct cx23885_dev *dev, ...
3c76db565fd2ad543236fbdd5bc560f6f449c7a9
Analyze and fix the following issue in the Linux kernel code: media: venus: Fix firmware path for sm8250
Problem Details: The firmware path for the sm8250 resources is incorrect. This fixes the path to address the firmware correctly. Signed-off-by: Patrick Whewell <patrick.whewell@sightlineapplications.com> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all...
```diff diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index d5e3dabc2e26..054b8e74ba4f 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -823,7 +823,7 @@ static const struct venus_resources sm8250_res = { .vmem_si...
bbfc89e6f67ccb1ddefc3e8a284248bcfea58544
Analyze and fix the following issue in the Linux kernel code: media: venus: Introduce accessors for remapped hfi_buffer_reqs members
Problem Details: Currently we have macros to access these, but they don't provide a way to override the remapped fields. Replace the macros with actual get/set pairs to fix that. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Stanimir V...
```diff diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 1822e85ab6bf..b70bd3dac4df 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -189,7 +189,7 @@ int venus_helper_alloc_dpb_bufs(struct venus_inst...
adeb071bb4cb5e5c5e51ed1ed9a3e8728afb187c
Analyze and fix the following issue in the Linux kernel code: media: venus: hfi_platform: Check vpu_version instead of device compatible
Problem Details: This is not a matter of the host SoC, but the VPU chip in Venus. Fix it. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.com> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmai...
```diff diff --git a/drivers/media/platform/qcom/venus/hfi_platform.c b/drivers/media/platform/qcom/venus/hfi_platform.c index b6c0b1f84b95..643e5aa138f5 100644 --- a/drivers/media/platform/qcom/venus/hfi_platform.c +++ b/drivers/media/platform/qcom/venus/hfi_platform.c @@ -80,7 +80,7 @@ hfi_platform_get_codecs(struct ...
d74e481609808330b4625b3691cf01e1f56e255e
Analyze and fix the following issue in the Linux kernel code: media: venus: hfi_venus: Write to VIDC_CTRL_INIT after unmasking interrupts
Problem Details: The startup procedure shouldn't be started with interrupts masked, as that may entail silent failures. Kick off initialization only after the interrupts are unmasked. Cc: stable@vger.kernel.org # v4.12+ Fixes: d96d3f30c0f2 ("[media] media: venus: hfi: add Venus HFI files") Signed-off-by: Konrad Dybci...
```diff diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index 918a283bd890..5506a0d196ef 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -453,7 +453,6 @@ static int venus_boot_core(struct venus_h...
6283e4834c69fa93a108efa18c6aa09c7e626f49
Analyze and fix the following issue in the Linux kernel code: media: venus: hfi_venus: Only consider sys_idle_indicator on V1
Problem Details: As per information from Qualcomm [1], this property is not really supported beyond msm8916 (HFI V1) and some newer HFI versions really dislike receiving it, going as far as crashing the device. Only consider toggling it (via the module option) on HFIV1. While at it, get rid of the global static variab...
```diff diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index f0b46389e8d5..918a283bd890 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -131,7 +131,6 @@ struct venus_hfi_device { static bool ...
1972e32431ed14682909ad568c6fd660572ae6ab
Analyze and fix the following issue in the Linux kernel code: media: mediatek: vcodec: Fix possible invalid memory access for encoder
Problem Details: The vpu maybe null pointer or unreasonable value when scp crash, need to validate that the vpu pointer and the vpu instance within this context is valid in case of leading to kernel reboot. Fixes: 27a274db6b4c ("[media] vcodec: mediatek: Add Mediatek VP8 Video Encoder Driver") Signed-off-by: Yunfei Do...
```diff diff --git a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.h b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.h index c07010e56649..a042f607ed8d 100644 --- a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.h +++ b/drivers/media/platform/mediatek/vcodec/en...
655b86e52eacdce79c2e02c5ec7258a97fcc2e4a
Analyze and fix the following issue in the Linux kernel code: media: mediatek: vcodec: Fix possible invalid memory access for decoder
Problem Details: The vpu maybe null pointer or unreasonable value when scp crash, need to validate that the vpu pointer and the vpu instance within this context is valid in case of leading to kernel reboot. Fixes: 590577a4e525 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver") Signed-off-by: Yunfei D...
```diff diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h index 6c318de25a55..7e36b2c69b7d 100644 --- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h +++ b/drivers/media/platform/mediatek/vcodec/de...
63b71f310adea92029db2049f341fd178a10ca9e
Analyze and fix the following issue in the Linux kernel code: media: mediatek: vcodec: fix unreasonable parameter definition and style
Problem Details: Fix unreasonable coding style. Fix unreasonable parameter definition. Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Hans Verkuil <hver...
```diff diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.h b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.h index 533d8d97f704..4122e37aea67 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.h +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.h @@ -1...
17834e0a4db51a01a374f5fad70c8a3d2773644c
Analyze and fix the following issue in the Linux kernel code: media: mediatek: vcodec: Removing useless debug log
Problem Details: Removing unresonable and useless debug log enter and leave in order to simply the log message. Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-o...
```diff diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c index 8a75d28e9692..805f8afbd26a 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c @@ -4...
9e2a90d75662d2cad22d8e3f3358c1b5392f037d
Analyze and fix the following issue in the Linux kernel code: media: atomisp: Fix me->stages error checking in sh_css_sp_init_pipeline()
Problem Details: The current error-checking of me->stages in sh_css_sp_init_pipeline() has some issues / weirdness: 1. It is checked at the top of the function, but only using the atomisp custom assert() macro which e.g. smatch does not recognize 2. It is first dereferenced in "first_binary = me->stages->binary", ...
```diff diff --git a/drivers/staging/media/atomisp/pci/sh_css_sp.c b/drivers/staging/media/atomisp/pci/sh_css_sp.c index 297e1b981720..f35c745c22c0 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_sp.c +++ b/drivers/staging/media/atomisp/pci/sh_css_sp.c @@ -51,6 +51,7 @@ #include "ia_css_event.h" #include "mmu_d...
7b4846b6515483396af706329cb51794eb6afb6d
Analyze and fix the following issue in the Linux kernel code: media: atomisp: Fix smatch warnings caused by atomisp custom assert() usage
Problem Details: The atomisp code base has a custom assert() macro, a couple of functions use this in a construction like the following: assert(pipe); assert(pipe->stream); if ((!pipe) || (!pipe->stream)) { ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "allocate_mip...
```diff diff --git a/drivers/staging/media/atomisp/pci/sh_css_mipi.c b/drivers/staging/media/atomisp/pci/sh_css_mipi.c index b20acaab0595..ced21dedf7ac 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_mipi.c +++ b/drivers/staging/media/atomisp/pci/sh_css_mipi.c @@ -351,15 +351,6 @@ allocate_mipi_frames(struct ia_c...
f33cb49081da0ec5af0888f8ecbd566bd326eed1
Analyze and fix the following issue in the Linux kernel code: media: go7007: Remove redundant if statement
Problem Details: The if statement that compares msgs[i].len != 3 is always false because it is in a code block where msg[i].len is equal to 3. The check is redundant and can be removed. As detected by cppcheck static analysis: drivers/media/usb/go7007/go7007-i2c.c:168:20: warning: Opposite inner 'if' condition leads t...
```diff diff --git a/drivers/media/usb/go7007/go7007-i2c.c b/drivers/media/usb/go7007/go7007-i2c.c index 38339dd2f83f..2880370e45c8 100644 --- a/drivers/media/usb/go7007/go7007-i2c.c +++ b/drivers/media/usb/go7007/go7007-i2c.c @@ -165,8 +165,6 @@ static int go7007_i2c_master_xfer(struct i2c_adapter *adapter, } else ...
2545a2c02ba1da9cfb9ec218623c71b00eb4a555
Analyze and fix the following issue in the Linux kernel code: media: ipu3-cio2: allow ipu_bridge to be a module again
Problem Details: This code was previously part of the VIDEO_IPU3_CIO2 driver, which could be built-in or a loadable module, but after the move it turned into a builtin-only driver. This fails to link when the I2C subsystem is a module: x86_64-linux-ld: drivers/media/pci/intel/ipu-bridge.o: in function `ipu_bridge_unre...
```diff diff --git a/drivers/media/pci/intel/Kconfig b/drivers/media/pci/intel/Kconfig index 64a29b0b7033..51b18fce6a1d 100644 --- a/drivers/media/pci/intel/Kconfig +++ b/drivers/media/pci/intel/Kconfig @@ -1,21 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-only config IPU_BRIDGE - bool "Intel IPU Sensors Bridge" - dep...
948a77aaecf202f722cf2264025f9987e5bd5c26
Analyze and fix the following issue in the Linux kernel code: media: cec: core: add adap_unconfigured() callback
Problem Details: The adap_configured() callback was called with the adap->lock mutex held if the 'configured' argument was false, and without the adap->lock mutex held if that argument was true. That was very confusing, and so split this up in a adap_unconfigured() callback and a high-level configured() callback. Thi...
```diff diff --git a/drivers/media/cec/core/cec-adap.c b/drivers/media/cec/core/cec-adap.c index a9b73fb33888..09ca83c23329 100644 --- a/drivers/media/cec/core/cec-adap.c +++ b/drivers/media/cec/core/cec-adap.c @@ -1348,7 +1348,7 @@ static void cec_adap_unconfigure(struct cec_adapter *adap) cec_flush(adap); wake_up...
da53c36ddd3f118a525a04faa8c47ca471e6c467
Analyze and fix the following issue in the Linux kernel code: media: cec: core: add adap_nb_transmit_canceled() callback
Problem Details: A potential deadlock was found by Zheng Zhang with a local syzkaller instance. The problem is that when a non-blocking CEC transmit is canceled by calling cec_data_cancel, that in turn can call the high-level received() driver callback, which can call cec_transmit_msg() to transmit a new message. The...
```diff diff --git a/drivers/media/cec/core/cec-adap.c b/drivers/media/cec/core/cec-adap.c index 241b1621b197..a9b73fb33888 100644 --- a/drivers/media/cec/core/cec-adap.c +++ b/drivers/media/cec/core/cec-adap.c @@ -385,8 +385,8 @@ static void cec_data_cancel(struct cec_data *data, u8 tx_status, u8 rx_status) cec_queu...
6e1e132e0038a2a4bce11ff1ad0db3b4564042c9
Analyze and fix the following issue in the Linux kernel code: media: pxa_camera: Fix probe error handling
Problem Details: Fix and simplify error handling in pxa_camera probe, by moving devm_*() functions early in the probe function and then tearing down what was set up on error patch. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # imx6qp Tested-by: Niklas Sö...
```diff diff --git a/drivers/media/platform/intel/pxa_camera.c b/drivers/media/platform/intel/pxa_camera.c index 1544102554da..2453bf58f92d 100644 --- a/drivers/media/platform/intel/pxa_camera.c +++ b/drivers/media/platform/intel/pxa_camera.c @@ -2274,13 +2274,6 @@ static int pxa_camera_probe(struct platform_device *pd...
1e3454582e11e0108ad0743529461181f8476741
Analyze and fix the following issue in the Linux kernel code: media: adv748x: Return to endpoint matching
Problem Details: Return the two CSI-2 transmitters of adv748x to endpoint matching. This should make the driver work again as expected. Fixes: 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching") Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Philipp Zabel <p.zabel@pengu...
```diff diff --git a/drivers/media/i2c/adv748x/adv748x-csi2.c b/drivers/media/i2c/adv748x/adv748x-csi2.c index b6f93c1db3d2..a5a7cb228896 100644 --- a/drivers/media/i2c/adv748x/adv748x-csi2.c +++ b/drivers/media/i2c/adv748x/adv748x-csi2.c @@ -296,8 +296,6 @@ int adv748x_csi2_init(struct adv748x_state *state, struct adv...