id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
4b04646caed5449ca97b909bbadca0a7a2762159
Analyze and fix the following issue in the Linux kernel code: buffer: fix various functions for block size > PAGE_SIZE
Problem Details: If i_blkbits is larger than PAGE_SHIFT, we shift by a negative number, which is undefined. It is safe to shift the block left as a block device must be smaller than MAX_LFS_FILESIZE, which is guaranteed to fit in loff_t. Link: https://lkml.kernel.org/r/20231109210608.2252323-6-willy@infradead.org Sig...
```diff diff --git a/fs/buffer.c b/fs/buffer.c index 1662ddddfa27..d75264326643 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -199,7 +199,7 @@ __find_get_block_slow(struct block_device *bdev, sector_t block) int all_mapped = 1; static DEFINE_RATELIMIT_STATE(last_warned, HZ, 1); - index = block >> (PAGE_SHIFT - bd...
5f3bd90d9b98855c2e811aa3b4823d583b0020df
Analyze and fix the following issue in the Linux kernel code: buffer: fix grow_buffers() for block size > PAGE_SIZE
Problem Details: We must not shift by a negative number so work in terms of a byte offset to avoid the awkward shift left-or-right-depending-on-sign option. This means we need to use check_mul_overflow() to ensure that a large block number does not result in a wrap. Link: https://lkml.kernel.org/r/20231109210608.2252...
```diff diff --git a/fs/buffer.c b/fs/buffer.c index 44e0c0b7f71f..f765a95034cf 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1085,26 +1085,21 @@ unlock: static bool grow_buffers(struct block_device *bdev, sector_t block, unsigned size, gfp_t gfp) { - pgoff_t index; - int sizebits; - - sizebits = PAGE_SHIFT - __f...
6d840a18773f36baaecc2d2f7fb18ec5862349e6
Analyze and fix the following issue in the Linux kernel code: buffer: return bool from grow_dev_folio()
Problem Details: Patch series "More buffer_head cleanups", v2. The first patch is a left-over from last cycle. The rest fix "obvious" block size > PAGE_SIZE problems. I haven't tested with a large block size setup (but I have done an ext4 xfstests run). This patch (of 7): Rename grow_dev_page() to grow_dev_folio(...
```diff diff --git a/fs/buffer.c b/fs/buffer.c index 967f34b70aa8..8dad6c691e14 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1024,40 +1024,43 @@ static sector_t folio_init_buffers(struct folio *folio, } /* - * Create the page-cache page that contains the requested block. + * Create the page-cache folio that conta...
46e714c729c8d1d8110bc0545d7ffe8a759c9dc0
Analyze and fix the following issue in the Linux kernel code: arch/mm/fault: fix major fault accounting when retrying under per-VMA lock
Problem Details: A test [1] in Android test suite started failing after [2] was merged. It turns out that after handling a major fault under per-VMA lock, the process major fault counter does not register that fault as major. Before [2] read faults would be done under mmap_lock, in which case FAULT_FLAG_TRIED flag is...
```diff diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 460d799e1296..55f6455a8284 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -607,6 +607,8 @@ static int __kprobes do_page_fault(unsigned long far, unsigned long esr, goto done; } count_vm_vma_lock_event(VMA_LOCK_RETRY); + i...
c28ac3c7eb945fee6e20f47d576af68fdff1392a
Analyze and fix the following issue in the Linux kernel code: mm/mglru: skip special VMAs in lru_gen_look_around()
Problem Details: Special VMAs like VM_PFNMAP can contain anon pages from COW. There isn't much profit in doing lookaround on them. Besides, they can trigger the pte_special() warning in get_pte_pfn(). Skip them in lru_gen_look_around(). Link: https://lkml.kernel.org/r/20231223045647.1566043-1-yuzhao@google.com Fixe...
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index 9dd8977de5a2..bba207f41b14 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3955,6 +3955,7 @@ void lru_gen_look_around(struct page_vma_mapped_walk *pvmw) int young = 0; pte_t *pte = pvmw->pte; unsigned long addr = pvmw->address; + struct vm_area_struct *vma = pvm...
9eab0421fa94a3dde0d1f7e36ab3294fc306c99d
Analyze and fix the following issue in the Linux kernel code: mm: fix unmap_mapping_range high bits shift bug
Problem Details: The bug happens when highest bit of holebegin is 1, suppose holebegin is 0x8000000111111000, after shift, hba would be 0xfff8000000111111, then vma_interval_tree_foreach would look it up fail or leads to the wrong result. error call seq e.g.: - mmap(..., offset=0x8000000111111000) |- syscall(mmap, ....
```diff diff --git a/mm/memory.c b/mm/memory.c index 5c757fba8858..6e0712d06cd4 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3624,8 +3624,8 @@ EXPORT_SYMBOL_GPL(unmap_mapping_pages); void unmap_mapping_range(struct address_space *mapping, loff_t const holebegin, loff_t const holelen, int even_cows) { - pgoff_t h...
9bcef5973e31020e5aa8571eb994d67b77318356
Analyze and fix the following issue in the Linux kernel code: mm: memcg: fix split queue list crash when large folio migration
Problem Details: When running autonuma with enabling multi-size THP, I encountered the following kernel crash issue: [ 134.290216] list_del corruption. prev->next should be fffff9ad42e1c490, but was dead000000000100. (prev=fffff9ad42399890) [ 134.290877] kernel BUG at lib/list_debug.c:62! [ 134.291052] invalid opco...
```diff diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 4f542444a91f..86ee29b5c39c 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2823,7 +2823,7 @@ void folio_undo_large_rmappable(struct folio *folio) spin_lock_irqsave(&ds_queue->split_queue_lock, flags); if (!list_empty(&folio->_deferred_list)) { ...
fa151a39a6879144b587f35c0dfcc15e1be9450f
Analyze and fix the following issue in the Linux kernel code: mm: fix arithmetic for max_prop_frac when setting max_ratio
Problem Details: Since now bdi->max_ratio is part per million, fix the wrong arithmetic for max_prop_frac when setting max_ratio. Otherwise the miscalculated max_prop_frac will affect the incrementing of writeout completion count when max_ratio is not 100%. Link: https://lkml.kernel.org/r/20231219142508.86265-3-jeffl...
```diff diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 2140382dd768..05e5c425b3ff 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -728,7 +728,8 @@ static int __bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ra ret = -EINVAL; } else { bdi->max_ratio = max_ratio; - b...
e0646b7590084a5bf3b056d3ad871d9379d2c25a
Analyze and fix the following issue in the Linux kernel code: mm: fix arithmetic for bdi min_ratio
Problem Details: Since now bdi->min_ratio is part per million, fix the wrong arithmetic. Otherwise it will fail with -EINVAL when setting a reasonable min_ratio, as it tries to set min_ratio to (min_ratio * BDI_RATIO_SCALE) in percentage unit, which exceeds 100% anyway. # cat /sys/class/bdi/253\:0/min_ratio 0...
```diff diff --git a/mm/page-writeback.c b/mm/page-writeback.c index ee2fd6a6af40..2140382dd768 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -692,7 +692,6 @@ static int __bdi_set_min_ratio(struct backing_dev_info *bdi, unsigned int min_ra if (min_ratio > 100 * BDI_RATIO_SCALE) return -EINVAL; - ...
c8f5caec3df84a02b937d6d9cda1f7ffa8dc443f
Analyze and fix the following issue in the Linux kernel code: cpuidle: haltpoll: Do not enable interrupts when entering idle
Problem Details: The cpuidle drivers' ->enter() methods are supposed to be IRQ invariant: 5e26aa933911 ("cpuidle/poll: Ensure IRQs stay disabled after cpuidle_state::enter() calls") bb7b11258561 ("cpuidle: Move IRQ state validation") Do that in the haltpoll driver too. Fixes: 5e26aa933911 ("cpuidle/poll: Ensure ...
```diff diff --git a/drivers/cpuidle/cpuidle-haltpoll.c b/drivers/cpuidle/cpuidle-haltpoll.c index e66df22f9695..d8515d5c0853 100644 --- a/drivers/cpuidle/cpuidle-haltpoll.c +++ b/drivers/cpuidle/cpuidle-haltpoll.c @@ -25,13 +25,12 @@ MODULE_PARM_DESC(force, "Load unconditionally"); static struct cpuidle_device __perc...
38744c3fa00109c51076121c2deb4f02e2f09194
Analyze and fix the following issue in the Linux kernel code: ASoC: mediatek: mt8186: fix AUD_PAD_TOP register and offset
Problem Details: AUD_PAD_TOP widget's correct register is AFE_AUD_PAD_TOP , and not zero. Having a zero as register, it would mean that the `snd_soc_dapm_new_widgets` would try to read the register at offset zero when trying to get the power status of this widget, which is incorrect. Fixes: b65c466220b3 ("ASoC: mediat...
```diff diff --git a/sound/soc/mediatek/mt8186/mt8186-dai-adda.c b/sound/soc/mediatek/mt8186/mt8186-dai-adda.c index 85ae3f76d951..ad6d4b5cf697 100644 --- a/sound/soc/mediatek/mt8186/mt8186-dai-adda.c +++ b/sound/soc/mediatek/mt8186/mt8186-dai-adda.c @@ -499,7 +499,7 @@ static const struct snd_soc_dapm_widget mtk_dai_a...
09eeb0723f219fbd96d8865bf9b935e03ee2ec22
Analyze and fix the following issue in the Linux kernel code: cifs: do not depend on release_iface for maintaining iface_list
Problem Details: parse_server_interfaces should be in complete charge of maintaining the iface_list linked list. Today, iface entries are removed from the list only when the last refcount is dropped. i.e. in release_iface. However, this can result in undercounting of refcount if the server stops advertising interfaces ...
```diff diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h index 55b3ce944022..5e32c79f03a7 100644 --- a/fs/smb/client/cifsglob.h +++ b/fs/smb/client/cifsglob.h @@ -994,7 +994,6 @@ release_iface(struct kref *ref) struct cifs_server_iface *iface = container_of(ref, struct cifs_server_iface,...
7257bcf3bdc785eabc4eef1f329a59815b032508
Analyze and fix the following issue in the Linux kernel code: cifs: cifs_chan_is_iface_active should be called with chan_lock held
Problem Details: cifs_chan_is_iface_active checks the channels of a session to see if the associated iface is active. This should always happen with chan_lock held. However, these two callers of this function were missing this locking. This change makes sure the function calls are protected with proper locking. Fixes...
```diff diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c index 560624189c8b..dc9b95ca71e6 100644 --- a/fs/smb/client/connect.c +++ b/fs/smb/client/connect.c @@ -232,10 +232,13 @@ cifs_mark_tcp_ses_conns_for_reconnect(struct TCP_Server_Info *server, spin_lock(&cifs_tcp_ses_lock); list_for_each_entry_sa...
27e1fd343f80168ff456785c2443136b6b7ca3cc
Analyze and fix the following issue in the Linux kernel code: cifs: after disabling multichannel, mark tcon for reconnect
Problem Details: Once the server disables multichannel for an active multichannel session, on the following reconnect, the client would reduce the number of channels to 1. However, it could be the case that the tree connect was active on one of these disabled channels. This results in an unrecoverable state. This chan...
```diff diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c index dd2a1fb65e71..560624189c8b 100644 --- a/fs/smb/client/connect.c +++ b/fs/smb/client/connect.c @@ -216,17 +216,21 @@ cifs_mark_tcp_ses_conns_for_reconnect(struct TCP_Server_Info *server, /* If server is a channel, select the primary channel *...
2cb54a19ac7153b9a26a72098c495187f64c2276
Analyze and fix the following issue in the Linux kernel code: apparmor: Fix ref count leak in task_kill
Problem Details: apparmor_task_kill was not putting the task_cred reference tc, or the cred_label reference tc when dealing with a passed in cred, fix this by using a single fn exit. Fixes: 90c436a64a6e ("apparmor: pass cred through to audit info.") Signed-off-by: John Johansen <john.johansen@canonical.com>
```diff diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index 3eb992801a7f..d851a6cc19d3 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -954,7 +954,6 @@ static int apparmor_task_kill(struct task_struct *target, struct kernel_siginfo cl = aa_get_newest_cred_label(cred); error ...
66946398a4be9fd41eafcc844a306273f5150e69
Analyze and fix the following issue in the Linux kernel code: ALSA: scarlett2: Rename DSP mux channels
Problem Details: The DSP mux channels are of type SCARLETT2_PORT_TYPE_MIX so the ALSA controls would refer to them "Mix X" and "Mixer Input X". This patch fixes them to be called "DSP X" and "DSP Input X". Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kerne...
```diff diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c index 59f178dc8050..a24fd6e867ed 100644 --- a/sound/usb/mixer_scarlett2.c +++ b/sound/usb/mixer_scarlett2.c @@ -583,6 +583,8 @@ struct scarlett2_port { const char * const src_descr; int src_num_offset; const char * const dst_descr; + c...
b5fe6c47a55f82f16e60a90528ada8bcc3558984
Analyze and fix the following issue in the Linux kernel code: ALSA: scarlett2: Formatting fixes
Problem Details: Add missing blank line before comment. For consistency with other functions that have few parameters, move the parameters onto the same line as the function name. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/72be568b02eea12621b0c4a96f8e8cc65b0c13c0.1703444932.git.g@b4....
```diff diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c index 2b2e6baeac20..5bc60cded5f6 100644 --- a/sound/usb/mixer_scarlett2.c +++ b/sound/usb/mixer_scarlett2.c @@ -2149,6 +2149,7 @@ static int scarlett2_add_firmware_version_ctl( return scarlett2_add_new_ctl(mixer, &scarlett2_firmware_versio...
993f7b42fa066b055e3a19b7f76ad8157c0927a0
Analyze and fix the following issue in the Linux kernel code: ALSA: scarlett2: Add missing mutex lock around get meter levels
Problem Details: As scarlett2_meter_ctl_get() uses meter_level_map[], the data_mutex should be locked while accessing it. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Fixes: 3473185f31df ("ALSA: scarlett2: Remap Level Meter values") Link: https://lore.kernel.org/r/77e093c27402c83d0730681448fa4f57583349dd.1703001053.gi...
```diff diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c index 8a60c2169259..a3cbeba7bd24 100644 --- a/sound/usb/mixer_scarlett2.c +++ b/sound/usb/mixer_scarlett2.c @@ -3880,10 +3880,12 @@ static int scarlett2_meter_ctl_get(struct snd_kcontrol *kctl, u16 meter_levels[SCARLETT2_MAX_METERS]; int...
04f8f053252b86c7583895c962d66747ecdc61b7
Analyze and fix the following issue in the Linux kernel code: ALSA: scarlett2: Add clamp() in scarlett2_mixer_ctl_put()
Problem Details: Ensure the value passed to scarlett2_mixer_ctl_put() is between 0 and SCARLETT2_MIXER_MAX_VALUE so we don't attempt to access outside scarlett2_mixer_values[]. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Link: https://lore.kernel...
```diff diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c index 30751bcba468..8a60c2169259 100644 --- a/sound/usb/mixer_scarlett2.c +++ b/sound/usb/mixer_scarlett2.c @@ -3663,7 +3663,8 @@ static int scarlett2_mixer_ctl_put(struct snd_kcontrol *kctl, mutex_lock(&private->data_mutex); oval = pr...
50603a67daef161c78c814580d57f7f0be57167e
Analyze and fix the following issue in the Linux kernel code: ALSA: scarlett2: Add missing error checks to *_ctl_get()
Problem Details: The *_ctl_get() functions which call scarlett2_update_*() were not checking the return value. Fix to check the return value and pass to the caller. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Link: https://lore.kernel.org/r/32a5f...
```diff diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c index c030368efdae..30751bcba468 100644 --- a/sound/usb/mixer_scarlett2.c +++ b/sound/usb/mixer_scarlett2.c @@ -2100,14 +2100,20 @@ static int scarlett2_sync_ctl_get(struct snd_kcontrol *kctl, struct usb_mixer_elem_info *elem = kctl->priva...
ca459dfa7d4ed9098fcf13e410963be6ae9b6bf3
Analyze and fix the following issue in the Linux kernel code: ALSA: scarlett2: Add missing error check to scarlett2_usb_set_config()
Problem Details: scarlett2_usb_set_config() calls scarlett2_usb_get() but was not checking the result. Return the error if it fails rather than continuing with an invalid value. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Fixes: 9e15fae6c51a ("ALSA: usb-audio: scarlett2: Allow bit-level access to config") Link: https...
```diff diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c index 0f38301dd3d5..c030368efdae 100644 --- a/sound/usb/mixer_scarlett2.c +++ b/sound/usb/mixer_scarlett2.c @@ -1577,7 +1577,10 @@ static int scarlett2_usb_set_config( size = 1; offset = config_item->offset; - scarlett2_usb_get(mixe...
5f6ff6931a1c0065a55448108940371e1ac8075f
Analyze and fix the following issue in the Linux kernel code: ALSA: scarlett2: Add missing error check to scarlett2_config_save()
Problem Details: scarlett2_config_save() was ignoring the return value from scarlett2_usb(). As this function is not called from user-space we can't return the error, so call usb_audio_err() instead. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Li...
```diff diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c index 51f5471d3fda..0f38301dd3d5 100644 --- a/sound/usb/mixer_scarlett2.c +++ b/sound/usb/mixer_scarlett2.c @@ -1524,9 +1524,11 @@ static void scarlett2_config_save(struct usb_mixer_interface *mixer) { __le32 req = cpu_to_le32(SCARLETT2_U...
0b2dca555d78c296de39c0ce29c997e55889d76a
Analyze and fix the following issue in the Linux kernel code: ALSA: scarlett2: Convert meter levels from little-endian
Problem Details: Add missing conversion from little-endian data to CPU-endian in scarlett2_usb_get_meter_levels(). Fixes: 3473185f31df ("ALSA: scarlett2: Remap Level Meter values") Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/ZYsBIE3DSKdi4YC/@m.b4.vu Signed-off-by: Takashi Iwai <tiwai@s...
```diff diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c index f7c57a2c3028..33a3d1161885 100644 --- a/sound/usb/mixer_scarlett2.c +++ b/sound/usb/mixer_scarlett2.c @@ -1966,7 +1966,7 @@ static int scarlett2_usb_get_meter_levels(struct usb_mixer_interface *mixer, __le16 num_meters; __le32 ma...
39a7dc23a1ed0fe81141792a09449d124c5953bd
Analyze and fix the following issue in the Linux kernel code: tracing: Fix blocked reader of snapshot buffer
Problem Details: If an application blocks on the snapshot or snapshot_raw files, expecting to be woken up when a snapshot occurs, it will not happen. Or it may happen with an unexpected result. That result is that the application will be reading the main buffer instead of the snapshot buffer. That is because when the ...
```diff diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 32c0dd2fd1c3..9286f88fcd32 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -949,7 +949,8 @@ void ring_buffer_wake_waiters(struct trace_buffer *buffer, int cpu) /* make sure the waiters see the new index */ ...
623b1f896fa8a669a277ee5a258307a16c7377a3
Analyze and fix the following issue in the Linux kernel code: ring-buffer: Fix wake ups when buffer_percent is set to 100
Problem Details: The tracefs file "buffer_percent" is to allow user space to set a water-mark on how much of the tracing ring buffer needs to be filled in order to wake up a blocked reader. 0 - is to wait until any data is in the buffer 1 - is to wait for 1% of the sub buffers to be filled 50 - would be half of the...
```diff diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 83eab547f1d1..32c0dd2fd1c3 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -881,9 +881,14 @@ static __always_inline bool full_hit(struct trace_buffer *buffer, int cpu, int f if (!nr_pages || !full) return...
70681aa0746ae61d7668b9f651221fad5e30c71e
Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/pmc: Move GBE LTR ignore to suspend callback
Problem Details: Commit 804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and core_configure()") caused a network performance regression due to the GBE LTR ignore that it added at probe. This was needed in order to allow the SoC to enter the deepest Package C state. To fix the regression and at least support P...
```diff diff --git a/drivers/platform/x86/intel/pmc/adl.c b/drivers/platform/x86/intel/pmc/adl.c index a887c388cf16..606f7678bcb0 100644 --- a/drivers/platform/x86/intel/pmc/adl.c +++ b/drivers/platform/x86/intel/pmc/adl.c @@ -314,16 +314,13 @@ int adl_core_init(struct pmc_dev *pmcdev) struct pmc *pmc = pmcdev->pmcs[...
6f9cc5c1f94daa98846b2073733d03ced709704b
Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/pmc: Allow reenabling LTRs
Problem Details: Commit 804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and core_configure()") caused a network performance regression due to the GBE LTR ignore that it added during probe. The fix will move the ignore to occur at suspend-time (so as to not affect suspend power). This will require the ability...
```diff diff --git a/drivers/platform/x86/intel/pmc/adl.c b/drivers/platform/x86/intel/pmc/adl.c index 5006008e01be..a887c388cf16 100644 --- a/drivers/platform/x86/intel/pmc/adl.c +++ b/drivers/platform/x86/intel/pmc/adl.c @@ -323,7 +323,7 @@ int adl_core_init(struct pmc_dev *pmcdev) * when a cable is attached. Tell...
7c13f365aee68b01e7e68ee293a71fdc7571c111
Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/pmc: Add suspend callback
Problem Details: Add a suspend callback to struct pmc for performing platform specific tasks before device suspend. This is needed in order to perform GBE LTR ignore on certain platforms at suspend-time instead of at probe-time and replace the GBE LTR ignore removal that was done in order to fix a bug introduced by com...
```diff diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c index e95d3011b999..5ab470d87ad7 100644 --- a/drivers/platform/x86/intel/pmc/core.c +++ b/drivers/platform/x86/intel/pmc/core.c @@ -1279,6 +1279,9 @@ static __maybe_unused int pmc_core_suspend(struct device *dev) struct...
b28ff7a7c3245d7f62acc20f15b4361292fe4117
Analyze and fix the following issue in the Linux kernel code: platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe
Problem Details: p2sb_bar() unhides P2SB device to get resources from the device. It guards the operation by locking pci_rescan_remove_lock so that parallel rescans do not find the P2SB device. However, this lock causes deadlock when PCI bus rescan is triggered by /sys/bus/pci/rescan. The rescan locks pci_rescan_remove...
```diff diff --git a/drivers/platform/x86/p2sb.c b/drivers/platform/x86/p2sb.c index 1cf2471d54dd..fcf1ce8bbdc5 100644 --- a/drivers/platform/x86/p2sb.c +++ b/drivers/platform/x86/p2sb.c @@ -26,6 +26,21 @@ static const struct x86_cpu_id p2sb_cpu_ids[] = { {} }; +/* + * Cache BAR0 of P2SB device functions 0 to 7. +...
126c18a4bb6460c3d82b57c56941104ed34b7ba6
Analyze and fix the following issue in the Linux kernel code: ALSA: seq: fix kvmalloc_array() arguments order
Problem Details: When compiling with gcc version 14.0.0 20231220 (experimental) and W=1, I've noticed the following warning: sound/core/seq/seq_memory.c: In function 'snd_seq_pool_init': sound/core/seq/seq_memory.c:445:41: warning: 'kvmalloc_array' sizes specified with 'sizeof' in the earlier argument and not in the l...
```diff diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c index b603bb93f896..e705e7538118 100644 --- a/sound/core/seq/seq_memory.c +++ b/sound/core/seq/seq_memory.c @@ -442,7 +442,8 @@ int snd_seq_pool_init(struct snd_seq_pool *pool) if (snd_BUG_ON(!pool)) return -EINVAL; - cellptr = kvmall...
4e7914eb1dae377b8e6de59c96b0653aacb47646
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/tas2781: remove sound controls in unbind
Problem Details: Remove sound controls in hda_unbind to make module loadable after module unload. Add a driver specific struct (tas2781_hda) to store the controls. This patch depends on patch: ALSA: hda/tas2781: do not use regcache Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") CC: stable@vger.ker...
```diff diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index 6d11bced78f0..dfe281b57aa6 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -65,6 +65,15 @@ enum calib_data { CALIB_MAX }; +struct tas2781_hda { + struct device *dev; + struct tasdevice...
e7aa105657f7f62f54a493480588895cc8a9a1a7
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/tas2781: move set_drv_data outside tasdevice_init
Problem Details: allow driver specific driver data in tas2781-hda-i2c and tas2781-i2c Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver") CC: stable@vger.kernel.org Signed-off-by: Gergo Koteles <soyer@irl.hu> Link: https://lore.kernel.org/r/1398bd8bf3e935b1595a99128320e4a1913e210a.1703204848.git.soyer@irl.hu Sig...
```diff diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index 54d135405788..6d11bced78f0 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -659,6 +659,8 @@ static int tas2781_hda_i2c_probe(struct i2c_client *clt) if (!tas_priv) return -ENOMEM; + ...
a0c9f7f2e0a46554737509459552789300a4e854
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/tas2781: fix typos in comment
Problem Details: Correct typos. Signed-off-by: Gergo Koteles <soyer@irl.hu> Link: https://lore.kernel.org/r/ead5609d63e71e8e87c13e1767decca5b272d696.1703203812.git.soyer@irl.hu Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index e4c54b2a012c..54d135405788 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -421,9 +421,9 @@ static void tas2781_apply_calib(struct tasdevice_priv *tas_priv) } } -/* Update the calibrat...
6dad45f4d28977bd1948973107cf325d431e5b7e
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/tas2781: do not use regcache
Problem Details: There are two problems with using regcache in this module. The amplifier has 3 addressing levels (BOOK, PAGE, REG). The firmware contains blocks that must be written to BOOK 0x8C. The regcache doesn't know anything about BOOK, so regcache_sync writes invalid values to the actual BOOK. The module hand...
```diff diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index 2fb1a7037c82..e4c54b2a012c 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -717,8 +717,6 @@ static int tas2781_runtime_suspend(struct device *dev) tas_priv->tasdevice[i].cur_conf = -1; ...
f60a631ab9ed5df15e446269ea515f2b8948ba0c
Analyze and fix the following issue in the Linux kernel code: sched/fair: Fix tg->load when offlining a CPU
Problem Details: When a CPU is taken offline, the contribution of its cfs_rqs to task_groups' load may remain and will negatively impact the calculation of the share of the online CPUs. To fix this bug, clear the contribution of an offlining CPU to task groups' load and skip its contribution while it is inactive. Her...
```diff diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index d7a3c63a2171..43c1216898cb 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4096,6 +4096,10 @@ static inline void update_tg_load_avg(struct cfs_rq *cfs_rq) if (cfs_rq->tg == &root_task_group) return; + /* rq has been offline and d...
97417cd79ce179a774b245a3f5535cc3fbbaee50
Analyze and fix the following issue in the Linux kernel code: ptp: ocp: fix bug in unregistering the DPLL subsystem
Problem Details: When unregistering the DPLL subsystem the priv pointer is different then the one used for registration which cause failure in unregistering. Fixes: 09eeb3aecc6c ("ptp_ocp: implement DPLL ops") Reviewed-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Signed-off...
```diff diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c index 4021d3d325f9..e7defce8cf48 100644 --- a/drivers/ptp/ptp_ocp.c +++ b/drivers/ptp/ptp_ocp.c @@ -4492,7 +4492,7 @@ ptp_ocp_remove(struct pci_dev *pdev) cancel_delayed_work_sync(&bp->sync_work); for (i = 0; i < OCP_SMA_NUM; i++) { if (bp->sma[i...
4f6ac47b55e3ce6e982807928d6074ec105ab66e
Analyze and fix the following issue in the Linux kernel code: xfs: fix a use after free in xfs_defer_finish_recovery
Problem Details: dfp will be freed by ->recover_work and thus the tracepoint in case of an error can lead to a use after free. Store the defer ops in a local variable to avoid that. Fixes: 7f2f7531e0d4 ("xfs: store an ops pointer in struct xfs_defer_pending") Reported-by: kernel test robot <oliver.sang@intel.com> Sig...
```diff diff --git a/fs/xfs/libxfs/xfs_defer.c b/fs/xfs/libxfs/xfs_defer.c index ca7f0ac04896..75c5b3a2c2cb 100644 --- a/fs/xfs/libxfs/xfs_defer.c +++ b/fs/xfs/libxfs/xfs_defer.c @@ -915,12 +915,14 @@ xfs_defer_finish_recovery( struct xfs_defer_pending *dfp, struct list_head *capture_list) { + const struct xfs_de...
0b670b54119902de75fcd20a50585cf7b573f801
Analyze and fix the following issue in the Linux kernel code: Input: gpio-keys - filter gpio_keys -EPROBE_DEFER error messages
Problem Details: commit ae42f9288846 ("gpio: Return EPROBE_DEFER if gc->to_irq is NULL") make gpiod_to_irq() possible to return -EPROBE_DEFER when the racing happens. This causes the following error message to be printed: gpio-keys gpio_keys: Unable to get irq number for GPIO 0, error -517 Fix that by changing de...
```diff diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 06c09b7addf8..9f3bcd41cf67 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -592,9 +592,9 @@ static int gpio_keys_setup_key(struct platform_device *pdev, irq = gpiod_to_irq(b...
4c460eb369514d53383a7c6ba1aefbca4914c68b
Analyze and fix the following issue in the Linux kernel code: RISC-V: KVM: Fix indentation in kvm_riscv_vcpu_set_reg_csr()
Problem Details: The indentation of "break" in kvm_riscv_vcpu_set_reg_csr() is inconsistent hence let us fix it. Fixes: c04913f2b54e ("RISCV: KVM: Add sstateen0 to ONE_REG") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202312190719.kBuYl6oJ-lkp@intel.com/ Signed-off-by: ...
```diff diff --git a/arch/riscv/kvm/vcpu_onereg.c b/arch/riscv/kvm/vcpu_onereg.c index 11cdbf844291..c0bad1aed9f0 100644 --- a/arch/riscv/kvm/vcpu_onereg.c +++ b/arch/riscv/kvm/vcpu_onereg.c @@ -485,7 +485,7 @@ static int kvm_riscv_vcpu_set_reg_csr(struct kvm_vcpu *vcpu, if (riscv_has_extension_unlikely(RISCV_ISA_EX...
7602730d7f18ad9738d8fc5e5fd7f52a11fee399
Analyze and fix the following issue in the Linux kernel code: KVM: riscv: selftests: Drop SBI multi registers
Problem Details: These registers are no longer getting added to get-reg-list. We keep sbi_ext_multi_id_to_str() for printing, even though we don't expect it to normally be used, because it may be useful for debug. Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org> Signe...
```diff diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c b/tools/testing/selftests/kvm/riscv/get-reg-list.c index 5d86c761784e..27d07a32a1ef 100644 --- a/tools/testing/selftests/kvm/riscv/get-reg-list.c +++ b/tools/testing/selftests/kvm/riscv/get-reg-list.c @@ -571,8 +571,6 @@ static __u64 base_regs[] = { ...
683c5bbbf6aea247bc95a7eb9fdfba4fcc8c909a
Analyze and fix the following issue in the Linux kernel code: riscv: kvm: Use SYM_*() assembly macros instead of deprecated ones
Problem Details: ENTRY()/END()/WEAK() macros are deprecated and we should make use of the new SYM_*() macros [1] for better annotation of symbols. Replace the deprecated ones with the new ones and fix wrong usage of END()/ENDPROC() to correctly describe the symbols. [1] https://docs.kernel.org/core-api/asm-annotations...
```diff diff --git a/arch/riscv/kvm/vcpu_switch.S b/arch/riscv/kvm/vcpu_switch.S index d74df8eb4d71..8b18473780ac 100644 --- a/arch/riscv/kvm/vcpu_switch.S +++ b/arch/riscv/kvm/vcpu_switch.S @@ -15,7 +15,7 @@ .altmacro .option norelax -ENTRY(__kvm_riscv_switch_to) +SYM_FUNC_START(__kvm_riscv_switch_to) /* Save ...
482b718a84f08b6fc84879c3e90cc57dba11c115
Analyze and fix the following issue in the Linux kernel code: powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2
Problem Details: Commit 8c5fa3b5c4df ("powerpc/64: Make ELFv2 the default for big-endian builds"), merged in Linux-6.5-rc1 changes the calling ABI in a way that is incompatible with the current code for the PS3's LV1 hypervisor calls. This change just adds the line '# CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2 is not set' to ...
```diff diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig index 2b175ddf82f0..aa8bb0208bcc 100644 --- a/arch/powerpc/configs/ps3_defconfig +++ b/arch/powerpc/configs/ps3_defconfig @@ -24,6 +24,7 @@ CONFIG_PS3_VRAM=m CONFIG_PS3_LPM=m # CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set CONFIG...
5bb13e63cb00f0fdca5141f33d7a47bb26730a81
Analyze and fix the following issue in the Linux kernel code: powerpc/86xx: Drop unused CONFIG_MPC8610
Problem Details: The MPC8610 symbol used to be default y if MPC8610_HPCD, but since MPC8610_HPCD was removed MPC8610 is now never used. Remove it. Fixes: 248667f8bbde ("powerpc: drop HPCD/MPC8610 evaluation platform support") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20231123032902....
```diff diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig index 67467cd6f34c..06b1e5c49d6f 100644 --- a/arch/powerpc/platforms/86xx/Kconfig +++ b/arch/powerpc/platforms/86xx/Kconfig @@ -52,10 +52,3 @@ config MPC8641 select MPIC default y if GEF_SBC610 || GEF_SBC310 || GEF_PPC9A ...
b8910630c967ffee582289451ddb5f9f19c26872
Analyze and fix the following issue in the Linux kernel code: crypto: iaa - Account for cpu-less numa nodes
Problem Details: In some configurations e.g. systems with CXL, a numa node can have 0 cpus and cpumask_nth() will return a cpu value that doesn't exist, which will result in an attempt to add an entry to the wq table at a bad index. To fix this, when iterating the cpus for a node, skip any node that doesn't have cpus....
```diff diff --git a/drivers/crypto/intel/iaa/iaa_crypto_main.c b/drivers/crypto/intel/iaa/iaa_crypto_main.c index abef4b5d5e7e..dfd3baf0a8d8 100644 --- a/drivers/crypto/intel/iaa/iaa_crypto_main.c +++ b/drivers/crypto/intel/iaa/iaa_crypto_main.c @@ -1017,12 +1017,17 @@ static void rebalance_wq_table(void) return; ...
744e1885922a9943458954cfea917b31064b4131
Analyze and fix the following issue in the Linux kernel code: crypto: scomp - fix req->dst buffer overflow
Problem Details: The req->dst buffer size should be checked before copying from the scomp_scratch->dst to avoid req->dst buffer overflow problem. Fixes: 1ab53a77b772 ("crypto: acomp - add driver-side scomp interface") Reported-by: syzbot+3eff5e51bf1db122a16e@syzkaller.appspotmail.com Closes: https://lore.kernel.org/al...
```diff diff --git a/crypto/scompress.c b/crypto/scompress.c index 442a82c9de7d..b108a30a7600 100644 --- a/crypto/scompress.c +++ b/crypto/scompress.c @@ -117,6 +117,7 @@ static int scomp_acomp_comp_decomp(struct acomp_req *req, int dir) struct crypto_scomp *scomp = *tfm_ctx; void **ctx = acomp_request_ctx(req); ...
a3c6f4f4d249cecaf2f34471aadbfb4f4ef57298
Analyze and fix the following issue in the Linux kernel code: crypto: sahara - do not resize req->src when doing hash operations
Problem Details: When testing sahara sha256 speed performance with tcrypt (mode=404) on imx53-qsrb board, multiple "Invalid numbers of src SG." errors are reported. This was traced to sahara_walk_and_recalc() resizing req->src and causing the subsequent dma_map_sg() call to fail. Now that the previous commit fixed sah...
```diff diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 321c11050457..f045591e8889 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -884,24 +884,6 @@ static int sahara_sha_hw_context_descriptor_create(struct sahara_dev *dev, return 0; } -static int sahara_walk_and_recalc(s...
7bafa74d1ba35dcc173e1ce915e983d65905f77e
Analyze and fix the following issue in the Linux kernel code: crypto: sahara - fix processing hash requests with req->nbytes < sg->length
Problem Details: It's not always the case that the entire sg entry needs to be processed. Currently, when nbytes is less than sg->length, "Descriptor length" errors are encountered. To fix this, take the actual request size into account when populating the hw links. Fixes: 5a2bb93f5992 ("crypto: sahara - add support ...
```diff diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index d49659db6a48..321c11050457 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -774,6 +774,7 @@ static int sahara_sha_hw_links_create(struct sahara_dev *dev, int start) { struct scatterlist *sg; + unsigned int ...
5deff027fca49a1eb3b20359333cf2ae562a2343
Analyze and fix the following issue in the Linux kernel code: crypto: sahara - improve error handling in sahara_sha_process()
Problem Details: sahara_sha_hw_data_descriptor_create() returns negative error codes on failure, so make sure the errors are correctly handled / propagated. Fixes: 5a2bb93f5992 ("crypto: sahara - add support for SHA1/256") Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Herbert Xu <herbert@go...
```diff diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index a9abf6439c4b..d49659db6a48 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -985,7 +985,10 @@ static int sahara_sha_process(struct ahash_request *req) return ret; if (rctx->first) { - sahara_sha_hw_data_descriptor_...
2dba8e1d1a7957dcbe7888846268538847b471d1
Analyze and fix the following issue in the Linux kernel code: crypto: sahara - fix wait_for_completion_timeout() error handling
Problem Details: The sg lists are not unmapped in case of timeout errors. Fix this. Fixes: 5a2bb93f5992 ("crypto: sahara - add support for SHA1/256") Fixes: 5de8875281e1 ("crypto: sahara - Add driver for SAHARA2 accelerator.") Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Herbert Xu <herber...
```diff diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 82c3f41ea476..a9abf6439c4b 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -605,16 +605,17 @@ static int sahara_aes_process(struct skcipher_request *req) timeout = wait_for_completion_timeout(&dev->dma_completion, ...
efcb50f41740ac55e6ccc4986c1a7740e21c62b4
Analyze and fix the following issue in the Linux kernel code: crypto: sahara - fix ahash reqsize
Problem Details: Set the reqsize for sha algorithms to sizeof(struct sahara_sha_reqctx), the extra space is not needed. Fixes: 5a2bb93f5992 ("crypto: sahara - add support for SHA1/256") Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 1f78dfe84c51..82c3f41ea476 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -1160,8 +1160,7 @@ static int sahara_sha_import(struct ahash_request *req, const void *in) static int sahara_sha_cra_init(struct crypto_tfm *tfm)...
d1d6351e37aac14b32a291731d0855996c459d11
Analyze and fix the following issue in the Linux kernel code: crypto: sahara - handle zero-length aes requests
Problem Details: In case of a zero-length input, exit gracefully from sahara_aes_crypt(). Fixes: 5de8875281e1 ("crypto: sahara - Add driver for SAHARA2 accelerator.") Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 27ed66cb761f..1f78dfe84c51 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -674,6 +674,9 @@ static int sahara_aes_crypt(struct skcipher_request *req, unsigned long mode) struct sahara_dev *dev = dev_ptr; int err = 0; ...
069579d0291cebda575a823ac1c85f0644e2ed95
Analyze and fix the following issue in the Linux kernel code: crypto: skcipher - remove excess kerneldoc members
Problem Details: Commit 31865c4c4db2 ("crypto: skcipher - Add lskcipher") moved some fields from 'struct skcipher_alg' into SKCIPHER_ALG_COMMON but didn't remove the corresponding kerneldoc members, which results in these warnings when running 'make htmldocs': ./include/crypto/skcipher.h:182: warning: Excess struct ...
```diff diff --git a/include/crypto/skcipher.h b/include/crypto/skcipher.h index f881740df194..c8857d7bdb37 100644 --- a/include/crypto/skcipher.h +++ b/include/crypto/skcipher.h @@ -121,16 +121,6 @@ struct skcipher_alg_common SKCIPHER_ALG_COMMON; /** * struct skcipher_alg - symmetric key cipher definition - * @mi...
b590563e441c4ce7cf8e328ecd687c46bbe6529f
Analyze and fix the following issue in the Linux kernel code: crypto: shash - remove excess kerneldoc members
Problem Details: Commit 42808e5dc602 ("crypto: hash - Count error stats differently") moved some fields from 'struct shash_alg' into HASH_ALG_COMMON but didn't remove the corresponding kerneldoc members, which results in these warnings when running 'make htmldocs': ./include/crypto/hash.h:248: warning: Excess struct...
```diff diff --git a/include/crypto/hash.h b/include/crypto/hash.h index c7bdbece27cc..5d61f576cfc8 100644 --- a/include/crypto/hash.h +++ b/include/crypto/hash.h @@ -212,13 +212,9 @@ struct shash_desc { * This is a counterpart to @init_tfm, used to remove * various changes set in @init_tfm. * @clone_...
38f56101b8733b6d334c836c119c79d49b958a3f
Analyze and fix the following issue in the Linux kernel code: crypto: iaa - remove unneeded semicolon
Problem Details: No functional modification involved. ./drivers/crypto/intel/iaa/iaa_crypto_main.c:979:2-3: Unneeded semicolon. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7772 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Acked-by: Tom Za...
```diff diff --git a/drivers/crypto/intel/iaa/iaa_crypto_main.c b/drivers/crypto/intel/iaa/iaa_crypto_main.c index 5093361b0107..abef4b5d5e7e 100644 --- a/drivers/crypto/intel/iaa/iaa_crypto_main.c +++ b/drivers/crypto/intel/iaa/iaa_crypto_main.c @@ -976,7 +976,7 @@ static int wq_table_add_wqs(int iaa, int cpu) pr_d...
f9d378fc68c43fd41b35133edec9cd902ec334ec
Analyze and fix the following issue in the Linux kernel code: ASoC: fsl_rpmsg: Fix error handler with pm_runtime_enable
Problem Details: There is error message when defer probe happens: fsl_rpmsg rpmsg_audio: Unbalanced pm_runtime_enable! Fix the error handler with pm_runtime_enable. Fixes: b73d9e6225e8 ("ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg") Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu ...
```diff diff --git a/sound/soc/fsl/fsl_rpmsg.c b/sound/soc/fsl/fsl_rpmsg.c index 5c5c04ce9db7..00852f174a69 100644 --- a/sound/soc/fsl/fsl_rpmsg.c +++ b/sound/soc/fsl/fsl_rpmsg.c @@ -238,7 +238,7 @@ static int fsl_rpmsg_probe(struct platform_device *pdev) ret = devm_snd_soc_register_component(&pdev->dev, &fsl_compone...
9ca65c373f4451fdf2f82ebc30b17185253aec8f
Analyze and fix the following issue in the Linux kernel code: docs: PCI: Fix typos
Problem Details: Fix typos in PCI docs. Link: https://lore.kernel.org/r/20231223184720.25645-1-tintinm2017@gmail.com Link: https://lore.kernel.org/r/20231223184412.25598-1-tintinm2017@gmail.com Signed-off-by: Attreyee Mukherjee <tintinm2017@gmail.com> [bhelgaas: squashed, commit log] Signed-off-by: Bjorn Helgaas <bhel...
```diff diff --git a/Documentation/PCI/boot-interrupts.rst b/Documentation/PCI/boot-interrupts.rst index 2ec70121bfca..931077bb0953 100644 --- a/Documentation/PCI/boot-interrupts.rst +++ b/Documentation/PCI/boot-interrupts.rst @@ -61,7 +61,7 @@ Conditions ========== The use of threaded interrupts is the most likely...
753547de0daecbdbd1af3618987ddade325d9aaa
Analyze and fix the following issue in the Linux kernel code: linux/export: Ensure natural alignment of kcrctab array
Problem Details: The ___kcrctab section holds an array of 32-bit CRC values. Add a .balign 4 to tell the linker the correct memory alignment. Fixes: f3304ecd7f06 ("linux/export: use inline assembler to populate symbol CRCs") Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Masahiro Yamada <masahiroy@kernel.o...
```diff diff --git a/include/linux/export-internal.h b/include/linux/export-internal.h index cd253eb51d6c..d445705ac13c 100644 --- a/include/linux/export-internal.h +++ b/include/linux/export-internal.h @@ -64,6 +64,7 @@ #define SYMBOL_CRC(sym, crc, sec) \ asm(".section \"___kcrctab" sec "+" #sym "\",\"a\"" "\n"...
4e814173a8c4f432fd068b1c796f0416328c9d99
Analyze and fix the following issue in the Linux kernel code: thermal: core: Fix thermal zone suspend-resume synchronization
Problem Details: There are 3 synchronization issues with thermal zone suspend-resume during system-wide transitions: 1. The resume code runs in a PM notifier which is invoked after user space has been thawed, so it can run concurrently with user space which can trigger a thermal zone device removal. If that ...
```diff diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 5e5fcbd81dda..7456335efaaa 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -37,8 +37,6 @@ static LIST_HEAD(thermal_governor_list); static DEFINE_MUTEX(thermal_list_lock); static DEFINE_MUTEX(...
561429807d50aad76f1205b0b1d7b4aacf365d4e
Analyze and fix the following issue in the Linux kernel code: sysctl: remove struct ctl_path
Problem Details: All usages of this struct have been removed from the kernel tree. The struct is still referenced by scripts/check-sysctl-docs but that script is broken anyways as it only supports the register_sysctl_paths() API and not the currently used register_sysctl() one. Fixes: 0199849acd07 ("sysctl: remove re...
```diff diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 26a38161c28f..ee7d33b89e9e 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -210,11 +210,6 @@ struct ctl_table_root { int (*permissions)(struct ctl_table_header *head, struct ctl_table *table); }; -/* struct ctl_path desc...
0b68ab50b8101a35b51fb9ec203cd988e47dbed3
Analyze and fix the following issue in the Linux kernel code: sysctl: delete unused define SYSCTL_PERM_EMPTY_DIR
Problem Details: It seems it was never used. Fixes: 2f2665c13af4 ("sysctl: replace child with an enumeration") Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
```diff diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 61b40ea81f4d..26a38161c28f 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -255,8 +255,6 @@ extern int unaligned_enabled; extern int unaligned_dump_stack; extern int no_unaligned_warning; -#define SYSCTL_PERM_EMPTY_DIR (1...
315552310c7de92baea4e570967066569937a843
Analyze and fix the following issue in the Linux kernel code: sysctl: Fix out of bounds access for empty sysctl registers
Problem Details: When registering tables to the sysctl subsystem there is a check to see if header is a permanently empty directory (used for mounts). This check evaluates the first element of the ctl_table. This results in an out of bounds evaluation when registering empty directories. The function register_sysctl_mo...
```diff diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 8064ea76f80b..84abf98340a0 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -44,7 +44,7 @@ static struct ctl_table sysctl_mount_point[] = { */ struct ctl_table_header *register_sysctl_mount_point(const char *path) { - return r...
dd8f87f21dc3da2eaf46e7401173f935b90b13a8
Analyze and fix the following issue in the Linux kernel code: reiserfs: fix uninit-value in comp_keys
Problem Details: The cpu_key was not initialized in reiserfs_delete_solid_item(), which triggered this issue. Reported-and-tested-by: <syzbot+b3b14fb9f8a14c5d0267@syzkaller.appspotmail.com> Signed-off-by: Edward Adam Davis <eadavis@qq.com> Link: https://lore.kernel.org/r/tencent_9EA7E746DE92DBC66049A62EDF6ED64CA706@q...
```diff diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c index 2138ee7d271d..5faf702f8d15 100644 --- a/fs/reiserfs/stree.c +++ b/fs/reiserfs/stree.c @@ -1407,7 +1407,7 @@ void reiserfs_delete_solid_item(struct reiserfs_transaction_handle *th, INITIALIZE_PATH(path); int item_len = 0; int tb_init = 0; - struc...
8ff363ade395e72dc639810b6f59849c743c363e
Analyze and fix the following issue in the Linux kernel code: block: Fix a memory leak in bdev_open_by_dev()
Problem Details: If we early exit here, 'handle' needs to be freed, or some memory leaks. Fixes: ed5cc702d311 ("block: Add config option to not allow writing to mounted devices") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/8eaec334781e695810aaa383b55de00ca4ab1352.1...
```diff diff --git a/block/bdev.c b/block/bdev.c index fc8d28d77495..de76320ef9df 100644 --- a/block/bdev.c +++ b/block/bdev.c @@ -828,8 +828,10 @@ struct bdev_handle *bdev_open_by_dev(dev_t dev, blk_mode_t mode, void *holder, goto free_handle; /* Blocking writes requires exclusive opener */ - if (mode & BLK_OPE...
c39e2ae3943d4ee278af4e1b1dcfd5946da1089b
Analyze and fix the following issue in the Linux kernel code: fs: fix __sb_write_started() kerneldoc formatting
Problem Details: When running 'make htmldocs', I see the following warning: Documentation/filesystems/api-summary:14: ./include/linux/fs.h:1659: WARNING: Definition list ends without a blank line; unexpected unindent. The official guidance [1] seems to be to use lists, which will prevent both the "unexpected uninde...
```diff diff --git a/include/linux/fs.h b/include/linux/fs.h index db5d07e6e02e..473063f385e5 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1650,9 +1650,9 @@ static inline bool __sb_start_write_trylock(struct super_block *sb, int level) * @sb: the super we write to * @level: the freeze level * - * ...
6ba22d8d1521f35ca1343e64f69d7857f0340e5e
Analyze and fix the following issue in the Linux kernel code: netfs: Make netfs_put_request() handle a NULL pointer
Problem Details: Make netfs_put_request() just return if given a NULL request pointer. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org
```diff diff --git a/fs/netfs/objects.c b/fs/netfs/objects.c index 65a17dd4ab49..3aa0bfbc04ec 100644 --- a/fs/netfs/objects.c +++ b/fs/netfs/objects.c @@ -106,19 +106,22 @@ static void netfs_free_request(struct work_struct *work) void netfs_put_request(struct netfs_io_request *rreq, bool was_async, enum netf...
1cff7243334f851b7dddf450abdaa6223a7a28e3
Analyze and fix the following issue in the Linux kernel code: arm64: dts: sprd: Change UMS512 idle-state nodename to match bindings
Problem Details: Fix below dtbs_check warning: idle-states: 'core-pd' does not match any of the regexes: '^(cpu|cluster)-', 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20231221092824.1169453-3-chunyan.zhang@unisoc.com Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
```diff diff --git a/arch/arm64/boot/dts/sprd/ums512.dtsi b/arch/arm64/boot/dts/sprd/ums512.dtsi index 237d93f0fcd0..dbdb79f8e959 100644 --- a/arch/arm64/boot/dts/sprd/ums512.dtsi +++ b/arch/arm64/boot/dts/sprd/ums512.dtsi @@ -113,7 +113,7 @@ idle-states { entry-method = "psci"; - CORE_PD: core-pd { + CORE_PD:...
829e3e70fe72edc084fbfc4964669594ebe427ce
Analyze and fix the following issue in the Linux kernel code: arm64: dts: sprd: Add clock reference for pll2 on UMS512
Problem Details: Fix below dtbs_check warning: 'clocks' is a dependency of 'clock-names' Link: https://lore.kernel.org/r/20231221092824.1169453-2-chunyan.zhang@unisoc.com Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
```diff diff --git a/arch/arm64/boot/dts/sprd/ums512.dtsi b/arch/arm64/boot/dts/sprd/ums512.dtsi index a4835ec1bb52..237d93f0fcd0 100644 --- a/arch/arm64/boot/dts/sprd/ums512.dtsi +++ b/arch/arm64/boot/dts/sprd/ums512.dtsi @@ -291,6 +291,7 @@ pll2: clock-controller@0 { compatible = "sprd,ums512-gc-pll"; r...
8358491a6cffd4ea4a6951aef12386c4b8b838b3
Analyze and fix the following issue in the Linux kernel code: arm64: dts: sprd: Removed unused clock references from etm nodes
Problem Details: Remove these unused clock references to fix dtbs_check warnings: etm@3f740000: clocks: [[11], [35, 34], [36, 8]] is too long etm@3f740000: clock-names:1: 'atclk' was expected etm@3f740000: clock-names: ['apb_pclk', 'clk_cs', 'cs_src'] is too long Link: https://lore.kernel.org/r/20231221092824.1169453...
```diff diff --git a/arch/arm64/boot/dts/sprd/ums512.dtsi b/arch/arm64/boot/dts/sprd/ums512.dtsi index 97ac550af2f1..a4835ec1bb52 100644 --- a/arch/arm64/boot/dts/sprd/ums512.dtsi +++ b/arch/arm64/boot/dts/sprd/ums512.dtsi @@ -682,8 +682,8 @@ compatible = "arm,coresight-etm4x", "arm,primecell"; reg = <0 0x3f040...
2da4f4a7b003441b80f0f12d8a216590f652a40f
Analyze and fix the following issue in the Linux kernel code: arm64: dts: sprd: fix the cpu node for UMS512
Problem Details: The UMS512 Socs have 8 cores contains 6 a55 and 2 a75. modify the cpu nodes to correct information. Fixes: 2b4881839a39 ("arm64: dts: sprd: Add support for Unisoc's UMS512") Cc: stable@vger.kernel.org Signed-off-by: Cixi Geng <cixi.geng1@unisoc.com> Link: https://lore.kernel.org/r/20230711162346.5978-...
```diff diff --git a/arch/arm64/boot/dts/sprd/ums512.dtsi b/arch/arm64/boot/dts/sprd/ums512.dtsi index 024be594c47d..97ac550af2f1 100644 --- a/arch/arm64/boot/dts/sprd/ums512.dtsi +++ b/arch/arm64/boot/dts/sprd/ums512.dtsi @@ -96,7 +96,7 @@ CPU6: cpu@600 { device_type = "cpu"; - compatible = "arm,cortex-a55"...
407868deb2a344e9baa7909e1b13aec35c7217b2
Analyze and fix the following issue in the Linux kernel code: kconfig: remove redundant NULL pointer check before free()
Problem Details: Passing NULL to free() is allowed and is a no-op. Remove redundant NULL pointer checks. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
```diff diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index bd14aae1db58..f1197e672431 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -432,8 +432,7 @@ load: case S_INT: case S_HEX: case S_STRING: - if (sym->def[def].val) - free(sym->def[def].val); + fr...
ab7a781fd6f889d8514817622afc3ae514c3caf1
Analyze and fix the following issue in the Linux kernel code: OPP: Fix _set_required_opps when opp is NULL
Problem Details: _set_required_opps can be called with opp NULL in _disable_opp_table(). commit e37440e7e2c2 ("OPP: Call dev_pm_opp_set_opp() for required OPPs") requires the opp pointer to be non-NULL to function. [ 81.253439] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000048 [ ...
```diff diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 49b429984bdb..a6e80f566e9b 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -1066,6 +1066,7 @@ static int _set_required_opps(struct device *dev, struct opp_table *opp_table, struct dev_pm_opp *opp, bool up) { struct device **devs...
d10c77873ba1e9e6b91905018e29e196fd5f863d
Analyze and fix the following issue in the Linux kernel code: ksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16()
Problem Details: If ->NameOffset/Length is bigger than ->CreateContextsOffset/Length, ksmbd_check_message doesn't validate request buffer it correctly. So slab-out-of-bounds warning from calling smb_strndup_from_utf16() in smb2_open() could happen. If ->NameLength is non-zero, Set the larger of the two sums (Name and C...
```diff diff --git a/fs/smb/server/smb2misc.c b/fs/smb/server/smb2misc.c index 23bd3d1209df..03dded29a980 100644 --- a/fs/smb/server/smb2misc.c +++ b/fs/smb/server/smb2misc.c @@ -106,16 +106,25 @@ static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, break; case SMB2_CREATE: { + unsigned short...
d2c4f1928a3f7f4a1f28a0cfc022e8a145ce6903
Analyze and fix the following issue in the Linux kernel code: virtio_net: fix missing dma unmap for resize
Problem Details: For rq, we have three cases getting buffers from virtio core: 1. virtqueue_get_buf{,_ctx} 2. virtqueue_detach_unused_buf 3. callback for virtqueue_resize But in commit 295525e29a5b("virtio_net: merge dma operations when filling mergeable buffers"), I missed the dma unmap for the #3 case. That will l...
```diff diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index d16f592c2061..51b1868d2f22 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -334,7 +334,6 @@ struct virtio_net_common_hdr { }; }; -static void virtnet_rq_free_unused_buf(struct virtqueue *vq, void *buf); static v...
5cb23af38916fccde98f7a999b0b6f8c4ec34a3e
Analyze and fix the following issue in the Linux kernel code: Documentation/i2c: fix spelling error in i2c-address-translators
Problem Details: Correct to "stretched" from "streched" in "keeps clock streched on bus A waiting for reply". Signed-off-by: Attreyee Mukherjee <tintinm2017@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Wolfram Sang <wsa@kernel.org>
```diff diff --git a/Documentation/i2c/i2c-address-translators.rst b/Documentation/i2c/i2c-address-translators.rst index b22ce9f41ecf..6845c114e472 100644 --- a/Documentation/i2c/i2c-address-translators.rst +++ b/Documentation/i2c/i2c-address-translators.rst @@ -71,7 +71,7 @@ Transaction: - Physical I2C transaction o...
7afd49a38e73afd57ff62c8d1cf5af760c4d49c0
Analyze and fix the following issue in the Linux kernel code: igc: Check VLAN EtherType mask
Problem Details: Currently the driver accepts VLAN EtherType steering rules regardless of the configured mask. And things might fail silently or with confusing error messages to the user. The VLAN EtherType can only be matched by full mask. Therefore, add a check for that. For instance the following rule is invalid, b...
```diff diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index b56b4f338bd3..859b2636f3d9 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -1357,6 +1357,14 @@ static int igc_ethtool_add_nfc_rule(struct...
b5063cbe148b829e8eb97672c2cbccc058835476
Analyze and fix the following issue in the Linux kernel code: igc: Check VLAN TCI mask
Problem Details: Currently the driver accepts VLAN TCI steering rules regardless of the configured mask. And things might fail silently or with confusing error messages to the user. There are two ways to handle the VLAN TCI mask: 1. Match on the PCP field using a VLAN prio filter 2. Match on complete TCI field usin...
```diff diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h index f48f82d5e274..85cc16396506 100644 --- a/drivers/net/ethernet/intel/igc/igc.h +++ b/drivers/net/ethernet/intel/igc/igc.h @@ -568,6 +568,7 @@ struct igc_nfc_filter { u16 etype; __be16 vlan_etype; u16 vlan_tci; + u...
088464abd48cf3735aee91f9e211b32da9d81117
Analyze and fix the following issue in the Linux kernel code: igc: Report VLAN EtherType matching back to user
Problem Details: Currently the driver allows to configure matching by VLAN EtherType. However, the retrieval function does not report it back to the user. Add it. Before: |root@host:~# ethtool -N enp3s0 flow-type ether vlan-etype 0x8100 action 0 |Added rule with ID 63 |root@host:~# ethtool --show-ntuple enp3s0 |4 RX r...
```diff diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index 785eaa8e0ba8..69b2fd006293 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -980,6 +980,12 @@ static int igc_ethtool_get_nfc_rule(struct i...
3e48041d9820c17e0a51599d12e66c6e12a8d08d
Analyze and fix the following issue in the Linux kernel code: i40e: Fix filter input checks to prevent config with invalid values
Problem Details: Prevent VF from configuring filters with unsupported actions or use REDIRECT action with invalid tc number. Current checks could cause out of bounds access on PF side. Fixes: e284fc280473 ("i40e: Add and delete cloud filter") Reviewed-by: Andrii Staikov <andrii.staikov@intel.com> Signed-off-by: Sudhee...
```diff diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index 3f99eb198245..031b15cceab9 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -3521,16 +3521,16 @@ static int i40e_v...
8278a6a43d030a3aa8d7768148e74844331e39e3
Analyze and fix the following issue in the Linux kernel code: ice: dpll: fix phase offset value
Problem Details: Stop dividing the phase_offset value received from firmware. This fault is present since the initial implementation. The phase_offset value received from firmware is in 0.01ps resolution. Dpll subsystem is using the value in 0.001ps, raw value is adjusted before providing it to the user. The user can ...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c index 9a6c25f98632..edac34c796ce 100644 --- a/drivers/net/ethernet/intel/ice/ice_common.c +++ b/drivers/net/ethernet/intel/ice/ice_common.c @@ -5332,7 +5332,6 @@ ice_aq_get_cgu_dpll_status(struct ice_hw *hw, u...
6d05ff55ef4f4954d28551236239f297bd52ea48
Analyze and fix the following issue in the Linux kernel code: ice: Shut down VSI with "link-down-on-close" enabled
Problem Details: Disabling netdev with ethtool private flag "link-down-on-close" enabled can cause NULL pointer dereference bug. Shut down VSI regardless of "link-down-on-close" state. Fixes: 8ac7132704f3 ("ice: Fix interface being down after reset with link-down-on-close flag on") Reviewed-by: Przemek Kitszel <przemy...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 270d68b69c59..adfdea1e2805 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -9193,6 +9193,8 @@ int ice_stop(struct net_device *netdev) else n...
6a8d8bb55e7001de2d50920381cc858f3a3e9fb7
Analyze and fix the following issue in the Linux kernel code: ice: Fix link_down_on_close message
Problem Details: The driver should not report an error message when for a medialess port the link_down_on_close flag is enabled and the physical link cannot be set down. Fixes: 8ac7132704f3 ("ice: Fix interface being down after reset with link-down-on-close flag on") Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@in...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index fb9c93f37e84..270d68b69c59 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -2146,7 +2146,7 @@ static int ice_configure_phy(struct ice_vsi *vsi) /...
d6b9f4e6f7fb589d8024a31cc4883d15d0c8def4
Analyze and fix the following issue in the Linux kernel code: block: rename and document BLK_DEF_MAX_SECTORS
Problem Details: Give BLK_DEF_MAX_SECTORS a _CAP postfix and document what it is used for. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20231227092305.279567-5-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
```diff diff --git a/block/blk-settings.c b/block/blk-settings.c index 33b3f767b81e..ba6e0e97118c 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -139,7 +139,7 @@ void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_hw_secto if (limits->max_user_sectors) max_sectors = min(max_sec...
9a9525de865410047fa962867b4fcd33943b206f
Analyze and fix the following issue in the Linux kernel code: null_blk: don't cap max_hw_sectors to BLK_DEF_MAX_SECTORS
Problem Details: null_blk has some rather odd capping of the max_hw_sectors value to BLK_DEF_MAX_SECTORS, which doesn't make sense - max_hw_sector is the hardware limit, and BLK_DEF_MAX_SECTORS despite the confusing name is the default cap for the max_sectors field used for normal file system I/O. Remove all the cappi...
```diff diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c index 3021d58ca51c..13ed446b5e19 100644 --- a/drivers/block/null_blk/main.c +++ b/drivers/block/null_blk/main.c @@ -2186,10 +2186,8 @@ static int null_add_dev(struct nullb_device *dev) blk_queue_logical_block_size(nullb->q, dev->bloc...
c968b99f868dd82ebcafec9788ce18334da177b6
Analyze and fix the following issue in the Linux kernel code: LoongArch: signal.c: add header file to fix build error
Problem Details: loongarch's signal.c uses rseq_signal_deliver() so it should pull in the appropriate header to prevent a build error: ../arch/loongarch/kernel/signal.c: In function 'handle_signal': ../arch/loongarch/kernel/signal.c:1034:9: error: implicit declaration of function 'rseq_signal_deliver' [-Werror=implici...
```diff diff --git a/arch/loongarch/kernel/signal.c b/arch/loongarch/kernel/signal.c index 4a3686d13349..7a555b600171 100644 --- a/arch/loongarch/kernel/signal.c +++ b/arch/loongarch/kernel/signal.c @@ -15,6 +15,7 @@ #include <linux/context_tracking.h> #include <linux/entry-common.h> #include <linux/irqflags.h> +#in...
5d5dfc50e5689d5b09de4a323f84c28a6700d156
Analyze and fix the following issue in the Linux kernel code: gpiolib: remove extra_checks
Problem Details: extra_checks is only used in a few places. It also depends on a non-standard DEBUG define one needs to add to the source file. The overhead of removing it should be minimal (we already use pure might_sleep() in the code anyway) so drop it. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro...
```diff diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index c9ca809b55de..837e9919bf07 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -47,19 +47,6 @@ * GPIOs can sometimes cost only an instruction or two per bit. */ - -/* When debugging, extend minimal trust to callers and plat...
7dd1871e5049bbd40ee78ac94b1678ba5caf2486
Analyze and fix the following issue in the Linux kernel code: gpio: tps65219: don't use CONFIG_DEBUG_GPIO
Problem Details: CONFIG_DEBUG_GPIO should only be used to enable debug log messages and for core GPIOLIB debugging. Don't use it to control the execution of potentially buggy code. Just put it under an always-false #if. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andy Shevchenko <a...
```diff diff --git a/drivers/gpio/gpio-tps65219.c b/drivers/gpio/gpio-tps65219.c index 7b38aa360112..cd1f17041f8c 100644 --- a/drivers/gpio/gpio-tps65219.c +++ b/drivers/gpio/gpio-tps65219.c @@ -96,16 +96,16 @@ static int tps65219_gpio_change_direction(struct gpio_chip *gc, unsigned int off * Below can be used for t...
ad5575eb6278892aa25a5d249c5009860d6d8bbc
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: Add a missing file to the INTEL GPIO section
Problem Details: When gpio-tangier was split the new born headers had been missed in the MAINTAINERS. Add it there. Fixes: d2c19e89e03c ("gpio: tangier: Introduce Intel Tangier GPIO driver") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linar...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 0931646fdb87..759985fd085c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10646,6 +10646,7 @@ F: drivers/gpio/gpio-pch.c F: drivers/gpio/gpio-sch.c F: drivers/gpio/gpio-sodaville.c F: drivers/gpio/gpio-tangier.c +F: drivers/gpio/gpio-tangier.h INTEL GVT-g DRIVE...
ede7511e7c22c9542a699ddff9f32de74e0bb972
Analyze and fix the following issue in the Linux kernel code: gpiolib: cdev: include overflow.h
Problem Details: struct_size() is used to calculate struct linereq size, so explicitly include overflow.h. Signed-off-by: Kent Gibson <warthog618@gmail.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
```diff diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c index 9155c54acc1e..942fe115b726 100644 --- a/drivers/gpio/gpiolib-cdev.c +++ b/drivers/gpio/gpiolib-cdev.c @@ -20,6 +20,7 @@ #include <linux/kfifo.h> #include <linux/module.h> #include <linux/mutex.h> +#include <linux/overflow.h> #inclu...
c0c4579d79d0df841e825c68df450909a0032faf
Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/ep93xx: Fix error handling during probe
Problem Details: When the interrupt property fails to be parsed, ep93xx_timer_of_init() return code ends up uninitialized: drivers/clocksource/timer-ep93xx.c:160:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (irq < 0) { ^~~~~~~...
```diff diff --git a/drivers/clocksource/timer-ep93xx.c b/drivers/clocksource/timer-ep93xx.c index bc0ca6e12334..6981ff3ac8a9 100644 --- a/drivers/clocksource/timer-ep93xx.c +++ b/drivers/clocksource/timer-ep93xx.c @@ -155,9 +155,8 @@ static int __init ep93xx_timer_of_init(struct device_node *np) ep93xx_tcu = tcu; ...
0515c73467fd550249ef83062e1d03d99c718b4f
Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/cadence-ttc: Fix some kernel-doc warnings
Problem Details: Fix some function kernel-doc warnings to placate scripts/kernel-doc. timer-cadence-ttc.c:79: warning: Function parameter or member 'clk_rate_change_nb' not described in 'ttc_timer' timer-cadence-ttc.c:158: warning: Function parameter or member 'cs' not described in '__ttc_clocksource_read' timer-caden...
```diff diff --git a/drivers/clocksource/timer-cadence-ttc.c b/drivers/clocksource/timer-cadence-ttc.c index 32daaac9b132..ca7a06489c40 100644 --- a/drivers/clocksource/timer-cadence-ttc.c +++ b/drivers/clocksource/timer-cadence-ttc.c @@ -69,7 +69,7 @@ * @base_addr: Base address of timer * @freq: Timer input clock ...
b99a212a7697c542b460adaa15d4a98abf8223f0
Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/timer-ti-dm: Fix make W=n kerneldoc warnings
Problem Details: Kernel test robot reports of kerneldoc related warnings that happen with make W=n for "parameter or member not described". These were caused by changes to function parameter names with earlier commits where the kerneldoc parts were not updated. Fixes: 49cd16bb573e ("clocksource/drivers/timer-ti-dm: S...
```diff diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c index 5f60f6bd3386..56acf2617262 100644 --- a/drivers/clocksource/timer-ti-dm.c +++ b/drivers/clocksource/timer-ti-dm.c @@ -183,7 +183,7 @@ static inline u32 dmtimer_read(struct dmtimer *timer, u32 reg) * dmtimer_write - write ...
b91cf01cf3e63a627b3b65f4284dcf9a4deb80f9
Analyze and fix the following issue in the Linux kernel code: dt-bindings: timer: thead,c900-aclint-mtimer: separate mtime and mtimecmp regs
Problem Details: The timer registers of aclint don't follow the clint layout and can be mapped on any different offset. As sg2042 uses separated timer and mswi for its clint, it should follow the aclint spec and have separated registers. The previous patch introduced a new type of T-HEAD aclint timer which has clint t...
```diff diff --git a/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml b/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml index fbd235650e52..2e92bcdeb423 100644 --- a/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml +++ b/Documentation/devicetree/bindings/t...
e345b87b0b0444d1c644b0ea15cfb50e88f10b55
Analyze and fix the following issue in the Linux kernel code: gfs2: Fix freeze consistency check in log_write_header
Problem Details: Functions gfs2_freeze_super() and gfs2_thaw_super() are using the SDF_FROZEN flag to indicate when the filesystem is frozen, synchronized by sd_freeze_mutex. However, this doesn't prevent writes from happening between the point of calling thaw_super() and the point where the SDF_FROZEN flag is cleared...
```diff diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 6b3ba8f7b67a..8cddf955ebc0 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -913,8 +913,9 @@ void gfs2_write_log_header(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd, static void log_write_header(struct gfs2_sbd *sdp, u32 flags) { blk_opf_t op_flags = REQ_PREF...
4e58543e7da4859c4ba61d15493e3522b6ad71fd
Analyze and fix the following issue in the Linux kernel code: gfs2: Refcounting fix in gfs2_thaw_super
Problem Details: It turns out that the .freeze_super and .thaw_super operations require the filesystem to manage the superblock refcount itself. We are using the freeze_super() and thaw_super() helpers to mostly take care of that for us, but this means that the superblock may no longer be around by when thaw_super() r...
```diff diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 6b45b7866212..ae92ae1203d8 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -819,6 +819,7 @@ static int gfs2_thaw_super(struct super_block *sb, enum freeze_holder who) return -EINVAL; } + atomic_inc(&sb->s_active); gfs2_freeze_unlock(&sdp->sd_fr...
5a7a964689b78be5817f14409619fded6882821d
Analyze and fix the following issue in the Linux kernel code: gfs2: Minor gfs2_{freeze,thaw}_super cleanup
Problem Details: This minor cleanup to gfs2_freeze_super() and gfs2_thaw_super() prepares for the following refcounting fix. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
```diff diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index cf3431486fd4..6b45b7866212 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -759,9 +759,10 @@ static int gfs2_freeze_super(struct super_block *sb, enum freeze_holder who) if (!mutex_trylock(&sdp->sd_freeze_mutex)) return -EBUSY; - error = -EBUSY; ...
b0a1fe4610de5761a66de0e43540fc3d59638402
Analyze and fix the following issue in the Linux kernel code: HID: magicmouse: fix kerneldoc for struct magicmouse_sc
Problem Details: Description for hdev, work and battery_timer of struct magicmouse_sc were missing. Fix that. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202312261056.AmFPDIL5-lkp@intel.com/ Signed-off-by: Jiri Kosina <jkosina@suse.com>
```diff diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index c9c968d4b36a..a46ff4e8b99f 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c @@ -120,6 +120,9 @@ MODULE_PARM_DESC(report_undeciphered, "Report undeciphered multi-touch state fie * @scroll_jiffies: Time of...
ee11d2d37f5c05bd7bf5ccc820a58f48423d032b
Analyze and fix the following issue in the Linux kernel code: drm/i915/perf: Update handling of MMIO triggered reports
Problem Details: On XEHP platforms user is not able to find MMIO triggered reports in the OA buffer since i915 squashes the context ID fields. These context ID fields hold the MMIO trigger markers. Update logic to not squash the context ID fields of MMIO triggered reports. Fixes: cba94bbcff08 ("drm/i915/perf: Determi...
```diff diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c index 7b1c8de2f9cb..2d695818f006 100644 --- a/drivers/gpu/drm/i915/i915_perf.c +++ b/drivers/gpu/drm/i915/i915_perf.c @@ -772,10 +772,6 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream, * The reason field in...
2bd7a06a1208aaacb4e7a2a5436c23bce8d70801
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: Fix passing the correct DPCD_REV for drm_dp_set_phy_test_pattern
Problem Details: Using link_status to get DPCD_REV fails when disabling/defaulting phy pattern. Use intel_dp->dpcd to access DPCD_REV correctly. Fixes: 8cdf72711928 ("drm/i915/dp: Program vswing, pre-emphasis, test-pattern") Cc: Jani Nikula <jani.nikula@intel.com> Cc: Imre Deak <imre.deak@intel.com> Cc: Lee Shawn C <s...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index b21bcd40f111..62ce92772367 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -4496,7 +4496,7 @@ static void intel_dp_process_phy_request(struct intel_dp *intel...
ba367479c7ad0b870461024cd5ae7a1ea6e1e3db
Analyze and fix the following issue in the Linux kernel code: OPP: The level field is always of unsigned int type
Problem Details: By mistake, dev_pm_opp_find_level_floor() used the level parameter as unsigned long instead of unsigned int. Fix it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
```diff diff --git a/drivers/opp/core.c b/drivers/opp/core.c index c022d548067d..49b429984bdb 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -842,9 +842,14 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_find_level_ceil); * use. */ struct dev_pm_opp *dev_pm_opp_find_level_floor(struct device *dev, - unsign...
7b474c77daddaf89bbb72594737538f4e0dce2fd
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix promotes
Problem Details: The recent work to fix data moves w.r.t. durability broke promotes, because the caused us to bail out when the extent minus pointers being dropped still has enough pointers to satisfy the current number of replicas. Disable this check when we're adding cached replicas. Signed-off-by: Kent Overstreet ...
```diff diff --git a/fs/bcachefs/data_update.c b/fs/bcachefs/data_update.c index b05457d284a6..37d6ecae8c30 100644 --- a/fs/bcachefs/data_update.c +++ b/fs/bcachefs/data_update.c @@ -587,7 +587,8 @@ int bch2_data_update_init(struct btree_trans *trans, * Increasing replication is an explicit operation triggered by ...