id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
60165ab774cb0c509680a73cf826d0e158454653 | Analyze and fix the following issue in the Linux kernel code: HID: logitech-hidpp: rework one more time the retries attempts | Problem Details:
Extract the internal code inside a helper function, fix the
initialization of the parameters used in the helper function
(`hidpp->answer_available` was not reset and `*response` wasn't either),
and use a `do {...} while();` loop.
Fixes: 586e8fede795 ("HID: logitech-hidpp: Retry commands when device is... | ```diff
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index 340c1ac442ad..05f5b5f588a2 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -275,21 +275,22 @@ static int __hidpp_send_report(struct hid_device *hdev,
}
/*
- * hidpp_send_message_syn... |
ed81cb9e05170646650359d729fb7e7afa4cb2ac | Analyze and fix the following issue in the Linux kernel code: ALSA: hda/tas2781: Switch back to use struct i2c_driver's .probe() | Problem Details:
struct i2c_driver::probe_new is about to go away. Switch the driver to
use the probe callback with the same prototype.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Link: https://lore.kernel.org/r/20230824200219.9569-... | ```diff
diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index aa9ce3837336..37114fd61a38 100644
--- a/sound/pci/hda/tas2781_hda_i2c.c
+++ b/sound/pci/hda/tas2781_hda_i2c.c
@@ -845,7 +845,7 @@ static struct i2c_driver tas2781_hda_i2c_driver = {
.pm = &tas2781_hda_pm_ops,
},
.id_tab... |
2f5124e86ae74b7ba24c9ae2644107b750cbf38f | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: add check max message length while scanning with extraie | Problem Details:
Currently the extraie length is directly used to allocate skb buffer. When
the length of skb is greater than the max message length which firmware
supports, error will happen in firmware side.
Hence add check for the skb length and drop extraie when overflow and
print a message.
Tested-on: WCN7850 hw... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index cc9a377c06fd..ef0f3cf35cfd 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -2239,12 +2239,6 @@ int ath12k_wmi_send_scan_start_cmd(struct ath12k *ar,
if (arg->num_b... |
1e4134610d93271535ecf900a676e1f094e9944c | Analyze and fix the following issue in the Linux kernel code: wifi: ath9k: use IS_ERR() with debugfs_create_dir() | Problem Details:
The debugfs_create_dir() function returns error pointers,
it never returns NULL. Most incorrect error checks were fixed,
but the one in ath9k_htc_init_debug() was forgotten.
Fix the remaining error check.
Fixes: e5facc75fa91 ("ath9k_htc: Cleanup HTC debugfs")
Signed-off-by: Wang Ming <machel@vivo.com... | ```diff
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
index 1ed2b1216bce..c549ff3abcdc 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
@@ -486,7 +486,7 @@ int ath9k_htc_init_debug(struct ath_h... |
a4f39c9f14a634e4cd35fcd338c239d11fcc73fc | Analyze and fix the following issue in the Linux kernel code: net: handle ARPHRD_PPP in dev_is_mac_header_xmit() | Problem Details:
The goal is to support a bpf_redirect() from an ethernet device (ingress)
to a ppp device (egress).
The l2 header is added automatically by the ppp driver, thus the ethernet
header should be removed.
CC: stable@vger.kernel.org
Fixes: 27b29f63058d ("bpf: add bpf_redirect() helper")
Signed-off-by: Nicol... | ```diff
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h
index 1ed52441972f..10a1e81434cb 100644
--- a/include/linux/if_arp.h
+++ b/include/linux/if_arp.h
@@ -53,6 +53,10 @@ static inline bool dev_is_mac_header_xmit(const struct net_device *dev)
case ARPHRD_NONE:
case ARPHRD_RAWIP:
case ARPHRD_PIMREG:... |
da596080b2b400c50fe9f8f237bcaf09fed06af8 | Analyze and fix the following issue in the Linux kernel code: drm/gma500: Fix call trace when psb_gem_mm_init() fails | Problem Details:
Because the gma_irq_install() is call after psb_gem_mm_init() function,
when psb_gem_mm_init() fails, the interrupt line haven't been allocated.
Yet the gma_irq_uninstall() is called in the psb_driver_unload() function
without checking if checking the irq is registered or not.
The calltrace is appende... | ```diff
diff --git a/drivers/gpu/drm/gma500/psb_drv.h b/drivers/gpu/drm/gma500/psb_drv.h
index 6204a745d958..c5edfa4aa4cc 100644
--- a/drivers/gpu/drm/gma500/psb_drv.h
+++ b/drivers/gpu/drm/gma500/psb_drv.h
@@ -416,6 +416,7 @@ struct drm_psb_private {
uint32_t pipestat[PSB_NUM_PIPE];
spinlock_t irqmask_lock;
+ bo... |
2e775f2d41ef8ed93aab2ad1b7a86b41b2da8560 | Analyze and fix the following issue in the Linux kernel code: drm/i915/display: update intel_dp_has_audio to support MST | Problem Details:
Modify intel_dp_has_audio to handle DP-MST as well.
v1: fix the wrong port comparison (Jani Nikula)
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedeskto... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 7067ee3a4bd3..6ec5f2dbb6db 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2562,15 +2562,17 @@ intel_dp_drrs_compute_config(struct intel_connector *connecto... |
1bd3a76880b2bce017987cf53780b372cf59528e | Analyze and fix the following issue in the Linux kernel code: scsi: snic: Fix double free in snic_tgt_create() | Problem Details:
Commit 41320b18a0e0 ("scsi: snic: Fix possible memory leak if device_add()
fails") fixed the memory leak caused by dev_set_name() when device_add()
failed. However, it did not consider that 'tgt' has already been released
when put_device(&tgt->dev) is called. Remove kfree(tgt) in the error path
to avoi... | ```diff
diff --git a/drivers/scsi/snic/snic_disc.c b/drivers/scsi/snic/snic_disc.c
index e429ad23c396..4db3ba62fcd3 100644
--- a/drivers/scsi/snic/snic_disc.c
+++ b/drivers/scsi/snic/snic_disc.c
@@ -303,12 +303,11 @@ snic_tgt_create(struct snic *snic, struct snic_tgt_id *tgtid)
"Snic Tgt: device_add, with err... |
9604eea5bd3ae1fa3c098294f4fc29ad687141ea | Analyze and fix the following issue in the Linux kernel code: scsi: st: Add third party poweron reset handling | Problem Details:
Many tape devices will automatically rewind following a poweron/reset.
This can result in data loss as other operations in the driver can write to
the tape when the position is unknown. E.g. MTEOM can write a filemark at
the beginning of the tape. This patch adds code to detect poweron/reset
unit atten... | ```diff
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 14d7981ddcdd..338aa8c42968 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -414,6 +414,8 @@ static int st_chk_result(struct scsi_tape *STp, struct st_request * SRpnt)
if (cmdstatp->have_sense &&
cmdstatp->sense_hdr.asc == 0 && cmdstatp->... |
90f359c1aa4ace0fb5f03796a7ee97c2ad2e42cc | Analyze and fix the following issue in the Linux kernel code: scsi: core: Report error list information in debugfs | Problem Details:
Provide information in debugfs about SCSI error handling to make it easier
to debug the SCSI error handler. Additionally, report the maximum number of
retries in debugfs (.allowed).
Reviewed-by: John Garry <john.g.garry@oracle.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Damien Le Moal <damien.lemoal@o... | ```diff
diff --git a/drivers/scsi/scsi_debugfs.c b/drivers/scsi/scsi_debugfs.c
index 217b70c678c3..f795848b316c 100644
--- a/drivers/scsi/scsi_debugfs.c
+++ b/drivers/scsi/scsi_debugfs.c
@@ -3,6 +3,7 @@
#include <linux/seq_file.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_dbg.h>
+#include <scsi/scsi_host.h>
#... |
e83d4e9b2d0ff12f02f85fbef909c46c6447d41e | Analyze and fix the following issue in the Linux kernel code: netlink: specs: fix indent in fou | Problem Details:
Fix up the indentation. This has no functional effect, AFAICT.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://lore.kernel.org/r/20230824003056.1436637-6-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org> | ```diff
diff --git a/Documentation/netlink/specs/fou.yaml b/Documentation/netlink/specs/fou.yaml
index 3e13826a3fdf..0af5ab842c04 100644
--- a/Documentation/netlink/specs/fou.yaml
+++ b/Documentation/netlink/specs/fou.yaml
@@ -107,16 +107,16 @@ operations:
flags: [ admin-perm ]
do:
- request: &s... |
dc2ef94d892634fba912e4fdeb01cd1c19346c9a | Analyze and fix the following issue in the Linux kernel code: tools: ynl-gen: fix collecting global policy attrs | Problem Details:
We look for attributes inside do.request, but there's another
layer of nesting in the spec, look inside do.request.attributes.
This bug had no effect as all global policies we generate (fou)
seem to be full, anyway, and we treat full and empty the same.
Next patch will change the treatment of empty p... | ```diff
diff --git a/tools/net/ynl/ynl-gen-c.py b/tools/net/ynl/ynl-gen-c.py
index e27deb199a70..13d06931c045 100755
--- a/tools/net/ynl/ynl-gen-c.py
+++ b/tools/net/ynl/ynl-gen-c.py
@@ -978,7 +978,9 @@ class Family(SpecFamily):
for op_mode in ['do', 'dump']:
if op_mode in op:
- ... |
10ea77e49c5761008d0e2bf6d30b434cbc62446d | Analyze and fix the following issue in the Linux kernel code: net/mlx5e: fix up for "net/mlx5e: Move MACsec flow steering operations to be used as core library" | Problem Details:
Recent merge had a conflict in:
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec_fs.c
between commit:
aeb660171b06 ("net/mlx5e: fix double free in macsec_fs_tx_create_crypto_table_groups")
from Linus' tree and commit:
cb5ebe4896f9 ("net/mlx5e: Move MACsec flow steering operations to b... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/macsec_fs.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/macsec_fs.c
index 2f2cb67717cd..4a078113e292 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/macsec_fs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/macsec_fs.c
@@ -278,6 +278,7 @@ s... |
60c5fd2e8f3c42a5abc565ba9876ead1da5ad2b7 | Analyze and fix the following issue in the Linux kernel code: scsi: core: raid_class: Remove raid_component_add() | Problem Details:
The raid_component_add() function was added to the kernel tree via patch
"[SCSI] embryonic RAID class" (2005). Remove this function since it never
has had any callers in the Linux kernel. And also raid_component_release()
is only used in raid_component_add(), so it is also removed.
Signed-off-by: Zhu ... | ```diff
diff --git a/drivers/scsi/raid_class.c b/drivers/scsi/raid_class.c
index 711252e52d8e..95a86e0dfd77 100644
--- a/drivers/scsi/raid_class.c
+++ b/drivers/scsi/raid_class.c
@@ -209,54 +209,6 @@ raid_attr_ro_state(level);
raid_attr_ro_fn(resync);
raid_attr_ro_state_fn(state);
-static void raid_component_releas... |
84a58e60038fa0366006977dba85eae16b2e3d78 | Analyze and fix the following issue in the Linux kernel code: net/mlx5: Dynamic cyclecounter shift calculation for PTP free running clock | Problem Details:
Use a dynamic calculation to determine the shift value for the internal
timer cyclecounter that will lead to the highest precision frequency
adjustments. Previously used a constant for the shift value assuming all
devices supported by the driver had a nominal frequency of 1GHz. However,
there are devic... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
index 377372f0578a..aa29f09e8356 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
@@ -32,16 +32,13 @@
#include <linu... |
284930a0146ade1ce0250a1d3bae7a675af4bb3b | Analyze and fix the following issue in the Linux kernel code: x86/hyperv: Remove duplicate include | Problem Details:
./arch/x86/hyperv/ivm.c: asm/sev.h is included more than once.
./arch/x86/hyperv/ivm.c: asm/coco.h is included more than once.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6212
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
R... | ```diff
diff --git a/arch/x86/hyperv/ivm.c b/arch/x86/hyperv/ivm.c
index 8fb3b28670e9..b9e12d7a83dc 100644
--- a/arch/x86/hyperv/ivm.c
+++ b/arch/x86/hyperv/ivm.c
@@ -18,9 +18,7 @@
#include <asm/mshyperv.h>
#include <asm/hypervisor.h>
#include <asm/mtrr.h>
-#include <asm/coco.h>
#include <asm/io_apic.h>
-#include <... |
cceb4e0810b61c7f5837c17e966b9b718dd62d22 | Analyze and fix the following issue in the Linux kernel code: Drivers: hv: vmbus: Support >64 VPs for a fully enlightened TDX/SNP VM | Problem Details:
Don't set *this_cpu_ptr(hyperv_pcpu_input_arg) before the function
set_memory_decrypted() returns, otherwise we run into this ticky issue:
For a fully enlightened TDX/SNP VM, in hv_common_cpu_init(),
*this_cpu_ptr(hyperv_pcpu_input_arg) is an encrypted page before
the set_memory_decrypted() returns.
... | ```diff
diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c
index 897bbb96f411..4c858e1636da 100644
--- a/drivers/hv/hv_common.c
+++ b/drivers/hv/hv_common.c
@@ -360,6 +360,7 @@ int hv_common_cpu_init(unsigned int cpu)
u64 msr_vp_index;
gfp_t flags;
int pgcount = hv_root_partition ? 2 : 1;
+ void *mem;
... |
0719881bf891cc72bf4375a9f4849d52772c80c6 | Analyze and fix the following issue in the Linux kernel code: x86/hyperv: Fix serial console interrupts for fully enlightened TDX guests | Problem Details:
When a fully enlightened TDX guest runs on Hyper-V, the UEFI firmware sets
the HW_REDUCED flag and consequently ttyS0 interrupts can't work. Fix the
issue by overriding x86_init.acpi.reduced_hw_early_init().
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Reviewed-by: Tianyu Lan <tiala@microsoft.... | ```diff
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index ff3d9c5de19c..fe5393d759d3 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -323,6 +323,26 @@ static void __init hv_smp_prepare_cpus(unsigned int max_cpus)
}
#endif
+/*
+ * When a fully enli... |
8566572bf3b4d6e416a4bf2110dbb4817d11ba59 | Analyze and fix the following issue in the Linux kernel code: ata: sata_gemini: Add missing MODULE_DESCRIPTION | Problem Details:
Add the missing MODULE_DESCRIPTION() to avoid warnings such as:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/ata/sata_gemini.o
when compiling with W=1.
Fixes: be4e456ed3a5 ("ata: Add driver for Faraday Technology FTIDE010")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <dlemo... | ```diff
diff --git a/drivers/ata/sata_gemini.c b/drivers/ata/sata_gemini.c
index 6bc3bffa83cd..400b22ee99c3 100644
--- a/drivers/ata/sata_gemini.c
+++ b/drivers/ata/sata_gemini.c
@@ -425,6 +425,7 @@ static struct platform_driver gemini_sata_driver = {
};
module_platform_driver(gemini_sata_driver);
+MODULE_DESCRIPTI... |
7274eef5729037300f29d14edeb334a47a098f65 | Analyze and fix the following issue in the Linux kernel code: ata: pata_ftide010: Add missing MODULE_DESCRIPTION | Problem Details:
Add the missing MODULE_DESCRIPTION() to avoid warnings such as:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/ata/pata_ftide010.o
when compiling with W=1.
Fixes: be4e456ed3a5 ("ata: Add driver for Faraday Technology FTIDE010")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <dle... | ```diff
diff --git a/drivers/ata/pata_ftide010.c b/drivers/ata/pata_ftide010.c
index d77ee40115aa..4d6ef90ccc77 100644
--- a/drivers/ata/pata_ftide010.c
+++ b/drivers/ata/pata_ftide010.c
@@ -560,6 +560,7 @@ static struct platform_driver pata_ftide010_driver = {
};
module_platform_driver(pata_ftide010_driver);
+MODU... |
7db15418d390cf878d7c77ae08a4ad39f1534bc5 | Analyze and fix the following issue in the Linux kernel code: nios2: fix flush_dcache_page() for usage from irq context | Problem Details:
Since at least kernel 6.1, flush_dcache_page() is called with IRQs
disabled, e.g. from aio_complete().
But the current implementation for flush_dcache_page() on NIOS2
unintentionally re-enables IRQs, which may lead to deadlocks.
Fix it by using xa_lock_irqsave() and xa_unlock_irqrestore() for the
fl... | ```diff
diff --git a/arch/nios2/include/asm/cacheflush.h b/arch/nios2/include/asm/cacheflush.h
index 7c48c5213fb7..348cea097792 100644
--- a/arch/nios2/include/asm/cacheflush.h
+++ b/arch/nios2/include/asm/cacheflush.h
@@ -52,5 +52,9 @@ extern void invalidate_dcache_range(unsigned long start, unsigned long end);
#de... |
01a7eb3e20994701700631ec30462087c4ecf142 | Analyze and fix the following issue in the Linux kernel code: mm: fix clean_record_shared_mapping_range kernel-doc | Problem Details:
Turn the a), b) into an unordered ReST list and remove the unnecessary
'Note:' prefix.
Link: https://lkml.kernel.org/r/20230818200630.2719595-4-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Mike Rapoport (IB... | ```diff
diff --git a/mm/mapping_dirty_helpers.c b/mm/mapping_dirty_helpers.c
index a26dd8bcfcdb..2f8829b3541a 100644
--- a/mm/mapping_dirty_helpers.c
+++ b/mm/mapping_dirty_helpers.c
@@ -288,13 +288,14 @@ EXPORT_SYMBOL_GPL(wp_shared_mapping_range);
* @end: Pointer to the number of the last set bit in @bitmap.
* non... |
853f62a30422f1a9a9c1f4b44df9b0de0d46a9e9 | Analyze and fix the following issue in the Linux kernel code: mm: fix get_mctgt_type() kernel-doc | Problem Details:
Convert the return values to an ReST list and tidy up the wording while
I'm touching it.
[akpm@linux-foundation.org: changes suggested by Randy]
[willy@infradead.org: another change suggested by Randy]
Link: https://lkml.kernel.org/r/ZOUZtZizeQG7PcsM@casper.infradead.org
Link: https://lkml.kernel.or... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 0286bd0ab043..b29b850cf399 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5850,25 +5850,20 @@ out:
* @ptent: the pte to be checked
* @target: the pointer the target page or swap ent will be stored(can be NULL)
*
- * Returns
- * 0(MC_TARGET_NON... |
19134bc23500a01bfdb77a804fc8e4bf8808d0cc | Analyze and fix the following issue in the Linux kernel code: mm: fix kernel-doc warning from tlb_flush_rmaps() | Problem Details:
Patch series "Improve mm documentation".
If you build with W=1, kernel-doc complains about tlb_flush_rmaps(). Then
I ran scripts/find-unused-docs.sh against mm/ and found a large number of
files which weren't included in the ReST documentation. I fixed up a
couple of them, and added all those withou... | ```diff
diff --git a/mm/mmu_gather.c b/mm/mmu_gather.c
index ea9683e12936..4f559f4ddd21 100644
--- a/mm/mmu_gather.c
+++ b/mm/mmu_gather.c
@@ -63,6 +63,7 @@ static void tlb_flush_rmap_batch(struct mmu_gather_batch *batch, struct vm_area_
/**
* tlb_flush_rmaps - do pending rmap removals after we have flushed the TLB
... |
40d49a3c9e4a0e5cf7a6fcebc8d4d7d63d1f3f1b | Analyze and fix the following issue in the Linux kernel code: mm: allow ->huge_fault() to be called without the mmap_lock held | Problem Details:
Remove the checks for the VMA lock being held, allowing the page fault
path to call into the filesystem instead of retrying with the mmap_lock
held. This will improve scalability for DAX page faults. Also update the
documentation to match (and fix some other changes that have happened
recently).
Lin... | ```diff
diff --git a/Documentation/filesystems/locking.rst b/Documentation/filesystems/locking.rst
index 211a03053992..1a2cb60b2499 100644
--- a/Documentation/filesystems/locking.rst
+++ b/Documentation/filesystems/locking.rst
@@ -628,26 +628,29 @@ vm_operations_struct
prototypes::
- void (*open)(struct vm_area_st... |
bad5a3a42a31859705baf39c4fc92173b2716760 | Analyze and fix the following issue in the Linux kernel code: selftests/mm: fix WARNING comparing pointer to 0 | Problem Details:
Remove comparing pointer to 0 to avoid this warning from coccinelle:
./tools/testing/selftests/mm/map_populate.c:80:16-17: WARNING comparing pointer to 0, suggest !E
./tools/testing/selftests/mm/map_populate.c:80:16-17: WARNING comparing pointer to 0
Link: https://lkml.kernel.org/r/20230817160033.900... | ```diff
diff --git a/tools/testing/selftests/mm/map_populate.c b/tools/testing/selftests/mm/map_populate.c
index 240f2d9dae7a..7945d0754875 100644
--- a/tools/testing/selftests/mm/map_populate.c
+++ b/tools/testing/selftests/mm/map_populate.c
@@ -77,7 +77,7 @@ int main(int argc, char **argv)
unsigned long *smap;
... |
7131fd7e30b20c3de03ca5d674546675dfffce5f | Analyze and fix the following issue in the Linux kernel code: selftests: cgroup: fix test_kmem_memcg_deletion kernel mem check | Problem Details:
Currently, not all kernel memory usage is being accounted for. This
commit switches to using the kernel entry within memory.stat which
already includes kernel_stack, pagetables, and slab. The kernel entry
also includes vmalloc and other additional kernel memory use cases which
were missing.
Link: http... | ```diff
diff --git a/tools/testing/selftests/cgroup/test_kmem.c b/tools/testing/selftests/cgroup/test_kmem.c
index ed2e50bb1e76..c82f974b85c9 100644
--- a/tools/testing/selftests/cgroup/test_kmem.c
+++ b/tools/testing/selftests/cgroup/test_kmem.c
@@ -162,11 +162,11 @@ static int cg_run_in_subcgroups(const char *parent,... |
004a9a38e20da6eb88fbfb7eeff0f3dd8a01776a | Analyze and fix the following issue in the Linux kernel code: mm: userfaultfd: remove stale comment about core dump locking | Problem Details:
Since commit 7f3bfab52cab ("mm/gup: take mmap_lock in get_dump_page()"),
which landed in v5.10, core dumping doesn't enter fault handling without
holding the mmap_lock anymore. Remove the stale parts of the comments,
but leave the behavior as-is - letting core dumping block on userfault
handling would... | ```diff
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index 1091cb461747..56eaae9dac1a 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -428,15 +428,11 @@ vm_fault_t handle_userfault(struct vm_fault *vmf, unsigned long reason)
* FOLL_DUMP case, anon memory also checks for FOLL_DUMP with
* the no_page_ta... |
00de2c9f26b15f1a6f2af516dd8ec5f8d28189b7 | Analyze and fix the following issue in the Linux kernel code: arm64: mm: use ptep_clear() instead of pte_clear() in clear_flush() | Problem Details:
In clear_flush(), the original pte may be a present entry, so we should
use ptep_clear() to let page_table_check track the pte clearing operation,
otherwise it may cause false positive in subsequent set_pte_at().
Link: https://lkml.kernel.org/r/20230810093241.1181142-1-qi.zheng@linux.dev
Fixes: 42b254... | ```diff
diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
index 21716c940682..9c52718ea750 100644
--- a/arch/arm64/mm/hugetlbpage.c
+++ b/arch/arm64/mm/hugetlbpage.c
@@ -236,7 +236,7 @@ static void clear_flush(struct mm_struct *mm,
unsigned long i, saddr = addr;
for (i = 0; i < ncontig; i++, ... |
876397837d582ce72f977ac3e635ce74eebcecc9 | Analyze and fix the following issue in the Linux kernel code: ia64: implement the new page table range API | Problem Details:
Add PFN_PTE_SHIFT, update_mmu_cache_range() and flush_dcache_folio().
Change the PG_arch_1 (aka PG_dcache_clean) flag from being per-page to
per-folio, which makes arch_dma_mark_clean() and mark_clean() a little
more exciting.
[willy@infradead.org: fix folio_size() handling]
Link: https://lkml.kern... | ```diff
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index 8ad6946521d8..c4d477e8bcd4 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -798,22 +798,30 @@ sba_io_pdir_entry(u64 *pdir_ptr, unsigned long vba)
#endif
#ifdef ENABLE_MARK_CLEAN
-/**
+/... |
8b5989f3333717273d02ab87ba8781f72a6783ab | Analyze and fix the following issue in the Linux kernel code: arm: implement the new page table range API | Problem Details:
Add set_ptes(), update_mmu_cache_range(), flush_dcache_folio() and
flush_icache_pages(). Change the PG_dcache_clear flag from being per-page
to per-folio which makes __dma_page_dev_to_cpu() a bit more exciting.
Also add flush_cache_pages(), even though this isn't used by generic code
(yet?)
[m.szypr... | ```diff
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h
index a094f964c869..841e268d2374 100644
--- a/arch/arm/include/asm/cacheflush.h
+++ b/arch/arm/include/asm/cacheflush.h
@@ -231,14 +231,15 @@ vivt_flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned
... |
f82e6bf9bb9b6e1dc001320a88eee67d7ac31e96 | Analyze and fix the following issue in the Linux kernel code: mm: memcg: use rstat for non-hierarchical stats | Problem Details:
Currently, memcg uses rstat to maintain aggregated hierarchical stats.
Counters are maintained for hierarchical stats at each memcg. Rstat
tracks which cgroups have updates on which cpus to keep those counters
fresh on the read-side.
Non-hierarchical stats are currently not covered by rstat. Their ... | ```diff
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 163004ae3349..11810a2cfd2d 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -111,6 +111,9 @@ struct lruvec_stats {
/* Aggregated (CPU and subtree) state */
long state[NR_VM_NODE_STAT_ITEMS];
+ /* Non-hier... |
29a22b9e08d70d6c9b075c12c47b6e895cb65cf0 | Analyze and fix the following issue in the Linux kernel code: mm: handle userfaults under VMA lock | Problem Details:
Enable handle_userfault to operate under VMA lock by releasing VMA lock
instead of mmap_lock and retrying. Note that FAULT_FLAG_RETRY_NOWAIT
should never be used when handling faults under per-VMA lock protection
because that would break the assumption that lock is dropped on retry.
[surenb@google.co... | ```diff
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index 70bd2951b68d..1091cb461747 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -277,17 +277,16 @@ static inline struct uffd_msg userfault_msg(unsigned long address,
* hugepmd ranges.
*/
static inline bool userfaultfd_huge_must_wait(struct userfault... |
4089eef0e6ac1a179c58304c657b3df3bb6fe509 | Analyze and fix the following issue in the Linux kernel code: mm: drop per-VMA lock when returning VM_FAULT_RETRY or VM_FAULT_COMPLETED | Problem Details:
handle_mm_fault returning VM_FAULT_RETRY or VM_FAULT_COMPLETED means
mmap_lock has been released. However with per-VMA locks behavior is
different and the caller should still release it. To make the rules
consistent for the caller, drop the per-VMA lock when returning
VM_FAULT_RETRY or VM_FAULT_COMPL... | ```diff
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 103fcbdc6552..2e5d1e238af9 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -599,7 +599,8 @@ static int __kprobes do_page_fault(unsigned long far, unsigned long esr,
goto lock_mmap;
}
fault = handle_mm_fault(vma, addr, mm_f... |
d51b68469bc7804c34622f7f3d4889628d37cfd6 | Analyze and fix the following issue in the Linux kernel code: mm: memory-failure: fix potential page refcnt leak in memory_failure() | Problem Details:
put_ref_page() is not called to drop extra refcnt when comes from madvise
in the case pfn is valid but pgmap is NULL leading to page refcnt leak.
Link: https://lkml.kernel.org/r/20230701072837.1994253-1-linmiaohe@huawei.com
Fixes: 1e8aaedb182d ("mm,memory_failure: always pin the page in madvise_inject... | ```diff
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 55dfe8a7bf4b..881c35ef1daa 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -2117,8 +2117,6 @@ static int memory_failure_dev_pagemap(unsigned long pfn, int flags,
{
int rc = -ENXIO;
- put_ref_page(pfn, flags);
-
/* device metadata ... |
08dff2810e8feb3096bf5c8242ab1649d1e8b1a4 | Analyze and fix the following issue in the Linux kernel code: mm/memory.c: fix mismerge | Problem Details:
Fix a build issue.
Link: https://lkml.kernel.org/r/ZNerqcNS4EBJA/2v@casper.infradead.org
Fixes: 4aaa60dad4d1 ("mm: allow per-VMA locks on file-backed VMAs")
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/... | ```diff
diff --git a/mm/memory.c b/mm/memory.c
index 4a7c8be9fe71..f9c3ad489823 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -5457,7 +5457,7 @@ retry:
* concurrent mremap() with MREMAP_DONTUNMAP could dissociate the VMA
* from its anon_vma.
*/
- if (unlikely(!vma->anon_vma && !vma_is_tcp(vma)))
+ if (vma_is_a... |
a98460494b16db9c377e55bc13e5407a0eb79fe8 | Analyze and fix the following issue in the Linux kernel code: mm/khugepaged: fix collapse_pte_mapped_thp() versus uffd | Problem Details:
Jann Horn demonstrated how userfaultfd ioctl UFFDIO_COPY into a private
shmem mapping can add valid PTEs to page table collapse_pte_mapped_thp()
thought it had emptied: page lock on the huge page is enough to protect
against WP faults (which find the PTE has been cleared), but not enough to
protect aga... | ```diff
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 40d43eccdee8..d5650541083a 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -1476,7 +1476,7 @@ int collapse_pte_mapped_thp(struct mm_struct *mm, unsigned long addr,
struct page *hpage;
pte_t *start_pte, *pte;
pmd_t *pmd, pgt_pmd;
- spinlock_t *pml,... |
6c1419730822fe991fc15bfd7059f6872a71a7af | Analyze and fix the following issue in the Linux kernel code: hugetlb: clear flags in tail pages that will be freed individually | Problem Details:
hugetlb manually creates and destroys compound pages. As such it makes
assumptions about struct page layout. Commit ebc1baf5c9b4 ("mm: free up a
word in the first tail page") breaks hugetlb. The following will fix the
breakage.
Link: https://lkml.kernel.org/r/20230822231741.GC4509@monkey
Fixes: ebc... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index a82c3104337e..cbc25826c9b0 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1484,6 +1484,7 @@ static void __destroy_compound_gigantic_folio(struct folio *folio,
for (i = 1; i < nr_pages; i++) {
p = folio_page(folio, i);
+ p->flags &= ~PAGE_FLAGS_CHECK_AT_FR... |
18df385f42f0b3310ed2e4a3e39264bf5e784692 | Analyze and fix the following issue in the Linux kernel code: io_uring: banish non-hot data to end of io_ring_ctx | Problem Details:
Let's move all slow path, setup/init and so on fields to the end of
io_ring_ctx, that makes ctx reorganisation later easier. That includes,
page arrays used only on tear down, CQ overflow list, old provided
buffer caches and used by io-wq poll hashes.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.... | ```diff
diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h
index ad87d6074fb2..72e609752323 100644
--- a/include/linux/io_uring_types.h
+++ b/include/linux/io_uring_types.h
@@ -211,20 +211,11 @@ struct io_ring_ctx {
unsigned int drain_disabled: 1;
unsigned int compat: 1;
- enum task... |
b9bbbf4979073d5536b7650decd37fcb901e6556 | Analyze and fix the following issue in the Linux kernel code: powerpc/mpc5xxx: Add missing fwnode_handle_put() | Problem Details:
In mpc5xxx_fwnode_get_bus_frequency(), we should add
fwnode_handle_put() when break out of the iteration
fwnode_for_each_parent_node() as it will automatically
increase and decrease the refcounter.
Fixes: de06fba62af6 ("powerpc/mpc5xxx: Switch mpc5xxx_get_bus_frequency() to use fwnode")
Signed-off-by:... | ```diff
diff --git a/arch/powerpc/sysdev/mpc5xxx_clocks.c b/arch/powerpc/sysdev/mpc5xxx_clocks.c
index c5bf7e1b3780..58cee28e2399 100644
--- a/arch/powerpc/sysdev/mpc5xxx_clocks.c
+++ b/arch/powerpc/sysdev/mpc5xxx_clocks.c
@@ -25,8 +25,10 @@ unsigned long mpc5xxx_fwnode_get_bus_frequency(struct fwnode_handle *fwnode)
... |
cdebfd27292ecdebe7d493830354e302368b3188 | Analyze and fix the following issue in the Linux kernel code: powerpc/config: Disable SLAB_DEBUG_ON in skiroot | Problem Details:
In 5.10 commit 5e84dd547bce ("powerpc/configs/skiroot: Enable some more
hardening options") set SLUB_DEBUG_ON.
When 5.14 came around, commit 792702911f58 ("slub: force on
no_hash_pointers when slub_debug is enabled") print all the
pointers when SLUB_DEBUG_ON is set. This was fine, but in 5.12 commit
5... | ```diff
diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig
index 71cfb990a74f..8d3eacb50d56 100644
--- a/arch/powerpc/configs/skiroot_defconfig
+++ b/arch/powerpc/configs/skiroot_defconfig
@@ -289,7 +289,6 @@ CONFIG_LIBCRC32C=y
# CONFIG_XZ_DEC_SPARC is not set
CONFIG_PRINTK_T... |
750bd41aeaeb1f0e0128aa4f8fcd6dd759713641 | Analyze and fix the following issue in the Linux kernel code: powerpc/pseries: Fix hcall tracepoints with JUMP_LABEL=n | Problem Details:
With JUMP_LABEL=n, hcall_tracepoint_refcount's address is being tested
instead of its value. This results in the tracing slowpath always being
taken unnecessarily.
Fixes: 9a10ccb29c0a2 ("powerpc/pseries: move hcall_tracepoint_refcount out of .toc")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Si... | ```diff
diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S
index 35254ac7af5e..ca0674b0b683 100644
--- a/arch/powerpc/platforms/pseries/hvCall.S
+++ b/arch/powerpc/platforms/pseries/hvCall.S
@@ -91,6 +91,7 @@ BEGIN_FTR_SECTION; \
b 1f; \
END_FTR_SECTION(0, 1); ... |
1eafbd8764b10798934344bd40395b27cec63145 | Analyze and fix the following issue in the Linux kernel code: powerpc/powermac: Fix unused function warning | Problem Details:
Clang reports:
arch/powerpc/platforms/powermac/feature.c:137:19: error: unused function 'simple_feature_tweak'
It's only used inside the #ifndef CONFIG_PPC64 block, so move it in
there to fix the warning. While at it drop the inline, the compiler will
decide whether it should be inlined or not.
Rep... | ```diff
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index ed472b797e28..ae62d432db8b 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -134,8 +134,10 @@ static struct pmac_mb_def pmac_mb;
* Here are the chip... |
e5548f85b4527c4c803b7eae7887c10bf8f90c97 | Analyze and fix the following issue in the Linux kernel code: shmem: fix smaps BUG sleeping while atomic | Problem Details:
smaps_pte_hole_lookup() is calling shmem_partial_swap_usage() with page
table lock held: but shmem_partial_swap_usage() does cond_resched_rcu() if
need_resched(): "BUG: sleeping function called from invalid context".
Since shmem_partial_swap_usage() is designed to count across a range, but
smaps_pte_h... | ```diff
diff --git a/mm/shmem.c b/mm/shmem.c
index f5af4b943e42..d963c747dabc 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -806,14 +806,16 @@ unsigned long shmem_partial_swap_usage(struct address_space *mapping,
XA_STATE(xas, &mapping->i_pages, start);
struct page *page;
unsigned long swapped = 0;
+ unsigned long ... |
5e56982dd0759d8b345fe1468297dd4f630db5d7 | Analyze and fix the following issue in the Linux kernel code: selftests: cachestat: test for cachestat availability | Problem Details:
Patch series "selftests: cachestat: fix run on older kernels", v2.
I ran all kernel selftests on some test machine, and stumbled upon
cachestat failing (among others). These patches fix the run on older
kernels and when the current directory is on a tmpfs instance.
This patch (of 2):
As cachestat ... | ```diff
diff --git a/tools/testing/selftests/cachestat/test_cachestat.c b/tools/testing/selftests/cachestat/test_cachestat.c
index 54d09b820ed4..b0c06393bcad 100644
--- a/tools/testing/selftests/cachestat/test_cachestat.c
+++ b/tools/testing/selftests/cachestat/test_cachestat.c
@@ -15,6 +15,8 @@
#include "../kselfte... |
cfeb6ae8bcb96ccf674724f223661bbcef7b0d0b | Analyze and fix the following issue in the Linux kernel code: maple_tree: disable mas_wr_append() when other readers are possible | Problem Details:
The current implementation of append may cause duplicate data and/or
incorrect ranges to be returned to a reader during an update. Although
this has not been reported or seen, disable the append write operation
while the tree is in rcu mode out of an abundance of caution.
During the analysis of the m... | ```diff
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 4dd73cf936a6..f723024e1426 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -4265,6 +4265,10 @@ static inline unsigned char mas_wr_new_end(struct ma_wr_state *wr_mas)
* mas_wr_append: Attempt to append
* @wr_mas: the maple write state
*
+ * Thi... |
0e0e9bd5f7b9d40fd03b70092367247d52da1db0 | Analyze and fix the following issue in the Linux kernel code: madvise:madvise_free_pte_range(): don't use mapcount() against large folio for sharing check | Problem Details:
Commit 98b211d6415f ("madvise: convert madvise_free_pte_range() to use a
folio") replaced the page_mapcount() with folio_mapcount() to check
whether the folio is shared by other mapping.
It's not correct for large folios. folio_mapcount() returns the total
mapcount of large folio which is not suitable... | ```diff
diff --git a/mm/madvise.c b/mm/madvise.c
index 46802b4cf65a..ec30f48f8f2e 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -680,7 +680,7 @@ static int madvise_free_pte_range(pmd_t *pmd, unsigned long addr,
if (folio_test_large(folio)) {
int err;
- if (folio_mapcount(folio) != 1)
+ if (folio_estimate... |
20b18aada1856b2ce0512b087a8681342af73e60 | Analyze and fix the following issue in the Linux kernel code: madvise:madvise_free_huge_pmd(): don't use mapcount() against large folio for sharing check | Problem Details:
Commit fc986a38b670 ("mm: huge_memory: convert madvise_free_huge_pmd to
use a folio") replaced the page_mapcount() with folio_mapcount() to check
whether the folio is shared by other mapping.
It's not correct for large folios. folio_mapcount() returns the total
mapcount of large folio which is not sui... | ```diff
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index f15d557e5708..164d22365bde 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1612,7 +1612,7 @@ bool madvise_free_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
* If other processes are mapping this folio, we couldn't discard
* the... |
2f406263e3e954aa24c1248edcfa9be0c1bb30fa | Analyze and fix the following issue in the Linux kernel code: madvise:madvise_cold_or_pageout_pte_range(): don't use mapcount() against large folio for sharing check | Problem Details:
Patch series "don't use mapcount() to check large folio sharing", v2.
In madvise_cold_or_pageout_pte_range() and madvise_free_pte_range(),
folio_mapcount() is used to check whether the folio is shared. But it's
not correct as folio_mapcount() returns total mapcount of large folio.
Use folio_estimate... | ```diff
diff --git a/mm/madvise.c b/mm/madvise.c
index bfe0e06427bd..46802b4cf65a 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -384,7 +384,7 @@ static int madvise_cold_or_pageout_pte_range(pmd_t *pmd,
folio = pfn_folio(pmd_pfn(orig_pmd));
/* Do not interfere with other mappings of this folio */
- if (folio_... |
33c24bee4b787ef58d8c9a36316ba85363b93617 | Analyze and fix the following issue in the Linux kernel code: kallsyms: Add more debug output for selftest | Problem Details:
While debugging a recent kallsyms_selftest failure[1], I needed more
details on what specifically was failing. This adds those details for
each failure state that is checked.
[1] https://lore.kernel.org/all/202308232200.1c932a90-oliver.sang@intel.com/
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Yong... | ```diff
diff --git a/kernel/kallsyms_selftest.c b/kernel/kallsyms_selftest.c
index a2e3745d15c4..232e8faefb46 100644
--- a/kernel/kallsyms_selftest.c
+++ b/kernel/kallsyms_selftest.c
@@ -341,6 +341,7 @@ static int test_kallsyms_basic_function(void)
ret = lookup_symbol_name(addr, namebuf);
if (unlikely(ret)) {
... |
199cd64140f222c66b68ebe288a3fcd0570e2e41 | Analyze and fix the following issue in the Linux kernel code: ASoC: soc-core.c: Do not error if a DAI link component is not found | Problem Details:
A recent cleanup of soc_dai_link_sanity_check() is responsible for
generating lots of confusing errors before returning -EPROBE_DEFER:
acp5x_mach acp5x_mach.0: ASoC: Component acp5x_i2s_dma.0 not found for link acp5x-8821-play
[...]
acp5x_mach acp5x_mach.0: ASoC: Component spi-VLV1776:00 not fou... | ```diff
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a5b96c17633a..cc442c52cdea 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -942,7 +942,7 @@ static int soc_dai_link_sanity_check(struct snd_soc_card *card,
* component list.
*/
if (!soc_find_component(dlc))
- goto compon... |
8886e1b03669c498f7a24bc5e483f46db5e81f82 | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: Fix error code in aw88261_i2c_probe() | Problem Details:
Passing zero to dev_err_probe is a success which is incorrect when
i2c_check_functionality() fails.
Fix this by passing -ENXIO instead of zero to dev_err_probe().
Fixes: 028a2ae25691 ("ASoC: codecs: Add aw88261 amplifier driver")
Reported-by: kernel test robot <lkp@intel.com
Reported-by: Dan Carpente... | ```diff
diff --git a/sound/soc/codecs/aw88261.c b/sound/soc/codecs/aw88261.c
index 6e2266b71386..a697b5006b45 100644
--- a/sound/soc/codecs/aw88261.c
+++ b/sound/soc/codecs/aw88261.c
@@ -1245,7 +1245,7 @@ static int aw88261_i2c_probe(struct i2c_client *i2c)
ret = i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C);... |
ef21fa7c198e04f3d3053b1c5b5f2b4b225c3350 | Analyze and fix the following issue in the Linux kernel code: riscv: Fix build errors using binutils2.37 toolchains | Problem Details:
When building the kernel with binutils 2.37 and GCC-11.1.0/GCC-11.2.0,
the following error occurs:
Assembler messages:
Error: cannot find default versions of the ISA extension `zicsr'
Error: cannot find default versions of the ISA extension `zifencei'
The above error originated from this commit... | ```diff
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 10e7a7ad175a..bea7b73e895d 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -580,15 +580,15 @@ config TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
and Zifencei are supported in binutils from version 2.36 onwards.
To make life easier, and a... |
2f88c8e802c8b128a155976631f4eb2ce4f3c805 | Analyze and fix the following issue in the Linux kernel code: sched/eevdf/doc: Modify the documented knob to base_slice_ns as well | Problem Details:
After committing the scheduler to EEVDF, we renamed the 'min_granularity_ns'
sysctl to 'base_slice_ns':
e4ec3318a17f ("sched/debug: Rename sysctl_sched_min_granularity to sysctl_sched_base_slice")
... but we forgot to rename it in the documentation. Do that now.
Fixes: e4ec3318a17f ("sched/debug:... | ```diff
diff --git a/Documentation/scheduler/sched-design-CFS.rst b/Documentation/scheduler/sched-design-CFS.rst
index 03db55504515..f68919800f05 100644
--- a/Documentation/scheduler/sched-design-CFS.rst
+++ b/Documentation/scheduler/sched-design-CFS.rst
@@ -94,7 +94,7 @@ other HZ detail. Thus the CFS scheduler has no... |
2a05334d7f91ff189692089c05fc48cc1d8204de | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Do not call kfree_skb() under spin_lock_irqsave() | Problem Details:
It is not allowed to call kfree_skb() from hardware interrupt
context or with hardware interrupts being disabled.
So replace kfree_skb() with dev_kfree_skb_irq() under
spin_lock_irqsave(). Compile tested only.
Fixes: baac6276c0a9 ("Bluetooth: btusb: handle mSBC audio over USB Endpoints")
Signed-off-by... | ```diff
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index e98f5fc06cfd..82597ab4f747 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2162,7 +2162,7 @@ static int btusb_switch_alt_setting(struct hci_dev *hdev, int new_alts)
* alternate setting.
*/
spin_lock_ir... |
d831e3612111d385e8629104af5429808ef26e25 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Fix quirks table naming | Problem Details:
The quirks table was named "blacklist_table" which isn't a good
description for that table as devices detected using it weren't ignored
by the driver.
Rename the table to match what it actually does.
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Si... | ```diff
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 1bb3b09013b0..e98f5fc06cfd 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -175,7 +175,7 @@ static const struct usb_device_id btusb_table[] = {
MODULE_DEVICE_TABLE(usb, btusb_table);
-static const struct usb_... |
253f3399f4c09ce6f4e67350f839be0361b4d5ff | Analyze and fix the following issue in the Linux kernel code: Bluetooth: HCI: Introduce HCI_QUIRK_BROKEN_LE_CODED | Problem Details:
This introduces HCI_QUIRK_BROKEN_LE_CODED which is used to indicate
that LE Coded PHY shall not be used, it is then set for some Intel
models that claim to support it but when used causes many problems.
Cc: stable@vger.kernel.org # 6.4.y+
Link: https://github.com/bluez/bluez/issues/577
Link: https://g... | ```diff
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 9b239ce96fa4..2462796a512a 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -2787,6 +2787,9 @@ static int btintel_setup_combined(struct hci_dev *hdev)
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED,
&... |
3344d318337d9dca928fd448e966557ec5063f85 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_conn: fail SCO/ISO via hci_conn_failed if ACL gone early | Problem Details:
Not calling hci_(dis)connect_cfm before deleting conn referred to by a
socket generally results to use-after-free.
When cleaning up SCO connections when the parent ACL is deleted too
early, use hci_conn_failed to do the connection cleanup properly.
We also need to clean up ISO connections in a simila... | ```diff
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 8b0c8e631324..9d5057cef30a 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -1044,6 +1044,29 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst,
return conn;
}
+static void hci_conn_cle... |
db08722fc7d46168fe31d9b8a7b29229dd959f9f | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_core: Fix missing instances using HCI_MAX_AD_LENGTH | Problem Details:
There a few instances still using HCI_MAX_AD_LENGTH instead of using
max_adv_len which takes care of detecting what is the actual maximum
length depending on if the controller supports EA or not.
Fixes: 112b5090c219 ("Bluetooth: MGMT: Fix always using HCI_MAX_AD_LENGTH")
Signed-off-by: Luiz Augusto vo... | ```diff
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 6fb055e3c595..6e2988b11f99 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -83,7 +83,7 @@ struct discovery_state {
u8 last_adv_addr_type;
s8 last_adv_rssi;
u32 last_adv_flag... |
3a15324fd4bb94c31a5fb893413b04e634567957 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_conn: Fix sending BT_HCI_CMD_LE_CREATE_CONN_CANCEL | Problem Details:
This fixes sending BT_HCI_CMD_LE_CREATE_CONN_CANCEL when
hci_le_create_conn_sync has not been called because HCI_CONN_SCANNING
has been clear too early before its cmd_sync callback has been run.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | ```diff
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 234746721047..95339623883c 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -1299,6 +1299,7 @@ static int hci_connect_le_sync(struct hci_dev *hdev, void *data)
bt_dev_dbg(hdev, "conn %p", conn);
+ clear_bit(HCI_C... |
94d9ba9f9888b748d4abd2aa1547af56ae85f772 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_sync: Fix UAF in hci_disconnect_all_sync | Problem Details:
Use-after-free can occur in hci_disconnect_all_sync if a connection is
deleted by concurrent processing of a controller event.
To prevent this the code now tries to iterate over the list backwards
to ensure the links are cleanup before its parents, also it no longer
relies on a cursor, instead it alwa... | ```diff
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 5eb30ba21370..d10a0f36b947 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -5370,6 +5370,7 @@ int hci_abort_conn_sync(struct hci_dev *hdev, struct hci_conn *conn, u8 reason)
{
int err = 0;
u16 handle = conn->hand... |
88975a55969e11f26fe3846bf4fbf8e7dc8cbbd4 | Analyze and fix the following issue in the Linux kernel code: NFS: Fix a potential data corruption | Problem Details:
We must ensure that the subrequests are joined back into the head before
we can retransmit a request. If the head was not on the commit lists,
because the server wrote it synchronously, we still need to add it back
to the retransmission list.
Add a call that mirrors the effect of nfs_cancel_remove_inod... | ```diff
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index aaffaaa336cc..47d892a1d363 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -472,13 +472,31 @@ out:
return result;
}
+static void nfs_direct_add_page_head(struct list_head *list,
+ struct nfs_page *req)
+{
+ struct nfs_page *head = req->wb_h... |
14e7316a3c73cf45cef4422549f3585fc1c53521 | Analyze and fix the following issue in the Linux kernel code: nfs: fix redundant readdir request after get eof | Problem Details:
When a directory contains 17 files (except . and ..), nfs client sends
a redundant readdir request after get eof.
A simple reproduce,
At NFS server, create a directory with 17 files under exported directory.
# mkdir test
# cd test
# for i in {0..16} ; do touch $i; done
At NFS client, no matter mo... | ```diff
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 8f3112e71a6a..e6a51fd94fea 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1089,6 +1089,17 @@ static void nfs_do_filldir(struct nfs_readdir_descriptor *desc,
for (i = desc->cache_entry_index; i < array->size; i++) {
struct nfs_cache_array_entry *ent;
+ /*
... |
08b45fcb2d4675f6182fe0edc0d8b1fe604051fa | Analyze and fix the following issue in the Linux kernel code: nfs/blocklayout: Use the passed in gfp flags | Problem Details:
This allocation should use the passed in GFP_ flags instead of
GFP_KERNEL. One places where this matters is in filelayout_pg_init_write()
which uses GFP_NOFS as the allocation flags.
Fixes: 5c83746a0cf2 ("pnfs/blocklayout: in-kernel GETDEVICEINFO XDR parsing")
Signed-off-by: Dan Carpenter <dan.carpen... | ```diff
diff --git a/fs/nfs/blocklayout/dev.c b/fs/nfs/blocklayout/dev.c
index 70f5563a8e81..65cbb5607a5f 100644
--- a/fs/nfs/blocklayout/dev.c
+++ b/fs/nfs/blocklayout/dev.c
@@ -404,7 +404,7 @@ bl_parse_concat(struct nfs_server *server, struct pnfs_block_dev *d,
int ret, i;
d->children = kcalloc(v->concat.volume... |
a841c9cb9b04b05525f0928633e84e95921ab298 | Analyze and fix the following issue in the Linux kernel code: filemap: Fix errors in file.c | Problem Details:
The following checkpatch errors are removed:
ERROR: "foo * bar" should be "foo *bar"
"foo * bar" should be "foo *bar"
Signed-off-by: ZhiHu <huzhi001@208suo.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> | ```diff
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 79b1b3fcd3fc..3f9768810427 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -200,7 +200,7 @@ nfs_file_splice_read(struct file *in, loff_t *ppos, struct pipe_inode_info *pipe
EXPORT_SYMBOL_GPL(nfs_file_splice_read);
int
-nfs_file_mmap(struct file * file, stru... |
96562c45af5c31b89a197af28f79bfa838fb8391 | Analyze and fix the following issue in the Linux kernel code: NFSv4/pnfs: minor fix for cleanup path in nfs4_get_device_info | Problem Details:
It is an almost improbable error case but when page allocating loop in
nfs4_get_device_info() fails then we should only free the already
allocated pages, as __free_page() can't deal with NULL arguments.
Found by Linux Verification Center (linuxtesting.org).
Cc: stable@vger.kernel.org
Signed-off-by: F... | ```diff
diff --git a/fs/nfs/pnfs_dev.c b/fs/nfs/pnfs_dev.c
index ddbbf4fcda86..178001c90156 100644
--- a/fs/nfs/pnfs_dev.c
+++ b/fs/nfs/pnfs_dev.c
@@ -154,7 +154,7 @@ nfs4_get_device_info(struct nfs_server *server,
set_bit(NFS_DEVICEID_NOCACHE, &d->flags);
out_free_pages:
- for (i = 0; i < max_pages; i++)
+ while... |
e87cf8a28e7592bd19064e8181324ae26bc02932 | Analyze and fix the following issue in the Linux kernel code: SUNRPC: clean up integer overflow check | Problem Details:
This integer overflow check works as intended but Clang and GCC and warn
about it when compiling with W=1.
include/linux/sunrpc/xdr.h:539:17: error: comparison is always false
due to limited range of data type [-Werror=type-limits]
Use size_mul() to prevent the integer overflow. It silences ... | ```diff
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
index adc844db1ea5..68915180a29c 100644
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -777,9 +777,7 @@ xdr_stream_decode_uint32_array(struct xdr_stream *xdr,
if (unlikely(xdr_stream_decode_u32(xdr, &len) < 0))
ret... |
469fb2c3c1bbaa092f541e3a8d3b3554042aa6a5 | Analyze and fix the following issue in the Linux kernel code: riscv, bpf: Fix missing exception handling and redundant zext for LDX_B/H/W | Problem Details:
For LDX_B/H/W, when zext has been inserted by verifier, it'll return 1,
and no exception handling will continue. Also, when the offset is 12-bit
value, the redundant zext inserted by the verifier is not removed. Fix
both scenarios by moving down the removal of redundant zext.
Signed-off-by: Pu Lehui <... | ```diff
diff --git a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c
index 0ca4f5c0097c..f2644e7ea6b5 100644
--- a/arch/riscv/net/bpf_jit_comp64.c
+++ b/arch/riscv/net/bpf_jit_comp64.c
@@ -1512,8 +1512,6 @@ out_be:
insns_start = ctx->ninsns;
emit(rv_lbu(rd, 0, RV_REG_T1), ctx);
insn_len = ... |
001fedacc907d641f7cfb89eb19c5d0535998662 | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Add a local kptr test with no special fields | Problem Details:
Add a local kptr test with no special fields in the struct. Without the
previous patch, the following warning will hit:
[ 44.683877] WARNING: CPU: 3 PID: 485 at kernel/bpf/syscall.c:660 bpf_obj_free_fields+0x220/0x240
[ 44.684640] Modules linked in: bpf_testmod(OE)
[ 44.685044] CPU: 3 PID:... | ```diff
diff --git a/tools/testing/selftests/bpf/prog_tests/local_kptr_stash.c b/tools/testing/selftests/bpf/prog_tests/local_kptr_stash.c
index 158616c94658..b25b870f87ba 100644
--- a/tools/testing/selftests/bpf/prog_tests/local_kptr_stash.c
+++ b/tools/testing/selftests/bpf/prog_tests/local_kptr_stash.c
@@ -27,6 +27,... |
8073a98e95323abdea5491533bf5cb51e0ba18d9 | Analyze and fix the following issue in the Linux kernel code: NFSD: Fix a thinko introduced by recent trace point changes | Problem Details:
The fixed commit erroneously removed a call to nfsd_end_grace(),
which makes calls to write_v4_end_grace() a no-op.
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202308241229.68396422-oliver.sang@intel.com
Fixes: 39d432fc7630 ("NFSD: trace nfsctl operati... | ```diff
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 1b8b1aab9a15..4302ca0ff6ed 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -1105,6 +1105,7 @@ static ssize_t write_v4_end_grace(struct file *file, char *buf, size_t size)
if (!nn->nfsd_serv)
return -EBUSY;
trace_nfsd_end_grace(netns(fil... |
74f6f5912693ce454384eaeec48705646a21c74f | Analyze and fix the following issue in the Linux kernel code: locks: fix KASAN: use-after-free in trace_event_raw_event_filelock_lock | Problem Details:
As following backtrace, the struct file_lock request , in posix_lock_inode
is free before ftrace function using.
Replace the ftrace function ahead free flow could fix the use-after-free
issue.
[name:report&]===============================================
BUG:KASAN: use-after-free in trace_event_raw_ev... | ```diff
diff --git a/fs/locks.c b/fs/locks.c
index 1114b3b8aa1e..0a99196764a8 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1316,6 +1316,7 @@ retry:
out:
spin_unlock(&ctx->flc_lock);
percpu_up_read(&file_rwsem);
+ trace_posix_lock_inode(inode, request, error);
/*
* Free any unused locks.
*/
@@ -1324,7 +132... |
bd4c4680c039fa9defddcff0ef354c147f7868b3 | Analyze and fix the following issue in the Linux kernel code: fs/locks: Fix typo | Problem Details:
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Jeff Layton <jlayton@kernel.org> | ```diff
diff --git a/fs/locks.c b/fs/locks.c
index 210766007e63..1114b3b8aa1e 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -2151,7 +2151,7 @@ EXPORT_SYMBOL_GPL(vfs_test_lock);
* @fl: The file_lock who's fl_pid should be translated
* @ns: The namespace into which the pid should be translated
*
- * Used to tranlate ... |
bfe2e8f569073e7297ad19932b980964105bb777 | Analyze and fix the following issue in the Linux kernel code: selftests: add OFD lock tests | Problem Details:
Test the basic locking stuff on 2 fds: multiple read locks,
conflicts between read and write locks, use of len==0 for queries.
Also tests for F_UNLCK F_OFD_GETLK extension.
[ jlayton: fix unlink() pathname in selftest ]
Cc: Jeff Layton <jlayton@kernel.org>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc:... | ```diff
diff --git a/tools/testing/selftests/filelock/Makefile b/tools/testing/selftests/filelock/Makefile
new file mode 100644
index 000000000000..478e82f8b464
--- /dev/null
+++ b/tools/testing/selftests/filelock/Makefile
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0
+
+TEST_GEN_PROGS := ofdlocks
+
+include ../l... |
f63a536f03a2f64fa9a75369e2d006d77f90c156 | Analyze and fix the following issue in the Linux kernel code: perf pmu: Merge JSON events with sysfs at load time | Problem Details:
Rather than load all sysfs events then parsing all JSON events and
merging with ones that already exist. When a sysfs event is loaded, look
for a corresponding JSON event and merge immediately.
To simplify the logic, early exit the perf_pmu__new_alias function if an
alias is attempted to be added twic... | ```diff
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index c37d98a11861..bc2dd8f94bcf 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -377,38 +377,6 @@ static int perf_pmu__parse_snapshot(struct perf_pmu_alias *alias,
return 0;
}
-static void perf_pmu_assign_str(char *name, const ch... |
197d3143520fec9fde89aebabc9f0d7464f08e50 | Analyze and fix the following issue in the Linux kernel code: HID: nvidia-shield: Reference hid_device devm allocation of input_dev name | Problem Details:
Use hid_device for devm allocation of the input_dev name to avoid a
use-after-free. input_unregister_device would trigger devres cleanup of all
resources associated with the input_dev, free-ing the name. The name would
subsequently be used in a uevent fired at the end of unregistering the
input_dev.
R... | ```diff
diff --git a/drivers/hid/hid-nvidia-shield.c b/drivers/hid/hid-nvidia-shield.c
index a928ad2be62d..084179a6be86 100644
--- a/drivers/hid/hid-nvidia-shield.c
+++ b/drivers/hid/hid-nvidia-shield.c
@@ -164,7 +164,7 @@ static struct input_dev *shield_allocate_input_dev(struct hid_device *hdev,
idev->id.product = ... |
4794394635293a3e74591351fff469cea7ad15a2 | Analyze and fix the following issue in the Linux kernel code: HID: multitouch: Correct devm device reference for hidinput input_dev name | Problem Details:
Reference the HID device rather than the input device for the devm
allocation of the input_dev name. Referencing the input_dev would lead to a
use-after-free when the input_dev was unregistered and subsequently fires a
uevent that depends on the name. At the point of firing the uevent, the
name would b... | ```diff
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index e31be0cb8b85..521b2ffb4244 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -1594,7 +1594,6 @@ static void mt_post_parse(struct mt_device *td, struct mt_application *app)
static int mt_input_configured... |
dd613a4e45f8d35f49a63a2064e5308fa5619e29 | Analyze and fix the following issue in the Linux kernel code: HID: uclogic: Correct devm device reference for hidinput input_dev name | Problem Details:
Reference the HID device rather than the input device for the devm
allocation of the input_dev name. Referencing the input_dev would lead to a
use-after-free when the input_dev was unregistered and subsequently fires a
uevent that depends on the name. At the point of firing the uevent, the
name would b... | ```diff
diff --git a/drivers/hid/hid-uclogic-core.c b/drivers/hid/hid-uclogic-core.c
index f67835f9ed4c..ad74cbc9a0aa 100644
--- a/drivers/hid/hid-uclogic-core.c
+++ b/drivers/hid/hid-uclogic-core.c
@@ -85,10 +85,8 @@ static int uclogic_input_configured(struct hid_device *hdev,
{
struct uclogic_drvdata *drvdata = hi... |
eac030b22ea12cdfcbb2e941c21c03964403c63f | Analyze and fix the following issue in the Linux kernel code: powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT | Problem Details:
lppaca_shared_proc() takes a pointer to the lppaca which is typically
accessed through get_lppaca(). With DEBUG_PREEMPT enabled, this leads
to checking if preemption is enabled, for example:
BUG: using smp_processor_id() in preemptible [00000000] code: grep/10693
caller is lparcfg_data+0x408/0x19... | ```diff
diff --git a/arch/powerpc/include/asm/lppaca.h b/arch/powerpc/include/asm/lppaca.h
index b6a63fa0965f..61ec2447dabf 100644
--- a/arch/powerpc/include/asm/lppaca.h
+++ b/arch/powerpc/include/asm/lppaca.h
@@ -23,6 +23,7 @@
#include <asm/types.h>
#include <asm/mmu.h>
#include <asm/firmware.h>
+#include <asm/pac... |
feea65a338e52297b68ceb688eaf0ffc50310a83 | Analyze and fix the following issue in the Linux kernel code: powerpc/powernv: Fix fortify source warnings in opal-prd.c | Problem Details:
As reported by Mahesh & Aneesh, opal_prd_msg_notifier() triggers a
FORTIFY_SOURCE warning:
memcpy: detected field-spanning write (size 32) of single field "&item->msg" at arch/powerpc/platforms/powernv/opal-prd.c:355 (size 4)
WARNING: CPU: 9 PID: 660 at arch/powerpc/platforms/powernv/opal-prd.c:35... | ```diff
diff --git a/arch/powerpc/platforms/powernv/opal-prd.c b/arch/powerpc/platforms/powernv/opal-prd.c
index 113bdb151f68..40e26e9f318f 100644
--- a/arch/powerpc/platforms/powernv/opal-prd.c
+++ b/arch/powerpc/platforms/powernv/opal-prd.c
@@ -24,13 +24,20 @@
#include <linux/uaccess.h>
+struct opal_prd_msg {
+ ... |
cdf4100eaa1f4107fcf7c95b5eccca96cca6c777 | Analyze and fix the following issue in the Linux kernel code: drm/gpuva_mgr: remove unused prev pointer in __drm_gpuva_sm_map() | Problem Details:
The prev pointer in __drm_gpuva_sm_map() was used to implement automatic
merging of mappings. Since automatic merging did not make its way
upstream, remove this leftover.
Fixes: e6303f323b1a ("drm: manager to keep track of GPUs VA mappings")
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Reviewed-b... | ```diff
diff --git a/drivers/gpu/drm/drm_gpuva_mgr.c b/drivers/gpu/drm/drm_gpuva_mgr.c
index f86bfad74ff8..ad99c9cfedac 100644
--- a/drivers/gpu/drm/drm_gpuva_mgr.c
+++ b/drivers/gpu/drm/drm_gpuva_mgr.c
@@ -1076,7 +1076,7 @@ __drm_gpuva_sm_map(struct drm_gpuva_manager *mgr,
u64 req_addr, u64 req_range,
stru... |
e83d12e0923116c11ed54891745edb8003a64854 | Analyze and fix the following issue in the Linux kernel code: drm/i915/sdvo: Fail gracefully if the TV dotclock is out of range | Problem Details:
Instead of warning and continuing with bogus state when the
requested dotclock isn't acceptable just print some debug
spew and fail gracefully.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230705202122.17915-8-ville.syrjala@linux.in... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
index 0fc403f4be2d..a1fbeac95347 100644
--- a/drivers/gpu/drm/i915/display/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
@@ -1269,7 +1269,7 @@ intel_sdvo_get_preferred_input_mode(struct intel_sdvo *... |
c008323fe361bd62a43d9fb29737dacd5c067fb7 | Analyze and fix the following issue in the Linux kernel code: ASoC: amd: yc: Fix a non-functional mic on Lenovo 82SJ | Problem Details:
Lenovo 82SJ doesn't have DMIC connected like 82V2 does. Narrow
the match down to only cover 82V2.
Reported-by: prosenfeld@Yuhsbstudents.org
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217063
Fixes: 2232b2dd8cd4 ("ASoC: amd: yc: Add Lenovo Yoga Slim 7 Pro X to quirks table")
Signed-off-by: Mar... | ```diff
diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
index a2661dd637a5..b304b3562c82 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -217,7 +217,7 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
.driver_data = &acp6x_card,
.matches = {... |
d9ae977d2d5635bde4fe75657417f5cffb14c954 | Analyze and fix the following issue in the Linux kernel code: ceph: switch ceph_lookup/atomic_open() to use new fscrypt helper | Problem Details:
Instead of setting the no-key dentry, use the new
fscrypt_prepare_lookup_partial() helper. We still need to mark the
directory as incomplete if the directory was just unlocked.
In ceph_atomic_open() this fixes a bug where a dentry is incorrectly
set with DCACHE_NOKEY_NAME when 'dir' has been evicted ... | ```diff
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index 0e4f8e07022d..854cbdd66661 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -785,14 +785,15 @@ static struct dentry *ceph_lookup(struct inode *dir, struct dentry *dentry,
return ERR_PTR(-ENAMETOOLONG);
if (IS_ENCRYPTED(dir)) {
- err = ceph_fscrypt_prepar... |
295fc4aa7de4b72cfd764b75a238f79b9433e3ec | Analyze and fix the following issue in the Linux kernel code: ceph: fix updating i_truncate_pagecache_size for fscrypt | Problem Details:
When fscrypt is enabled we will align the truncate size up to the
CEPH_FSCRYPT_BLOCK_SIZE always, so if we truncate the size in the
same block more than once, the latter ones will be skipped being
invalidated from the page caches.
This will force invalidating the page caches by using the smaller
size ... | ```diff
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 54041d9c1e25..028b5140a85d 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -3950,8 +3950,8 @@ static bool handle_cap_trunc(struct inode *inode,
if (IS_ENCRYPTED(inode) && size)
size = extra_info->fscrypt_file_size;
- dout("handle_cap_trunc inode %p m... |
33a5f1709a44efa7253b84832fe4a49fccf4924b | Analyze and fix the following issue in the Linux kernel code: ceph: add read/modify/write to ceph_sync_write | Problem Details:
When doing a synchronous write on an encrypted inode, we have no
guarantee that the caller is writing crypto block-aligned data. When
that happens, we must do a read/modify/write cycle.
First, expand the range to cover complete blocks. If we had to change
the original pos or length, issue a read to fi... | ```diff
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 0abe36379fdf..45e00e42960b 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -1571,18 +1571,16 @@ ceph_sync_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos,
struct inode *inode = file_inode(file);
struct ceph_inode_info *ci = ceph_inode(inode)... |
16be62fc8a53482529201b4be6bbcd0de3a058cb | Analyze and fix the following issue in the Linux kernel code: ceph: size handling in MClientRequest, cap updates and inode traces | Problem Details:
For encrypted inodes, transmit a rounded-up size to the MDS as the
normal file size and send the real inode size in fscrypt_file field.
Also, fix up creates and truncates to also transmit fscrypt_file.
When we get an inode trace from the MDS, grab the fscrypt_file field if
the inode is encrypted, and ... | ```diff
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 4738be54dc73..aff256274415 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -1217,10 +1217,9 @@ struct cap_msg_args {
umode_t mode;
bool inline_data;
bool wake;
+ bool encrypted;
u32 fscrypt_auth_len;
- u32 fscrypt_file_len;
u8 fscryp... |
e127e03009a3a3c26f00d0b2703c6e0e47927aec | Analyze and fix the following issue in the Linux kernel code: ceph: allow encrypting a directory while not having Ax caps | Problem Details:
If a client doesn't have Fx caps on a directory, it will get errors while
trying encrypt it:
ceph: handle_cap_grant: cap grant attempt to change fscrypt_auth on non-I_NEW inode (old len 0 new len 48)
fscrypt (ceph, inode 1099511627812): Error -105 getting encryption context
A simple way to reproduce ... | ```diff
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 828badfe62a8..9ec4ebe5ccaf 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -975,7 +975,8 @@ int ceph_fill_inode(struct inode *inode, struct page *locked_page,
__ceph_update_quota(ci, iinfo->max_bytes, iinfo->max_files);
#ifdef CONFIG_FS_ENCRYPTION
... |
457117f077c6749d1e28469eae91fb69c9806768 | Analyze and fix the following issue in the Linux kernel code: ceph: add helpers for converting names for userland presentation | Problem Details:
Define a new ceph_fname struct that we can use to carry information
about encrypted dentry names. Add helpers for working with these
objects, including ceph_fname_to_usr which formats an encrypted filename
for userland presentation.
[ xiubli: fix resulting name length check -- neither name_len nor
c... | ```diff
diff --git a/fs/ceph/crypto.c b/fs/ceph/crypto.c
index 6dc723e8d395..e2a461960955 100644
--- a/fs/ceph/crypto.c
+++ b/fs/ceph/crypto.c
@@ -244,3 +244,80 @@ int ceph_encode_encrypted_fname(const struct inode *parent,
dout("base64-encoded ciphertext name = %.*s\n", elen, buf);
return elen;
}
+
+/**
+ * ceph_... |
8b94da92559f7e403dc7ab81937cc50f949ee2fd | Analyze and fix the following issue in the Linux kernel code: x86/efistub: Fix PCI ROM preservation in mixed mode | Problem Details:
preserve_pci_rom_image() was accessing the romsize field in
efi_pci_io_protocol_t directly instead of using the efi_table_attr()
helper. This prevents the ROM image from being saved correctly during a
mixed mode boot.
Fixes: 2c3625cb9fa2 ("efi/x86: Fold __setup_efi_pci32() and __setup_efi_pci64() into... | ```diff
diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index 220be75a5cdc..146477da2b98 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -72,7 +72,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup... |
2c66ca3949dc701da7f4c9407f2140ae425683a5 | Analyze and fix the following issue in the Linux kernel code: x86/fpu: Set X86_FEATURE_OSXSAVE feature after enabling OSXSAVE in CR4 | Problem Details:
0-Day found a 34.6% regression in stress-ng's 'af-alg' test case, and
bisected it to commit b81fac906a8f ("x86/fpu: Move FPU initialization into
arch_cpu_finalize_init()"), which optimizes the FPU init order, and moves
the CR4_OSXSAVE enabling into a later place:
arch_cpu_finalize_init
ident... | ```diff
diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c
index 0bab497c9436..1afbc4866b10 100644
--- a/arch/x86/kernel/fpu/xstate.c
+++ b/arch/x86/kernel/fpu/xstate.c
@@ -882,6 +882,13 @@ void __init fpu__init_system_xstate(unsigned int legacy_size)
goto out_disable;
}
+ /*
+ * CPU capab... |
1f69383b203e28cf8a4ca9570e572da1699f76cd | Analyze and fix the following issue in the Linux kernel code: x86/fpu: Invalidate FPU state correctly on exec() | Problem Details:
The thread flag TIF_NEED_FPU_LOAD indicates that the FPU saved state is
valid and should be reloaded when returning to userspace. However, the
kernel will skip doing this if the FPU registers are already valid as
determined by fpregs_state_valid(). The logic embedded there considers
the state valid if ... | ```diff
diff --git a/arch/x86/kernel/fpu/context.h b/arch/x86/kernel/fpu/context.h
index af5cbdd9bd29..f6d856bd50bc 100644
--- a/arch/x86/kernel/fpu/context.h
+++ b/arch/x86/kernel/fpu/context.h
@@ -19,8 +19,7 @@
* FPU state for a task MUST let the rest of the kernel know that the
* FPU registers are no longer vali... |
0c3b063ef4136191312a88ea7a670a6a2a2dae5a | Analyze and fix the following issue in the Linux kernel code: drm/drm_connector: Provide short description of param 'supported_colorspaces' | Problem Details:
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/drm_connector.c:2215: warning: Function parameter or member 'supported_colorspaces' not described in 'drm_mode_create_hdmi_colorspace_property'
drivers/gpu/drm/drm_connector.c:2239: warning: Function parameter or member 'supported_colo... | ```diff
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 3ed4cfcb350c..f28725736237 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -2203,6 +2203,7 @@ static int drm_mode_create_colorspace_property(struct drm_connector *connector,
/**
* drm_mo... |
91dc52151c9b3c955589e1ab3a008f341803f8cf | Analyze and fix the following issue in the Linux kernel code: drm/tests/drm_kunit_helpers: Place correct function name in the comment header | Problem Details:
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/tests/drm_kunit_helpers.c:172: warning: expecting prototype for drm_kunit_helper_context_alloc(). Prototype was for drm_kunit_helper_acquire_ctx_alloc() instead
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/... | ```diff
diff --git a/drivers/gpu/drm/tests/drm_kunit_helpers.c b/drivers/gpu/drm/tests/drm_kunit_helpers.c
index 3d624ff2f651..c1dfbfcaa000 100644
--- a/drivers/gpu/drm/tests/drm_kunit_helpers.c
+++ b/drivers/gpu/drm/tests/drm_kunit_helpers.c
@@ -156,7 +156,7 @@ static void action_drm_release_context(void *ptr)
}
/... |
17cf8661ee0f065c08152e611a568dd1fb0285f1 | Analyze and fix the following issue in the Linux kernel code: PCI: layerscape: Add workaround for lost link capabilities during reset | Problem Details:
The endpoint controller loses the Maximum Link Width and Supported Link Speed
value from the Link Capabilities Register - initially configured by the Reset
Configuration Word (RCW) - during a link-down or hot reset event.
Address this issue in the endpoint event handler.
Link: https://lore.kernel.org... | ```diff
diff --git a/drivers/pci/controller/dwc/pci-layerscape-ep.c b/drivers/pci/controller/dwc/pci-layerscape-ep.c
index e0969ff2ddf7..b1faf41a2fae 100644
--- a/drivers/pci/controller/dwc/pci-layerscape-ep.c
+++ b/drivers/pci/controller/dwc/pci-layerscape-ep.c
@@ -45,6 +45,7 @@ struct ls_pcie_ep {
struct pci_epc_fe... |
e74216b8def3803e98ae536de78733e9d7f3b109 | Analyze and fix the following issue in the Linux kernel code: bonding: fix macvlan over alb bond support | Problem Details:
The commit 14af9963ba1e ("bonding: Support macvlans on top of tlb/rlb mode
bonds") aims to enable the use of macvlans on top of rlb bond mode. However,
the current rlb bond mode only handles ARP packets to update remote neighbor
entries. This causes an issue when a macvlan is on top of the bond, and
re... | ```diff
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index b9dbad3a8af8..fc5da5d7744d 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -660,10 +660,10 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
return NULL;
arp ... |
b2bcbd031d34d1ba1f491b9152474cf9f6d4d51b | Analyze and fix the following issue in the Linux kernel code: ALSA: ump: Don't create unused substreams for static blocks | Problem Details:
When the UMP Endpoint is declared as "static", that is, no dynamic
reassignment of UMP Groups, it makes little sense to expose always all
16 groups with 16 substreams. Many of those substreams are disabled
groups, hence they are useless, but applications don't know it and try
to open / access all thos... | ```diff
diff --git a/include/sound/ump.h b/include/sound/ump.h
index 44d2c2fd021d..91238dabe307 100644
--- a/include/sound/ump.h
+++ b/include/sound/ump.h
@@ -45,6 +45,7 @@ struct snd_ump_endpoint {
spinlock_t legacy_locks[2];
struct snd_rawmidi *legacy_rmidi;
struct snd_rawmidi_substream *legacy_substreams[2][SN... |
1761f4cc114af531020ea190df6a24dd288a8221 | Analyze and fix the following issue in the Linux kernel code: ALSA: ump: Fill group names for legacy rawmidi substreams | Problem Details:
To make it clearer which legacy substream corresponds to which UMP
group, fill the subname field of each substream object with the group
number and the endpoint name, e.g. "Group 1 (My Device)".
Ideally speaking, we should have some better link information to the
derived UMP, but it's another feature ... | ```diff
diff --git a/sound/core/ump.c b/sound/core/ump.c
index b72b6dc36e0b..d5d72473d999 100644
--- a/sound/core/ump.c
+++ b/sound/core/ump.c
@@ -1123,6 +1123,16 @@ static void process_legacy_input(struct snd_ump_endpoint *ump, const u32 *src,
spin_unlock_irqrestore(&ump->legacy_locks[dir], flags);
}
+static void... |
5f11dd938fe7657899ca79b2ffc4d708e43f4737 | Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Attach legacy rawmidi after probing all UMP EPs | Problem Details:
The legacy rawmidi devices are the shadows of the main UMP devices,
hence it's better to initialize them after all UMP Endpoints are
parsed. Then, at the moment the legacy rawmidi is created, we already
know the static flag or the proper EP name string, and we can fill
those information at UMP core si... | ```diff
diff --git a/sound/core/ump.c b/sound/core/ump.c
index fbe2892e72fd..b72b6dc36e0b 100644
--- a/sound/core/ump.c
+++ b/sound/core/ump.c
@@ -1150,6 +1150,8 @@ int snd_ump_attach_legacy_rawmidi(struct snd_ump_endpoint *ump,
if (output)
snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT,
&snd_ump_... |
67de40c9df94037769967ba28c7d951afb45b7fb | Analyze and fix the following issue in the Linux kernel code: ALSA: ac97: Fix possible error value of *rac97 | Problem Details:
Before committing 79597c8bf64c, *rac97 always be NULL if there is
an error. When error happens, make sure *rac97 is NULL is safer.
For examble, in snd_vortex_mixer():
err = snd_ac97_mixer(pbus, &ac97, &vortex->codec);
vortex->isquad = ((vortex->codec == NULL) ?
0 : (vortex->codec->ext_id&0x80));
I... | ```diff
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 80a65b8ad7b9..25f93e56cfc7 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -2069,10 +2069,9 @@ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template,
.dev_disconnect = snd_ac97... |
581523ee3652ea6c1012b2ccbb8588c9c77ef4bb | Analyze and fix the following issue in the Linux kernel code: ALSA: hda: cs35l41: Override the _DSD for HP Zbook Fury 17 G9 to correct boost type | Problem Details:
CS35L41 HDA driver requires ACPI to contain correct _DSD properties to
correctly configure the device. Whilst the HP Zbook Fury 17 G9 contains
valid _DSD properties, the boost type has been configured incorrectly
in the _DSD for this laptop. We can override these properties to fix
the boost type.
Sign... | ```diff
diff --git a/sound/pci/hda/cs35l41_hda_property.c b/sound/pci/hda/cs35l41_hda_property.c
index 9b5a1d61575e..b62a4e6968e2 100644
--- a/sound/pci/hda/cs35l41_hda_property.c
+++ b/sound/pci/hda/cs35l41_hda_property.c
@@ -43,6 +43,37 @@ static int lenovo_legion_no_acpi(struct cs35l41_hda *cs35l41, struct device *p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.