id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
adb44a4bfc8a3312d2a13cc09d2b89d5828e7702 | Analyze and fix the following issue in the Linux kernel code: s390/mm/hugetlbfs: Add missing includes | Problem Details:
Add missing includes to fix this randconfig compile error:
All errors (new ones prefixed by >>):
In file included from mm/pagewalk.c:5:
In file included from include/linux/hugetlb.h:798:
>> arch/s390/include/asm/hugetlb.h:94:31: error: call to undeclared function 'is_pte_marker'; ISO C99 and la... | ```diff
diff --git a/arch/s390/include/asm/hugetlb.h b/arch/s390/include/asm/hugetlb.h
index 0f621c99b216..5bdb35991ecb 100644
--- a/arch/s390/include/asm/hugetlb.h
+++ b/arch/s390/include/asm/hugetlb.h
@@ -10,6 +10,8 @@
#define _ASM_S390_HUGETLB_H
#include <linux/pgtable.h>
+#include <linux/swap.h>
+#include <linu... |
b7529880cb961d515642ce63f9d7570869bbbdc3 | Analyze and fix the following issue in the Linux kernel code: netfilter: nft_socket: remove WARN_ON_ONCE on maximum cgroup level | Problem Details:
cgroup maximum depth is INT_MAX by default, there is a cgroup toggle to
restrict this maximum depth to a more reasonable value not to harm
performance. Remove unnecessary WARN_ON_ONCE which is reachable from
userspace.
Fixes: 7f3287db6543 ("netfilter: nft_socket: make cgroupsv2 matching work with name... | ```diff
diff --git a/net/netfilter/nft_socket.c b/net/netfilter/nft_socket.c
index f5da0c1775f2..35d0409b0095 100644
--- a/net/netfilter/nft_socket.c
+++ b/net/netfilter/nft_socket.c
@@ -68,7 +68,7 @@ static noinline int nft_socket_cgroup_subtree_level(void)
cgroup_put(cgrp);
- if (WARN_ON_ONCE(level > 255))
+ if... |
04317f4eb2aad312ad85c1a17ad81fe75f1f9bc7 | Analyze and fix the following issue in the Linux kernel code: netfilter: x_tables: fix LED ID check in led_tg_check() | Problem Details:
Syzbot has reported the following BUG detected by KASAN:
BUG: KASAN: slab-out-of-bounds in strlen+0x58/0x70
Read of size 1 at addr ffff8881022da0c8 by task repro/5879
...
Call Trace:
<TASK>
dump_stack_lvl+0x241/0x360
? __pfx_dump_stack_lvl+0x10/0x10
? __pfx__printk+0x10/0x10
? _printk+0xd5/0x120
... | ```diff
diff --git a/net/netfilter/xt_LED.c b/net/netfilter/xt_LED.c
index f7b0286d106a..8a80fd76fe45 100644
--- a/net/netfilter/xt_LED.c
+++ b/net/netfilter/xt_LED.c
@@ -96,7 +96,9 @@ static int led_tg_check(const struct xt_tgchk_param *par)
struct xt_led_info_internal *ledinternal;
int err;
- if (ledinfo->id[0]... |
146b6f1112eb30a19776d6c323c994e9d67790db | Analyze and fix the following issue in the Linux kernel code: ipvs: fix UB due to uninitialized stack access in ip_vs_protocol_init() | Problem Details:
Under certain kernel configurations when building with Clang/LLVM, the
compiler does not generate a return or jump as the terminator
instruction for ip_vs_protocol_init(), triggering the following objtool
warning during build time:
vmlinux.o: warning: objtool: ip_vs_protocol_init() falls through to ... | ```diff
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
index f100da4ba3bc..a9fd1d3fc2cb 100644
--- a/net/netfilter/ipvs/ip_vs_proto.c
+++ b/net/netfilter/ipvs/ip_vs_proto.c
@@ -340,7 +340,7 @@ void __net_exit ip_vs_protocol_net_cleanup(struct netns_ipvs *ipvs)
int __init ip_vs_proto... |
04f5cb48995d51deed0af71aaba1b8699511313f | Analyze and fix the following issue in the Linux kernel code: Documentation: tls_offload: fix typos and grammar | Problem Details:
Fix typos and grammar where it improves readability.
Signed-off-by: Leo Stone <leocstone@gmail.com>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Link: https://patch.msgid.link/20241124230002.56058-1-leocstone@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com> | ```diff
diff --git a/Documentation/networking/tls-offload.rst b/Documentation/networking/tls-offload.rst
index 5f0dea3d571e..7354d48cdf92 100644
--- a/Documentation/networking/tls-offload.rst
+++ b/Documentation/networking/tls-offload.rst
@@ -51,7 +51,7 @@ and send them to the device for encryption and transmission.
R... |
6e33123a18bf6c69c941d09e091e8bfef5fb0d41 | Analyze and fix the following issue in the Linux kernel code: Fix spelling mistake | Problem Details:
Changed from reequires to require. A minute typo.
Signed-off-by: Vyshnav Ajith <puthen1977@gmail.com>
Link: https://patch.msgid.link/20241121221852.10754-1-puthen1977@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com> | ```diff
diff --git a/Documentation/networking/cdc_mbim.rst b/Documentation/networking/cdc_mbim.rst
index 37f968acc473..8404a3f794f3 100644
--- a/Documentation/networking/cdc_mbim.rst
+++ b/Documentation/networking/cdc_mbim.rst
@@ -51,7 +51,7 @@ Such userspace applications includes, but are not limited to:
- mbimcli (... |
f5807b0606da7ac7c1b74a386b22134ec7702d05 | Analyze and fix the following issue in the Linux kernel code: ntp: Remove invalid cast in time offset math | Problem Details:
Due to an unsigned cast, adjtimex() returns the wrong offest when using
ADJ_MICRO and the offset is negative. In this case a small negative offset
returns approximately 4.29 seconds (~ 2^32/1000 milliseconds) due to the
unsigned cast of the negative offset.
This cast was added when the kernel internal... | ```diff
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index b550ebe0f03b..163e7a2033b6 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -798,7 +798,7 @@ int __do_adjtimex(struct __kernel_timex *txc, const struct timespec64 *ts,
txc->offset = shift_right(ntpdata->time_offset * NTP_INTERVAL_FREQ, NTP_S... |
34851431ceca1bf457d85895bd38a4e7967e2055 | Analyze and fix the following issue in the Linux kernel code: HID: i2c-hid: Revert to using power commands to wake on resume | Problem Details:
commit 7d6f065de37c ("HID: i2c-hid: Use address probe to wake on resume")
replaced the retry of power commands with the dummy read "bus probe" we
use on boot which accounts for a necessary delay before retry.
This made at least one Weida device (2575:0910 in an ASUS Vivobook S14)
very unhappy, as the ... | ```diff
diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
index 43664a24176f..4e87380d3edd 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -414,7 +414,19 @@ static int i2c_hid_set_power(struct i2c_hid *ihid, int power_state)
i2c_hid_dbg(... |
34f4e94c839a5cfdbb5dd32b54760fdb8b25b5d7 | Analyze and fix the following issue in the Linux kernel code: drm/panthor: Fix a typo in the FW iface flag definitions | Problem Details:
Drop the _RD_ in the flag names.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241113160257.2002333-1-boris.brezillon@collabora.com | ```diff
diff --git a/drivers/gpu/drm/panthor/panthor_fw.c b/drivers/gpu/drm/panthor/panthor_fw.c
index c807b6ce71bd..4a2e36504fea 100644
--- a/drivers/gpu/drm/panthor/panthor_fw.c
+++ b/drivers/gpu/drm/panthor/panthor_fw.c
@@ -91,26 +91,26 @@ enum panthor_fw_binary_entry_type {
#define CSF_FW_BINARY_ENTRY_UPDATE B... |
fc9c273d6daaa9866f349bbe8cae25c67764c456 | Analyze and fix the following issue in the Linux kernel code: ipmr: fix tables suspicious RCU usage | Problem Details:
Similar to the previous patch, plumb the RCU lock inside
the ipmr_get_table(), provided a lockless variant and apply
the latter in the few spots were the lock is already held.
Fixes: 709b46e8d90b ("net: Add compat ioctl support for the ipv4 multicast ioctl SIOCGETSGCNT")
Fixes: f0ad0860d01e ("ipv4: ip... | ```diff
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index bac0776648e0..383ea8b91cc7 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -142,7 +142,7 @@ static struct mr_table *ipmr_mr_table_iter(struct net *net,
return ret;
}
-static struct mr_table *ipmr_get_table(struct net *net, u32 id)
+static struct mr... |
f1553c9894b4dbeb10a2ab15ab1aa113b3b4047c | Analyze and fix the following issue in the Linux kernel code: ip6mr: fix tables suspicious RCU usage | Problem Details:
Several places call ip6mr_get_table() with no RCU nor RTNL lock.
Add RCU protection inside such helper and provide a lockless variant
for the few callers that already acquired the relevant lock.
Note that some users additionally reference the table outside the RCU
lock. That is actually safe as the ta... | ```diff
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index b80fca894916..4147890fe98f 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -130,7 +130,7 @@ static struct mr_table *ip6mr_mr_table_iter(struct net *net,
return ret;
}
-static struct mr_table *ip6mr_get_table(struct net *net, u32 id)
+static str... |
11b6e701bce96f98474084f26821157cb0dccf69 | Analyze and fix the following issue in the Linux kernel code: ipmr: add debug check for mr table cleanup | Problem Details:
The multicast route tables lifecycle, for both ipv4 and ipv6, is
protected by RCU using the RTNL lock for write access. In many
places a table pointer escapes the RCU (or RTNL) protected critical
section, but such scenarios are actually safe because tables are
deleted only at namespace cleanup time or ... | ```diff
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index c58dd78509a2..bac0776648e0 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -120,6 +120,11 @@ static void ipmr_expire_process(struct timer_list *t);
lockdep_rtnl_is_held() || \
list_empty(&net->ipv4.mr_tables))
+static bool ipmr_can_free_tab... |
663a917475530feff868a4f2bda286ea4171f420 | Analyze and fix the following issue in the Linux kernel code: selftests: rds: move test.py to TEST_FILES | Problem Details:
The test.py should not be run separately. It should be run via run.sh,
which will do some sanity checks first. Move the test.py from TEST_PROGS
to TEST_FILES.
Reported-by: Maximilian Heyne <mheyne@amazon.de>
Closes: https://lore.kernel.org/netdev/20241122150129.GB18887@dev-dsk-mheyne-1b-55676e6a.eu-we... | ```diff
diff --git a/tools/testing/selftests/net/rds/Makefile b/tools/testing/selftests/net/rds/Makefile
index 1803c39dbacb..612a7219990e 100644
--- a/tools/testing/selftests/net/rds/Makefile
+++ b/tools/testing/selftests/net/rds/Makefile
@@ -3,10 +3,9 @@
all:
@echo mk_build_dir="$(shell pwd)" > include.sh
-TEST_P... |
aef7ee7649e02f7fc0d2e5e532f352496976dcb1 | Analyze and fix the following issue in the Linux kernel code: dma-debug: fix physical address calculation for struct dma_debug_entry | Problem Details:
Offset into the page should also be considered while calculating a physical
address for struct dma_debug_entry. page_to_phys() just shifts the value
PAGE_SHIFT bits to the left so offset part is zero-filled.
An example (wrong) debug assertion failure with CONFIG_DMA_API_DEBUG
enabled which is observed... | ```diff
diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c
index 295396226f31..e43c6de2bce4 100644
--- a/kernel/dma/debug.c
+++ b/kernel/dma/debug.c
@@ -1219,7 +1219,7 @@ void debug_dma_map_page(struct device *dev, struct page *page, size_t offset,
entry->dev = dev;
entry->type = dma_debug_single;
- ... |
122aba8c80618eca904490b1733af27fb8f07528 | Analyze and fix the following issue in the Linux kernel code: net_sched: sch_fq: don't follow the fast path if Tx is behind now | Problem Details:
Recent kernels cause a lot of TCP retransmissions
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 2.24 GBytes 19.2 Gbits/sec 2767 442 KBytes
[ 5] 1.00-2.00 sec 2.23 GBytes 19.1 Gbits/sec 2312 350 KBytes
... | ```diff
diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c
index a97638bef6da..a5e87f9ea986 100644
--- a/net/sched/sch_fq.c
+++ b/net/sched/sch_fq.c
@@ -332,6 +332,12 @@ static bool fq_fastpath_check(const struct Qdisc *sch, struct sk_buff *skb,
*/
if (q->internal.qlen >= 8)
return false;
+
+ /* Ordering ... |
c31e72d021db2714df03df6c42855a1db592716c | Analyze and fix the following issue in the Linux kernel code: tcp: Fix use-after-free of nreq in reqsk_timer_handler(). | Problem Details:
The cited commit replaced inet_csk_reqsk_queue_drop_and_put() with
__inet_csk_reqsk_queue_drop() and reqsk_put() in reqsk_timer_handler().
Then, oreq should be passed to reqsk_put() instead of req; otherwise
use-after-free of nreq could happen when reqsk is migrated but the
retry attempt failed (e.g. ... | ```diff
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 491c2c6b683e..6872b5aff73e 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -1191,7 +1191,7 @@ no_ownership:
drop:
__inet_csk_reqsk_queue_drop(sk_listener, oreq, true);
- reqsk_put(req)... |
e2668c34b7e1a2288ea0a97ccf3cd12e2870ca18 | Analyze and fix the following issue in the Linux kernel code: net: phy: fix phy_ethtool_set_eee() incorrectly enabling LPI | Problem Details:
When phy_ethtool_set_eee_noneg() detects a change in the LPI
parameters, it attempts to update phylib state and trigger the link
to cycle so the MAC sees the updated parameters.
However, in doing so, it sets phydev->enable_tx_lpi depending on
whether the EEE configuration allows the MAC to generate LP... | ```diff
diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c
index 96d0b3a5a9d3..944ae98ad110 100644
--- a/drivers/net/phy/phy-c45.c
+++ b/drivers/net/phy/phy-c45.c
@@ -1530,7 +1530,7 @@ int genphy_c45_ethtool_get_eee(struct phy_device *phydev,
return ret;
data->eee_enabled = is_enabled;
- data->ee... |
02020056647017e70509bb58c3096448117099e1 | Analyze and fix the following issue in the Linux kernel code: rxrpc: Improve setsockopt() handling of malformed user input | Problem Details:
copy_from_sockptr() does not return negative value on error; instead, it
reports the number of bytes that failed to copy. Since it's deprecated,
switch to copy_safe_from_sockptr().
Note: Keeping the `optlen != sizeof(unsigned int)` check as
copy_safe_from_sockptr() by itself would also accept
optlen >... | ```diff
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
index f4844683e120..9d8bd0b37e41 100644
--- a/net/rxrpc/af_rxrpc.c
+++ b/net/rxrpc/af_rxrpc.c
@@ -707,9 +707,10 @@ static int rxrpc_setsockopt(struct socket *sock, int level, int optname,
ret = -EISCONN;
if (rx->sk.sk_state != RXRPC_UNBOUND)
... |
1465036b10be4b8b00eb31c879e86de633ad74c1 | Analyze and fix the following issue in the Linux kernel code: llc: Improve setsockopt() handling of malformed user input | Problem Details:
copy_from_sockptr() is used incorrectly: return value is the number of
bytes that could not be copied. Since it's deprecated, switch to
copy_safe_from_sockptr().
Note: Keeping the `optlen != sizeof(int)` check as copy_safe_from_sockptr()
by itself would also accept optlen > sizeof(int). Which would al... | ```diff
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 4eb52add7103..0259cde394ba 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -1098,7 +1098,7 @@ static int llc_ui_setsockopt(struct socket *sock, int level, int optname,
lock_sock(sk);
if (unlikely(level != SOL_LLC || optlen != sizeof(int)))
go... |
ca0f79f0286046f6a91c099dc941cf7afae198d6 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Apply quirk for Medion E15433 | Problem Details:
Medion E15433 laptop wich ALC269VC (SSID 2782:1705) needs the same
workaround for the missing speaker as another model.
Link: https://bugzilla.suse.com/show_bug.cgi?id=1233298
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20241128072646.15659-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <... | ```diff
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index d950666f9c74..4355282f5b2d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -10952,6 +10952,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x2782, 0x0228, "Infinix ZERO BO... |
5f7bec831f1f17c354e4307a12cf79b018296975 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Use ttm_bo_access in xe_vm_snapshot_capture_delayed | Problem Details:
Non-contiguous mapping of BO in VRAM doesn't work, use ttm_bo_access
instead.
v2:
- Fix error handling
Fixes: 0eb2a18a8fad ("drm/xe: Implement VM snapshot support for BO's and userptr")
Suggested-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewe... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 2e67648ed512..610226c7c1ce 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -3310,7 +3310,6 @@ void xe_vm_snapshot_capture_delayed(struct xe_vm_snapshot *snap)
for (int i = 0; i < snap->num_snaps; i++) {
... |
1c6878af115a4586a40d6c14d530fa9f93e0bd83 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Take PM ref in delayed snapshot capture worker | Problem Details:
The delayed snapshot capture worker can access the GPU or VRAM both of
which require a PM reference. Take a reference in this worker.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fixes: 4f04d07c0a94 ("drm/xe: Faster devcoredump")
Signed-off-by: Ma... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c
index 0e5edf14a241..0d3a4dc87a7f 100644
--- a/drivers/gpu/drm/xe/xe_devcoredump.c
+++ b/drivers/gpu/drm/xe/xe_devcoredump.c
@@ -23,6 +23,7 @@
#include "xe_guc_submit.h"
#include "xe_hw_engine.h"
#include "xe_module.h"
+#in... |
97e8cecb6a0dde7ebb8e8e973146b5a131f52b9f | Analyze and fix the following issue in the Linux kernel code: drm/xe: Add xe_ttm_access_memory | Problem Details:
Non-contiguous VRAM cannot easily be mapped in TTM nor can non-visible
VRAM easily be accessed. Add xe_ttm_access_memory which hooks into
ttm_bo_access to access such memory.
v4:
- Assert memory access rather than taking RPM ref (Thomas / Auld)
- Fix warning on xe_res_cursor.h for non-zero offset (M... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index aaf54131c89e..9de28798ad1c 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -442,6 +442,14 @@ static void xe_ttm_tt_destroy(struct ttm_device *ttm_dev, struct ttm_tt *tt)
kfree(tt);
}
+static bool xe_ttm_r... |
7d08df5d0bd3d12d14dcec773fcddbe3eed3a8e8 | Analyze and fix the following issue in the Linux kernel code: drm/ttm: Add ttm_bo_access | Problem Details:
Non-contiguous VRAM cannot easily be mapped in TTM nor can non-visible
VRAM easily be accessed. Add ttm_bo_access, which is similar to
ttm_bo_vm_access, to access such memory.
v4:
- Fix checkpatch warnings (CI)
v5:
- Fix checkpatch warnings (CI)
v6:
- Fix kernel doc (Auld)
v7:
- Move ttm_bo_access... | ```diff
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
index 2c699ed1963a..f02d3966cc84 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
@@ -405,13 +405,25 @@ static int ttm_bo_vm_access_kmap(struct ttm_buffer_object *bo,
return len;
}
-int ttm_bo_v... |
e6064da6461f989a357f2e280d7f8d4155267c4c | Analyze and fix the following issue in the Linux kernel code: kbuild: rename .tmp_vmlinux.kallsyms0.syms to .tmp_vmlinux0.syms | Problem Details:
Change the naming for consistency.
While at this, fix the comments in scripts/link-vmlinux.sh.
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | ```diff
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index 53bd4b727e21..139aa4d1215a 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -207,8 +207,8 @@ kallsymso=
strip_debug=
if is_enabled CONFIG_KALLSYMS; then
- true > .tmp_vmlinux.kallsyms0.syms
- kallsyms .tmp_vmlinux.kall... |
2b1bd507542a6ec1506a847da8e81fc764a4e707 | Analyze and fix the following issue in the Linux kernel code: modpost: improve error messages in device_id_check() | Problem Details:
The first error message in device_id_check() is obscure and can be
misleading because the cause of the error is unlikely to be found in
the struct definition in mod_devicetable.h.
This type of error occurs when an array is passed to an incorrect type
of MODULE_DEVICE_TABLE().
[Example 1]
static ... | ```diff
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index fc4bbeea1268..5b5745f00eb3 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -176,40 +176,6 @@ static inline void add_guid(char *str, guid_t guid)
guid.b[12], guid.b[13], guid.b[14], guid.b[15]);
}
-/**
- * Check ... |
054a9cd395a79f4a5595f2cd24542e9bca8723c8 | Analyze and fix the following issue in the Linux kernel code: modpost: rename alias symbol for MODULE_DEVICE_TABLE() | Problem Details:
This commit renames the alias symbol, __mod_<type>__<name>_device_table
to __mod_device_table__<type>__<name>.
This change simplifies the code slightly, as there is no longer a need
to check both the prefix and suffix.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | ```diff
diff --git a/include/linux/module.h b/include/linux/module.h
index 88ecc5e9f523..3dd79a3d0cbf 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -247,7 +247,7 @@ extern void cleanup_module(void);
#ifdef MODULE
/* Creates an alias so file2alias.c can find device table. */
#define MODULE_DEVIC... |
0c3e091319e4748cb36ac9a50848903dc6f54054 | Analyze and fix the following issue in the Linux kernel code: modpost: remove incorrect code in do_eisa_entry() | Problem Details:
This function contains multiple bugs after the following commits:
- ac551828993e ("modpost: i2c aliases need no trailing wildcard")
- 6543becf26ff ("mod/file2alias: make modalias generation safe for cross compiling")
Commit ac551828993e inserted the following code to do_eisa_entry():
else
... | ```diff
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index c4cc11aa558f..634e40748287 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -809,10 +809,7 @@ static int do_eisa_entry(const char *filename, void *symval,
char *alias)
{
DEF_FIELD_ADDR(symval, eisa_device_id, sig... |
523f3dbc187a9618d4fd80c2b438e4d490705dcd | Analyze and fix the following issue in the Linux kernel code: setlocalversion: work around "git describe" performance | Problem Details:
Contrary to expectations, passing a single candidate tag to "git
describe" is slower than not passing any --match options.
$ time git describe --debug
...
traversed 10619 commits
...
v6.12-rc5-63-g0fc810ae3ae1
real 0m0.169s
$ time git describe --match=v6.12-rc5 --debug
...
trave... | ```diff
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 38b96c6797f4..5818465abba9 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -30,6 +30,27 @@ if test $# -gt 0 -o ! -d "$srctree"; then
usage
fi
+try_tag() {
+ tag="$1"
+
+ # Is $tag an annotated tag?
+ [ "$(git cat-fil... |
e397a603e49cc7c7c113fad9f55a09637f290c34 | Analyze and fix the following issue in the Linux kernel code: kbuild: switch from lz4c to lz4 for compression | Problem Details:
Replace lz4c with lz4 for kernel image compression.
Although lz4 and lz4c are functionally similar, lz4c has been deprecated
upstream since 2018. Since as early as Ubuntu 16.04 and Fedora 25, lz4
and lz4c have been packaged together, making it safe to update the
requirement from lz4c to lz4.
Consequen... | ```diff
diff --git a/Makefile b/Makefile
index 215d5fd95a28..f7f43c8997ae 100644
--- a/Makefile
+++ b/Makefile
@@ -533,7 +533,7 @@ KGZIP = gzip
KBZIP2 = bzip2
KLZOP = lzop
LZMA = lzma
-LZ4 = lz4c
+LZ4 = lz4
XZ = xz
ZSTD = zstd
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 01040a767c1d..7... |
1d3730f0012fa04ec392b52cc21f945704ac2e16 | Analyze and fix the following issue in the Linux kernel code: kbuild: support -fmacro-prefix-map for external modules | Problem Details:
This commit makes -fmacro-prefix-map work for external modules built in
a separate output directory. It improves the reproducibility of external
modules and provides the benefits described in commit a73619a845d5
("kbuild: use -fmacro-prefix-map to make __FILE__ a relative path").
When building_out_of_... | ```diff
diff --git a/Makefile b/Makefile
index 5aba1ac89375..a4ac0133f7cd 100644
--- a/Makefile
+++ b/Makefile
@@ -1041,8 +1041,10 @@ ifdef CONFIG_CC_IS_GCC
KBUILD_CFLAGS += -fconserve-stack
endif
-# change __FILE__ to the relative path from the srctree
-KBUILD_CPPFLAGS += $(call cc-option,-fmacro-prefix-map=$(sr... |
bad6beb2c0bb982b830f592a7b3e3eee76cbb85a | Analyze and fix the following issue in the Linux kernel code: kbuild: remove extmod_prefix, MODORDER, MODULES_NSDEPS variables | Problem Details:
With the previous changes, $(extmod_prefix), $(MODORDER), and
$(MODULES_NSDEPS) are constant. (empty, modules.order, and
modules.nsdeps, respectively).
Remove these variables and hard-code their values.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.... | ```diff
diff --git a/Makefile b/Makefile
index 2718d2037f5e..b82c84903c88 100644
--- a/Makefile
+++ b/Makefile
@@ -1122,10 +1122,6 @@ export MODLIB
PHONY += prepare0
-export extmod_prefix =
-export MODORDER := $(extmod_prefix)modules.order
-export MODULES_NSDEPS := $(extmod_prefix)modules.nsdeps
-
ifeq ($(KBUILD_... |
13b25489b6f8bd73ed65f07928f7c27a481f1820 | Analyze and fix the following issue in the Linux kernel code: kbuild: change working directory to external module directory with M= | Problem Details:
Currently, Kbuild always operates in the output directory of the kernel,
even when building external modules. This increases the risk of external
module Makefiles attempting to write to the kernel directory.
This commit switches the working directory to the external module
directory, allowing the remo... | ```diff
diff --git a/Documentation/dev-tools/coccinelle.rst b/Documentation/dev-tools/coccinelle.rst
index 535ce126fb4f..6e70a1e9a3c0 100644
--- a/Documentation/dev-tools/coccinelle.rst
+++ b/Documentation/dev-tools/coccinelle.rst
@@ -250,25 +250,17 @@ variables for .cocciconfig is as follows:
- Your directory from wh... |
2cbd51f1f8739fd2fdf4bae1386bcf75ce0176ba | Analyze and fix the following issue in the Linux kernel code: block: Don't allow an atomic write be truncated in blkdev_write_iter() | Problem Details:
A write which goes past the end of the bdev in blkdev_write_iter() will
be truncated. Truncating cannot tolerated for an atomic write, so error
that condition.
Fixes: caf336f81b3a ("block: Add fops atomic write support")
Signed-off-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Christoph Hellwi... | ```diff
diff --git a/block/fops.c b/block/fops.c
index 2d01c9007681..13a67940d040 100644
--- a/block/fops.c
+++ b/block/fops.c
@@ -677,6 +677,7 @@ static ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from)
struct file *file = iocb->ki_filp;
struct inode *bd_inode = bdev_file_inode(file);
struct b... |
43eef70e7e2ac74e7767731dd806720c7fb5e010 | Analyze and fix the following issue in the Linux kernel code: io_uring: fix corner case forgetting to vunmap | Problem Details:
io_pages_unmap() is a bit tricky in trying to figure whether the pages
were previously vmap'ed or not. In particular If there is juts one page
it belives there is no need to vunmap. Paired io_pages_map(), however,
could've failed io_mem_alloc_compound() and attempted to
io_mem_alloc_single(), which doe... | ```diff
diff --git a/io_uring/memmap.c b/io_uring/memmap.c
index ea08f19dc648..57de9bccbf50 100644
--- a/io_uring/memmap.c
+++ b/io_uring/memmap.c
@@ -73,6 +73,8 @@ void *io_pages_map(struct page ***out_pages, unsigned short *npages,
ret = io_mem_alloc_compound(pages, nr_pages, size, gfp);
if (!IS_ERR(ret))
goto... |
7f05e20b989ac33c9c0f8c2028ec0a566493548f | Analyze and fix the following issue in the Linux kernel code: of: address: Preserve the flags portion on 1:1 dma-ranges mapping | Problem Details:
A missing or empty dma-ranges in a DT node implies a 1:1 mapping for dma
translations. In this specific case, the current behaviour is to zero out
the entire specifier so that the translation could be carried on as an
offset from zero. This includes address specifier that has flags (e.g.
PCI ranges).
... | ```diff
diff --git a/drivers/of/address.c b/drivers/of/address.c
index c5b925ac469f..5b7ee3ed5296 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -459,7 +459,8 @@ static int of_translate_one(const struct device_node *parent, const struct of_bu
}
if (ranges == NULL || rlen == 0) {
offset = of_read... |
8f2fc64773be829d763b3bb7161dd9913deae2a9 | Analyze and fix the following issue in the Linux kernel code: drm/vc4: Fix reading of frame count on GEN5 / Pi4 | Problem Details:
The frame count values moved within registers DISPSTAT1 and
DISPSTAT2 with GEN5, so update the accessor function to
accommodate that.
Fixes: b51cd7ad143d ("drm/vc4: hvs: Fix frame count register readout")
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msg... | ```diff
diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c
index 1edf6e3fa7e6..f8edb0791091 100644
--- a/drivers/gpu/drm/vc4/vc4_hvs.c
+++ b/drivers/gpu/drm/vc4/vc4_hvs.c
@@ -272,19 +272,42 @@ u8 vc4_hvs_get_fifo_frame_count(struct vc4_hvs *hvs, unsigned int fifo)
if (!drm_dev_enter(drm, &idx)... |
b682aa788e5f9f1ddacdfbb453e49fd3f4e83721 | Analyze and fix the following issue in the Linux kernel code: ASoC: amd: yc: Add a quirk for microfone on Lenovo ThinkPad P14s Gen 5 21MES00B00 | Problem Details:
New ThinkPads need new quirk entries. Ilya has tested this one.
Laptop product id is 21MES00B00, though the shorthand 21ME works.
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219533
Cc: stable@vger.kernel.org
Signed-off-by: Ilya Zverev <ilya@zverev.info>
Link: https://patch.msgid.link/202411271... | ```diff
diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
index facd82f0f251..e38c5885dadf 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -248,6 +248,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "21M5"),
}... |
f934f6be76c1d033692f7fbfcbb06ec44a25bf3f | Analyze and fix the following issue in the Linux kernel code: s390/mm: Introduce region-third and segment table swap entries | Problem Details:
Introduce region-third (PUD) and segment table (PMD) swap entries, and
make hugetlbfs RSTE <-> PTE conversion code aware of them, so that they
can be used for hugetlbfs PTE_MARKER entries. Future work could also
build on this to enable THP_SWAP and THP_MIGRATION for s390.
Similar to PTE swap entries, ... | ```diff
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 8213e05770f8..300affac1698 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -286,6 +286,7 @@ static inline int is_module_addr(void *addr)
#define _REGION3_ENTRY_ORIGIN_LARGE ~0x7fffffffUL /... |
03e6db16b808afbe23e10617f2d18578846bdce0 | Analyze and fix the following issue in the Linux kernel code: s390/mm: Introduce region-third and segment table entry present bits | Problem Details:
Introduce region-third and segment table entry present SW bits, and adjust
pmd/pud_present() accordingly.
Also add pmd/pud_present() checks to pmd/pud_leaf(), to return false for
future swap entries. Same logic applies to pmd_trans_huge(), make that
return pmd_leaf() instead of duplicating the same ch... | ```diff
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index ee5d047a2d67..8213e05770f8 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -277,7 +277,8 @@ static inline int is_module_addr(void *addr)
#define _REGION1_ENTRY_EMPTY (_REGION_ENTRY_TYPE_R1... |
ae1b9fb2d556e95001399dcd4e228525aead5122 | Analyze and fix the following issue in the Linux kernel code: s390/mm: Rearrange region-third and segment table entry SW bits | Problem Details:
Rearrange region-third and segment table entry SW bits, in order to
make room for future encoding of region/segment table swap entries.
Also adjust _SEGMENT_ENTRY_GMAP_UC and _SEGMENT_ENTRY_GMAP_IN bits in
gmap code. Those should only apply for gmap PMDs, and not really depend
on or conflict with host... | ```diff
diff --git a/arch/s390/include/asm/gmap.h b/arch/s390/include/asm/gmap.h
index 64761c78f774..13f51a6a5bb1 100644
--- a/arch/s390/include/asm/gmap.h
+++ b/arch/s390/include/asm/gmap.h
@@ -17,8 +17,8 @@
#define GMAP_NOTIFY_MPROT 0x1
/* Status bits only for huge segment entries */
-#define _SEGMENT_ENTRY_GMAP_... |
7061c63919bde3bb0daa63e700a117ab1f2c97b1 | Analyze and fix the following issue in the Linux kernel code: KVM: s390: Remove one byte cmpxchg() usage | Problem Details:
Within sca_clear_ext_call() cmpxchg() is used to clear one or two bytes
(depending on sca format). The cmpxchg() calls are not supposed to fail; if
so that would be a bug. Given that cmpxchg() usage on one and two byte
areas generates very inefficient code, replace them with block concurrent
WRITE_ONCE... | ```diff
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index eff69018cbeb..ea8dce299954 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -118,8 +118,6 @@ static int sca_inject_ext_call(struct kvm_vcpu *vcpu, int src_id)
static void sca_clear_ext_call(struct kvm_vcpu *vcpu... |
e9db1b551774037ebe39dde4a658d89ba95e260b | Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: ipc3-topology: Convert the topology pin index to ALH dai index | Problem Details:
Intel SoundWire machine driver always uses Pin number 2 and above.
Currently, the pin number is used as the FW DAI index directly. As a
result, FW DAI 0 and 1 are never used. That worked fine because we use
up to 2 DAIs in a SDW link. Convert the topology pin index to ALH dai
index, the mapping is usin... | ```diff
diff --git a/sound/soc/sof/ipc3-topology.c b/sound/soc/sof/ipc3-topology.c
index be61e377e59e..c2fce554a674 100644
--- a/sound/soc/sof/ipc3-topology.c
+++ b/sound/soc/sof/ipc3-topology.c
@@ -20,6 +20,9 @@
/* size of tplg ABI in bytes */
#define SOF_IPC3_TPLG_ABI_SIZE 3
+/* Base of SOF_DAI_INTEL_ALH, this sh... |
2f2020327cc8561d7c520d2f2d9acea84fa7b3a3 | Analyze and fix the following issue in the Linux kernel code: ASoC: mediatek: Check num_codecs is not zero to avoid panic during probe | Problem Details:
Following commit 13f58267cda3 ("ASoC: soc.h: don't create dummy
Component via COMP_DUMMY()"), COMP_DUMMY() became an array with zero
length, and only gets populated with the dummy struct after the card is
registered. Since the sound card driver's probe happens before the card
registration, accessing an... | ```diff
diff --git a/sound/soc/mediatek/mt8188/mt8188-mt6359.c b/sound/soc/mediatek/mt8188/mt8188-mt6359.c
index 84abdba9ddb6..e04b88a57535 100644
--- a/sound/soc/mediatek/mt8188/mt8188-mt6359.c
+++ b/sound/soc/mediatek/mt8188/mt8188-mt6359.c
@@ -1277,10 +1277,12 @@ static int mt8188_mt6359_soc_card_probe(struct mtk_so... |
4095cf872084ecfdfdb0e681f3e9ff9745acfa75 | Analyze and fix the following issue in the Linux kernel code: ASoC: amd: yc: Fix for enabling DMIC on acp6x via _DSD entry | Problem Details:
Add condition check to register ACP PDM sound card by reading
_WOV acpi entry.
Fixes: 5426f506b584 ("ASoC: amd: Add support for enabling DMIC on acp6x via _DSD")
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20241127112227.227106-1-venkataprasad.... | ```diff
diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
index 6439c175552a..facd82f0f251 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -551,8 +551,14 @@ static int acp6x_probe(struct platform_device *pdev)
struct acp6x_pdm *machine = NULL;
struct snd_so... |
44b682694a0ca366bf15c26c3c3c16d26c9e9f6d | Analyze and fix the following issue in the Linux kernel code: i2c: Fix whitespace style issue | Problem Details:
This patch fixes a coding style issue in the alignment of parameters
in the function i2c_smbus_write_bytes(). It replaces spaces with tabs for
alignment, as per the coding style guidelines.
Signed-off-by: Liam Zuiderhoek <zuiderhoekl@gmail.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineerin... | ```diff
diff --git a/drivers/i2c/i2c-core-smbus.c b/drivers/i2c/i2c-core-smbus.c
index 0a6bdc6df172..e73afbefe222 100644
--- a/drivers/i2c/i2c-core-smbus.c
+++ b/drivers/i2c/i2c-core-smbus.c
@@ -122,7 +122,7 @@ EXPORT_SYMBOL(i2c_smbus_read_byte);
s32 i2c_smbus_write_byte(const struct i2c_client *client, u8 value)
{
... |
1fcc67e3a354865775355eafec1fb061a755c971 | Analyze and fix the following issue in the Linux kernel code: of: base: Add for_each_child_of_node_with_prefix() | Problem Details:
There are cases where drivers would go through child device nodes and
operate on only the ones whose node name starts with a given prefix.
Provide a helper for these users. This will mainly be used in a
subsequent patch that implements a hardware component prober for I2C
busses.
Signed-off-by: Chen-Y... | ```diff
diff --git a/drivers/of/base.c b/drivers/of/base.c
index a8b0c42bdc8e..4cba021c89d3 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -644,6 +644,41 @@ struct device_node *of_get_next_child(const struct device_node *node,
}
EXPORT_SYMBOL(of_get_next_child);
+/**
+ * of_get_next_child_with_prefix - F... |
febc689b27d28973cd02f667548a5dca383d859a | Analyze and fix the following issue in the Linux kernel code: drm/xe/migrate: use XE_BO_FLAG_PAGETABLE | Problem Details:
On some HW we want to avoid the host caching PTEs, since access from GPU
side can be incoherent. However here the special migrate object is
mapping PTEs which are written from the host and potentially cached. Use
XE_BO_FLAG_PAGETABLE to ensure that non-cached mapping is used, on
platforms where this ma... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index 48e205a40fd2..1b97d90aadda 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
+++ b/drivers/gpu/drm/xe/xe_migrate.c
@@ -209,7 +209,8 @@ static int xe_migrate_prepare_vm(struct xe_tile *tile, struct xe_migrate *m,
num_entries *... |
f3dc9246f9c3cd5a7d8fd70cfd805bfc52214e2e | Analyze and fix the following issue in the Linux kernel code: drm/xe/migrate: fix pat index usage | Problem Details:
XE_CACHE_WB must be converted into the per-platform pat index for that
particular caching mode, otherwise we are just encoding whatever happens
to be the value of that enum.
Fixes: e8babb280b5e ("drm/xe: Convert multiple bind ops into single job")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
C... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index cfd31ae49cc1..48e205a40fd2 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
+++ b/drivers/gpu/drm/xe/xe_migrate.c
@@ -1350,6 +1350,7 @@ __xe_migrate_update_pgtables(struct xe_migrate *m,
/* For sysmem PTE's, need to map them in... |
7be34f6feedd60e418de1c2c48e661d70416635f | Analyze and fix the following issue in the Linux kernel code: ALSA: ump: Fix evaluation of MIDI 1.0 FB info | Problem Details:
The m1.0 field of UMP Function Block info specifies whether the given
FB is a MIDI 1.0 port or not. When implementing the UMP support on
Linux, I somehow interpreted as if it were bit flags, but the field is
actually an enumeration from 0 to 2, where 2 means MIDI 1.0 *and* low
speed.
This patch corre... | ```diff
diff --git a/sound/core/ump.c b/sound/core/ump.c
index 5d4dd207e5ab..6d0aac6c763f 100644
--- a/sound/core/ump.c
+++ b/sound/core/ump.c
@@ -788,7 +788,10 @@ static void fill_fb_info(struct snd_ump_endpoint *ump,
info->ui_hint = buf->fb_info.ui_hint;
info->first_group = buf->fb_info.first_group;
info->num_g... |
9ad467a2b2716d4ed12f003b041aa6c776a13ff5 | Analyze and fix the following issue in the Linux kernel code: ALSA: core: Fix possible NULL dereference caused by kunit_kzalloc() | Problem Details:
kunit_kzalloc() may return a NULL pointer, dereferencing it without
NULL check may lead to NULL dereference.
Add NULL checks for all the kunit_kzalloc() in sound_kunit.c
Fixes: 3e39acf56ede ("ALSA: core: Add sound core KUnit test")
Signed-off-by: Zichen Xie <zichenxie0106@gmail.com>
Link: https://patc... | ```diff
diff --git a/sound/core/sound_kunit.c b/sound/core/sound_kunit.c
index bfed1a25fc8f..84e337ecbddd 100644
--- a/sound/core/sound_kunit.c
+++ b/sound/core/sound_kunit.c
@@ -172,6 +172,7 @@ static void test_format_fill_silence(struct kunit *test)
u32 i, j;
buffer = kunit_kzalloc(test, SILENCE_BUFFER_SIZE, GF... |
c353ee4fb119a2582d0e011f66a76a38f5cf984d | Analyze and fix the following issue in the Linux kernel code: smb: Initialize cfid->tcon before performing network ops | Problem Details:
Avoid leaking a tcon ref when a lease break races with opening the
cached directory. Processing the leak break might take a reference to
the tcon in cached_dir_lease_break() and then fail to release the ref in
cached_dir_offload_close, since cfid->tcon is still NULL.
Fixes: ebe98f1447bb ("cifs: enable... | ```diff
diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c
index d9e1d1dc6178..fe738623cf1b 100644
--- a/fs/smb/client/cached_dir.c
+++ b/fs/smb/client/cached_dir.c
@@ -229,6 +229,7 @@ replay_again:
}
}
cfid->dentry = dentry;
+ cfid->tcon = tcon;
/*
* We do not hold the lock for the open... |
a74769564eb0a94c41a6224ee81230554c167f71 | Analyze and fix the following issue in the Linux kernel code: docs: ABI: sysfs-bus-event_source-devices-vpa-pmu: Fix htmldocs errors | Problem Details:
Fix errors during `make htmldocs`, eg:
Documentation/ABI/testing/sysfs-bus-event_source-devices-vpa-pmu:2: ERROR: Unexpected indentation.
Fixes: 4ae0b32ecee7 ("docs: ABI: sysfs-bus-event_source-devices-vpa-pmu: Document sysfs event format entries for vpa_pmu")
Reported-by: Stephen Rothwell <sfr@can... | ```diff
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-vpa-pmu b/Documentation/ABI/testing/sysfs-bus-event_source-devices-vpa-pmu
index 8285263ff78d..a116aee9709a 100644
--- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-vpa-pmu
+++ b/Documentation/ABI/testing/sysfs-bus-event_source-d... |
e4a4565489622b29cc4208d117828596207ee6f6 | Analyze and fix the following issue in the Linux kernel code: powerpc/machdep: Remove duplicated include in svm.c | Problem Details:
The header files linux/mem_encrypt.h is included twice in svm.c,
so one inclusion of each can be removed.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11750
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Madhavan Srinivas... | ```diff
diff --git a/arch/powerpc/platforms/pseries/svm.c b/arch/powerpc/platforms/pseries/svm.c
index c5d0f92c7969..384c9dc1899a 100644
--- a/arch/powerpc/platforms/pseries/svm.c
+++ b/arch/powerpc/platforms/pseries/svm.c
@@ -10,7 +10,6 @@
#include <linux/memblock.h>
#include <linux/mem_encrypt.h>
#include <linux/c... |
04b5f0a5bfee5a5886dc19296c90d9a6964275e4 | Analyze and fix the following issue in the Linux kernel code: apparmor: lift new_profile declaration to remove C23 extension warning | Problem Details:
the kernel test robot reports a C23 extension
warning: label followed by a declaration is a C23 extension
[-Wc23-extensions]
696 | struct aa_profile *new_profile = NULL;
Instead of adding a null statement creating a C99 style inline var
declaration lift the label declaration out o... | ```diff
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index 75d3bd02c067..5939bd9a9b9b 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -636,6 +636,7 @@ static struct aa_label *profile_transition(const struct cred *subj_cred,
struct aa_ruleset *rules = list_first_entr... |
8acf7ad02d1b1bc6dbb1fc78a295582d0d336502 | Analyze and fix the following issue in the Linux kernel code: apparmor: replace misleading 'scrubbing environment' phrase in debug print | Problem Details:
The wording of 'scrubbing environment' implied that all environment
variables would be removed, when instead secure-execution mode only
removes a small number of environment variables. This patch updates the
wording to describe what actually occurs instead: setting AT_SECURE for
ld.so's secure-executio... | ```diff
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index 8c18d72531f8..75d3bd02c067 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -714,8 +714,8 @@ create_learning_profile:
if (!(perms.xindex & AA_X_UNSAFE)) {
if (DEBUG_ON) {
- dbg_printk("apparmor: scrubb... |
9b897132424fe76bf6c61f22f9cf12af7f1d1e6a | Analyze and fix the following issue in the Linux kernel code: apparmor: fix 'Do simple duplicate message elimination' | Problem Details:
Multiple profiles shared 'ent->caps', so some logs missed.
Fixes: 0ed3b28ab8bf ("AppArmor: mediation of non file objects")
Signed-off-by: chao liu <liuzgyid@outlook.com>
Signed-off-by: John Johansen <john.johansen@canonical.com> | ```diff
diff --git a/security/apparmor/capability.c b/security/apparmor/capability.c
index 9934df16c843..bf7df6086830 100644
--- a/security/apparmor/capability.c
+++ b/security/apparmor/capability.c
@@ -96,6 +96,8 @@ static int audit_caps(struct apparmor_audit_data *ad, struct aa_profile *profile
return error;
} e... |
7290f59231910ccba427d441a6e8b8c6f6112448 | Analyze and fix the following issue in the Linux kernel code: apparmor: test: Fix memory leak for aa_unpack_strdup() | Problem Details:
The string allocated by kmemdup() in aa_unpack_strdup() is not
freed and cause following memory leaks, free them to fix it.
unreferenced object 0xffffff80c6af8a50 (size 8):
comm "kunit_try_catch", pid 225, jiffies 4294894407
hex dump (first 8 bytes):
74 65 73 74 69 6e 67 00 ... | ```diff
diff --git a/security/apparmor/policy_unpack_test.c b/security/apparmor/policy_unpack_test.c
index c64733d6c98f..f070902da8fc 100644
--- a/security/apparmor/policy_unpack_test.c
+++ b/security/apparmor/policy_unpack_test.c
@@ -281,6 +281,8 @@ static void policy_unpack_test_unpack_strdup_with_null_name(struct ku... |
1dc707e647bc919834eff9636c8d00b78c782545 | Analyze and fix the following issue in the Linux kernel code: rust: fix up formatting after merge | Problem Details:
When I merged the rust 'use' imports, I didn't realize that there's
an offical preferred idiomatic format - so while it all worked fine,
it doesn't match what 'make rustfmt' wants to make it.
Fix it up appropriately.
Suggested-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Linus Torvalds <torvald... | ```diff
diff --git a/rust/kernel/task.rs b/rust/kernel/task.rs
index 7a76be583126..07bc22a7645c 100644
--- a/rust/kernel/task.rs
+++ b/rust/kernel/task.rs
@@ -6,11 +6,15 @@
use crate::{
bindings,
+ ffi::{c_int, c_long, c_uint},
pid_namespace::PidNamespace,
types::{ARef, NotThreadSafe, Opaque},
};
... |
3fa640d035e5ae526769615c35cb9ed4be6e3662 | Analyze and fix the following issue in the Linux kernel code: smb: During unmount, ensure all cached dir instances drop their dentry | Problem Details:
The unmount process (cifs_kill_sb() calling close_all_cached_dirs()) can
race with various cached directory operations, which ultimately results
in dentries not being dropped and these kernel BUGs:
BUG: Dentry ffff88814f37e358{i=1000000000080,n=/} still in use (2) [unmount of cifs cifs]
VFS: Busy ino... | ```diff
diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c
index 81b92d202557..d9e1d1dc6178 100644
--- a/fs/smb/client/cached_dir.c
+++ b/fs/smb/client/cached_dir.c
@@ -17,6 +17,11 @@ static void free_cached_dir(struct cached_fid *cfid);
static void smb2_close_cached_fid(struct kref *ref);
static vo... |
796733054e4a55c78c1c58c6121a550667ebccbf | Analyze and fix the following issue in the Linux kernel code: smb: client: fix noisy message when mounting shares | Problem Details:
When the client unconditionally attempts to get an DFS referral to
check if share is DFS, some servers may return different errors that
aren't handled in smb2_get_dfs_refer(), so the following will be
logged in dmesg:
CIFS: VFS: \\srv\IPC$ smb2_get_dfs_refer: ioctl error...
which can confuse some us... | ```diff
diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c
index 5349b6519b15..87cb1872db28 100644
--- a/fs/smb/client/smb2ops.c
+++ b/fs/smb/client/smb2ops.c
@@ -2999,7 +2999,7 @@ smb2_get_dfs_refer(const unsigned int xid, struct cifs_ses *ses,
rc = -EIO;
if (rc) {
if (!is_retryable_error(rc) && rc... |
36008fe6e3dc588e5e9ceae6e82c7f69399eb5d8 | Analyze and fix the following issue in the Linux kernel code: smb: client: don't try following DFS links in cifs_tree_connect() | Problem Details:
We can't properly support chasing DFS links in cifs_tree_connect()
because
(1) We don't support creating new sessions while we're reconnecting,
which would be required for DFS interlinks.
(2) ->is_path_accessible() can't be called from cifs_tree_connect()
as it would deadlock with smb2... | ```diff
diff --git a/fs/smb/client/dfs.c b/fs/smb/client/dfs.c
index 5dc7708ed600..4647df9e1e3b 100644
--- a/fs/smb/client/dfs.c
+++ b/fs/smb/client/dfs.c
@@ -321,49 +321,6 @@ int dfs_mount_share(struct cifs_mount_ctx *mnt_ctx)
return rc;
}
-/* Update dfs referral path of superblock */
-static int update_server_fu... |
214c0eea43b2ea66bcd6467ea57e47ce8874191b | Analyze and fix the following issue in the Linux kernel code: kbuild: add $(objtree)/ prefix to some in-kernel build artifacts | Problem Details:
$(objtree) refers to the top of the output directory of kernel builds.
This commit adds the explicit $(objtree)/ prefix to build artifacts
needed for building external modules.
This change has no immediate impact, as the top-level Makefile
currently defines:
objtree := .
This commit prepa... | ```diff
diff --git a/Makefile b/Makefile
index 891d28e54791..9b8f4f4cb01b 100644
--- a/Makefile
+++ b/Makefile
@@ -354,7 +354,7 @@ else # !mixed-build
include $(srctree)/scripts/Kbuild.include
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
-KERNELRELEASE = $(call read-file, include/config/ke... |
bcbbf493f2fa6fa1f0832f6b5b4c80a65de242d6 | Analyze and fix the following issue in the Linux kernel code: kbuild: deb-pkg: Don't fail if modules.order is missing | Problem Details:
Kernels built without CONFIG_MODULES might still want to create -dbg deb
packages but install_linux_image_dbg() assumes modules.order always
exists. This obviously isn't true if no modules were built, so we should
skip reading modules.order in that case.
Fixes: 16c36f8864e3 ("kbuild: deb-pkg: use buil... | ```diff
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 441b0bb66e0d..fb686fd3266f 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -96,16 +96,18 @@ install_linux_image_dbg () {
# Parse modules.order directly because 'make modules_install' may sign,
# compress modules... |
dbefa1f31a91670c9e7dac9b559625336206466f | Analyze and fix the following issue in the Linux kernel code: Rename .data.once to .data..once to fix resetting WARN*_ONCE | Problem Details:
Commit b1fca27d384e ("kernel debug: support resetting WARN*_ONCE")
added support for clearing the state of once warnings. However,
it is not functional when CONFIG_LD_DEAD_CODE_DATA_ELIMINATION or
CONFIG_LTO_CLANG is enabled, because .data.once matches the
.data.[0-9a-zA-Z_]* pattern in the DATA_MAIN m... | ```diff
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 3c9dc1fd094d..54504013c749 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -359,7 +359,7 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG)
*(.data..shared_aligne... |
bb43a59944f45e89aa158740b8a16ba8f0b0fa2b | Analyze and fix the following issue in the Linux kernel code: Rename .data.unlikely to .data..unlikely | Problem Details:
Commit 7ccaba5314ca ("consolidate WARN_...ONCE() static variables")
was intended to collect all .data.unlikely sections into one chunk.
However, this has not worked when CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
or CONFIG_LTO_CLANG is enabled, because .data.unlikely matches the
.data.[0-9a-zA-Z_]* pattern i... | ```diff
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index c995474e4c64..3c9dc1fd094d 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -357,7 +357,7 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG)
*(.data..decrypted) ... |
d63b852430be7fa2b6d7c550ea67e94b6681d0b5 | Analyze and fix the following issue in the Linux kernel code: kbuild: Fix Propeller build option | Problem Details:
The '-fbasic-block-sections=labels' option has been deprecated in tip
of tree clang (20.0.0) [1]. While the option still works, a warning is
emitted:
clang: warning: argument '-fbasic-block-sections=labels' is deprecated, use '-fbasic-block-address-map' instead [-Wdeprecated]
Add a version check to... | ```diff
diff --git a/scripts/Makefile.propeller b/scripts/Makefile.propeller
index 344190717e47..48a660128e25 100644
--- a/scripts/Makefile.propeller
+++ b/scripts/Makefile.propeller
@@ -5,7 +5,14 @@ ifdef CLANG_PROPELLER_PROFILE_PREFIX
CFLAGS_PROPELLER_CLANG := -fbasic-block-sections=list=$(CLANG_PROPELLER_PROFILE_... |
d5dc95836147f2e25b134c0ca3a0bc1a5867ea29 | Analyze and fix the following issue in the Linux kernel code: kbuild: Add Propeller configuration for kernel build | Problem Details:
Add the build support for using Clang's Propeller optimizer. Like
AutoFDO, Propeller uses hardware sampling to gather information
about the frequency of execution of different code paths within a
binary. This information is then used to guide the compiler's
optimization decisions, resulting in a more e... | ```diff
diff --git a/Documentation/dev-tools/index.rst b/Documentation/dev-tools/index.rst
index 6945644f7008..3c0ac08b2709 100644
--- a/Documentation/dev-tools/index.rst
+++ b/Documentation/dev-tools/index.rst
@@ -35,6 +35,7 @@ Documentation/dev-tools/testing-overview.rst
checkuapi
gpio-sloppy-logic-analyzer
... |
0043ecea2399ffc8bfd99ed9dbbe766e7c79293c | Analyze and fix the following issue in the Linux kernel code: vmlinux.lds.h: Adjust symbol ordering in text output section | Problem Details:
When the -ffunction-sections compiler option is enabled, each function
is placed in a separate section named .text.function_name rather than
putting all functions in a single .text section.
However, using -function-sections can cause problems with the
linker script. The comments included in include/as... | ```diff
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S
index d317a843f7ea..f1b86eb30340 100644
--- a/arch/sparc/kernel/vmlinux.lds.S
+++ b/arch/sparc/kernel/vmlinux.lds.S
@@ -48,6 +48,11 @@ SECTIONS
{
_text = .;
HEAD_TEXT
+ ALIGN_FUNCTION();
+#ifdef CONFIG_SPARC64
+ ... |
6756af923e06aa33ad8894aaecbf9060953ba00f | Analyze and fix the following issue in the Linux kernel code: udf: Verify inode link counts before performing rename | Problem Details:
During rename, we are updating link counts of various inodes either when
rename deletes target or when moving directory across directories.
Verify involved link counts are sane so that we don't trip warnings in
VFS.
Reported-by: syzbot+3ff7365dc04a6bcafa66@syzkaller.appspotmail.com
Signed-off-by: Jan ... | ```diff
diff --git a/fs/udf/namei.c b/fs/udf/namei.c
index 2be775d30ac1..2cb49b6b0716 100644
--- a/fs/udf/namei.c
+++ b/fs/udf/namei.c
@@ -791,8 +791,18 @@ static int udf_rename(struct mnt_idmap *idmap, struct inode *old_dir,
retval = -ENOTEMPTY;
if (!empty_dir(new_inode))
goto out_oiter;
+ retval = -EFS... |
ac6f420291b3fee1113f21d612fa88b628afab5b | Analyze and fix the following issue in the Linux kernel code: quota: flush quota_release_work upon quota writeback | Problem Details:
One of the paths quota writeback is called from is:
freeze_super()
sync_filesystem()
ext4_sync_fs()
dquot_writeback_dquots()
Since we currently don't always flush the quota_release_work queue in
this path, we can end up with the following race:
1. dquot are added to releasing_dquots lis... | ```diff
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 3dd8d6f27725..f9578918cfb2 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -688,6 +688,8 @@ int dquot_writeback_dquots(struct super_block *sb, int type)
WARN_ON_ONCE(!rwsem_is_locked(&sb->s_umount));
+ flush_delayed_work("a_release_work);
... |
49c5c63d48eb5b110580e4c4b937f0006fcc9b10 | Analyze and fix the following issue in the Linux kernel code: io_uring: fix task_work cap overshooting | Problem Details:
A previous commit fixed task_work overrunning by a lot more than what
the user asked for, by adding a retry list. However, it didn't cap the
overall count, hence for multiple task_work runs inside the same wait
loop, it'd still overshoot the target by potentially a large amount.
Cap it generally insid... | ```diff
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index bfa93888f862..ae199e44da57 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -1277,6 +1277,8 @@ static int __io_run_local_work_loop(struct llist_node **node,
struct io_tw_state *ts,
int events)
{
+ int ret = 0;
+
while... |
ca70b8baf2bd125b2a4d96e76db79375c07d7ff2 | Analyze and fix the following issue in the Linux kernel code: tcp_bpf: Fix the sk_mem_uncharge logic in tcp_bpf_sendmsg | Problem Details:
The current sk memory accounting logic in __SK_REDIRECT is pre-uncharging
tosend bytes, which is either msg->sg.size or a smaller value apply_bytes.
Potential problems with this strategy are as follows:
- If the actual sent bytes are smaller than tosend, we need to charge some
bytes back, as in lin... | ```diff
diff --git a/net/ipv4/tcp_bpf.c b/net/ipv4/tcp_bpf.c
index 370993c03d31..99cef92e6290 100644
--- a/net/ipv4/tcp_bpf.c
+++ b/net/ipv4/tcp_bpf.c
@@ -441,7 +441,6 @@ more_data:
cork = true;
psock->cork = NULL;
}
- sk_msg_return(sk, msg, tosend);
release_sock(sk);
origsize = msg->sg.size;
@@ -45... |
f82e62d470cc990ebd9d691f931dd418e4e9cea9 | Analyze and fix the following issue in the Linux kernel code: irqchip/gicv3-its: Add workaround for hip09 ITS erratum 162100801 | Problem Details:
When enabling GICv4.1 in hip09, VMAPP fails to clear some caches during
the unmap operation, which can causes vSGIs to be lost.
To fix the issue, invalidate the related vPE cache through GICR_INVALLR
after VMOVP.
Suggested-by: Marc Zyngier <maz@kernel.org>
Co-developed-by: Nianyao Tang <tangnianyao@h... | ```diff
diff --git a/Documentation/arch/arm64/silicon-errata.rst b/Documentation/arch/arm64/silicon-errata.rst
index 65bfab1b1861..77db10e944f0 100644
--- a/Documentation/arch/arm64/silicon-errata.rst
+++ b/Documentation/arch/arm64/silicon-errata.rst
@@ -258,6 +258,8 @@ stable kernels.
| Hisilicon | Hip{08,09,10,... |
12aaf67584cf19dc84615b7aba272fe642c35b8b | Analyze and fix the following issue in the Linux kernel code: irqchip/irq-mvebu-sei: Move misplaced select() callback to SEI CP domain | Problem Details:
Commit fbdf14e90ce4 ("irqchip/irq-mvebu-sei: Switch to MSI parent")
introduced in v6.11-rc1 broke Mavell Armada platforms (and possibly others)
by incorrectly switching irq-mvebu-sei to MSI parent.
In the above commit, msi_parent_ops is set for the sei->cp_domain, but
rather than adding a .select meth... | ```diff
diff --git a/drivers/irqchip/irq-mvebu-sei.c b/drivers/irqchip/irq-mvebu-sei.c
index f8c70f2d100a..065166ab5dbc 100644
--- a/drivers/irqchip/irq-mvebu-sei.c
+++ b/drivers/irqchip/irq-mvebu-sei.c
@@ -192,7 +192,6 @@ static void mvebu_sei_domain_free(struct irq_domain *domain, unsigned int virq,
}
static cons... |
2957fa4931a3b658d8e54eda9439d4c57967e8ad | Analyze and fix the following issue in the Linux kernel code: fs/backing_file: fix wrong argument in callback | Problem Details:
Commit 48b50624aec4 ("backing-file: clean up the API") unintentionally
changed the argument in the ->accessed() callback from the user file to
the backing file.
Fixes: 48b50624aec4 ("backing-file: clean up the API")
Reported-by: syzbot+8d1206605b05ca9a0e6a@syzkaller.appspotmail.com
Closes: https://lor... | ```diff
diff --git a/fs/backing-file.c b/fs/backing-file.c
index 526ddb4d6f76..cbdad8b68474 100644
--- a/fs/backing-file.c
+++ b/fs/backing-file.c
@@ -327,6 +327,7 @@ int backing_file_mmap(struct file *file, struct vm_area_struct *vma,
struct backing_file_ctx *ctx)
{
const struct cred *old_cred;
+ struct fi... |
ed9588554943097bdf09588a8a105fbb058869c5 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: SCO: remove the redundant sco_conn_put | Problem Details:
When adding conn, it is necessary to increase and retain the conn reference
count at the same time.
Another problem was fixed along the way, conn_put is missing when hcon is NULL
in the timeout routine.
Fixes: e6720779ae61 ("Bluetooth: SCO: Use kref to track lifetime of sco_conn")
Reported-and-tested... | ```diff
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 1b8e468d24cf..78f7bca24487 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -143,6 +143,7 @@ static void sco_sock_timeout(struct work_struct *work)
sco_conn_lock(conn);
if (!conn->hcon) {
sco_conn_unlock(conn);
+ sco_conn_put(conn... |
a66dfaf18fd61bb75ef8cee83db46b2aadf153d0 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: MGMT: Fix possible deadlocks | Problem Details:
This fixes possible deadlocks like the following caused by
hci_cmd_sync_dequeue causing the destroy function to run:
INFO: task kworker/u19:0:143 blocked for more than 120 seconds.
Tainted: G W O 6.8.0-2024-03-19-intel-next-iLS-24ww14 #1
"echo 0 > /proc/sys/kernel/hung_task_tim... | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index e406eb8e4327..b31192d473d0 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1518,7 +1518,8 @@ static void mgmt_set_discoverable_complete(struct hci_dev *hdev, void *data,
bt_dev_dbg(hdev, "err %d", err);
/* Make sure cmd still ... |
0b882940665ca2849386ee459d4331aa2f8c4e7d | Analyze and fix the following issue in the Linux kernel code: Bluetooth: MGMT: Fix slab-use-after-free Read in set_powered_sync | Problem Details:
This fixes the following crash:
==================================================================
BUG: KASAN: slab-use-after-free in set_powered_sync+0x3a/0xc0 net/bluetooth/mgmt.c:1353
Read of size 8 at addr ffff888029b4dd18 by task kworker/u9:0/54
CPU: 1 UID: 0 PID: 54 Comm: kworker/u9:0 Not taint... | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 1f6d083682b8..e406eb8e4327 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1318,7 +1318,8 @@ static void mgmt_set_powered_complete(struct hci_dev *hdev, void *data, int err)
struct mgmt_mode *cp;
/* Make sure cmd still outstan... |
6fc3a49f23856fdf155ab35f2244295f7870bf83 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Fix S1/S2 combination when FWB==1 and S2 has Device memory type | Problem Details:
The G.a revision of the ARM ARM had it pretty clear that HCR_EL2.FWB
had no influence on "The way that stage 1 memory types and attributes
are combined with stage 2 Device type and attributes." (D5.5.5).
However, this wording was lost in further revisions of the architecture.
Restore the intended beh... | ```diff
diff --git a/arch/arm64/kvm/at.c b/arch/arm64/kvm/at.c
index 8c5d7990e5b3..3d7eb395e33d 100644
--- a/arch/arm64/kvm/at.c
+++ b/arch/arm64/kvm/at.c
@@ -739,8 +739,15 @@ static u64 compute_par_s12(struct kvm_vcpu *vcpu, u64 s1_par,
final_attr = s1_parattr;
break;
default:
- /* MemAttr[2]=0, Device fr... |
0c0a4eae26ac78379d0c1db053de168a8febc6c9 | Analyze and fix the following issue in the Linux kernel code: io_uring: check for overflows in io_pin_pages | Problem Details:
WARNING: CPU: 0 PID: 5834 at io_uring/memmap.c:144 io_pin_pages+0x149/0x180 io_uring/memmap.c:144
CPU: 0 UID: 0 PID: 5834 Comm: syz-executor825 Not tainted 6.12.0-next-20241118-syzkaller #0
Call Trace:
<TASK>
__io_uaddr_map+0xfb/0x2d0 io_uring/memmap.c:183
io_rings_map io_uring/io_uring.c:2611 [inli... | ```diff
diff --git a/io_uring/memmap.c b/io_uring/memmap.c
index 3d71756bc598..ea08f19dc648 100644
--- a/io_uring/memmap.c
+++ b/io_uring/memmap.c
@@ -136,7 +136,12 @@ struct page **io_pin_pages(unsigned long uaddr, unsigned long len, int *npages)
struct page **pages;
int ret;
- end = (uaddr + len + PAGE_SIZE - 1... |
1b0cab327e060ccf397ae634a34c84dd1d4d2bb2 | Analyze and fix the following issue in the Linux kernel code: mq-deadline: don't call req_get_ioprio from the I/O completion handler | Problem Details:
req_get_ioprio looks at req->bio to find the I/O priority, which is not
set when completing bios that the driver fully iterated through.
Stash away the dd_per_prio in the elevator private data instead of looking
it up again to optimize the code a bit while fixing the regression from
removing the per-r... | ```diff
diff --git a/block/mq-deadline.c b/block/mq-deadline.c
index acdc28756d9d..91b3789f710e 100644
--- a/block/mq-deadline.c
+++ b/block/mq-deadline.c
@@ -685,10 +685,9 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
prio = ioprio_class_to_prio[ioprio_class];
per_prio = &dd->p... |
0b83c86b444ab467134b0e618f45ad2216a4973c | Analyze and fix the following issue in the Linux kernel code: block: Prevent potential deadlock in blk_revalidate_disk_zones() | Problem Details:
The function blk_revalidate_disk_zones() calls the function
disk_update_zone_resources() after freezing the device queue. In turn,
disk_update_zone_resources() calls queue_limits_start_update() which
takes a queue limits mutex lock, resulting in the ordering:
q->q_usage_counter check -> q->limits_lock.... | ```diff
diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index 70211751df16..263e28b72053 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -1551,6 +1551,7 @@ static int disk_update_zone_resources(struct gendisk *disk,
unsigned int nr_seq_zones, nr_conv_zones;
unsigned int pool_size;
struct queue_limits... |
db2eee61434808d66233a9d3ea5ec31b8867de23 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda: Show the codec quirk info at probing | Problem Details:
Lots of HD-audio devices need the device-specific quirk, and it's
often helpful to know which quirk is applied. But currently the
driver shows it only as a debug output, hence we'd have to enable the
debug option at each time we want to see it (and the output becomes
too messy due to other debug messa... | ```diff
diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c
index 8e74be038b0f..84393f4f429d 100644
--- a/sound/pci/hda/hda_auto_parser.c
+++ b/sound/pci/hda/hda_auto_parser.c
@@ -933,6 +933,7 @@ void snd_hda_pick_pin_fixup(struct hda_codec *codec,
bool match_all_pins)
{
const stru... |
d798bc6f3c174c61837862cb9778d73cccd92a8e | Analyze and fix the following issue in the Linux kernel code: arm64: Fix usage of new shifted MDCR_EL2 values | Problem Details:
Since the linked fixes commit, these masks are already shifted so remove
the shifts. One issue that this fixes is SPE and TRBE not being
available anymore:
arm_spe_pmu arm,spe-v1: profiling buffer owned by higher exception level
Fixes: 641630313e9c ("arm64: sysreg: Migrate MDCR_EL2 definition to tab... | ```diff
diff --git a/arch/arm64/include/asm/el2_setup.h b/arch/arm64/include/asm/el2_setup.h
index 4cd41464be3f..f134907d3c08 100644
--- a/arch/arm64/include/asm/el2_setup.h
+++ b/arch/arm64/include/asm/el2_setup.h
@@ -79,7 +79,7 @@
1 << PMSCR_EL2_PA_SHIFT)
msr_s SYS_PMSCR_EL2, x0 // addresses and physical ... |
3661c05c54e8db7064aa96a0774654740974dffc | Analyze and fix the following issue in the Linux kernel code: bnxt_en: Unregister PTP during PCI shutdown and suspend | Problem Details:
If we go through the PCI shutdown or suspend path, we shutdown the
NIC but PTP remains registered. If the kernel continues to run for
a little bit, the periodic PTP .do_aux_work() function may be called
and it will read the PHC from the BAR register. Since the device
has already been disabled, it wil... | ```diff
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 9c4b8ea22bf9..57e69c0552ab 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -16245,6 +16245,7 @@ static void bnxt_shutdown(struct pci_dev *pdev)
if ... |
3051a77a09dfe3022aa012071346937fdf059033 | Analyze and fix the following issue in the Linux kernel code: bnxt_en: Fix receive ring space parameters when XDP is active | Problem Details:
The MTU setting at the time an XDP multi-buffer is attached
determines whether the aggregation ring will be used and the
rx_skb_func handler. This is done in bnxt_set_rx_skb_mode().
If the MTU is later changed, the aggregation ring setting may need
to be changed and it may become out-of-sync with the... | ```diff
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 3bee485b50f0..b7541156fe46 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -4661,7 +4661,7 @@ int bnxt_set_rx_skb_mode(struct bnxt *bp, bool page_mod... |
5ac066b7b062ee753a14557ea11bdc62364c8090 | Analyze and fix the following issue in the Linux kernel code: bnxt_en: Fix queue start to update vnic RSS table | Problem Details:
HWRM_RING_FREE followed by a HWRM_RING_ALLOC is not guaranteed to
have the same FW ring ID as before. So we must reinitialize the
RSS table with the correct ring IDs. Otherwise, traffic may not
resume properly if the restarted ring ID is stale. Since this
feature is only supported on P5_PLUS chips, ... | ```diff
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 3eeaceb3ff38..3bee485b50f0 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -15477,6 +15477,13 @@ static int bnxt_queue_start(struct net_device *dev, ... |
5007991670941c132fb3bc0484c009cf4bcea30f | Analyze and fix the following issue in the Linux kernel code: bnxt_en: Set backplane link modes correctly for ethtool | Problem Details:
Use the return value from bnxt_get_media() to determine the port and
link modes. bnxt_get_media() returns the proper BNXT_MEDIA_KR when
the PHY is backplane. This will correct the ethtool settings for
backplane devices.
Fixes: 5d4e1bf60664 ("bnxt_en: extend media types to supported and autoneg modes... | ```diff
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
index 2f4987ec7464..f1f6bb328a55 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
@@ -2837,19 +2837,24 @@ static int bnxt_get_l... |
5311598f7f3293683cdc761df71ae3469327332c | Analyze and fix the following issue in the Linux kernel code: bnxt_en: Reserve rings after PCIe AER recovery if NIC interface is down | Problem Details:
After successful PCIe AER recovery, FW will reset all resource
reservations. If it is IF_UP, the driver will call bnxt_open() and
all resources will be reserved again. It it is IF_DOWN, we should
call bnxt_reserve_rings() so that we can reserve resources including
RoCE resources to allow RoCE to resu... | ```diff
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 5f7bdafcf05d..3eeaceb3ff38 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -16478,8 +16478,12 @@ static void bnxt_io_resume(struct pci_dev *pdev)
r... |
ff6cdc407f4179748f4673c39b0921503199a0ad | Analyze and fix the following issue in the Linux kernel code: x86/CPU/AMD: Terminate the erratum_1386_microcode array | Problem Details:
The erratum_1386_microcode array requires an empty entry at the end.
Otherwise x86_match_cpu_with_stepping() will continue iterate the array after
it ended.
Add an empty entry to erratum_1386_microcode to its end.
Fixes: 29ba89f189528 ("x86/CPU/AMD: Improve the erratum 1386 workaround")
Signed-off-by... | ```diff
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 823f44f7bc94..d8408aafeed9 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -798,6 +798,7 @@ static void init_amd_bd(struct cpuinfo_x86 *c)
static const struct x86_cpu_desc erratum_1386_microcode[] = {
AMD_CPU_D... |
86e8f94789dd6f3e705bfa821e1e416f97a2f863 | Analyze and fix the following issue in the Linux kernel code: drm/sti: Add __iomem for mixer_dbg_mxn's parameter | Problem Details:
Sparse complains about incorrect type in argument 1.
expected void const volatile __iomem *ptr but got void *.
so modify mixer_dbg_mxn's addr parameter.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202411191809.6V3c826r-lkp@intel.com/
Fixes: a5f81078a56... | ```diff
diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c
index 7e5f14646625..06c1b81912f7 100644
--- a/drivers/gpu/drm/sti/sti_mixer.c
+++ b/drivers/gpu/drm/sti/sti_mixer.c
@@ -137,7 +137,7 @@ static void mixer_dbg_crb(struct seq_file *s, int val)
}
}
-static void mixer_dbg_mxn(struct... |
bd2fccac61b40eaf08d9546acc9fef958bfe4763 | Analyze and fix the following issue in the Linux kernel code: drm/dp_mst: Fix MST sideband message body length check | Problem Details:
Fix the MST sideband message body length check, which must be at least 1
byte accounting for the message body CRC (aka message data CRC) at the
end of the message.
This fixes a case where an MST branch device returns a header with a
correct header CRC (indicating a correctly received body length), wit... | ```diff
diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
index ac90118b9e7a..e6ee180815b2 100644
--- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
@@ -320,6 +320,9 @@ static bool drm_dp_decode_sideband_msg_hd... |
ac1f43c03fc91eee53cc95683245350d4d87781e | Analyze and fix the following issue in the Linux kernel code: thermal: gov_power_allocator: Add missing NULL pointer check | Problem Details:
Commit 0dc23567c206 ("thermal: core: Move lists of thermal instances
to trip descriptors") overlooked the case in which the Power Allocator
governor attempts to bind to a tripless thermal zone and params->trip_max
is NULL in check_power_actors().
No power actors can be found in that case, so check_pow... | ```diff
diff --git a/drivers/thermal/gov_power_allocator.c b/drivers/thermal/gov_power_allocator.c
index ac6fa6b8f99f..3b644de3292e 100644
--- a/drivers/thermal/gov_power_allocator.c
+++ b/drivers/thermal/gov_power_allocator.c
@@ -588,10 +588,15 @@ static void allow_maximum_power(struct thermal_zone_device *tz)
static... |
9cfb5e7f0ded2bfaabc270ceb5f91d13f0e805b9 | Analyze and fix the following issue in the Linux kernel code: net: hsr: fix hsr_init_sk() vs network/transport headers. | Problem Details:
Following sequence in hsr_init_sk() is invalid :
skb_reset_mac_header(skb);
skb_reset_mac_len(skb);
skb_reset_network_header(skb);
skb_reset_transport_header(skb);
It is invalid because skb_reset_mac_len() needs the correct
network header, which should be after the mac header.
This p... | ```diff
diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index 9e64496a5c1c..31a416ee21ad 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -268,6 +268,8 @@ static struct sk_buff *hsr_init_skb(struct hsr_port *master)
skb->dev = master->dev;
skb->priority = TC_PRIO_CONTROL;
+ skb_reset_netwo... |
d24cfee7f63d6b44d45a67c5662bd1cc48e8b3ca | Analyze and fix the following issue in the Linux kernel code: spi: Fix acpi deferred irq probe | Problem Details:
When probing spi device take care of deferred probe of ACPI irq gpio
similar like for OF/DT case.
>From practical standpoint this fixes issue with vsc-tp driver on
Dell XP 9340 laptop, which try to request interrupt with spi->irq
equal to -EPROBE_DEFER and fail to probe with the following error:
vsc-... | ```diff
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 460a49d9a0de..ff1add2ecb91 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -424,6 +424,16 @@ static int spi_probe(struct device *dev)
spi->irq = 0;
}
+ if (has_acpi_companion(dev) && spi->irq < 0) {
+ struct acpi_device *adev = to_acpi_... |
2ac40e6d0ccdd93031f8b1af61b0fe5cdd704923 | Analyze and fix the following issue in the Linux kernel code: spi: atmel-quadspi: Fix register name in verbose logging function | Problem Details:
`atmel_qspi_reg_name()` is used for pretty-printing register offsets
for verbose logging of register accesses. However, due to a typo
(likely a copy-paste error), QSPI_RD's offset prints as "MR", the
name of the previous register. Fix this typo.
Fixes: c528ecfbef04 ("spi: atmel-quadspi: Add verbose de... | ```diff
diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index 91108ddfaef2..316bce577081 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -183,7 +183,7 @@ static const char *atmel_qspi_reg_name(u32 offset, char *tmp, size_t sz)
case QSPI_MR:
return "MR";
case Q... |
762ca6eed026346d9d41ed5ac633083c4f1e5071 | Analyze and fix the following issue in the Linux kernel code: octeontx2-af: Quiesce traffic before NIX block reset | Problem Details:
During initialization, the AF driver resets all blocks. The RPM (MAC)
block and NIX block operate on a credit-based model. When the NIX block
resets during active traffic flow, it doesn't release credits to the RPM
block. This causes the RPM FIFO to overflow, leading to receive traffic
struck.
To addr... | ```diff
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
index 2f621714c54e..8216f843a7cd 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
@@ -214,6 +214,24 @@ u8 cgx_lmac_get_p2x(int cgx_id, ... |
6fc2164108462b913a1290fa2c44054c70b060ef | Analyze and fix the following issue in the Linux kernel code: octeontx2-af: RPM: fix stale FCFEC counters | Problem Details:
The corrected words register(FCFECX_VL0_CCW_LO)/Uncorrected words
register (FCFECX_VL0_NCCW_LO) of FCFEC counter has different LMAC
offset which needs to be accessed differently.
Fixes: 84ad3642115d ("octeontx2-af: Add FEC stats for RPM/RPM_USX block")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.c... | ```diff
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rpm.c b/drivers/net/ethernet/marvell/octeontx2/af/rpm.c
index 70629f94c27e..e97fcc51d7f2 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rpm.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rpm.c
@@ -704,27 +704,27 @@ int rpm_get_fec_stats(void *rpm... |
07cd1eb166a3fa7244afa74d48bd13c9df7c559d | Analyze and fix the following issue in the Linux kernel code: octeontx2-af: RPM: fix stale RSFEC counters | Problem Details:
The earlier patch sets the 'Stats control register' for RPM
receive/transmit statistics instead of RSFEC statistics,
causing the driver to return stale FEC counters.
Fixes: 84ad3642115d ("octeontx2-af: Add FEC stats for RPM/RPM_USX block")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-of... | ```diff
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rpm.c b/drivers/net/ethernet/marvell/octeontx2/af/rpm.c
index 22dd50a3fcd3..70629f94c27e 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rpm.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rpm.c
@@ -699,6 +699,10 @@ int rpm_get_fec_stats(void *rpmd... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.