id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
b64140c74e954f1db6eae5548ca3a1f41b6fad79 | Analyze and fix the following issue in the Linux kernel code: crypto: caam - add error check to caam_rsa_set_priv_key_form | Problem Details:
The caam_rsa_set_priv_key_form did not check for memory allocation errors.
Add the checks to the caam_rsa_set_priv_key_form functions.
Fixes: 52e26d77b8b3 ("crypto: caam - add support for RSA key form 2")
Signed-off-by: Chen Ridong <chenridong@huawei.com>
Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>... | ```diff
diff --git a/drivers/crypto/caam/caampkc.c b/drivers/crypto/caam/caampkc.c
index 887a5f2fb927..cb001aa1de66 100644
--- a/drivers/crypto/caam/caampkc.c
+++ b/drivers/crypto/caam/caampkc.c
@@ -984,7 +984,7 @@ err:
return -ENOMEM;
}
-static void caam_rsa_set_priv_key_form(struct caam_rsa_ctx *ctx,
+static int... |
8fbe4c49c0ccac9a6a3cff35a45fa55d4ae35d6e | Analyze and fix the following issue in the Linux kernel code: efi/memattr: Ignore table if the size is clearly bogus | Problem Details:
There are reports [0] of cases where a corrupt EFI Memory Attributes
Table leads to out of memory issues at boot because the descriptor size
and entry count in the table header are still used to reserve the entire
table in memory, even though the resulting region is gigabytes in size.
Given that the E... | ```diff
diff --git a/drivers/firmware/efi/memattr.c b/drivers/firmware/efi/memattr.c
index 164203429fa7..c38b1a335590 100644
--- a/drivers/firmware/efi/memattr.c
+++ b/drivers/firmware/efi/memattr.c
@@ -22,6 +22,7 @@ unsigned long __ro_after_init efi_mem_attr_table = EFI_INVALID_TABLE_ADDR;
int __init efi_memattr_init... |
7ff3e945a35ac472c6783403eae1e7519d96f1cf | Analyze and fix the following issue in the Linux kernel code: ecryptfs: Fix spelling mistake "validationg" -> "validating" | Problem Details:
There is a spelling mistake in an error message literal string. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20241108112509.109891-1-colin.i.king@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org> | ```diff
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
index c9aa80e534c2..8dd1d7189c3b 100644
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
@@ -451,7 +451,7 @@ static int ecryptfs_get_tree(struct fs_context *fc)
mount_crypt_stat = &sbi->mount_crypt_stat;
rc = ecryptfs_validate_options(fc);
if (rc) {
- ... |
a20853ab8296d4a8754482cb5e9adde8ab426a25 | Analyze and fix the following issue in the Linux kernel code: fs: open_by_handle_at() support for decoding "explicit connectable" file handles | Problem Details:
Teach open_by_handle_at(2) about the type format of "explicit connectable"
file handles that were created using the AT_HANDLE_CONNECTABLE flag to
name_to_handle_at(2).
When decoding an "explicit connectable" file handles, name_to_handle_at(2)
should fail if it cannot open a "connected" fd with known p... | ```diff
diff --git a/fs/fhandle.c b/fs/fhandle.c
index 8339a1041025..75cfd190cd69 100644
--- a/fs/fhandle.c
+++ b/fs/fhandle.c
@@ -246,7 +246,13 @@ static int vfs_dentry_acceptable(void *context, struct dentry *dentry)
if (!(ctx->flags & HANDLE_CHECK_SUBTREE) || d == root)
retval = 1;
- WARN_ON_ONCE(d != root &&... |
c374196b2b9f4b803fccd59ed82f0712041e21e1 | Analyze and fix the following issue in the Linux kernel code: fs: name_to_handle_at() support for "explicit connectable" file handles | Problem Details:
nfsd encodes "connectable" file handles for the subtree_check feature,
which can be resolved to an open file with a connected path.
So far, userspace nfs server could not make use of this functionality.
Introduce a new flag AT_HANDLE_CONNECTABLE to name_to_handle_at(2).
When used, the encoded file han... | ```diff
diff --git a/fs/fhandle.c b/fs/fhandle.c
index 218511f38cbb..8339a1041025 100644
--- a/fs/fhandle.c
+++ b/fs/fhandle.c
@@ -31,6 +31,14 @@ static long do_sys_name_to_handle(const struct path *path,
if (!exportfs_can_encode_fh(path->dentry->d_sb->s_export_op, fh_flags))
return -EOPNOTSUPP;
+ /*
+ * A requ... |
4a530a7c751d27f9dbd70b7fc45670cd11713b13 | Analyze and fix the following issue in the Linux kernel code: fs: prepare for "explicit connectable" file handles | Problem Details:
We would like to use the high 16bit of the handle_type field to encode
file handle traits, such as "connectable".
In preparation for this change, make sure that filesystems do not return
a handle_type value with upper bits set and that the open_by_handle_at(2)
syscall rejects these handle types.
Sign... | ```diff
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index 4f2dd4ab4486..0c899cfba578 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -382,14 +382,24 @@ int exportfs_encode_inode_fh(struct inode *inode, struct fid *fid,
int *max_len, struct inode *parent, int flags)
{
const struct ex... |
6fce6e9791685e95b70144a414eb90132e497489 | Analyze and fix the following issue in the Linux kernel code: efi/zboot: Fix outdated comment about using LoadImage/StartImage | Problem Details:
EFI zboot no longer uses LoadImage/StartImage, but subsumes the arch
code to load and start the bare metal image directly. Fix the Kconfig
description accordingly.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org> | ```diff
diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
index 72f2537d90ca..e312d731f4a3 100644
--- a/drivers/firmware/efi/Kconfig
+++ b/drivers/firmware/efi/Kconfig
@@ -84,12 +84,10 @@ config EFI_ZBOOT
help
Create the bootable image as an EFI application that carries the
actual kerne... |
06d39d79cbd5a91a33707951ebf2512d0e759847 | Analyze and fix the following issue in the Linux kernel code: efi/libstub: Free correct pointer on failure | Problem Details:
cmdline_ptr is an out parameter, which is not allocated by the function
itself, and likely points into the caller's stack.
cmdline refers to the pool allocation that should be freed when cleaning
up after a failure, so pass this instead to free_pool().
Fixes: 42c8ea3dca09 ("efi: libstub: Factor out E... | ```diff
diff --git a/drivers/firmware/efi/libstub/efi-stub.c b/drivers/firmware/efi/libstub/efi-stub.c
index f09e277ba210..fc71dcab43e0 100644
--- a/drivers/firmware/efi/libstub/efi-stub.c
+++ b/drivers/firmware/efi/libstub/efi-stub.c
@@ -148,7 +148,7 @@ efi_status_t efi_handle_cmdline(efi_loaded_image_t *image, char *... |
a49e7e8125a112d5dc63ff024191cd264c6260a8 | Analyze and fix the following issue in the Linux kernel code: drm: Move client code to clients/ subdirectory | Problem Details:
Just move some files around to keep source code well organized. Plus
fix a type in the help text of CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM. No
functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/... | ```diff
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 5504721007cc..fd294ccca6bb 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -217,77 +217,7 @@ config DRM_CLIENT
option. Drivers that support the default clients should
select DRM_CLIENT_SELECTION instead.
-config... |
2532e6c74a67e65b95f310946e0c0e0a41b3a34b | Analyze and fix the following issue in the Linux kernel code: cma: enforce non-zero pageblock_order during cma_init_reserved_mem() | Problem Details:
cma_init_reserved_mem() checks base and size alignment with
CMA_MIN_ALIGNMENT_BYTES. However, some users might call this during early
boot when pageblock_order is 0. That means if base and size does not have
pageblock_order alignment, it can cause functional failures during cma
activate area.
So let... | ```diff
diff --git a/mm/cma.c b/mm/cma.c
index c5869d0001ad..de5bc0c81fc2 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -181,6 +181,15 @@ int __init cma_init_reserved_mem(phys_addr_t base, phys_addr_t size,
if (!size || !memblock_is_region_reserved(base, size))
return -EINVAL;
+ /*
+ * CMA uses CMA_MIN_ALIGNMENT_BYTE... |
f364cdeb38938f9d03061682b8ff3779dd1730e5 | Analyze and fix the following issue in the Linux kernel code: zram: fix NULL pointer in comp_algorithm_show() | Problem Details:
LTP reported a NULL pointer dereference as followed:
CPU: 7 UID: 0 PID: 5995 Comm: cat Kdump: loaded Not tainted 6.12.0-rc6+ #3
Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
pstate: 40400005 (nZcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __pi_strcmp+0x24/0x140
lr : zcomp_ava... | ```diff
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index cee49bb0126d..3dee026988dc 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -2572,6 +2572,8 @@ static int zram_add(void)
zram->disk->private_data = zram;
snprintf(zram->disk->disk_name, 16, "zra... |
2ea80b039b9af0b71c00378523b71c254fb99c23 | Analyze and fix the following issue in the Linux kernel code: vmstat: call fold_vm_zone_numa_events() before show per zone NUMA event | Problem Details:
Since 5.14-rc1, NUMA events will only be folded from per-CPU statistics to
per zone and global statistics when the user actually needs it.
Currently, the kernel has performs the fold operation when reading
/proc/vmstat, but does not perform the fold operation in /proc/zoneinfo.
This can lead to inacc... | ```diff
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 3d82bb906dcf..11a37c528395 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1780,6 +1780,7 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
zone_page_state(zone, i));
#ifdef CONFIG_NUMA
+ fold_vm_zone_numa_events(zone);
for (i = 0; i... |
737f34137844d6572ab7d473c998c7f977ff30eb | Analyze and fix the following issue in the Linux kernel code: ocfs2: uncache inode which has failed entering the group | Problem Details:
Syzbot has reported the following BUG:
kernel BUG at fs/ocfs2/uptodate.c:509!
...
Call Trace:
<TASK>
? __die_body+0x5f/0xb0
? die+0x9e/0xc0
? do_trap+0x15a/0x3a0
? ocfs2_set_new_buffer_uptodate+0x145/0x160
? do_error_trap+0x1dc/0x2c0
? ocfs2_set_new_buffer_uptodate+0x145/0x160
? __pfx_do_error... | ```diff
diff --git a/fs/ocfs2/resize.c b/fs/ocfs2/resize.c
index c4a4016d3866..b0733c08ed13 100644
--- a/fs/ocfs2/resize.c
+++ b/fs/ocfs2/resize.c
@@ -574,6 +574,8 @@ out_commit:
ocfs2_commit_trans(osb, handle);
out_free_group_bh:
+ if (ret < 0)
+ ocfs2_remove_from_cache(INODE_CACHE(inode), group_bh);
brelse(gr... |
8ce41b0f9d77cca074df25afd39b86e2ee3aa68e | Analyze and fix the following issue in the Linux kernel code: mm: fix NULL pointer dereference in alloc_pages_bulk_noprof | Problem Details:
We triggered a NULL pointer dereference for ac.preferred_zoneref->zone in
alloc_pages_bulk_noprof() when the task is migrated between cpusets.
When cpuset is enabled, in prepare_alloc_pages(), ac->nodemask may be
¤t->mems_allowed. when first_zones_zonelist() is called to find
preferred_zoneref,... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 216fbbfbedcf..b6958333054d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4607,7 +4607,8 @@ unsigned long alloc_pages_bulk_noprof(gfp_t gfp, int preferred_nid,
gfp = alloc_gfp;
/* Find an allowed local zone that meets the low watermark. */
- for... |
669b0cb81e4e4e78cff77a5b367c7f70c0c6c05e | Analyze and fix the following issue in the Linux kernel code: fs/proc/task_mmu: prevent integer overflow in pagemap_scan_get_args() | Problem Details:
The "arg->vec_len" variable is a u64 that comes from the user at the start
of the function. The "arg->vec_len * sizeof(struct page_region))"
multiplication can lead to integer wrapping. Use size_mul() to avoid
that.
Also the size_add/mul() functions work on unsigned long so for 32bit
systems we need... | ```diff
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index e52bd96137a6..7eb010de39fe 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -2665,8 +2665,10 @@ static int pagemap_scan_get_args(struct pm_scan_arg *arg,
return -EFAULT;
if (!arg->vec && arg->vec_len)
return -EINVAL;
+ if (UINT_MAX ==... |
fd7b4f9f46d46acbc7af3a439bb0d869efdc5c58 | Analyze and fix the following issue in the Linux kernel code: sched/task_stack: fix object_is_on_stack() for KASAN tagged pointers | Problem Details:
When CONFIG_KASAN_SW_TAGS and CONFIG_KASAN_STACK are enabled, the
object_is_on_stack() function may produce incorrect results due to the
presence of tags in the obj pointer, while the stack pointer does not have
tags. This discrepancy can lead to incorrect stack object detection and
subsequently trigg... | ```diff
diff --git a/include/linux/sched/task_stack.h b/include/linux/sched/task_stack.h
index bf10bdb487dd..6c2fef89a4fd 100644
--- a/include/linux/sched/task_stack.h
+++ b/include/linux/sched/task_stack.h
@@ -9,6 +9,7 @@
#include <linux/sched.h>
#include <linux/magic.h>
#include <linux/refcount.h>
+#include <linux... |
31daa34315d45d3fe77f2158d889d523d78852ea | Analyze and fix the following issue in the Linux kernel code: crash, powerpc: default to CRASH_DUMP=n on PPC_BOOK3S_32 | Problem Details:
Fixes boot failures on 6.9 on PPC_BOOK3S_32 machines using Open Firmware.
On these machines, the kernel refuses to boot from non-zero
PHYSICAL_START, which occurs when CRASH_DUMP is on.
Since most PPC_BOOK3S_32 machines boot via Open Firmware, it should
default to off for them. Users booting via som... | ```diff
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 749179a1d162..202397be76d8 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1598,6 +1598,9 @@ config ATAGS_PROC
config ARCH_SUPPORTS_CRASH_DUMP
def_bool y
+config ARCH_DEFAULT_CRASH_DUMP
+ def_bool y
+
config AUTO_ZRELADDR
bool "Auto calcula... |
a4a282daf1a190f03790bf163458ea3c8d28d217 | Analyze and fix the following issue in the Linux kernel code: mm/mremap: fix address wraparound in move_page_tables() | Problem Details:
On 32-bit platforms, it is possible for the expression `len + old_addr <
old_end` to be false-positive if `len + old_addr` wraps around.
`old_addr` is the cursor in the old range up to which page table entries
have been moved; so if the operation succeeded, `old_addr` is the *end* of
the old region, a... | ```diff
diff --git a/mm/mremap.c b/mm/mremap.c
index dda09e957a5d..dee98ff2bbd6 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -648,7 +648,7 @@ again:
* Prevent negative return values when {old,new}_addr was realigned
* but we broke out of the above loop for the first PMD itself.
*/
- if (len + old_addr < old_e... |
a39326767c55c00c7c313333404cbcb502cce8fe | Analyze and fix the following issue in the Linux kernel code: tools/mm: fix compile error | Problem Details:
Add a missing semicolon.
Link: https://lkml.kernel.org/r/20241112171655.1662670-1-motiejus@jakstys.lt
Fixes: ece5897e5a10 ("tools/mm: -Werror fixes in page-types/slabinfo")
Signed-off-by: Motiejus JakÅ`tys <motiejus@jakstys.lt>
Closes: https://github.com/NixOS/nixpkgs/issues/355369
Reviewed-by: SeongJ... | ```diff
diff --git a/tools/mm/page-types.c b/tools/mm/page-types.c
index 6eb17cc1a06c..bcac7ebfb51f 100644
--- a/tools/mm/page-types.c
+++ b/tools/mm/page-types.c
@@ -420,7 +420,7 @@ static void show_page(unsigned long voffset, unsigned long offset,
if (opt_file)
printf("%lx\t", voffset);
if (opt_list_cgroup)
- ... |
a35672819f8d85e2ae38b80d40b923e3ef81e4ea | Analyze and fix the following issue in the Linux kernel code: xfrm: Fix acquire state insertion. | Problem Details:
A recent commit jumped over the dst hash computation and
left the symbol uninitialized. Fix this by explicitly
computing the dst hash before it is used.
Fixes: 0045e3d80613 ("xfrm: Cache used outbound xfrm states at the policy.")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Simon... | ```diff
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index e3266a5d4f90..67ca7ac955a3 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1470,6 +1470,7 @@ found:
x->km.state = XFRM_STATE_ACQ;
x->dir = XFRM_SA_DIR_OUT;
list_add(&x->km.all, &net->xfrm.state_all);
+ h = xfrm_dst... |
ea301aec8bb718b02b68761d2229fc12c9fefa29 | Analyze and fix the following issue in the Linux kernel code: i40e: Fix handling changed priv flags | Problem Details:
After assembling the new private flags on a PF, the operation to determine
the changed flags uses the wrong bitmaps. Instead of xor-ing orig_flags
with new_flags, it uses the still unchanged pf->flags, thus changed_flags
is always 0.
Fix it by using the correct bitmaps.
The issue was discovered while... | ```diff
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index f2506511bbff..bce5b76f1e7a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -5299,7 +5299,7 @@ static int i40e_set_priv_flags(stru... |
b52a8deea530f027e4bd0d2444f068ff8a86ea4e | Analyze and fix the following issue in the Linux kernel code: dt-bindings: net: sff,sfp: Fix "interrupts" property typo | Problem Details:
The example has "interrupt" property which is not a defined property. It
should be "interrupts" instead. "interrupts" also should not contain a
phandle.
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link... | ```diff
diff --git a/Documentation/devicetree/bindings/net/sff,sfp.yaml b/Documentation/devicetree/bindings/net/sff,sfp.yaml
index 90611b598d2b..15616ad737f5 100644
--- a/Documentation/devicetree/bindings/net/sff,sfp.yaml
+++ b/Documentation/devicetree/bindings/net/sff,sfp.yaml
@@ -132,7 +132,7 @@ examples:
pi... |
4c54e9497d9abbaca814a963f805884f02dc89ec | Analyze and fix the following issue in the Linux kernel code: net: sparx5: add missing lan969x Kconfig dependency | Problem Details:
The sparx5 switchdev driver can be built either with or without support
for the Lan969x switch. However, it cannot be built-in when the lan969x
driver is a loadable module because of a link-time dependency:
arm-linux-gnueabi-ld: drivers/net/ethernet/microchip/sparx5/sparx5_main.o:(.rodata+0xd44): unde... | ```diff
diff --git a/drivers/net/ethernet/microchip/lan969x/Kconfig b/drivers/net/ethernet/microchip/lan969x/Kconfig
index 728180d3fa33..c5c6122ae2ec 100644
--- a/drivers/net/ethernet/microchip/lan969x/Kconfig
+++ b/drivers/net/ethernet/microchip/lan969x/Kconfig
@@ -1,5 +1,5 @@
config LAN969X_SWITCH
- tristate "Lan969... |
f66af9616148e10e04eb172c7616ad79912b446e | Analyze and fix the following issue in the Linux kernel code: net: enetc: clean up before returning in probe() | Problem Details:
We recently added this error path. We need to call enetc_pci_remove()
before returning. It cleans up the resources from enetc_pci_probe().
Fixes: 99100d0d9922 ("net: enetc: add preliminary support for i.MX95 ENETC PF")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Wei Fang <w... | ```diff
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_vf.c b/drivers/net/ethernet/freescale/enetc/enetc_vf.c
index d18c11e406fc..a5f8ce576b6e 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_vf.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_vf.c
@@ -174,9 +174,11 @@ static int enetc_vf_probe(struct... |
378e8feea9a70d37a5dc1678b7ec27df21099fa5 | Analyze and fix the following issue in the Linux kernel code: net: phy: dp83869: fix status reporting for 1000base-x autonegotiation | Problem Details:
The DP83869 PHY transceiver supports converting from RGMII to 1000base-x.
In this operation mode, autonegotiation can be performed, as described in
IEEE802.3.
The DP83869 has a set of fiber-specific registers located at offset 0xc00.
When the transceiver is configured in RGMII-to-1000base-x mode, thes... | ```diff
diff --git a/drivers/net/phy/dp83869.c b/drivers/net/phy/dp83869.c
index 5f056d7db83e..b6b38caf9c0e 100644
--- a/drivers/net/phy/dp83869.c
+++ b/drivers/net/phy/dp83869.c
@@ -153,19 +153,32 @@ struct dp83869_private {
int mode;
};
+static int dp83869_config_aneg(struct phy_device *phydev)
+{
+ struct dp838... |
470a271627e8c4e2b5357fd0f5759cf6e33cc145 | Analyze and fix the following issue in the Linux kernel code: Input: ads7846 - increase xfer array size in 'struct ser_req' | Problem Details:
Clang warns (or errors with CONFIG_WERROR=y, trimmed for brevity):
drivers/input/touchscreen/ads7846.c:412:2: error: array index 6 is past the end of the array (that has type 'struct spi_transfer[6]') [-Werror,-Warray-bounds]
412 | req->xfer[6].tx_buf = &req->scratch;
| ^... | ```diff
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index f7bc0a3e56d8..7b3711a3597c 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -331,7 +331,7 @@ struct ser_req {
u8 ref_off;
u16 scratch;
struct spi_message msg;
- str... |
a5f040cfcfdd8cd10591d50fb6280dffe07c7a8e | Analyze and fix the following issue in the Linux kernel code: Input: fix the input_event struct documentation | Problem Details:
Fix the datatype of the value field of the input_event struct which is
signed instead of unsigned.
Signed-off-by: Maud Spierings <maud_spierings@hotmail.com>
Link: https://lore.kernel.org/r/20241110-fix_input_doc-v1-1-745d5f908e61@hotmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> | ```diff
diff --git a/Documentation/input/input.rst b/Documentation/input/input.rst
index 2c67fa904adc..d9a6de87d02d 100644
--- a/Documentation/input/input.rst
+++ b/Documentation/input/input.rst
@@ -264,7 +264,7 @@ events on a read. Their layout is::
struct timeval time;
unsigned short type;
unsigned ... |
6d026e6d48cd2a95407c8fdd8d6187b871401c23 | Analyze and fix the following issue in the Linux kernel code: iommu/arm-smmu-v3: Import IOMMUFD module namespace | Problem Details:
Commit 69d9b312f38a ("iommu/arm-smmu-v3: Support IOMMU_VIOMMU_ALLOC")
started using _iommufd_object_alloc() without importing the IOMMUFD
module namespace, resulting in a modpost warning:
WARNING: modpost: module arm_smmu_v3 uses symbol _iommufd_object_alloc from namespace IOMMUFD, but does not impo... | ```diff
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c
index c96cab6521a4..6cc14d82399f 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c
@@ -397,3 +397,5 @@ struct iommufd_vi... |
f946cae86d088d02a2f9c0ae0bf8a80359d3f454 | Analyze and fix the following issue in the Linux kernel code: scftorture: Handle NULL argument passed to scf_add_to_free_list(). | Problem Details:
Dan reported that after the rework the newly introduced
scf_add_to_free_list() may get a NULL pointer passed. This replaced
kfree() which was fine with a NULL pointer but scf_add_to_free_list()
isn't.
Let scf_add_to_free_list() handle NULL pointer.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org... | ```diff
diff --git a/kernel/scftorture.c b/kernel/scftorture.c
index eeafd3fc1682..d86d2d9c4624 100644
--- a/kernel/scftorture.c
+++ b/kernel/scftorture.c
@@ -155,6 +155,8 @@ static void scf_add_to_free_list(struct scf_check *scfcp)
struct llist_head *pool;
unsigned int cpu;
+ if (!scfcp)
+ return;
cpu = raw_s... |
4aa5cc1e0012f784bc7f637458e597564833b425 | Analyze and fix the following issue in the Linux kernel code: powerpc-km82xx.c: replace of_node_put() with __free | Problem Details:
The use of the __free macro allows the cleanup to be based on scope
instead of on another function called later. This makes the cleanup
automatic and less susceptible to errors later.
Signed-off-by: David Hunter <david.hunter.linux@gmail.com>
[mpe: Fix over-long line & change log wording]
Signed-off-b... | ```diff
diff --git a/arch/powerpc/platforms/82xx/km82xx.c b/arch/powerpc/platforms/82xx/km82xx.c
index c86da3f2b74b..99f0f0f41876 100644
--- a/arch/powerpc/platforms/82xx/km82xx.c
+++ b/arch/powerpc/platforms/82xx/km82xx.c
@@ -27,15 +27,15 @@
static void __init km82xx_pic_init(void)
{
- struct device_node *np = of_... |
0ec8bc9e880eb576dc4492e8e0c7153ed0a71031 | Analyze and fix the following issue in the Linux kernel code: mm, swap: fix allocation and scanning race with swapoff | Problem Details:
There are two flags used to synchronize allocation and scanning with
swapoff: SWP_WRITEOK and SWP_SCANNING.
SWP_WRITEOK: Swapoff will first unset this flag, at this point any further
swap allocation or scanning on this device should just abort so no more
new entries will be referencing this device. S... | ```diff
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 9c85bd46ab7f..b0a9071cfe1d 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -664,12 +664,15 @@ static bool cluster_scan_range(struct swap_info_struct *si,
return true;
}
-static void cluster_alloc_range(struct swap_info_struct *si, struct swap_cluster_info ... |
c64ef7e4851d1a9abbb7f7833e4936973ac5ba79 | Analyze and fix the following issue in the Linux kernel code: clk: clk-axi-clkgen: make sure to enable the AXI bus clock | Problem Details:
In order to access the registers of the HW, we need to make sure that
the AXI bus clock is enabled. Hence let's increase the number of clocks
by one.
In order to keep backward compatibility and make sure old DTs still work
we check if clock-names is available or not. If it is, then we can
disambiguate... | ```diff
diff --git a/drivers/clk/clk-axi-clkgen.c b/drivers/clk/clk-axi-clkgen.c
index bf4d8ddc93ae..934e53a96ddd 100644
--- a/drivers/clk/clk-axi-clkgen.c
+++ b/drivers/clk/clk-axi-clkgen.c
@@ -7,6 +7,7 @@
*/
#include <linux/platform_device.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <li... |
47f3f5a82a31527e027929c5cec3dd1ef5ef30f5 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: clock: axi-clkgen: include AXI clk | Problem Details:
In order to access the registers of the HW, we need to make sure that
the AXI bus clock is enabled. Hence let's increase the number of clocks
by one and add clock-names to differentiate between parent clocks and
the bus clock.
Fixes: 0e646c52cf0e ("clk: Add axi-clkgen driver")
Signed-off-by: Nuno Sa <... | ```diff
diff --git a/Documentation/devicetree/bindings/clock/adi,axi-clkgen.yaml b/Documentation/devicetree/bindings/clock/adi,axi-clkgen.yaml
index 5e942bccf277..2b2041818a0a 100644
--- a/Documentation/devicetree/bindings/clock/adi,axi-clkgen.yaml
+++ b/Documentation/devicetree/bindings/clock/adi,axi-clkgen.yaml
@@ -2... |
1302e352b26f34991b619b5d0b621b76d20a3883 | Analyze and fix the following issue in the Linux kernel code: perf trace: Avoid garbage when not printing a syscall's arguments | Problem Details:
syscall__scnprintf_args may not place anything in the output buffer
(e.g., because the arguments are all zero). If that happened in
trace__fprintf_sys_enter, its fprintf would receive an unitialized
buffer leading to garbage output.
Fix the problem by passing the (possibly zero) bounds of the argument... | ```diff
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index ca5c3f5d6c38..6a1a128fe645 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2702,6 +2702,7 @@ static int trace__fprintf_sys_enter(struct trace *trace, struct evsel *evsel,
char msg[1024];
void *args, *augm... |
3fd7c36973a250e17a4ee305a31545a9426021f4 | Analyze and fix the following issue in the Linux kernel code: perf trace: Do not lose last events in a race | Problem Details:
If a perf trace event selector specifies a maximum number of events to output
(i.e., "/nr=N/" syntax), the event printing handler, trace__event_handler,
disables the event selector after the maximum number events are
printed.
Furthermore, trace__event_handler checked if the event selector was
disabled... | ```diff
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 14794725669d..ca5c3f5d6c38 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -3096,13 +3096,8 @@ static int trace__event_handler(struct trace *trace, struct evsel *evsel,
{
struct thread *thread;
int callch... |
f98eded9e9ab048c88ff59c5523e703a6ced5523 | Analyze and fix the following issue in the Linux kernel code: clk: en7523: fix estimation of fixed rate for EN7581 | Problem Details:
Introduce en7581_base_clks array in order to define per-SoC fixed-rate
clock parameters and fix wrong parameters for emi, npu and crypto EN7581
clocks
Fixes: 66bc47326ce2 ("clk: en7523: Add EN7581 support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/20241112-c... | ```diff
diff --git a/drivers/clk/clk-en7523.c b/drivers/clk/clk-en7523.c
index 7f83cbce01ee..fdd8ea989ed2 100644
--- a/drivers/clk/clk-en7523.c
+++ b/drivers/clk/clk-en7523.c
@@ -37,6 +37,7 @@
#define REG_NP_SCU_SSTR 0x9c
#define REG_PCIE_XSI0_SEL_MASK GENMASK(14, 13)
#define REG_PCIE_XSI1_SEL_MASK GENMASK(12, 1... |
be530c3fc296f35e67f0f799029ba17880dd3f50 | Analyze and fix the following issue in the Linux kernel code: clk: mediatek: mt6735-apmixedsys: Fix an error handling path in clk_mt6735_apmixed_probe() | Problem Details:
If an error occurs after a successful mtk_alloc_clk_data(),
mtk_free_clk_data() should be called, as already done in the .remove()
function.
Switch to mtk_devm_alloc_clk_data() in order to fix the memory leak in the
probe function, and simplify the remove function.
Fixes: 43c04ed79189 ("clk: mediatek... | ```diff
diff --git a/drivers/clk/mediatek/clk-mt6735-apmixedsys.c b/drivers/clk/mediatek/clk-mt6735-apmixedsys.c
index 104722a61dfd..e0949911e8f7 100644
--- a/drivers/clk/mediatek/clk-mt6735-apmixedsys.c
+++ b/drivers/clk/mediatek/clk-mt6735-apmixedsys.c
@@ -88,7 +88,7 @@ static int clk_mt6735_apmixed_probe(struct plat... |
d34db686a3d74bd564bfce2ada15011c556269fc | Analyze and fix the following issue in the Linux kernel code: clk: ralink: mtmips: fix clocks probe order in oldest ralink SoCs | Problem Details:
Base clocks are the first in being probed and are real dependencies of the
rest of fixed, factor and peripheral clocks. For old ralink SoCs RT2880,
RT305x and RT3883 'xtal' must be defined first since in any other case,
when fixed clocks are probed they are delayed until 'xtal' is probed so the
followi... | ```diff
diff --git a/drivers/clk/ralink/clk-mtmips.c b/drivers/clk/ralink/clk-mtmips.c
index 62f9801ecd3a..76285fbbdeaa 100644
--- a/drivers/clk/ralink/clk-mtmips.c
+++ b/drivers/clk/ralink/clk-mtmips.c
@@ -263,10 +263,6 @@ err_clk_unreg:
.rate = _rate \
}
-static struct mtmips_clk_fixed rt305x_fixed_clocks[] ... |
33239152305567b3e9bf052f71fd4baecd626341 | Analyze and fix the following issue in the Linux kernel code: clk: ralink: mtmips: fix clock plan for Ralink SoC RT3883 | Problem Details:
Clock plan for Ralink SoC RT3883 needs an extra 'periph' clock to properly
set some peripherals that has this clock as their parent. When this driver
was mainlined we could not find any active users of this SoC so we cannot
perform any real tests for it. Now, one user of a Belkin f9k1109 version 1
devi... | ```diff
diff --git a/drivers/clk/ralink/clk-mtmips.c b/drivers/clk/ralink/clk-mtmips.c
index 50a443bf79ec..62f9801ecd3a 100644
--- a/drivers/clk/ralink/clk-mtmips.c
+++ b/drivers/clk/ralink/clk-mtmips.c
@@ -267,6 +267,11 @@ static struct mtmips_clk_fixed rt305x_fixed_clocks[] = {
CLK_FIXED("xtal", NULL, 40000000)
};... |
27aabf27fd014ae037cc179c61b0bee7cff55b3d | Analyze and fix the following issue in the Linux kernel code: Bluetooth: fix use-after-free in device_for_each_child() | Problem Details:
Syzbot has reported the following KASAN splat:
BUG: KASAN: slab-use-after-free in device_for_each_child+0x18f/0x1a0
Read of size 8 at addr ffff88801f605308 by task kbnepd bnep0/4980
CPU: 0 UID: 0 PID: 4980 Comm: kbnepd bnep0 Not tainted 6.12.0-rc4-00161-gae90f6a6170d #1
Hardware name: QEMU Standard P... | ```diff
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index 367e32fe30eb..4b54dbbf0729 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -21,16 +21,6 @@ static const struct device_type bt_link = {
.release = bt_link_release,
};
-/*
- * The rfcomm tty device will possibl... |
acece9d1ca9283154cc4fcc778579059119ccb90 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel: Direct exception event to bluetooth stack | Problem Details:
Have exception event part of HCI traces which helps for debug.
snoop traces:
> HCI Event: Vendor (0xff) plen 79
Vendor Prefix (0x8780)
Intel Extended Telemetry (0x03)
Unknown extended telemetry event type (0xde)
01 01 de
Unknown extended subevent 0x07
01 0... | ```diff
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index e122dff855ba..d496cf2c3411 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -3361,13 +3361,12 @@ int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
case INTEL_TLV_TEST_EXCEPTION:
/* Gen... |
55abbd148dfb604ebf3f72d6c3dd2a8063d40718 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_core: Fix calling mgmt_device_connected | Problem Details:
Since 61a939c68ee0 ("Bluetooth: Queue incoming ACL data until
BT_CONNECTED state is reached") there is no long the need to call
mgmt_device_connected as ACL data will be queued until BT_CONNECTED
state.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=219458
Link: https://github.com/bluez/bluez/issue... | ```diff
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index f6cff34a8542..f9e19f9cb5a3 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3792,8 +3792,6 @@ static void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)
hci_dev_lock(hdev);
conn = hci_conn_hash_lo... |
07a9342b94a91b306ed1cf6aa8254aea210764c9 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: ISO: Send BIG Create Sync via hci_sync | Problem Details:
Before issuing the LE BIG Create Sync command, an available BIG handle
is chosen by iterating through the conn_hash list and finding the first
unused value.
If a BIG is terminated, the associated hcons are removed from the list
and the LE BIG Terminate Sync command is sent via hci_sync queue.
However,... | ```diff
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index b5b78d469d54..d097e308a755 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -2180,7 +2180,15 @@ static bool hci_conn_check_create_big_sync(struct hci_conn *conn)
return true;
}
-int hci_le_big_create_sync_pending(... |
25ab2db3e60e0e84d7cdc740ea6ae3c10fe61eaa | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_conn: Remove alloc from critical section | Problem Details:
This removes the kzalloc memory allocation inside critical section in
create_pa_sync, fixing the following message that appears when the kernel
is compiled with CONFIG_DEBUG_ATOMIC_SLEEP enabled:
BUG: sleeping function called from invalid context at
include/linux/sched/mm.h:321
Signed-off-by: Iulia T... | ```diff
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index e996e9763666..b5b78d469d54 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -2079,7 +2079,7 @@ static bool hci_conn_check_create_pa_sync(struct hci_conn *conn)
static int create_pa_sync(struct hci_dev *hdev, void *d... |
dc26097bdb864a0d5955b9a25e43376ffc1af99b | Analyze and fix the following issue in the Linux kernel code: Bluetooth: ISO: Use kref to track lifetime of iso_conn | Problem Details:
This make use of kref to keep track of reference of iso_conn which
allows better tracking of its lifetime with usage of things like
kref_get_unless_zero in a similar way as used in l2cap_chan.
In addition to it remove call to iso_sock_set_timer on iso_sock_disconn
since at that point it is useless to ... | ```diff
diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
index 9e119da43147..24e78ada9ad2 100644
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@ -35,6 +35,7 @@ struct iso_conn {
struct sk_buff *rx_skb;
__u32 rx_len;
__u16 tx_sn;
+ struct kref ref;
};
#define iso_conn_lock(c) spin_lock(&(c)->loc... |
679cb60fd60774798719c3e449874a168642a8e6 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Add new VID/PID 0489/e124 for MT7925 | Problem Details:
Add VID 0489 & PID e124 for MediaTek MT7925 USB Bluetooth chip.
The information in /sys/kernel/debug/usb/devices about the Bluetooth
device is listed as the below.
T: Bus=01 Lev=01 Prnt=01 Port=08 Cnt=02 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendo... | ```diff
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 6dc5a7e76558..59bb146d556e 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -656,6 +656,8 @@ static const struct usb_device_id quirks_table[] = {
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x0489, 0xe11e),... |
79321b06a03e395ab1fc19a47549e9d70ddac115 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: ISO: Fix matching parent socket for BIS slave | Problem Details:
Currently, when a BIS slave connection is notified to the
ISO layer, the parent socket is tried to be matched by the
HCI_EVT_LE_BIG_SYNC_ESTABILISHED event. However, a BIS slave
connection is notified to the ISO layer after the Command
Complete for the LE Setup ISO Data Path command is received.
This c... | ```diff
diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
index 7a83e400ac77..0d98cc16bbac 100644
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@ -1733,6 +1733,13 @@ static bool iso_match_big(struct sock *sk, void *data)
return ev->handle == iso_pi(sk)->qos.bcast.big;
}
+static bool iso_match_big_hcon(... |
e42eec0f182ac0605e658145f6fe3b6a7c256c45 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btbcm: fix missing of_node_put() in btbcm_get_board_name() | Problem Details:
of_find_node_by_path() returns a pointer to a device_node with its
refcount incremented, and a call to of_node_put() is required to
decrement the refcount again and avoid leaking the resource.
If 'of_property_read_string_index(root, "compatible", 0, &tmp)' fails,
the function returns without calling o... | ```diff
diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
index eef00467905e..a1153ada74d2 100644
--- a/drivers/bluetooth/btbcm.c
+++ b/drivers/bluetooth/btbcm.c
@@ -541,11 +541,10 @@ static const struct bcm_subver_table bcm_usb_subver_table[] = {
static const char *btbcm_get_board_name(struct device ... |
faa5fd605d2081b6c9fa2355b59582d4ccd24b16 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Add new VID/PID 0489/e111 for MT7925 | Problem Details:
Add VID 0489 & PID e111 for MediaTek MT7925 USB Bluetooth chip.
The information in /sys/kernel/debug/usb/devices about the Bluetooth
device is listed as the below.
T: Bus=02 Lev=02 Prnt=02 Port=04 Cnt=02 Dev#= 4 Spd=480 MxCh= 0
D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendo... | ```diff
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 514d593923ad..6dc5a7e76558 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -648,6 +648,8 @@ static const struct usb_device_id quirks_table[] = {
BTUSB_WIDEBAND_SPEECH },
/* Additional MediaTek MT79... |
61c5a3def90ac729a538e5ca5ff7f461cff72776 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btmtk: adjust the position to init iso data anchor | Problem Details:
MediaTek iso data anchor init should be moved to where MediaTek
claims iso data interface.
If there is an unexpected BT usb disconnect during setup flow,
it will cause a NULL pointer crash issue when releasing iso
anchor since the anchor wasn't been init yet. Adjust the position
to do iso data anchor i... | ```diff
diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c
index b7fc14aafc74..8a3f7c3fcfec 100644
--- a/drivers/bluetooth/btmtk.c
+++ b/drivers/bluetooth/btmtk.c
@@ -1215,7 +1215,6 @@ static int btmtk_usb_isointf_init(struct hci_dev *hdev)
struct sk_buff *skb;
int err;
- init_usb_anchor(&btmtk_da... |
681ed497d676db1677605b2f9deacf2ab2cba040 | Analyze and fix the following issue in the Linux kernel code: clk: amlogic: axg-audio: fix Kconfig dependency on RESET_MESON_AUX | Problem Details:
As in most cases, using 'imply' is wrong here and does not prevent
build failures since that code may not be visible to a built-in
clk driver:
axg-audio.c:(.text+0x15c): undefined reference to `devm_meson_rst_aux_register'
Replace the incorrt 'imply' with the necessary 'depends on'.
Fixes: 664988eb4... | ```diff
diff --git a/drivers/clk/meson/Kconfig b/drivers/clk/meson/Kconfig
index 7cb21fc223b0..febb5d7348ff 100644
--- a/drivers/clk/meson/Kconfig
+++ b/drivers/clk/meson/Kconfig
@@ -106,7 +106,7 @@ config COMMON_CLK_AXG_AUDIO
select COMMON_CLK_MESON_SCLK_DIV
select COMMON_CLK_MESON_CLKC_UTILS
select REGMAP_MMIO
... |
5fe6caa62b07fd39cd6a28acc8f92ba2955e11a6 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix type of len in rfcomm_sock_getsockopt{,_old}() | Problem Details:
Commit 9bf4e919ccad worked around an issue introduced after an innocuous
optimisation change in LLVM main:
> len is defined as an 'int' because it is assigned from
> '__user int *optlen'. However, it is clamped against the result of
> sizeof(), which has a type of 'size_t' ('unsigned long' for 64-bit
... | ```diff
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index 355e1a1698f5..40766f8119ed 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -729,7 +729,8 @@ static int rfcomm_sock_getsockopt_old(struct socket *sock, int optname, char __u
struct sock *l2cap_sk;
struc... |
510e8380b0382ee3b070748656b00f83c9a5bf80 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel: Do no pass vendor events to stack | Problem Details:
During firmware download, vendor specific events like boot up and
secure send result are generated. These events can be safely processed at
the driver level. Passing on these events to stack prints unnecessary
log as below.
Bluetooth: hci0: Malformed MSFT vendor event: 0x02
Fixes: 3368aa357f3b ("... | ```diff
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 2be6d48a2a65..e122dff855ba 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -3395,7 +3395,8 @@ int btintel_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
* indicating that the bootup completed.... |
9b49561f6c35d97f20abc178fece5868dd5e3338 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel_pcie: Remove deadcode | Problem Details:
The switch case statement has a default branch. Thus, the return
statement at the end of the function can never be reached.
Fix it by removing the return statement at the end of the
function.
This issue was reported by Coverity Scan.
Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
Reviewed-b... | ```diff
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index e4ae8c898dfd..660496e55276 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -391,7 +391,6 @@ static inline char *btintel_pcie_alivectxt_state2str(u32 alive_intr_ctxt)
default:
retur... |
969c765e2b508cca9099d246c010a1e48dcfd089 | Analyze and fix the following issue in the Linux kernel code: clk: clk-apple-nco: Add NULL check in applnco_probe | Problem Details:
Add NULL check in applnco_probe, to handle kernel NULL pointer
dereference error.
Fixes: 6641057d5dba ("clk: clk-apple-nco: Add driver for Apple NCO")
Signed-off-by: Charles Han <hanchunchao@inspur.com>
Link: https://lore.kernel.org/r/20241114072820.3071-1-hanchunchao@inspur.com
Reviewed-by: Martin Po... | ```diff
diff --git a/drivers/clk/clk-apple-nco.c b/drivers/clk/clk-apple-nco.c
index 39472a51530a..457a48d48941 100644
--- a/drivers/clk/clk-apple-nco.c
+++ b/drivers/clk/clk-apple-nco.c
@@ -297,6 +297,9 @@ static int applnco_probe(struct platform_device *pdev)
memset(&init, 0, sizeof(init));
init.name = devm_kas... |
05c200c8f0295c9c91beeb3ee0552331c1f8adbe | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel_pcie: Add handshake between driver and firmware | Problem Details:
The following handshake mechanism needs be followed after firmware
download is completed to bring the firmware to running state.
After firmware fragments of Operational image are downloaded and
secure sends result of the image succeeds,
1. Driver sends HCI Intel reset with boot option #1 to switch FW... | ```diff
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 2ad1f83a9d78..c9df27f3b80e 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -1841,6 +1841,37 @@ static int btintel_boot_wait(struct hci_dev *hdev, ktime_t calltime, int msec)
return 0;
}
+static int bt... |
59437cbb5781227567dec226aaa88c66a09ccc5a | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_core: Fix not checking skb length on hci_scodata_packet | Problem Details:
This fixes not checking if skb really contains an SCO header otherwise
the code may attempt to access some uninitilized/invalid memory past the
valid skb->data.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | ```diff
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index f9e1df409015..f6cff34a8542 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3814,18 +3814,22 @@ drop:
/* SCO data packet */
static void hci_scodata_packet(struct hci_dev *hdev, struct sk_buff *skb)
{
- struct hci_s... |
3fe288a8214e7dd784d1f9b7c9e448244d316b47 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_core: Fix not checking skb length on hci_acldata_packet | Problem Details:
This fixes not checking if skb really contains an ACL header otherwise
the code may attempt to access some uninitilized/invalid memory past the
valid skb->data.
Reported-by: syzbot+6ea290ba76d8c1eb1ac2@syzkaller.appspotmail.com
Tested-by: syzbot+6ea290ba76d8c1eb1ac2@syzkaller.appspotmail.com
Closes: h... | ```diff
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 96d097b21d13..f9e1df409015 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3771,18 +3771,22 @@ static void hci_tx_work(struct work_struct *work)
/* ACL data packet */
static void hci_acldata_packet(struct hci_dev *... |
2b0f2fc9ed62e73c95df1fa8ed2ba3dac54699df | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_conn: Use disable_delayed_work_sync | Problem Details:
This makes use of disable_delayed_work_sync instead
cancel_delayed_work_sync as it not only cancel the ongoing work but also
disables new submit which is disarable since the object holding the work
is about to be freed.
Reported-by: syzbot+2446dd3cb07277388db6@syzkaller.appspotmail.com
Tested-by: syzb... | ```diff
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 50e65b2f54ee..40c4a36d2be3 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -1127,9 +1127,9 @@ void hci_conn_del(struct hci_conn *conn)
hci_conn_unlink(conn);
- cancel_delayed_work_sync(&conn->disc_work);
- cance... |
69b84ffce260ff13826dc10aeb3c3e5c2288a552 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Add RTL8852BE device 0489:e123 to device tables | Problem Details:
Add the support ID 0489:e123 to usb_device_id table for
Realtek RTL8852B chip.
The device info from /sys/kernel/debug/usb/devices as below.
T: Bus=01 Lev=01 Prnt=01 Port=07 Cnt=04 Dev#= 7 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0489 ProdID=e123 Rev= ... | ```diff
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 5627bb2268dc..000a64dcc20e 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -530,6 +530,8 @@ static const struct usb_device_id quirks_table[] = {
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x13d3, 0x3591),... |
e623e2a066e2f6ee5c3a7f817ed6429650466a37 | Analyze and fix the following issue in the Linux kernel code: bluetooth: Fix typos in the comments | Problem Details:
Correctly spelled comments make it easier for the reader to understand
the code.
Fix typos:
'fragement' ==> 'fragment',
'genration' ==> 'generation',
'funciton' ==> 'function',
'Explitly' ==> 'Explicitly',
'explaination' ==> 'explanation',
'Tranlate' ==> 'Translate',
'immediatelly' ==> 'immediately',
... | ```diff
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 438b92967bc3..2ad1f83a9d78 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -1040,7 +1040,7 @@ static int btintel_download_firmware_payload(struct hci_dev *hdev,
* as needed.
*
* Send set of com... |
d96b543c6f3b78b6440b68b5a5bbface553eff28 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_conn: Reduce hci_conn_drop() calls in two functions | Problem Details:
An hci_conn_drop() call was immediately used after a null pointer check
for an hci_conn_link() call in two function implementations.
Thus call such a function only once instead directly before the checks.
This issue was transformed by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfr... | ```diff
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index c4c74b82ed21..50e65b2f54ee 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -2224,13 +2224,9 @@ struct hci_conn *hci_bind_bis(struct hci_dev *hdev, bdaddr_t *dst,
conn->iso_qos.bcast.big);
if (parent && paren... |
c5da9bd6e8053cec636f0e212887390ac614d123 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btnxpuart: Drop _v0 suffix from FW names | Problem Details:
This updates all FW names by dropping the _v0 suffix.
Its been decided that all NXP BT/ WiFi FW names won't support _v0 suffix.
The suffix would be kept for next HW versions such as v1, v2 and so on,
which do not have backward compatible FW.
This change affects W8987, IW416 and IW615 chipsets, out of ... | ```diff
diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index 5ea0d23e88c0..6ef199ce2f61 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -34,16 +34,17 @@
/* NXP HW err codes */
#define BTNXPUART_IR_HW_ERR 0xb0
-#define FIRMWARE_W8987 "uart8987_bt_v0.bin... |
e69bcffce21c649a23645b20eb527b3d1ce6fc49 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Add one more ID 0x13d3:0x3623 for Qualcomm WCN785x | Problem Details:
Add one more part with ID (0x13d3, 0x3623) to usb_device_id table for
Qualcomm WCN785x, and its device info from /sys/kernel/debug/usb/devices
is shown below:
T: Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=13d3... | ```diff
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 2dfe20a1ae75..3d1e58dbf0a2 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -375,6 +375,8 @@ static const struct usb_device_id quirks_table[] = {
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x0489, 0xe0f3),... |
45f745dd1ac880ce299c0f92b874cda090ddade6 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Add one more ID 0x0489:0xe0f3 for Qualcomm WCN785x | Problem Details:
Add one more part with ID (0x0489, 0xe0f3) to usb_device_id table for
Qualcomm WCN785x, and its device info from /sys/kernel/debug/usb/devices
is shown below:
T: Bus=01 Lev=01 Prnt=01 Port=13 Cnt=03 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0489... | ```diff
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index f527f479cfb5..2dfe20a1ae75 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -373,6 +373,8 @@ static const struct usb_device_id quirks_table[] = {
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x0489, 0xe0fc),... |
47fa0f99a9aa962bac8e6da09cb104e8da94e4df | Analyze and fix the following issue in the Linux kernel code: perf probe: Fix to ignore escaped characters in --lines option | Problem Details:
Use strbprk_esc() and strdup_esc() to ignore escaped characters in
--lines option. This has been done for other options, but only --lines
option doesn't.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: Dima Kogan <dima@secretsauce.net>
Cc:... | ```diff
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 9e94d66d6333..b9119391d373 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -1372,7 +1372,7 @@ int parse_line_range_desc(const char *arg, struct line_range *lr)
lr->start = 0;
lr->end = INT_MAX;... |
e7c70ee7c9aa7420d22b47d8951f4b5fef4554ea | Analyze and fix the following issue in the Linux kernel code: perf probe: Fix error message for failing to find line range | Problem Details:
With --lines option, if perf-probe fails to find the specified line, it
warns as "Debuginfo analysis failed." but this misleads user as the
debuginfo is broken.
Fix this message to "Specified source line(LINESPEC) is not found." so
that user can understand the error correctly.
Signed-off-by: Masami H... | ```diff
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index a580aa2cd512..9e94d66d6333 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -1039,6 +1039,17 @@ static int _show_one_line(FILE *fp, int l, bool skip, bool show_num)
return rv;
}
+static int spr... |
fe4f9b4124967ffb75d66994520831231b779550 | Analyze and fix the following issue in the Linux kernel code: perf trace: Fix tracing itself, creating feedback loops | Problem Details:
There exists a pids_filtered map in augmented_raw_syscalls.bpf.c that
ceases to provide functionality after the BPF skeleton migration done
in:
5e6da6be3082f77b ("perf trace: Migrate BPF augmentation to use a skeleton")
Before the migration, pid_filtered map works, courtesy of Arnaldo
Carvalho de Mel... | ```diff
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 156c3e829179..14794725669d 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -4326,6 +4326,9 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
sizeof(__u32), BPF_ANY);
}
}
+
+... |
ef027aca2961b5b60ec9e91e3758af751396ad3d | Analyze and fix the following issue in the Linux kernel code: fs: jffs2: Fix inconsistent indentation in jffs2_mark_node_obsolete | Problem Details:
Fix the indentation to ensure consistent code style and improve
readability, and to fix this warnings:
fs/jffs2/nodemgmt.c:635 jffs2_mark_node_obsolete() warn: inconsistent
indenting
fs/jffs2/nodemgmt.c:646 jffs2_mark_node_obsolete() warn: inconsistent
indenting
Signed-off-by: Suraj Sonawane <surajson... | ```diff
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c
index 69569864630e..3fb9f9807b66 100644
--- a/fs/jffs2/nodemgmt.c
+++ b/fs/jffs2/nodemgmt.c
@@ -631,8 +631,8 @@ void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
ref->flash_offset, jeb->used_size);
BUG();
})
- ... |
3ba44ee966bc3c41dd8a944f963466c8fcc60dc8 | Analyze and fix the following issue in the Linux kernel code: jffs2: fix use of uninitialized variable | Problem Details:
When building the kernel with -Wmaybe-uninitialized, the compiler
reports this warning:
In function 'jffs2_mark_erased_block',
inlined from 'jffs2_erase_pending_blocks' at fs/jffs2/erase.c:116:4:
fs/jffs2/erase.c:474:9: warning: 'bad_offset' may be used uninitialized [-Wmaybe-uninitialized]
474 ... | ```diff
diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
index acd32f05b519..ef3a1e1b6cb0 100644
--- a/fs/jffs2/erase.c
+++ b/fs/jffs2/erase.c
@@ -338,10 +338,9 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
} while(--retlen);
mtd_unpoint(c->mtd, jeb->offset, c->sector_size);
... |
07593293ffabba14125c8998525adde5a832bfa3 | Analyze and fix the following issue in the Linux kernel code: mtd: ubi: fix unreleased fwnode_handle in find_volume_fwnode() | Problem Details:
The 'fw_vols' fwnode_handle initialized via
device_get_named_child_node() requires explicit calls to
fwnode_handle_put() when the variable is no longer required.
Add the missing calls to fwnode_handle_put() before the function
returns.
Cc: stable@vger.kernel.org
Fixes: 51932f9fc487 ("mtd: ubi: popula... | ```diff
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
index 5a3558bbb903..e5cf3bdca3b0 100644
--- a/drivers/mtd/ubi/vmt.c
+++ b/drivers/mtd/ubi/vmt.c
@@ -143,8 +143,10 @@ static struct fwnode_handle *find_volume_fwnode(struct ubi_volume *vol)
vol->vol_id != volid)
continue;
+ fwnode_handle_pu... |
a4af89cc50f3c1035c1e0dfb50948a23107f3e95 | Analyze and fix the following issue in the Linux kernel code: sched_ext: ops.cpu_acquire() should be called with SCX_KF_REST | Problem Details:
ops.cpu_acquire() is currently called with 0 kf_maks which is interpreted as
SCX_KF_UNLOCKED which allows all unlocked kfuncs, but ops.cpu_acquire() is
called from balance_one() under the rq lock and should only be allowed call
kfuncs that are safe under the rq lock. Update it to use SCX_KF_REST.
Sign... | ```diff
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 19f9cb3a4190..1ae8520b63dd 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -2645,7 +2645,7 @@ static int balance_one(struct rq *rq, struct task_struct *prev)
* emitted in scx_next_task_picked().
*/
if (SCX_HAS_OP(cpu_acquire))
- ... |
4617fb8fc15effe8eda4dd898d4e33eb537a7140 | Analyze and fix the following issue in the Linux kernel code: ubifs: authentication: Fix use-after-free in ubifs_tnc_end_commit | Problem Details:
After an insertion in TNC, the tree might split and cause a node to
change its `znode->parent`. A further deletion of other nodes in the
tree (which also could free the nodes), the aforementioned node's
`znode->cparent` could still point to a freed node. This
`znode->cparent` may not be updated when ge... | ```diff
diff --git a/fs/ubifs/tnc_commit.c b/fs/ubifs/tnc_commit.c
index a55e04822d16..7c43e0ccf6d4 100644
--- a/fs/ubifs/tnc_commit.c
+++ b/fs/ubifs/tnc_commit.c
@@ -657,6 +657,8 @@ static int get_znodes_to_commit(struct ubifs_info *c)
znode->alt = 0;
cnext = find_next_dirty(znode);
if (!cnext) {
+ ubifs_as... |
bcddf52b7a17adcebc768d26f4e27cf79adb424c | Analyze and fix the following issue in the Linux kernel code: ubi: fastmap: Fix duplicate slab cache names while attaching | Problem Details:
Since commit 4c39529663b9 ("slab: Warn on duplicate cache names when
DEBUG_VM=y"), the duplicate slab cache names can be detected and a
kernel WARNING is thrown out.
In UBI fast attaching process, alloc_ai() could be invoked twice
with the same slab cache name 'ubi_aeb_slab_cache', which will trigger
f... | ```diff
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
index ae5abe492b52..adc47b87b38a 100644
--- a/drivers/mtd/ubi/attach.c
+++ b/drivers/mtd/ubi/attach.c
@@ -1447,7 +1447,7 @@ out_ech:
return err;
}
-static struct ubi_attach_info *alloc_ai(void)
+static struct ubi_attach_info *alloc_ai(const c... |
fbfbf86685b3270dc27d1c5d6108532334aaf329 | Analyze and fix the following issue in the Linux kernel code: cgroup/cpuset: Disable cpuset_cpumask_can_shrink() test if not load balancing | Problem Details:
With some recent proposed changes [1] in the deadline server code,
it has caused a test failure in test_cpuset_prs.sh when a change
is being made to an isolated partition. This is due to failing
the cpuset_cpumask_can_shrink() check for SCHED_DEADLINE tasks at
validate_change().
This is actually a fal... | ```diff
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 142303abb055..f321ed515f3a 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -581,12 +581,24 @@ static int validate_change(struct cpuset *cur, struct cpuset *trial)
/*
* We can't shrink if we won't have enough room for S... |
cb04444c243c001fc27f275e84792ff1c2b96867 | Analyze and fix the following issue in the Linux kernel code: vfio/mlx5: Fix unwind flows in mlx5vf_pci_save/resume_device_data() | Problem Details:
Fix unwind flows in mlx5vf_pci_save_device_data() and
mlx5vf_pci_resume_device_data() to avoid freeing the migf pointer at the
'end' label, as this will be handled by fput(migf->filp) through
mlx5vf_release_file().
To ensure mlx5vf_release_file() functions correctly, move the
initialization of migf fi... | ```diff
diff --git a/drivers/vfio/pci/mlx5/main.c b/drivers/vfio/pci/mlx5/main.c
index 242c23eef452..8833e60d42f5 100644
--- a/drivers/vfio/pci/mlx5/main.c
+++ b/drivers/vfio/pci/mlx5/main.c
@@ -640,14 +640,11 @@ mlx5vf_pci_save_device_data(struct mlx5vf_pci_core_device *mvdev, bool track)
O_RDONLY);
if (IS_ERR... |
22e87bf3f77c18f5982c19ffe2732ef0c7a25f16 | Analyze and fix the following issue in the Linux kernel code: vfio/mlx5: Fix an unwind issue in mlx5vf_add_migration_pages() | Problem Details:
Fix an unwind issue in mlx5vf_add_migration_pages().
If a set of pages is allocated but fails to be added to the SG table,
they need to be freed to prevent a memory leak.
Any pages successfully added to the SG table will be freed as part of
mlx5vf_free_data_buffer().
Fixes: 6fadb021266d ("vfio/mlx5:... | ```diff
diff --git a/drivers/vfio/pci/mlx5/cmd.c b/drivers/vfio/pci/mlx5/cmd.c
index 41a4b0cf4297..7527e277c898 100644
--- a/drivers/vfio/pci/mlx5/cmd.c
+++ b/drivers/vfio/pci/mlx5/cmd.c
@@ -423,6 +423,7 @@ static int mlx5vf_add_migration_pages(struct mlx5_vhca_data_buffer *buf,
unsigned long filled;
unsigned int t... |
5580cdae05aefa96deebd7f5ade9d70c92adabd7 | Analyze and fix the following issue in the Linux kernel code: ubi: wl: Close down wear-leveling before nand is suspended | Problem Details:
If a reboot/shutdown signal with double force (-ff) is triggered when
the erase worker or wear-leveling worker function runs we may end up in
a race condition since the MTD device gets a reboot notification and
suspends the nand flash before the erase or wear-leveling is done. This
will reject all acce... | ```diff
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index c792b9bcab9b..26cc53ad34ec 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -549,6 +549,7 @@ struct ubi_debug_info {
* @peb_buf: a buffer of PEB size used for different purposes
* @buf_mutex: protects @peb_buf
* @ckvol_mutex... |
84a2bee9c49769310efa19601157ef50a1df1267 | Analyze and fix the following issue in the Linux kernel code: ubifs: Correct the total block count by deducting journal reservation | Problem Details:
Since commit e874dcde1cbf ("ubifs: Reserve one leb for each journal
head while doing budget"), available space is calulated by deducting
reservation for all journal heads. However, the total block count (
which is only used by statfs) is not updated yet, which will cause
the wrong displaying for used s... | ```diff
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index cb26b8b27ef6..57d051b9be1d 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -773,10 +773,10 @@ static void init_constants_master(struct ubifs_info *c)
* necessary to report something for the 'statfs()' call.
*
* Subtract the LEB reserved for... |
09663753bb7c50b33f8e5fa562c20ce275b88237 | Analyze and fix the following issue in the Linux kernel code: tracing/ring-buffer: Clear all memory mapped CPU ring buffers on first recording | Problem Details:
The events of a memory mapped ring buffer from the previous boot should
not be mixed in with events from the current boot. There's meta data that
is used to handle KASLR so that function names can be shown properly.
Also, since the timestamps of the previous boot have no meaning to the
timestamps of t... | ```diff
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index a8f52b6527ca..619e9aa62201 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2386,6 +2386,25 @@ void tracing_reset_online_cpus(struct array_buffer *buf)
ring_buffer_record_enable(buffer);
}
+static void tracing_reset_all_cpus(str... |
c4595fe394a289927077e3da561db27811919ee0 | Analyze and fix the following issue in the Linux kernel code: ubi: fastmap: wl: Schedule fm_work if wear-leveling pool is empty | Problem Details:
Since commit 14072ee33d5a ("ubi: fastmap: Check wl_pool for free peb
before wear leveling"), wear_leveling_worker() won't schedule fm_work
if wear-leveling pool is empty, which could temporarily disable the
wear-leveling until the fastmap is updated(eg. pool becomes empty).
Fix it by scheduling fm_work... | ```diff
diff --git a/drivers/mtd/ubi/fastmap-wl.c b/drivers/mtd/ubi/fastmap-wl.c
index 2a9cc9413c42..9bdb6525f128 100644
--- a/drivers/mtd/ubi/fastmap-wl.c
+++ b/drivers/mtd/ubi/fastmap-wl.c
@@ -346,14 +346,27 @@ out:
* WL sub-system.
*
* @ubi: UBI device description object
+ * @need_fill: whether to fill wear-le... |
051ae5aa73d782a8be2699a11e17c68f28b4e758 | Analyze and fix the following issue in the Linux kernel code: iommufd: Lock all IOAS objects | Problem Details:
Define helpers to lock and unlock all IOAS objects.
This will allow DMA mappings to be updated atomically during live update.
This code is substantially the same as an initial version provided by
Jason, plus fixes.
Link: https://patch.msgid.link/r/1731527497-16091-3-git-send-email-steven.sistare@oracl... | ```diff
diff --git a/drivers/iommu/iommufd/ioas.c b/drivers/iommu/iommufd/ioas.c
index c05d33fc3a50..c82ed5a92e3b 100644
--- a/drivers/iommu/iommufd/ioas.c
+++ b/drivers/iommu/iommufd/ioas.c
@@ -52,7 +52,10 @@ int iommufd_ioas_alloc_ioctl(struct iommufd_ucmd *ucmd)
rc = iommufd_ucmd_respond(ucmd, sizeof(*cmd));
if ... |
d610020f030bec819f42de327c2bd5437d2766b3 | Analyze and fix the following issue in the Linux kernel code: ubi: wl: Put source PEB into correct list if trying locking LEB failed | Problem Details:
During wear-leveing work, the source PEB will be moved into scrub list
when source LEB cannot be locked in ubi_eba_copy_leb(), which is wrong
for non-scrub type source PEB. The problem could bring extra and
ineffective wear-leveing jobs, which makes more or less negative effects
for the life time of fl... | ```diff
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index a357f3d27f2f..8a26968aba11 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -846,7 +846,14 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk,
goto out_not_moved;
}
if (err == MOVE_RETRY) {
- s... |
0104dcdaad3a7afd141e79a5fb817a92ada910ac | Analyze and fix the following issue in the Linux kernel code: thermal: testing: Initialize some variables annoteded with _free() | Problem Details:
Variables annotated with __free() need to be initialized if the function
can return before they get updated for the first time or the attempt to
free the memory pointed to by them upon function return may crash the
kernel.
Fix this issue in some places in the thermal testing code.
Fixes: f6a034f2df42... | ```diff
diff --git a/drivers/thermal/testing/zone.c b/drivers/thermal/testing/zone.c
index 2619d3df5bd9..1f4e450100e2 100644
--- a/drivers/thermal/testing/zone.c
+++ b/drivers/thermal/testing/zone.c
@@ -185,7 +185,7 @@ static void tt_add_tz_work_fn(struct work_struct *work)
int tt_add_tz(void)
{
struct tt_thermal_z... |
81f5c72d041b92490261354a528b60e66ed2fa3b | Analyze and fix the following issue in the Linux kernel code: USB: properly lock dynamic id list when showing an id | Problem Details:
When walking the list of dynamic ids for a driver, no lock was being
held, which meant that an id could be removed or added while the list
was being iterated. Fix this up by properly grabing the lock while we
walk the list.
Reported-by: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel... | ```diff
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index bc3c00580238..9ea955a3d115 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -116,6 +116,7 @@ ssize_t usb_show_dynids(struct usb_dynids *dynids, char *buf)
struct usb_dynid *dynid;
size_t count = 0;
+ guard(mu... |
c3bda715438a5d30e67abf6830a2f01f36500f43 | Analyze and fix the following issue in the Linux kernel code: drm/i915/display: Convert i915_suspend into i9xx_display_sr | Problem Details:
These save & restore functions inside i915_suspend are old display
functions to save and restore a bunch of display related registers.
Move it under display and rename accordantly. Just don't move it
entirely towards intel_display struct yet because it depends
on drm_i915_private for the IS_MOBILE.
W... | ```diff
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 31710d98cad5..e465828d748f 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -30,7 +30,6 @@ i915-y += \
i915_params.o \
i915_pci.o \
i915_scatterlist.o \
- i915_suspend.o \
i915_switcheroo.o ... |
7d493a5ecc26f861421af6e64427d5f697ddd395 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix incorrect comparison for delayed refs | Problem Details:
When I reworked delayed ref comparison in cf4f04325b2b ("btrfs: move
->parent and ->ref_root into btrfs_delayed_ref_node"), I made a mistake
and returned -1 for the case where ref1->ref_root was > than
ref2->ref_root. This is a subtle bug that can result in improper
delayed ref running order, which ca... | ```diff
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
index 65d841d7142c..cab94d141f66 100644
--- a/fs/btrfs/delayed-ref.c
+++ b/fs/btrfs/delayed-ref.c
@@ -298,7 +298,7 @@ static int comp_refs(struct btrfs_delayed_ref_node *ref1,
if (ref1->ref_root < ref2->ref_root)
return -1;
if (ref1->ref_roo... |
580bb355bcae7e9a6606ce9644af09b2a793f1bb | Analyze and fix the following issue in the Linux kernel code: Revert: "ring-buffer: Do not have boot mapped buffers hook to CPU hotplug" | Problem Details:
A crash happened when testing cpu hotplug with respect to the memory
mapped ring buffers. It was assumed that the hot plug code was adding a
per CPU buffer that was already created that caused the crash. The real
problem was due to ref counting and was fixed by commit 2cf9733891a4
("ring-buffer: Fix re... | ```diff
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 3ea4f7bb1837..5807116bcd0b 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2337,12 +2337,9 @@ static struct trace_buffer *alloc_buffer(unsigned long size, unsigned flags,
if (!buffer->buffers[cpu])
goto ... |
ede132a5cf559f3ab35a4c28bac4f4a6c20334d8 | Analyze and fix the following issue in the Linux kernel code: RDMA/mlx5: Move events notifier registration to be after device registration | Problem Details:
Move pkey change work initialization and cleanup from device resources
stage to notifier stage, since this is the stage which handles this work
events.
Fix a race between the device deregistration and pkey change work by moving
MLX5_IB_STAGE_DEVICE_NOTIFIER to be after MLX5_IB_STAGE_IB_REG in order to... | ```diff
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 65da5df05d02..bc7930d0c564 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -3005,7 +3005,6 @@ unlock:
static int mlx5_ib_dev_res_init(struct mlx5_ib_dev *dev)
{
struct mlx5_ib_r... |
dbf670f13949249f09b872ae59aab2feb259ca5f | Analyze and fix the following issue in the Linux kernel code: drm/xe: Wire devcoredump to LR TDR | Problem Details:
LR queues can hang, cause engine reset, or cause IOMMU CAT errors.
Collect an error capture when this occurs.
v2:
- s/queue's/queues (Jonathan)
v4:
- Fix build (CI)
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Link: https://patchwor... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 985a21a72da4..f9ecee5364d8 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -896,13 +896,18 @@ static void xe_guc_exec_queue_lr_cleanup(struct work_struct *w)
!exec_queue_... |
990c29c2dd22e46395831bcff7b06a6ca9ee0573 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Improve schedule disable response failure | Problem Details:
Print Guc ID and take devcoredump on schedule disable response failure.
GuC ID is useful information and a schedule disable response failure is
possible the LRC state is corrupted so a devcoredump is helpful to debug.
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Jonathan Cavitt ... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 08a6578ee104..46fd4621bfca 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -1124,7 +1124,10 @@ guc_exec_queue_timedout_job(struct drm_sched_job *drm_job)
if (!ret || xe_guc_r... |
10304796918a1d771f9bd187af6520eea0479bc1 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Add xe_ring_lrc_is_idle() helper | Problem Details:
Add helper to compare ring head and tail to determine if LRC is idle.
v2:
- Fix kernel doc (CI, Zhanjun)
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Link: https://patchwork.freedesk... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index c70b75a3eb85..663ad4d97b34 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -1696,7 +1696,7 @@ static void guc_exec_queue_stop(struct xe_guc *guc, struct xe_exec_queue *q)
b... |
f89d17ae2ac42931be2a0153fecbf8533280c927 | Analyze and fix the following issue in the Linux kernel code: fbdev: sh7760fb: Fix a possible memory leak in sh7760fb_alloc_mem() | Problem Details:
When information such as info->screen_base is not ready, calling
sh7760fb_free_mem() does not release memory correctly. Call
dma_free_coherent() instead.
Fixes: 4a25e41831ee ("video: sh7760fb: SH7760/SH7763 LCDC framebuffer driver")
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Dmi... | ```diff
diff --git a/drivers/video/fbdev/sh7760fb.c b/drivers/video/fbdev/sh7760fb.c
index 3d2a27fefc87..130adef2e468 100644
--- a/drivers/video/fbdev/sh7760fb.c
+++ b/drivers/video/fbdev/sh7760fb.c
@@ -409,12 +409,11 @@ static int sh7760fb_alloc_mem(struct fb_info *info)
vram = PAGE_SIZE;
fbmem = dma_alloc_cohe... |
6d9f9115c091c88cacf78734d8ea34c8609e8680 | Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Fix dereference before NULL check | Problem Details:
The pointer list->list is dereferenced before the NULL check.
Fix this by moving the NULL check outside the for loop, so that
the check is performed before the dereferencing.
The list->list pointer cannot be NULL so this has no effect on runtime.
It's just a correctness issue.
This issue was reported ... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_capture.c b/drivers/gpu/drm/xe/xe_guc_capture.c
index 8b6cb786a2aa..cc72446a5de1 100644
--- a/drivers/gpu/drm/xe/xe_guc_capture.c
+++ b/drivers/gpu/drm/xe/xe_guc_capture.c
@@ -1531,7 +1531,7 @@ read_reg_to_node(struct xe_hw_engine *hwe, const struct __guc_mmio_reg_descr_gr... |
9b4662d0df9f4433f1828904ba5e8733c1ad5158 | Analyze and fix the following issue in the Linux kernel code: ALSA: ump: Fix the wrong format specifier | Problem Details:
The format specifier of "unsigned int" in snprintf()
should be "%u", not "%d".
Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Link: https://patch.msgid.link/20241114075822.41614-1-zhangjiao2@cmss.chinamobile.com
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/core/ump.c b/sound/core/ump.c
index ab4932dc499f..5d4dd207e5ab 100644
--- a/sound/core/ump.c
+++ b/sound/core/ump.c
@@ -387,7 +387,7 @@ int snd_ump_block_new(struct snd_ump_endpoint *ump, unsigned int blk,
fb->info.first_group = first_group;
fb->info.num_groups = num_groups;
/* fill the... |
83b5a407fbb73e6965adfb4bd0a803724bf87f96 | Analyze and fix the following issue in the Linux kernel code: powerpc/kexec: Fix return of uninitialized variable | Problem Details:
of_property_read_u64() can fail and leave the variable uninitialized,
which will then be used. Return error if reading the property failed.
Fixes: 2e6bd221d96f ("powerpc/kexec_file: Enable early kernel OPAL calls")
Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
Signed-off-by: Michael Ellerman <m... | ```diff
diff --git a/arch/powerpc/kexec/file_load_64.c b/arch/powerpc/kexec/file_load_64.c
index 9738adabeb1f..dc65c1391157 100644
--- a/arch/powerpc/kexec/file_load_64.c
+++ b/arch/powerpc/kexec/file_load_64.c
@@ -736,13 +736,18 @@ int setup_purgatory_ppc64(struct kimage *image, const void *slave_code,
if (dn) {
... |
0c32840763b1579c923b4216c18bb756ca4ba473 | Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/pmt: allow user offset for PMT callbacks | Problem Details:
Usage of the telem sysfs file allows for partial reads at an offset.
The current callback method returns the buffer starting from offset 0
only.
Include the requested offset in the callback and update the necessary
address calculations with the offset.
Note: offset addition is moved from the caller t... | ```diff
diff --git a/drivers/platform/x86/intel/pmt/class.c b/drivers/platform/x86/intel/pmt/class.c
index 7680474c4f96..375695cc0d60 100644
--- a/drivers/platform/x86/intel/pmt/class.c
+++ b/drivers/platform/x86/intel/pmt/class.c
@@ -59,10 +59,12 @@ pmt_memcpy64_fromio(void *to, const u64 __iomem *from, size_t count)
... |
35f56c554eb1b56b77b3cf197a6b00922d49033d | Analyze and fix the following issue in the Linux kernel code: netfilter: ipset: add missing range check in bitmap_ip_uadt | Problem Details:
When tb[IPSET_ATTR_IP_TO] is not present but tb[IPSET_ATTR_CIDR] exists,
the values of ip and ip_to are slightly swapped. Therefore, the range check
for ip should be done later, but this part is missing and it seems that the
vulnerability occurs.
So we should add missing range checks and remove unnece... | ```diff
diff --git a/net/netfilter/ipset/ip_set_bitmap_ip.c b/net/netfilter/ipset/ip_set_bitmap_ip.c
index e4fa00abde6a..5988b9bb9029 100644
--- a/net/netfilter/ipset/ip_set_bitmap_ip.c
+++ b/net/netfilter/ipset/ip_set_bitmap_ip.c
@@ -163,11 +163,8 @@ bitmap_ip_uadt(struct ip_set *set, struct nlattr *tb[],
ret = ip_... |
041bd1e4f2d82859690cd8b41c35f0f9404c3770 | Analyze and fix the following issue in the Linux kernel code: selftests: netfilter: Fix missing return values in conntrack_dump_flush | Problem Details:
Fix the bug of some functions were missing return values.
Fixes: eff3c558bb7e ("netfilter: ctnetlink: support filtering by zone")
Signed-off-by: Guan Jing <guanjing@cmss.chinamobile.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | ```diff
diff --git a/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c b/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
index 254ff03297f0..5f827e10717d 100644
--- a/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
+++ b/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
@... |
67ab51cbdfee02ef07fb9d7d14cc0bf6cb5a5e5c | Analyze and fix the following issue in the Linux kernel code: arm64: tls: Fix context-switching of tpidrro_el0 when kpti is enabled | Problem Details:
Commit 18011eac28c7 ("arm64: tls: Avoid unconditional zeroing of
tpidrro_el0 for native tasks") tried to optimise the context switching
of tpidrro_el0 by eliding the clearing of the register when switching
to a native task with kpti enabled, on the erroneous assumption that
the kpti trampoline entry co... | ```diff
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index 0540653fbf38..3d78798c4a0a 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -439,7 +439,7 @@ static void tls_thread_switch(struct task_struct *next)
if (is_compat_thread(task_thread_info(next)))
writ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.