id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
06080ea23095afe04a2cb7a8d05fab4311782623 | Analyze and fix the following issue in the Linux kernel code: selftests: net: bridge: increase IGMP/MLD exclude timeout membership interval | Problem Details:
When running the bridge IGMP/MLD selftests on debug kernels we can get
spurious errors when setting up the IGMP/MLD exclude timeout tests
because the membership interval is just 3 seconds and the setup has 2
seconds of sleep plus various validations, the one second that is left
is not enough. Increase ... | ```diff
diff --git a/tools/testing/selftests/net/forwarding/bridge_igmp.sh b/tools/testing/selftests/net/forwarding/bridge_igmp.sh
index 2aa66d2a1702..e6a3e04fd83f 100755
--- a/tools/testing/selftests/net/forwarding/bridge_igmp.sh
+++ b/tools/testing/selftests/net/forwarding/bridge_igmp.sh
@@ -478,10 +478,10 @@ v3exc_t... |
8bd67ebb50c0145fd2ca8681ab65eb7e8cde1afc | Analyze and fix the following issue in the Linux kernel code: net: bridge: xmit: make sure we have at least eth header len bytes | Problem Details:
syzbot triggered an uninit value[1] error in bridge device's xmit path
by sending a short (less than ETH_HLEN bytes) skb. To fix it check if
we can actually pull that amount instead of assuming.
Tested with dropwatch:
drop at: br_dev_xmit+0xb93/0x12d0 [bridge] (0xffffffffc06739b3)
origin: software
... | ```diff
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index c366ccc8b3db..ecac7886988b 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -27,6 +27,7 @@ EXPORT_SYMBOL_GPL(nf_br_ops);
/* net device transmit always called with BH disabled */
netdev_tx_t br_dev_xmit(struct sk_buff *skb, s... |
e5bc44e47c531860be96ac615314b1ab23d5aa2b | Analyze and fix the following issue in the Linux kernel code: arch/topology: Fix variable naming to avoid shadowing | Problem Details:
Using 'hw_pressure' for local variable name is confusing in regard to the
per-CPU 'hw_pressure' variable that uses the same name:
include/linux/arch_topology.h:DECLARE_PER_CPU(unsigned long, hw_pressure);
... which puts it into a global scope for all code that includes
<linux/topology.h>, shadowing... | ```diff
diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index 0248912ff687..c66d070207a0 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -179,7 +179,7 @@ DEFINE_PER_CPU(unsigned long, hw_pressure);
void topology_update_hw_pressure(const struct cpumask *cpus,
... |
d210d8c0df2f05a081758f3b0b9dc2f4f247b661 | Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: Modify intel_dp_get_su_granularity to support panel replay | Problem Details:
Currently intel_dp_get_su_granularity doesn't support panel replay.
This fix modifies it to support panel replay as well.
v4:
- use drm_dp_dpcd_readb instead of drm_dp_dpcd_read
- ensure return value is 0 if drm_dp_dpcd_readb fails
v3: use correct offset for DP_PANEL_PANEL_REPLAY_CAPABILITY
v2: re... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 0a5ce29f09d1..6d1f442f3d14 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -468,6 +468,40 @@ static u8 intel_dp_get_sink_sync_latency(struct intel_dp *in... |
d07a578703dbf839ea39bffc425fba2321f45543 | Analyze and fix the following issue in the Linux kernel code: drm/i915/display: Do not print "psr: enabled" for on Panel Replay | Problem Details:
After setting has_psr for panel replay as well crtc state dump is
improperly printing "psr: enabled" for Panel Replay as well. Fix this by
checking also has_panel_replay.
Fixes: 5afa6e496098 ("drm/i915/psr: Set intel_crtc_state->has_psr on panel replay as well")
Signed-off-by: Jouni Högander <jouni.ho... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c b/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c
index 1da4c122c52e..bddcc9edeab4 100644
--- a/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c
+++ b/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c
@@ -252,7 +252,8 @@ void intel_cr... |
b9c6820f029abaabbc37646093866aa730ca0928 | Analyze and fix the following issue in the Linux kernel code: ring-buffer: Add cast to unsigned long addr passed to virt_to_page() | Problem Details:
The sub-buffer pages are held in an unsigned long array, and when it is
passed to virt_to_page() a cast is needed.
Link: https://lore.kernel.org/all/20240515124808.06279d04@canb.auug.org.au/
Link: https://lore.kernel.org/linux-trace-kernel/20240515010558.4abaefdd@rorschach.local.home
Cc: Masami Hiram... | ```diff
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index a02c7a52a0f5..7345a8b625fb 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -6283,7 +6283,7 @@ static int __rb_map_vma(struct ring_buffer_per_cpu *cpu_buffer,
}
while (p < nr_pages) {
- struct page *page... |
0d8968287a1cf7b03d07387dc871de3861b9f6b9 | Analyze and fix the following issue in the Linux kernel code: f2fs: Add inline to f2fs_build_fault_attr() stub | Problem Details:
When building without CONFIG_F2FS_FAULT_INJECTION, there is a warning
from each file that includes f2fs.h because the stub for
f2fs_build_fault_attr() is missing inline:
In file included from fs/f2fs/segment.c:21:
fs/f2fs/f2fs.h:4605:12: warning: 'f2fs_build_fault_attr' defined but not used [-Wunu... | ```diff
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index ef7de97be647..1974b6aff397 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -4602,8 +4602,8 @@ static inline bool f2fs_need_verity(const struct inode *inode, pgoff_t idx)
extern int f2fs_build_fault_attr(struct f2fs_sb_info *sbi, unsigned long rate,
... |
1564d411e17f51e2f64655b4e4da015be1ba7eaa | Analyze and fix the following issue in the Linux kernel code: drm/xe/xe_guc_submit: Fix exec queue stop race condition | Problem Details:
Reorder the xe_sched_tdr_queue_imm and set_exec_queue_banned calls in
guc_exec_queue_stop. This prevents a possible race condition between
the two events in which it's possible for xe_sched_tdr_queue_imm to
wake the ufence waiter before the exec queue is banned, causing the
ufence waiter to miss the b... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index fde527d34f58..3a8e501f2bc2 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -1491,8 +1491,8 @@ static void guc_exec_queue_stop(struct xe_guc *guc, struct xe_exec_queue *q)
... |
edfc6481faf896301cab940da776229fe39e9fc9 | Analyze and fix the following issue in the Linux kernel code: smb3: fix perf regression with cached writes with netfs conversion | Problem Details:
Write through mode is for cache=none, not for default (when
caching is allowed if we have a lease). Some tests were running
much, much more slowly as a result of disabling caching of
writes by default.
Reviewed-by: David Howells <dhowells@redhat.com>
Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de>
Fi... | ```diff
diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c
index e8bfeea23660..5d4b0fd3a59e 100644
--- a/fs/smb/client/inode.c
+++ b/fs/smb/client/inode.c
@@ -34,11 +34,8 @@
static void cifs_set_netfs_context(struct inode *inode)
{
struct cifsInodeInfo *cifs_i = CIFS_I(inode);
- struct cifs_sb_info *cifs_sb... |
3df01f5c72b0b4ecdca2b3da88a4b6fac809986b | Analyze and fix the following issue in the Linux kernel code: drm/xe/uc: Reorder post hwconfig uC initialization step | Problem Details:
We want to move the GuC submission initialization to the post
hwconfig step, but now this step is done too late as migration
initialization uses exec_queue that would crash due to a unset
exec_queue_ops. We can easily fix that by small function reorder.
Signed-off-by: Michal Wajdeczko <michal.wajdeczk... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index 11870ad2caf6..e69a03ddd255 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -430,6 +430,10 @@ static int all_fw_domain_init(struct xe_gt *gt)
if (err)
goto err_force_wake;
+ err = xe_uc_init_post_hwconfi... |
04f4a70a183a688a60fe3882d6e4236ea02cfc67 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Only use reserved BCS instances for usm migrate exec queue | Problem Details:
The GuC context scheduling queue is 2 entires deep, thus it is possible
for a migration job to be stuck behind a fault if migration exec queue
shares engines with user jobs. This can deadlock as the migrate exec
queue is required to service page faults. Avoid deadlock by only using
reserved BCS instanc... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index 2b12f3621f9e..bacb23de411b 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
+++ b/drivers/gpu/drm/xe/xe_migrate.c
@@ -34,7 +34,6 @@
#include "xe_sync.h"
#include "xe_trace.h"
#include "xe_vm.h"
-#include "xe_wa.h"
/**
* str... |
24bf80f78e5ad45bc3e0886cef86def712bdf3ed | Analyze and fix the following issue in the Linux kernel code: s390/ipl: Introduce sysfs attribute 'scp_data' for dump ipl | Problem Details:
This is analogous to the reipl's sysfs attribute named equally and enables
tools such as s390-tools' dumpconf to pass additional kernel cmdline
parameters to a stand-alone dumper such as zfcpdump (e.g. to enable
debug output with 'dump_debug' parameter) or ngdump.
Acked-by: Heiko Carstens <hca@linux.i... | ```diff
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 0de11583ec9d..ff6bd177f69f 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -1572,6 +1572,11 @@ DEFINE_IPL_ATTR_RW(dump_fcp, br_lba, "%lld\n", "%lld\n",
DEFINE_IPL_ATTR_RW(dump_fcp, device, "0.0.%04llx\n", "0.0.%llx\n",
... |
7faacaeaf6ce12fae78751de5ad869d8f1e1cd7a | Analyze and fix the following issue in the Linux kernel code: s390/ipl: Fix incorrect initialization of nvme dump block | Problem Details:
Initialize the correct fields of the nvme dump block.
This bug had not been detected before because first, the fcp and nvme fields
of struct ipl_parameter_block are part of the same union and, therefore,
overlap in memory and second, they are identical in structure and size.
Fixes: d70e38cb1dee ("s390... | ```diff
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 73d09cd4c6b0..2f004dfd6131 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -1862,9 +1862,9 @@ static int __init dump_nvme_init(void)
}
dump_block_nvme->hdr.len = IPL_BP_NVME_LEN;
dump_block_nvme->hdr.version = IPL_PARM_... |
9c922b73acaf39f867668d9cbe5dc69c23511f84 | Analyze and fix the following issue in the Linux kernel code: s390/ipl: Fix incorrect initialization of len fields in nvme reipl block | Problem Details:
Use correct symbolic constants IPL_BP_NVME_LEN and IPL_BP0_NVME_LEN
to initialize nvme reipl block when 'scp_data' sysfs attribute is
being updated. This bug had not been detected before because
the corresponding fcp and nvme symbolic constants are equal.
Fixes: 23a457b8d57d ("s390: nvme reipl")
Revie... | ```diff
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index f78c40e2b631..73d09cd4c6b0 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -966,8 +966,8 @@ static ssize_t reipl_nvme_scpdata_write(struct file *filp, struct kobject *kobj,
scpdata_len += padding;
}
- reipl_block_nvme-... |
72935e3adafdd26fbabf12f3d88165a09516168a | Analyze and fix the following issue in the Linux kernel code: s390/ipl: Fix size of vmcmd buffers for sending z/VM CP diag X'008' cmds | Problem Details:
z/VM CP diagnose X'008' accepts commands of max 240 characters.
Using a smaller value as a buffer size makes kernel send truncated CP
commands which are longer than the old buffer size. This can result in
invalid CP commands passed to z/VM.
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by... | ```diff
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 7dc54571f18e..eb3fd130ee81 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -1958,11 +1958,13 @@ static struct shutdown_action __refdata dump_reipl_action = {
* vmcmd shutdown action: Trigger vm command on shutdown.
*/
-... |
3bbde49ec560f95b2b09b9cedd0c41ae95ecb92c | Analyze and fix the following issue in the Linux kernel code: s390/smsgiucv_app: Make use of iucv_alloc_device() | Problem Details:
Make use of iucv_alloc_device() to get rid of quite some code. In addition
this also removes a cast to an incompatible function (clang W=1):
drivers/s390/net/smsgiucv_app.c:176:26: error: cast from 'void (*)(const void *)' to 'void (*)(struct device *)' converts to incompatible function type [-Werro... | ```diff
diff --git a/drivers/s390/net/smsgiucv_app.c b/drivers/s390/net/smsgiucv_app.c
index 0a263999f7ae..cc44cbb0028b 100644
--- a/drivers/s390/net/smsgiucv_app.c
+++ b/drivers/s390/net/smsgiucv_app.c
@@ -156,25 +156,14 @@ static int __init smsgiucv_app_init(void)
if (!MACHINE_IS_VM)
return -ENODEV;
- smsg_app... |
968bfb566dd193f912ccab47aaa50f3112f6f82d | Analyze and fix the following issue in the Linux kernel code: s390/netiucv: Make use of iucv_alloc_device() | Problem Details:
Make use of iucv_alloc_device() to get rid of quite some code. In addition
this also removes a cast to an incompatible function (clang W=1):
drivers/s390/net/netiucv.c:1716:18: error: cast from 'void (*)(const void *)' to 'void (*)(struct device *)' converts to incompatible function type [-Werror,-W... | ```diff
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
index 8852b03f943b..039e18d46f76 100644
--- a/drivers/s390/net/netiucv.c
+++ b/drivers/s390/net/netiucv.c
@@ -1696,26 +1696,14 @@ static const struct attribute_group *netiucv_attr_groups[] = {
static int netiucv_register_device(struct net_dev... |
4ee55c956325f5b28a23c5916bfd8372042702b3 | Analyze and fix the following issue in the Linux kernel code: s390/vmlogrdr: Make use of iucv_alloc_device() | Problem Details:
Make use of iucv_alloc_device() to get rid of quite some code. In addition
this also removes a cast to an incompatible function (clang W=1):
drivers/s390/char/vmlogrdr.c:746:18: error: cast from 'void (*)(const void *)' to 'void (*)(struct device *)' converts to incompatible function type [-Werror,-... | ```diff
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c
index d7e408c8d0b8..c09e1e09fb66 100644
--- a/drivers/s390/char/vmlogrdr.c
+++ b/drivers/s390/char/vmlogrdr.c
@@ -728,23 +728,9 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv)
struct device *dev;
int ret;
- dev =... |
dc9dfd8ae4b5ac28e457a830556b53b15f4b9a1c | Analyze and fix the following issue in the Linux kernel code: selftests: netfilter: fix packetdrill conntrack testcase | Problem Details:
Some versions of conntrack(8) default to ipv4-only, so this needs to request
ipv6 explicitly, like all other spots already do.
Fixes: a8a388c2aae4 ("selftests: netfilter: add packetdrill based conntrack tests")
Reported-by: Jakub Kicinski <kuba@kernel.org>
Closes: https://lore.kernel.org/netdev/202405... | ```diff
diff --git a/tools/testing/selftests/net/netfilter/packetdrill/conntrack_synack_reuse.pkt b/tools/testing/selftests/net/netfilter/packetdrill/conntrack_synack_reuse.pkt
index 21e1bb6395e4..842242f8ccf7 100644
--- a/tools/testing/selftests/net/netfilter/packetdrill/conntrack_synack_reuse.pkt
+++ b/tools/testing/... |
386f0cffae4654f6db1c0d8ad8273511f925f719 | Analyze and fix the following issue in the Linux kernel code: net: gro: fix napi_gro_cb zeroed alignment | Problem Details:
Add 2 byte padding to napi_gro_cb struct to ensure zeroed member is
aligned after flush_id member was removed in the original commit.
Fixes: 4b0ebbca3e16 ("net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment")
Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off... | ```diff
diff --git a/include/net/gro.h b/include/net/gro.h
index f13634b1f4c1..b9b58c1f8d19 100644
--- a/include/net/gro.h
+++ b/include/net/gro.h
@@ -42,8 +42,7 @@ struct napi_gro_cb {
/* Used in ipv6_gro_receive() and foo-over-udp and esp-in-udp */
u16 proto;
- /* used to support CHECKSUM_COMPLETE for tunneling... |
4c0be90e6874b8af30541c37689780fc7c8276c9 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix the warning conditions | Problem Details:
The maximum timeout display uses in xe_pcode_request is 3 msec, add the
warning in cases the function is misused with higher timeouts.
Add a warning if pcode_try_request is not passed the timeout parameter
greater than 0.
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@i... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_pcode.c b/drivers/gpu/drm/xe/xe_pcode.c
index a5e7da8cf944..9c4eefdf6642 100644
--- a/drivers/gpu/drm/xe/xe_pcode.c
+++ b/drivers/gpu/drm/xe/xe_pcode.c
@@ -10,6 +10,7 @@
#include <drm/drm_managed.h>
+#include "xe_assert.h"
#include "xe_device.h"
#include "xe_gt.h"
#inc... |
c81858eb52266b3d6ba28ca4f62a198231a10cdc | Analyze and fix the following issue in the Linux kernel code: drm/xe: Change pcode timeout to 50msec while polling again | Problem Details:
Polling is initially attempted with timeout_base_ms enabled for
preemption, and if it exceeds this timeframe, another attempt is made
without preemption, allowing an additional 50 ms before timing out.
v2
- Rebase
v3
- Move warnings to separate patch (Lucas)
Cc: Lucas De Marchi <lucas.demarchi@intel... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_pcode.c b/drivers/gpu/drm/xe/xe_pcode.c
index c010ef16fbf5..a5e7da8cf944 100644
--- a/drivers/gpu/drm/xe/xe_pcode.c
+++ b/drivers/gpu/drm/xe/xe_pcode.c
@@ -191,7 +191,7 @@ int xe_pcode_request(struct xe_gt *gt, u32 mbox, u32 request,
drm_WARN_ON_ONCE(>_to_xe(gt)->drm, time... |
d4e9a968738bf66d3bb852dd5588d4c7afd6d7f4 | Analyze and fix the following issue in the Linux kernel code: eventfs: Fix a possible null pointer dereference in eventfs_find_events() | Problem Details:
In function eventfs_find_events,there is a potential null pointer
that may be caused by calling update_events_attr which will perform
some operations on the members of the ei struct when ei is NULL.
Hence,When ei->is_freed is set,return NULL directly.
Link: https://lore.kernel.org/linux-trace-kernel/... | ```diff
diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c
index a878cea70f4c..0256afdd4acf 100644
--- a/fs/tracefs/event_inode.c
+++ b/fs/tracefs/event_inode.c
@@ -345,10 +345,9 @@ static struct eventfs_inode *eventfs_find_events(struct dentry *dentry)
* If the ei is being freed, the ownership of the... |
e60b613df8b6253def41215402f72986fee3fc8d | Analyze and fix the following issue in the Linux kernel code: ftrace: Fix possible use-after-free issue in ftrace_location() | Problem Details:
KASAN reports a bug:
BUG: KASAN: use-after-free in ftrace_location+0x90/0x120
Read of size 8 at addr ffff888141d40010 by task insmod/424
CPU: 8 PID: 424 Comm: insmod Tainted: G W 6.9.0-rc2+
[...]
Call Trace:
<TASK>
dump_stack_lvl+0x68/0xa0
print_report+0xcf/0x610
... | ```diff
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 5a01d72f66db..2308c0a2fd29 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1595,12 +1595,15 @@ static struct dyn_ftrace *lookup_rec(unsigned long start, unsigned long end)
unsigned long ftrace_location_range(unsigned long start... |
6a486c1361ea588938898ae812b32dcfbd4022f2 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel_pcie: Refactor and code cleanup | Problem Details:
Minor refactor and s/TX_WAIT_TIMEOUT_MS/BTINTEL_PCIE_TX_WAIT_TIMEOUT_MS/g.
Fixes: 6e65a09f9275 ("Bluetooth: btintel_pcie: Add *setup* function to download firmware")
Signed-off-by: Kiran K <kiran.k@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | ```diff
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 030a75e5d2a3..5b6805d87fcf 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -151,7 +151,7 @@ static int btintel_pcie_send_sync(struct btintel_pcie_data *data,
/* Wait for the complet... |
e5a43efba2560d617b06e59dc10d2f9de7d08e5f | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel_pcie: Fix warning reported by sparse | Problem Details:
Fix sparse error.
Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202405100654.0djvoryZ-lkp@intel.com/
Signed-off-by: Kiran K <kiran.k@intel.com>
Signed-off-by: Luiz Augusto von... | ```diff
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 2853ab80079d..030a75e5d2a3 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -670,7 +670,7 @@ struct btintel_pcie_causes_list {
u8 cause_num;
};
-struct btintel_pcie_causes_list caus... |
e77f43d531af41e9ce299eab10dcae8fa5dbc293 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_core: Fix not handling hdev->le_num_of_adv_sets=1 | Problem Details:
If hdev->le_num_of_adv_sets is set to 1 it means that only handle 0x00
can be used, but since the MGMT interface instances start from 1
(instance 0 means all instances in case of MGMT_OP_REMOVE_ADVERTISING)
the code needs to map the instance to handle otherwise users will not be
able to advertise as in... | ```diff
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 431d0c8a0e27..9231396fe96f 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -246,6 +246,7 @@ struct adv_info {
bool periodic;
__u8 mesh;
__u8 instance;
+ __u8 handle;
__u32 flags... |
36b1c9c35452d043ce2239a65393b3e7ee7101c5 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel: Fix compiler warning for multi_v7_defconfig config | Problem Details:
Fix the following compiler warning reported for ARCH=arm
multi_v7_defconfig.
In file included from drivers/bluetooth/hci_ldisc.c:34:
drivers/bluetooth/btintel.h:373:13: warning: 'btintel_hw_error' defined
but not used [-Wunused-function]
373 | static void btintel_hw_error(struct hci_dev *hdev, u8 co... | ```diff
diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h
index 5d4685b5c1fa..b5fea735e260 100644
--- a/drivers/bluetooth/btintel.h
+++ b/drivers/bluetooth/btintel.h
@@ -370,7 +370,7 @@ static inline int btintel_shutdown_combined(struct hci_dev *hdev)
return -ENODEV;
}
-static void btintel_hw_... |
a18d28f53ab42c0b5a802d7dc193ffb75e8e32ff | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel_pcie: Fix compiler warnings | Problem Details:
Fix compiler warnings reported by kernel bot.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202405080647.VRBej6fA-lkp@intel.com/
Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport")
Signed-off-by: Kiran K <kiran.k@intel.com>
Sig... | ```diff
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index e9bc4b673424..2853ab80079d 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -251,7 +251,6 @@ static void btintel_pcie_reset_bt(struct btintel_pcie_data *data)
static int btintel_pcie_en... |
6e65a09f927566f257322358d429b267548473eb | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel_pcie: Add *setup* function to download firmware | Problem Details:
Add support to download firmware.
dmesg:
[4.407464] Bluetooth: Core ver 2.22
[4.407467] Bluetooth: Starting self testing
[4.409093] Bluetooth: ECDH test passed in 1587 usecs
[4.420737] Bluetooth: SMP test passed in 526 usecs
[4.420745] Bluetooth: Finished self testing
[4.420760] Bluetooth: HCI device ... | ```diff
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 911bb50d7ce7..e9bc4b673424 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -42,6 +42,7 @@ MODULE_DEVICE_TABLE(pci, btintel_pcie_table);
/* Intel PCIe uses 4 bytes of HCI type instead... |
a5b862c6a221459d54e494e88965b48dcfa6cc44 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: L2CAP: Fix div-by-zero in l2cap_le_flowctl_init() | Problem Details:
l2cap_le_flowctl_init() can cause both div-by-zero and an integer
overflow since hdev->le_mtu may not fall in the valid range.
Move MTU from hci_dev to hci_conn to validate MTU and stop the connection
process earlier if MTU is invalid.
Also, add a missing validation in read_buffer_size() and make it r... | ```diff
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 21ebd70f3dcc..de530262d824 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -1665,6 +1665,15 @@ struct hci_cp_le_set_event_mask {
__u8 mask[8];
} __packed;
+/* BLUETOOTH CORE SPECIFICATION Version ... |
a189f0ee6685457528db7a36ded3085e5d13ddc3 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: qca: Fix error code in qca_read_fw_build_info() | Problem Details:
Return -ENOMEM on allocation failure. Don't return success.
Fixes: cda0d6a198e2 ("Bluetooth: qca: fix info leak when fetching fw build id")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz... | ```diff
diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
index 6aefc922a08a..dfbbac92242a 100644
--- a/drivers/bluetooth/btqca.c
+++ b/drivers/bluetooth/btqca.c
@@ -136,8 +136,10 @@ static int qca_read_fw_build_info(struct hci_dev *hdev)
}
build_label = kstrndup(&edl->data[1], build_lbl_len, GFP... |
ea9e148c803b24ebbc7a74171f22f42c8fd8d644 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_conn: Use __counted_by() and avoid -Wfamnae warning | Problem Details:
Prepare for the coming implementation by GCC and Clang of the
__counted_by attribute. Flexible array members annotated with
__counted_by can have their accesses bounds-checked at run-time
via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE
(for strcpy/memcpy-family functions).
Also,... | ```diff
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 38eb7ec86a1a..21ebd70f3dcc 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -2143,7 +2143,7 @@ struct hci_cp_le_set_cig_params {
__le16 c_latency;
__le16 p_latency;
__u8 num_cis;
- struct hci_cis... |
5c9f6a7853926ab1eca68208ea5bcd0684fc91ad | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel: Add support for Filmore Peak2 (BE201) | Problem Details:
Add VID/PID for Intel Filmore Peak2 (BE201)
Device from /sys/kernel/debug/usb/devices:
T: Bus=09 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=8087 ProdID=0037 Rev= 0.00
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= ... | ```diff
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 482d6d76f900..90d1f1697357 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -477,6 +477,7 @@ static const struct usb_device_id quirks_table[] = {
{ USB_DEVICE(0x8087, 0x0033), .driver_info = BTUSB_INTEL_COMBINED ... |
ce60b9231b66710b6ee24042ded26efee120ecfc | Analyze and fix the following issue in the Linux kernel code: Bluetooth: compute LE flow credits based on recvbuf space | Problem Details:
Previously LE flow credits were returned to the
sender even if the socket's receive buffer was
full. This meant that no back-pressure
was applied to the sender, thus it continued to
send data, resulting in data loss without any
error being reported. Furthermore, the amount
of credits was essentially fi... | ```diff
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 7d4a3e766e7b..5cfdc813491a 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -554,6 +554,9 @@ struct l2cap_chan {
__u16 tx_credits;
__u16 rx_credits;
+ /* estimated available receive buffer s... |
c90748b898cf9a0654aeadac1ba2254e3ab8e9fa | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_conn: Use __counted_by() to avoid -Wfamnae warning | Problem Details:
Prepare for the coming implementation by GCC and Clang of the
__counted_by attribute. Flexible array members annotated with
__counted_by can have their accesses bounds-checked at run-time
via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE
(for strcpy/memcpy-family functions).
Also,... | ```diff
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 0b0ac7f06570..c4c6b8810701 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -2216,7 +2216,7 @@ struct hci_cp_le_big_create_sync {
__u8 mse;
__le16 timeout;
__u8 num_bis;
- __u8 bis[];
+ __u8... |
c4585edf708edb5277a3cc4b8581ccb833f3307d | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_conn, hci_sync: Use __counted_by() to avoid -Wfamnae warnings | Problem Details:
Prepare for the coming implementation by GCC and Clang of the
__counted_by attribute. Flexible array members annotated with
__counted_by can have their accesses bounds-checked at run-time
via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE
(for strcpy/memcpy-family functions).
Also,... | ```diff
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 5c12761cbc0e..0b0ac7f06570 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -2026,7 +2026,7 @@ struct hci_cp_le_set_ext_adv_data {
__u8 operation;
__u8 frag_pref;
__u8 length;
- __u8 data[];
+ __u... |
958cd6beab693f395ffe07814ef77d2b45e8b0fc | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Fix the patch for MT7920 the affected to MT7921 | Problem Details:
Because both MT7920 and MT7921 use the same chip ID.
We use the 8th bit of fw_flavor to distingush MT7920.
The original patch made a mistake to check whole fw_flavor,
that makes the condition both true (dev_id == 0x7961 && fw_flavor),
and makes MT7921 flow wrong.
In this patch, we correct the flow to ... | ```diff
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 4c0cc13adb47..8bede0a33566 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3123,6 +3123,7 @@ static int btusb_mtk_setup(struct hci_dev *hdev)
bt_dev_err(hdev, "Failed to get fw flavor (%d)", err);
return ... |
68aa21054ec3a1a313af90a5f95ade16c3326d20 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: ath3k: Fix multiple issues reported by checkpatch.pl | Problem Details:
This fixes some CHECKs reported by the checkpatch script.
Issues reported in ath3k.c:
-------
ath3k.c
-------
CHECK: Please don't use multiple blank lines
+
+
CHECK: Blank lines aren't necessary after an open brace '{'
+static const struct usb_device_id ath3k_blist_tbl[] = {
+
CHECK: Alignment shoul... | ```diff
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index 88262d3a9392..ce97b336fbfb 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -3,7 +3,6 @@
* Copyright (c) 2008-2009 Atheros Communications Inc.
*/
-
#include <linux/module.h>
#include <linux/kernel.h>
#incl... |
1c08108f3014881ad5f4c35a2abaf9c65475035d | Analyze and fix the following issue in the Linux kernel code: Bluetooth: L2CAP: Avoid -Wflex-array-member-not-at-end warnings | Problem Details:
-Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
ready to enable it globally.
There are currently a couple of objects (`req` and `rsp`), in a couple
of structures, that contain flexible structures (`struct l2cap_ecred_conn_req`
and `struct l2cap_ecred_conn_rsp`), for example:
st... | ```diff
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index a4278aa618ab..7d4a3e766e7b 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -463,18 +463,24 @@ struct l2cap_le_credits {
#define L2CAP_ECRED_MAX_CID 5
struct l2cap_ecred_conn_req {
- __le16 psm... |
62f7de372c9452e200fde215628903758c3df6c4 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_intel: Fix multiple issues reported by checkpatch.pl | Problem Details:
This fixes the following CHECKs, WARNINGs, and ERRORs reported in
hci_intel.c
Reported by checkpatch.pl:
-----------
hci_intel.c
-----------
WARNING: Prefer using '"%s...", __func__' to using 'intel_setup', this
function's name, in a string
+ bt_dev_dbg(hdev, "start intel_setup");
ERROR... | ```diff
diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c
index bd44d683b9be..999ccd5bb4f2 100644
--- a/drivers/bluetooth/hci_intel.c
+++ b/drivers/bluetooth/hci_intel.c
@@ -537,7 +537,7 @@ static int intel_setup(struct hci_uart *hu)
int speed_change = 0;
int err;
- bt_dev_dbg(hdev, "star... |
8c0401b7308cb7f37fb85bb84f6dfd0df749fd43 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Add support for MediaTek MT7922 device | Problem Details:
This patch adds support for the MediaTek MT7922 Bluetooth device.
The information in /sys/kernel/debug/usb/devices about the MT7922
is as follows:
T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=13d3 ProdID=358... | ```diff
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index e3946f7b736e..4c0cc13adb47 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -619,6 +619,11 @@ static const struct usb_device_id quirks_table[] = {
BTUSB_WIDEBAND_SPEECH |
BTUSB_VALID_LE_STAT... |
f3b845e0aea321b7f2e93195e2e5c5ef28407db6 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel: Add support to download intermediate loader | Problem Details:
Some variants of Intel controllers like BlazarI supports downloading of
Intermediate bootloader (IML) image. IML gives flexibility to fix issues as its
not possible to fix issue in Primary bootloader once flashed to ROM. This patch
adds the support to download IML before downloading operational firmwar... | ```diff
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 2abe75f06e9c..a19ebe47bd95 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -521,6 +521,9 @@ static int btintel_version_info_tlv(struct hci_dev *hdev,
version->min_fw_build_nn, version->min_fw_build... |
c636fa85feb450ca414a10010ed05361a73c93a6 | Analyze and fix the following issue in the Linux kernel code: wifi: brcmsmac: LCN PHY code is used for BCM4313 2G-only device | Problem Details:
The band_idx variable in the function wlc_lcnphy_tx_iqlo_cal() will
never be set to 1 as BCM4313 is the only device for which the LCN PHY
code is used. This is a 2G-only device.
Fixes: 5b435de0d786 ("net: wireless: add brcm80211 drivers")
Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@ora... | ```diff
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c
index aae2cf95fe95..e472591f321b 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy... |
e56d4b633fffea9510db468085bed0799cba4ecd | Analyze and fix the following issue in the Linux kernel code: nbd: Fix signal handling | Problem Details:
Both nbd_send_cmd() and nbd_handle_cmd() return either a negative error
number or a positive blk_status_t value. nbd_queue_rq() converts these
return values into a blk_status_t value. There is a bug in the conversion
code: if nbd_send_cmd() returns BLK_STS_RESOURCE, nbd_queue_rq() should
return BLK_STS... | ```diff
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 29e43ab1650c..22a79a62cc4e 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -588,6 +588,10 @@ static inline int was_interrupted(int result)
return result == -ERESTARTSYS || result == -EINTR;
}
+/*
+ * Returns BLK_STS_RESOURCE if the ... |
08190cc4d8a62f2a07b4158751afd3a01638c4c5 | Analyze and fix the following issue in the Linux kernel code: nbd: Use NULL to represent a pointer | Problem Details:
This patch fixes the following sparse warnings:
drivers/block/nbd.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, include/trace/events/nbd.h):
./include/trace/events/nbd.h:61:1: warning: Using plain integer as NULL pointer
drivers/block/nbd.c: note: in in... | ```diff
diff --git a/include/trace/events/nbd.h b/include/trace/events/nbd.h
index 9849956f34d8..390d98a05c9d 100644
--- a/include/trace/events/nbd.h
+++ b/include/trace/events/nbd.h
@@ -72,7 +72,7 @@ DECLARE_EVENT_CLASS(nbd_send_request,
),
TP_fast_assign(
- __entry->nbd_request = 0;
+ __entry->nbd_request = N... |
aea27a92a41dae14843f92c79e9e42d8f570105c | Analyze and fix the following issue in the Linux kernel code: net: micrel: Fix receiving the timestamp in the frame for lan8841 | Problem Details:
The blamed commit started to use the ptp workqueue to get the second
part of the timestamp. And when the port was set down, then this
workqueue is stopped. But if the config option NETWORK_PHY_TIMESTAMPING
is not enabled, then the ptp_clock is not initialized so then it would
crash when it would try to... | ```diff
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index ddb50a0e2bc8..87780465cd0d 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -4676,7 +4676,8 @@ static int lan8841_suspend(struct phy_device *phydev)
struct kszphy_priv *priv = phydev->priv;
struct kszphy_ptp_priv *... |
ce698dcf10d5d85c712b8cf3140d125e3112daf9 | Analyze and fix the following issue in the Linux kernel code: Documentation/i915: remove kernel-doc for DMC wakelocks | Problem Details:
The function descriptions are optional and have not yet been added to
the DMC wakelock code, so we shouldn't try to use it. Since this is a
regression, remove the kernel-doc entry for DMC wakelocks for now.
The proper documentation will be added in a future patch.
Fixes: 765425f598c2 ("drm/i915/displ... | ```diff
diff --git a/Documentation/gpu/i915.rst b/Documentation/gpu/i915.rst
index 17261ba18313..3113e36f14cf 100644
--- a/Documentation/gpu/i915.rst
+++ b/Documentation/gpu/i915.rst
@@ -210,9 +210,6 @@ DMC wakelock support
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dmc_wl.c
:doc: DMC wakelock support
-.... |
22e6824622e8a8889df0f8fc4ed5aea0e702a694 | Analyze and fix the following issue in the Linux kernel code: s390/pkey: Use kfree_sensitive() to fix Coccinelle warnings | Problem Details:
Replace memzero_explicit() and kfree() with kfree_sensitive() to fix
warnings reported by Coccinelle:
WARNING opportunity for kfree_sensitive/kvfree_sensitive (line 1506)
WARNING opportunity for kfree_sensitive/kvfree_sensitive (line 1643)
WARNING opportunity for kfree_sensitive/kvfree_sensitive (line... | ```diff
diff --git a/drivers/s390/crypto/pkey_api.c b/drivers/s390/crypto/pkey_api.c
index dccf664a3d95..933894065623 100644
--- a/drivers/s390/crypto/pkey_api.c
+++ b/drivers/s390/crypto/pkey_api.c
@@ -1503,8 +1503,7 @@ static long pkey_unlocked_ioctl(struct file *filp, unsigned int cmd,
rc = pkey_keyblob2pkey(kkey... |
62b672c4ba90e726cc39b5c3d6dffd1ca817e143 | Analyze and fix the following issue in the Linux kernel code: s390/stackstrace: Detect vdso stack frames | Problem Details:
Clear the backchain of the extra stack frame added by the vdso user wrapper
code. This allows the user stack walker to detect and skip the non-standard
stack frame. Without this an incorrect instruction pointer would be added
to stack traces, and stack frame walking would be continued with a more or
le... | ```diff
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h
index db9982f0e8cd..bbbdc5abe2b2 100644
--- a/arch/s390/include/asm/processor.h
+++ b/arch/s390/include/asm/processor.h
@@ -98,6 +98,7 @@ void cpu_detect_mhz_feature(void);
extern const struct seq_operations cpuinfo_op;
exter... |
be72ea09c1a5273abf8c6c52ef53e36c701cbf6a | Analyze and fix the following issue in the Linux kernel code: s390/vdso: Introduce and use struct stack_frame_vdso_wrapper | Problem Details:
Introduce and use struct stack_frame_vdso_wrapper within vdso user wrapper
code. With this structure it is possible to automatically generate an
asm-offset define which can be used to save and restore the return address
of the calling function.
Also use STACK_FRAME_USER_OVERHEAD instead of STACK_FRAM... | ```diff
diff --git a/arch/s390/include/asm/stacktrace.h b/arch/s390/include/asm/stacktrace.h
index 4aefbe32265d..85b6738b826a 100644
--- a/arch/s390/include/asm/stacktrace.h
+++ b/arch/s390/include/asm/stacktrace.h
@@ -13,6 +13,11 @@ struct stack_frame_user {
unsigned long empty2[4];
};
+struct stack_frame_vdso_wr... |
cd58109283944ea8bdcd0a8211a86cbd2450716a | Analyze and fix the following issue in the Linux kernel code: s390/stacktrace: Improve detection of invalid instruction pointers | Problem Details:
Add basic checks to identify invalid instruction pointers when walking
stack frames:
Instruction pointers must
- have even addresses
- be larger than mmap_min_addr
- lower than the asce_limit of the process
Alternatively it would also be possible to walk page tables similar to fast
GUP and verify th... | ```diff
diff --git a/arch/s390/kernel/stacktrace.c b/arch/s390/kernel/stacktrace.c
index 1c9e3b7739a2..b4485b0c7f06 100644
--- a/arch/s390/kernel/stacktrace.c
+++ b/arch/s390/kernel/stacktrace.c
@@ -77,6 +77,21 @@ static inline bool store_ip(stack_trace_consume_fn consume_entry, void *cookie,
return consume_entry(coo... |
87eceb17a987802aeee718be4decd19b56fc8e33 | Analyze and fix the following issue in the Linux kernel code: s390/stacktrace: Skip first user stack frame | Problem Details:
When walking user stack frames the first stack frame (where the stack
pointer points to) should be skipped: the return address of the current
function is saved in the previous stack frame, not the current stack frame,
which is allocated for to be called functions.
Fixes: aa44433ac4ee ("s390: add USER_... | ```diff
diff --git a/arch/s390/kernel/stacktrace.c b/arch/s390/kernel/stacktrace.c
index e580d4cd2729..1c9e3b7739a2 100644
--- a/arch/s390/kernel/stacktrace.c
+++ b/arch/s390/kernel/stacktrace.c
@@ -95,6 +95,10 @@ void arch_stack_walk_user_common(stack_trace_consume_fn consume_entry, void *coo
while (1) {
if (__ge... |
ebd912ff9919a10609511383d94942362234c077 | Analyze and fix the following issue in the Linux kernel code: s390/stacktrace: Merge perf_callchain_user() and arch_stack_walk_user() | Problem Details:
The two functions perf_callchain_user() and arch_stack_walk_user() are
nearly identical. Reduce code duplication and add a common helper which can
be called by both functions.
Fixes: aa44433ac4ee ("s390: add USER_STACKTRACE support")
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Heiko ... | ```diff
diff --git a/arch/s390/include/asm/stacktrace.h b/arch/s390/include/asm/stacktrace.h
index 433fde85b14e..4aefbe32265d 100644
--- a/arch/s390/include/asm/stacktrace.h
+++ b/arch/s390/include/asm/stacktrace.h
@@ -2,6 +2,7 @@
#ifndef _ASM_S390_STACKTRACE_H
#define _ASM_S390_STACKTRACE_H
+#include <linux/stackt... |
185445c7c137822ad856aae91a41e199370cb534 | Analyze and fix the following issue in the Linux kernel code: s390/vdso: Use standard stack frame layout | Problem Details:
By default user space is compiled with standard stack frame layout and not
with the packed stack layout. The vdso code however inherited the
-mpacked-stack compiler option from the kernel. Remove this option to make
sure the vdso is compiled with standard stack frame layout.
This makes sure that the s... | ```diff
diff --git a/arch/s390/kernel/vdso32/Makefile b/arch/s390/kernel/vdso32/Makefile
index 9090c0e5de25..4800d80decee 100644
--- a/arch/s390/kernel/vdso32/Makefile
+++ b/arch/s390/kernel/vdso32/Makefile
@@ -19,6 +19,7 @@ KBUILD_AFLAGS_32 := $(filter-out -m64,$(KBUILD_AFLAGS))
KBUILD_AFLAGS_32 += -m31 -s
KBUILD_... |
fc2f5f10f9bc5e58d38e9fda7dae107ac04a799f | Analyze and fix the following issue in the Linux kernel code: s390/vdso: Create .build-id links for unstripped vdso files | Problem Details:
Citing Andy Lutomirski from commit dda1e95cee38 ("x86/vdso: Create
.build-id links for unstripped vdso files"):
"With this change, doing 'make vdso_install' and telling gdb:
set debug-file-directory /lib/modules/KVER/vdso
will enable vdso debugging with symbols. This is useful for
testing, but kern... | ```diff
diff --git a/scripts/Makefile.vdsoinst b/scripts/Makefile.vdsoinst
index c477d17b0aa5..a81ca735003e 100644
--- a/scripts/Makefile.vdsoinst
+++ b/scripts/Makefile.vdsoinst
@@ -21,7 +21,7 @@ $$(dest): $$(src) FORCE
$$(call cmd,install)
# Some architectures create .build-id symlinks
-ifneq ($(filter arm sparc... |
10f70525365146046dddcc3d36bfaea2aee0376a | Analyze and fix the following issue in the Linux kernel code: s390/vdso: Generate unwind information for C modules | Problem Details:
GDB fails to unwind vDSO functions with error message "PC not saved",
for instance when stepping through gettimeofday().
Add -fasynchronous-unwind-tables to CFLAGS to generate .eh_frame
DWARF unwind information for the vDSO C modules.
Fixes: 4bff8cb54502 ("s390: convert to GENERIC_VDSO")
Signed-off-b... | ```diff
diff --git a/arch/s390/kernel/vdso32/Makefile b/arch/s390/kernel/vdso32/Makefile
index b12a274cbb47..9090c0e5de25 100644
--- a/arch/s390/kernel/vdso32/Makefile
+++ b/arch/s390/kernel/vdso32/Makefile
@@ -20,7 +20,8 @@ KBUILD_AFLAGS_32 += -m31 -s
KBUILD_CFLAGS_32 := $(filter-out -m64,$(KBUILD_CFLAGS))
KBUILD_... |
fbad43eccae5cb14594195c20113369aabaa22b5 | Analyze and fix the following issue in the Linux kernel code: drm/i915/gt: Disarm breadcrumbs if engines are already idle | Problem Details:
The breadcrumbs use a GT wakeref for guarding the interrupt, but are
disarmed during release of the engine wakeref. This leaves a hole where
we may attach a breadcrumb just as the engine is parking (after it has
parked its breadcrumbs), execute the irq worker with some signalers still
attached, but nev... | ```diff
diff --git a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
index d650beb8ed22..20b9b04ec1e0 100644
--- a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
@@ -263,8 +263,13 @@ static void signal_irq_work(struct irq_work *wor... |
04b5e2f9a75a3f33f29dec780c1363367642fd73 | Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: sof_sdw_rt_sdca_jack_common: Use name_prefix for `-sdca` detection | Problem Details:
Match against the correct string to decide to add the '-sdca' postfix:
instead of codec_dai->name the correct one is component->name_prefix.
The component->name_prefix is added previously to the card->components as
hs.
Fixes: 9a9d31b149f3 ("ASoC: Intel: sof_sdw_rt_sdca_jack_common: remove -sdca for n... | ```diff
diff --git a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c b/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c
index 701b0372f59e..012195c50519 100644
--- a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c
+++ b/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c
@@ -109,7 +109,7 @@ int rt_sdca_j... |
b444dfc84d6c19fa385be6d89d62b77184f81ea4 | Analyze and fix the following issue in the Linux kernel code: devm-helpers: Fix a misspelled cancellation in the comments | Problem Details:
Fix a misspelled cancellation in the comments.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240503173843.2922111-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com> | ```diff
diff --git a/include/linux/devm-helpers.h b/include/linux/devm-helpers.h
index 74891802200d..708ca9131402 100644
--- a/include/linux/devm-helpers.h
+++ b/include/linux/devm-helpers.h
@@ -41,7 +41,7 @@ static inline void devm_delayed_work_drop(void *res)
* detached. A few drivers need delayed work which must b... |
2c6370e6607663fc5fa0fd9ed58e2e01014898c7 | Analyze and fix the following issue in the Linux kernel code: platform/x86: p2sb: Don't init until unassigned resources have been assigned | Problem Details:
The P2SB could get an invalid BAR from the BIOS, and that won't be fixed
up until pcibios_assign_resources(), which is an fs_initcall().
- Move p2sb_fs_init() to an fs_initcall_sync(). This is still early
enough to avoid a race with any dependent drivers.
- Add a check for IORESOURCE_UNSET in p2sb_... | ```diff
diff --git a/drivers/platform/x86/p2sb.c b/drivers/platform/x86/p2sb.c
index 53fe96b99ab7..3bf5d2243491 100644
--- a/drivers/platform/x86/p2sb.c
+++ b/drivers/platform/x86/p2sb.c
@@ -55,12 +55,9 @@ static void p2sb_get_devfn(unsigned int *devfn)
*devfn = fn;
}
-static bool p2sb_valid_resource(struct resour... |
086437d94aa3591b459e64bffed657b88dcc46a7 | Analyze and fix the following issue in the Linux kernel code: kallsyms: replace deprecated strncpy with strscpy | Problem Details:
strncpy() is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces. The goal is to remove its use completely [2].
namebuf is eventually cleaned of any trailing llvm suffixes using
strstr(). This hints that namebuf sho... | ```diff
diff --git a/kernel/module/kallsyms.c b/kernel/module/kallsyms.c
index ef73ae7c8909..62fb57bb9f16 100644
--- a/kernel/module/kallsyms.c
+++ b/kernel/module/kallsyms.c
@@ -348,7 +348,7 @@ const char *module_address_lookup(unsigned long addr,
}
/* Make a copy in here where it's safe */
if (ret) {
- strncpy... |
068a95ef3945033b5355e50fecea18737680d43d | Analyze and fix the following issue in the Linux kernel code: power: supply: sbs-manager: Remove class argument from i2c_mux_add_adapter() | Problem Details:
Commit 99a741aa7a2d ("i2c: mux: gpio: remove support for class-based
device instantiation") removed the last call to i2c_mux_add_adapter()
with a non-null class argument. Therefore the class argument can be
removed.
Note: Class-based device instantiation is a legacy mechanism which
shouldn't be used i... | ```diff
diff --git a/drivers/power/supply/sbs-manager.c b/drivers/power/supply/sbs-manager.c
index 9e4141cffbf9..933b04806d10 100644
--- a/drivers/power/supply/sbs-manager.c
+++ b/drivers/power/supply/sbs-manager.c
@@ -358,7 +358,7 @@ static int sbsm_probe(struct i2c_client *client)
/* register muxed i2c channels. On... |
8771b7f31b7fff91a998e6afdb60650d4bac59a5 | Analyze and fix the following issue in the Linux kernel code: media: bcm2835-unicam: Depend on COMMON_CLK | Problem Details:
The bcm2835-unicam driver calls the clk_set_min_rate() function, which
is declared but not implemented on platforms that don't provide
COMMON_CLK. This causes linkage failures with some configurations.
Fix it by depending on COMMON_CLK. This only slightly restricts
compilation testing, but not usage o... | ```diff
diff --git a/drivers/media/platform/broadcom/Kconfig b/drivers/media/platform/broadcom/Kconfig
index cc2c9afcc948..32b76ebfcd9a 100644
--- a/drivers/media/platform/broadcom/Kconfig
+++ b/drivers/media/platform/broadcom/Kconfig
@@ -3,7 +3,7 @@
config VIDEO_BCM2835_UNICAM
tristate "Broadcom BCM283x/BCM271x Uni... |
8fe51b45c5645c259f759479c374648e9dfeaa03 | Analyze and fix the following issue in the Linux kernel code: modules: Drop the .export_symbol section from the final modules | Problem Details:
Commit ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost")
forget drop the .export_symbol section from the final modules.
Fixes: ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost")
Signed-off-by: Wang Yao <wangyao@lemote.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | ```diff
diff --git a/scripts/module.lds.S b/scripts/module.lds.S
index bf5bcf2836d8..89ff01a22634 100644
--- a/scripts/module.lds.S
+++ b/scripts/module.lds.S
@@ -13,6 +13,7 @@ SECTIONS {
/DISCARD/ : {
*(.discard)
*(.discard.*)
+ *(.export_symbol)
}
__ksymtab 0 : { *(SORT(___ksymtab+*)) }
``` |
d6af2c76399f98444a5b4de96baf4b362d9f102b | Analyze and fix the following issue in the Linux kernel code: LoongArch: Fix callchain parse error with kernel tracepoint events again | Problem Details:
With commit d3119bc985fb645 ("LoongArch: Fix callchain parse error with
kernel tracepoint events"), perf can parse kernel callchain, but not
complete and sometimes maybe error. The reason is LoongArch's unwinders
(guess, prologue and orc) don't really need fp (i.e., regs[22]), and
they use sp (i.e., re... | ```diff
diff --git a/arch/loongarch/include/asm/perf_event.h b/arch/loongarch/include/asm/perf_event.h
index 52b638059e40..f948a0676daf 100644
--- a/arch/loongarch/include/asm/perf_event.h
+++ b/arch/loongarch/include/asm/perf_event.h
@@ -13,8 +13,7 @@
#define perf_arch_fetch_caller_regs(regs, __ip) { \
(regs)->cs... |
5685d7fcb55fd729d7e0452c157a0ac8d72ca7b6 | Analyze and fix the following issue in the Linux kernel code: LoongArch: Give a chance to build with !CONFIG_SMP | Problem Details:
In the current code, SMP is selected in Kconfig for LoongArch, the users
can not unset it, this is reasonable for a multi-processor machine. But
as the help info of config SMP said, if you have a system with only one
CPU, say N. On a uni-processor machine, the kernel will run faster if you
say N here.
... | ```diff
diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index e22330064e98..73246b21aae8 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -178,7 +178,6 @@ config LOONGARCH
select PCI_QUIRKS
select PERF_USE_VMALLOC
select RTC_LIB
- select SMP
select SPARSE_IRQ
select SYSCTL_ARCH... |
402c014cbcc7c9ada6d62ee646b2b359d4793ce2 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Drop useless forcewake get/put | Problem Details:
Forcewake used to be needed in xe_gt_init_early() since it was calling
xe_gt_topology_init(). That call was dropped in commit 4c47049d93b7
("drm/xe/guc: Fix missing topology init"), but the forcewake calls were
left behind. Remove them.
Cc: Zhanjun Dong <zhanjun.dong@intel.com>
Reviewed-by: Michał Win... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index 3b3418eb7bc4..05b77214f996 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -318,14 +318,6 @@ int xe_gt_init_early(struct xe_gt *gt)
return err;
}
- err = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
- if... |
36ac9e7f2e5786bd37c5cd91132e1f39c29b8197 | Analyze and fix the following issue in the Linux kernel code: net: stmmac: move the EST lock to struct stmmac_priv | Problem Details:
Reinitialize the whole EST structure would also reset the mutex
lock which is embedded in the EST structure, and then trigger
the following warning. To address this, move the lock to struct
stmmac_priv. We also need to reacquire the mutex lock when doing
this initialization.
DEBUG_LOCKS_WARN_ON(lock->... | ```diff
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index ed38099ca740..044e61a385e4 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -261,6 +261,8 @@ struct stmmac_priv {
struct stmmac_extra_st... |
00797af95f5eedfcec9b247c7e06efbc789e8f6e | Analyze and fix the following issue in the Linux kernel code: mptcp: remove unnecessary else statements | Problem Details:
The 'else' statements are not needed here, because their previous 'if'
block ends with a 'return'.
This fixes CheckPatch warnings:
WARNING: else is not generally useful after a break or return
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>... | ```diff
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index c1d13e555d10..612c38570a64 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -1119,6 +1119,8 @@ static enum mapping_status get_mapping_status(struct sock *ssk,
}
if (mpext->data_fin == 1) {
+ u64 data_fin_seq;
+
if (data_len == 1... |
5eae7a8202f368a77ff0148729a9fa73cc24033a | Analyze and fix the following issue in the Linux kernel code: mptcp: prefer strscpy over strcpy | Problem Details:
strcpy() performs no bounds checking on the destination buffer. This
could result in linear overflows beyond the end of the buffer, leading
to all kinds of misbehaviors. The safe replacement is strscpy() [1].
This is in preparation of a possible future step where all strcpy() uses
will be removed in f... | ```diff
diff --git a/net/mptcp/ctrl.c b/net/mptcp/ctrl.c
index 542555ba474c..98b1dd498ff6 100644
--- a/net/mptcp/ctrl.c
+++ b/net/mptcp/ctrl.c
@@ -92,7 +92,7 @@ static void mptcp_pernet_set_defaults(struct mptcp_pernet *pernet)
pernet->allow_join_initial_addr_port = 1;
pernet->stale_loss_cnt = 4;
pernet->pm_type ... |
bd11dc4fb969ec148e50cd87f88a78246dbc4d0b | Analyze and fix the following issue in the Linux kernel code: mptcp: fix full TCP keep-alive support | Problem Details:
SO_KEEPALIVE support has been added a while ago, as part of a series
"adding SOL_SOCKET" support. To have a full control of this keep-alive
feature, it is important to also support TCP_KEEP* socket options at the
SOL_TCP level.
Supporting them on the setsockopt() part is easy, it is just a matter of
r... | ```diff
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index cfc5f9c3f113..4dcce3641d1d 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -312,6 +312,9 @@ struct mptcp_sock {
free_first:1,
rcvspace_init:1;
u32 notsent_lowat;
+ int keepalive_cnt;
+ int keepalive_idle;
+ int keepaliv... |
a65198136eaa15b74ee0abf73f12ef83d469a334 | Analyze and fix the following issue in the Linux kernel code: mptcp: SO_KEEPALIVE: fix getsockopt support | Problem Details:
SO_KEEPALIVE support has to be set on each subflow: on each TCP socket,
where sk_prot->keepalive is defined. Technically, nothing has to be done
on the MPTCP socket. That's why mptcp_sol_socket_sync_intval() was
called instead of mptcp_sol_socket_intval().
Except that when nothing is done on the MPTCP... | ```diff
diff --git a/net/mptcp/sockopt.c b/net/mptcp/sockopt.c
index eaa3b79651a4..5ab506c96609 100644
--- a/net/mptcp/sockopt.c
+++ b/net/mptcp/sockopt.c
@@ -181,8 +181,6 @@ static int mptcp_setsockopt_sol_socket_int(struct mptcp_sock *msk, int optname,
switch (optname) {
case SO_KEEPALIVE:
- mptcp_sol_socket_s... |
cea4066588308fa932b6b03486c608efff1d761c | Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: ser: avoid multiple deinit on same CAM | Problem Details:
We did deinit CAM in STA iteration in VIF loop. But, the STA iteration
missed to restrict the target VIF. So, if there are multiple VIFs, we
would deinit a CAM multiple times. Now, fix it.
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: http... | ```diff
diff --git a/drivers/net/wireless/realtek/rtw89/ser.c b/drivers/net/wireless/realtek/rtw89/ser.c
index 99896d85d2f8..5fc2faa9ba5a 100644
--- a/drivers/net/wireless/realtek/rtw89/ser.c
+++ b/drivers/net/wireless/realtek/rtw89/ser.c
@@ -308,9 +308,13 @@ static void ser_reset_vif(struct rtw89_dev *rtwdev, struct r... |
c2e0c58b25a0a0c37ec643255558c5af4450c9f5 | Analyze and fix the following issue in the Linux kernel code: net: fec: remove .ndo_poll_controller to avoid deadlocks | Problem Details:
There is a deadlock issue found in sungem driver, please refer to the
commit ac0a230f719b ("eth: sungem: remove .ndo_poll_controller to avoid
deadlocks"). The root cause of the issue is that netpoll is in atomic
context and disable_irq() is called by .ndo_poll_controller interface
of sungem driver, how... | ```diff
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 8bd213da8fb6..a72d8a2eb0b3 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -3674,29 +3674,6 @@ fec_set_mac_address(struct net_device *ndev, void *p)
... |
ad506586cb69292b6ac59ab95468aadd54b19ab7 | Analyze and fix the following issue in the Linux kernel code: dpll: fix return value check for kmemdup | Problem Details:
The return value of kmemdup() is dst->freq_supported, not
src->freq_supported. Update the check accordingly.
Fixes: 830ead5fb0c5 ("dpll: fix pin dump crash for rebound module")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Arkadius... | ```diff
diff --git a/drivers/dpll/dpll_core.c b/drivers/dpll/dpll_core.c
index d0f6693ca142..32019dc33cca 100644
--- a/drivers/dpll/dpll_core.c
+++ b/drivers/dpll/dpll_core.c
@@ -449,7 +449,7 @@ static int dpll_pin_prop_dup(const struct dpll_pin_properties *src,
sizeof(*src->freq_supported);
dst->freq_suppor... |
25260555b118e71c64dfdb6786144f654fe1a27d | Analyze and fix the following issue in the Linux kernel code: null_blk: Fix two sparse warnings | Problem Details:
Fix the following sparse warnings:
drivers/block/null_blk/main.c:1243:35: warning: incorrect type in return expression (different base types)
drivers/block/null_blk/main.c:1243:35: expected int
drivers/block/null_blk/main.c:1243:35: got restricted blk_status_t
drivers/block/null_blk/main.c:1291:... | ```diff
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index 4005a8b685e8..5d56ad4ce01a 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -1218,7 +1218,7 @@ static int null_transfer(struct nullb *nullb, struct page *page,
return err;
}
-static int null_ha... |
c5963a0990d1da70d1bd399e6811887ff2231b0d | Analyze and fix the following issue in the Linux kernel code: ftrace: Replaces simple_strtoul in ftrace | Problem Details:
The function simple_strtoul performs no error checking in scenarios
where the input value overflows the intended output variable.
This results in this function successfully returning, even when the
output does not match the input string (aka the function returns
successfully even when the result is wro... | ```diff
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index da1710499698..3951c0d0ec63 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -4202,12 +4202,12 @@ static int
add_rec_by_index(struct ftrace_hash *hash, struct ftrace_glob *func_g,
int clear_filter)
{
- long index = simple_str... |
36e56b1b002bb26440403053f19f9e1a8bc075b2 | Analyze and fix the following issue in the Linux kernel code: ax25: Fix reference count leak issue of net_device | Problem Details:
There is a reference count leak issue of the object "net_device" in
ax25_dev_device_down(). When the ax25 device is shutting down, the
ax25_dev_device_down() drops the reference count of net_device one
or zero times depending on if we goto unlock_put or not, which will
cause memory leak.
In order to s... | ```diff
diff --git a/net/ax25/ax25_dev.c b/net/ax25/ax25_dev.c
index 52ccc37d5687..c9d55b99a7a5 100644
--- a/net/ax25/ax25_dev.c
+++ b/net/ax25/ax25_dev.c
@@ -118,15 +118,10 @@ void ax25_dev_device_down(struct net_device *dev)
list_for_each_entry(s, &ax25_dev_list, list) {
if (s == ax25_dev) {
list_del(&s->lis... |
b505e0319852b08a3a716b64620168eab21f4ced | Analyze and fix the following issue in the Linux kernel code: ax25: Fix reference count leak issues of ax25_dev | Problem Details:
The ax25_addr_ax25dev() and ax25_dev_device_down() exist a reference
count leak issue of the object "ax25_dev".
Memory leak issue in ax25_addr_ax25dev():
The reference count of the object "ax25_dev" can be increased multiple
times in ax25_addr_ax25dev(). This will cause a memory leak.
Memory leak is... | ```diff
diff --git a/net/ax25/ax25_dev.c b/net/ax25/ax25_dev.c
index f16ee5c09d07..52ccc37d5687 100644
--- a/net/ax25/ax25_dev.c
+++ b/net/ax25/ax25_dev.c
@@ -39,6 +39,7 @@ ax25_dev *ax25_addr_ax25dev(ax25_address *addr)
if (ax25cmp(addr, (const ax25_address *)ax25_dev->dev->dev_addr) == 0) {
res = ax25_dev;
... |
ecf848eb934b03959918f5269f64c0e52bc23998 | Analyze and fix the following issue in the Linux kernel code: net: usb: ax88179_178a: fix link status when link is set to down/up | Problem Details:
The idea was to keep only one reset at initialization stage in order to
reduce the total delay, or the reset from usbnet_probe or the reset from
usbnet_open.
I have seen that restarting from usbnet_probe is necessary to avoid doing
too complex things. But when the link is set to down/up (for example t... | ```diff
diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
index df9d767cb524..56ede5fa0261 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -174,6 +174,7 @@ struct ax88179_data {
u32 wol_supported;
u32 wolopts;
u8 disconnecting;
+ u8 initialized;
};
... |
5eefb477d21a26183bc3499aeefa991198315a2d | Analyze and fix the following issue in the Linux kernel code: net: smc91x: Fix m68k kernel compilation for ColdFire CPU | Problem Details:
Compiling the m68k kernel with support for the ColdFire CPU family fails
with the following error:
In file included from drivers/net/ethernet/smsc/smc91x.c:80:
drivers/net/ethernet/smsc/smc91x.c: In function ‘smc_reset’:
drivers/net/ethernet/smsc/smc91x.h:160:40: error: implicit declaration of functio... | ```diff
diff --git a/drivers/net/ethernet/smsc/smc91x.h b/drivers/net/ethernet/smsc/smc91x.h
index 46eee747c699..45ef5ac0788a 100644
--- a/drivers/net/ethernet/smsc/smc91x.h
+++ b/drivers/net/ethernet/smsc/smc91x.h
@@ -156,8 +156,8 @@ static inline void mcf_outsw(void *a, unsigned char *p, int l)
writew(*wp++, a);
... |
14b1cd25346b1d615616a9c2dfdad9b4e6581e0d | Analyze and fix the following issue in the Linux kernel code: cifs: Fix locking in cifs_strict_readv() | Problem Details:
Fix to take the i_rwsem (through the netfs locking wrappers) before taking
cinode->lock_sem.
Fixes: 3ee1a1fc3981 ("cifs: Cut over to using netfslib")
Reported-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com> | ```diff
diff --git a/fs/netfs/direct_read.c b/fs/netfs/direct_read.c
index ad4370b3935d..10a1e4da6bda 100644
--- a/fs/netfs/direct_read.c
+++ b/fs/netfs/direct_read.c
@@ -26,7 +26,7 @@
*
* The caller must hold any appropriate locks.
*/
-static ssize_t netfs_unbuffered_read_iter_locked(struct kiocb *iocb, struct i... |
8ec9897ec2e93a412b9e3119e3137583a85969e0 | Analyze and fix the following issue in the Linux kernel code: netlabel: fix RCU annotation for IPv4 options on socket creation | Problem Details:
Xiumei reports the following splat when netlabel and TCP socket are used:
=============================
WARNING: suspicious RCU usage
6.9.0-rc2+ #637 Not tainted
-----------------------------
net/ipv4/cipso_ipv4.c:1880 suspicious rcu_dereference_protected() usage!
other info that might help us ... | ```diff
diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h
index 53dd7d988a2d..c9111bb2f59b 100644
--- a/include/net/cipso_ipv4.h
+++ b/include/net/cipso_ipv4.h
@@ -183,7 +183,8 @@ int cipso_v4_getattr(const unsigned char *cipso,
struct netlbl_lsm_secattr *secattr);
int cipso_v4_sock_setattr(stru... |
29b4c7bb8565118e2c7e08709fce0dbe8bf61011 | Analyze and fix the following issue in the Linux kernel code: cifs: Change from mempool_destroy to mempool_exit for request pools | Problem Details:
insmod followed by rmmod was oopsing with the new mempools cifs request patch
Fixes: edea94a69730 ("cifs: Add mempools for cifs_io_request and cifs_io_subrequest structs")
Suggested-by: David Howells <dhowells@redhat.com>
Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Steve French <st... | ```diff
diff --git a/fs/smb/client/cifsfs.c b/fs/smb/client/cifsfs.c
index 6e1698614745..ec5b639f421a 100644
--- a/fs/smb/client/cifsfs.c
+++ b/fs/smb/client/cifsfs.c
@@ -1790,9 +1790,9 @@ nomem_req:
static void cifs_destroy_netfs(void)
{
- mempool_destroy(&cifs_io_subrequest_pool);
+ mempool_exit(&cifs_io_subreque... |
9f9bef9bc5c68a6ca9bbffcd29cd188167c29ae1 | Analyze and fix the following issue in the Linux kernel code: smb: smb2pdu.h: Avoid -Wflex-array-member-not-at-end warnings | Problem Details:
-Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
ready to enable it globally.
So, in order to avoid ending up with a flexible-array member in the
middle of multiple other structs, we use the `__struct_group()` helper
to separate the flexible array from the rest of the members in ... | ```diff
diff --git a/fs/smb/client/smb2pdu.h b/fs/smb/client/smb2pdu.h
index 2fccf0d4f53d..5c458ab3b05a 100644
--- a/fs/smb/client/smb2pdu.h
+++ b/fs/smb/client/smb2pdu.h
@@ -145,7 +145,7 @@ struct durable_context_v2 {
} __packed;
struct create_durable_v2 {
- struct create_context ccontext;
+ struct create_context_... |
97776caf6c6e3a932d8e1410e6810cbfcb69d42d | Analyze and fix the following issue in the Linux kernel code: net: ena: Changes around strscpy calls | Problem Details:
strscpy copies as much of the string as possible,
meaning that the destination string will be truncated
in case of no space. As this is a non-critical error in
our case, adding a debug level print for indication.
This patch also removes a -1 which was added to ensure
enough space for NUL, but strscpy ... | ```diff
diff --git a/drivers/net/ethernet/amazon/ena/ena_ethtool.c b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
index 28583db848e2..b24cc3f05248 100644
--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c
+++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
@@ -460,10 +460,18 @@ static void ena_get_drvinfo(struct net_... |
5fcc17dfe05e127a38d24b0e5bf93aaba01fdddc | Analyze and fix the following issue in the Linux kernel code: selftests: netfilter: nft_flowtable.sh: bump socat timeout to 1m | Problem Details:
Now that this test runs in netdev CI it looks like 10s isn't enough
for debug kernels:
selftests: net/netfilter: nft_flowtable.sh
2024/05/10 20:33:08 socat[12204] E write(7, 0x563feb16a000, 8192): Broken pipe
FAIL: file mismatch for ns1 -> ns2
-rw------- 1 root root 37345280 May 10 20:32 /tmp/t... | ```diff
diff --git a/tools/testing/selftests/net/netfilter/nft_flowtable.sh b/tools/testing/selftests/net/netfilter/nft_flowtable.sh
index 86d516e8acd6..b3995550856a 100755
--- a/tools/testing/selftests/net/netfilter/nft_flowtable.sh
+++ b/tools/testing/selftests/net/netfilter/nft_flowtable.sh
@@ -17,6 +17,7 @@
source... |
cfc2eefd40f1bc121a41a2acd54458046d77f9ae | Analyze and fix the following issue in the Linux kernel code: selftests: net: use upstream mtools | Problem Details:
Joachim kindly merged the IPv6 support in
https://github.com/troglobit/mtools/pull/2, so we can just use his
version now. A few more fixes subsequently came in for IPv6, so even
better.
Check that the deployed mtools version is 3.0 or above. Note that the
version check breaks compatibility with my for... | ```diff
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index 3353a1745946..112c85c35092 100644
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -309,6 +309,21 @@ require_command()
fi
}
+# IPv6 supp... |
f37dc28ac6e2624afd7916faacea259f57f5ca82 | Analyze and fix the following issue in the Linux kernel code: selftest: epoll_busy_poll: Fix spelling mistake "couldnt" -> "couldn't" | Problem Details:
There is a spelling mistake in a TH_LOG message. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240510084811.3299685-1-colin.i.king@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org> | ```diff
diff --git a/tools/testing/selftests/net/epoll_busy_poll.c b/tools/testing/selftests/net/epoll_busy_poll.c
index 9dd2830fd67c..16e457c2f877 100644
--- a/tools/testing/selftests/net/epoll_busy_poll.c
+++ b/tools/testing/selftests/net/epoll_busy_poll.c
@@ -232,7 +232,7 @@ TEST_F(epoll_busy_poll, test_set_invalid)... |
1af7f88af269c4e06a4dc3bc920ff6cdf7471124 | Analyze and fix the following issue in the Linux kernel code: inet: fix inet_fill_ifaddr() flags truncation | Problem Details:
I missed that (struct ifaddrmsg)->ifa_flags was only 8bits,
while (struct in_ifaddr)->ifa_flags is 32bits.
Use a temporary 32bit variable as I did in set_ifa_lifetime()
and check_lifetime().
Fixes: 3ddc2231c810 ("inet: annotate data-races around ifa->ifa_flags")
Reported-by: Yu Watanabe <watanabe.yu@... | ```diff
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 7a437f0d4190..7e45c34c8340 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1683,6 +1683,7 @@ static int inet_fill_ifaddr(struct sk_buff *skb, const struct in_ifaddr *ifa,
struct nlmsghdr *nlh;
unsigned long tstamp;
u32 preferred, val... |
87bfdbbb199249f677a92c6e13234b9c450992c6 | Analyze and fix the following issue in the Linux kernel code: net: phy: air_en8811h: reset netdev rules when LED is set manually | Problem Details:
Setting LED_OFF via brightness_set should deactivate hw control, so make
sure netdev trigger rules also get cleared in that case.
This fixes unwanted restoration of the default netdev trigger rules and
matches the behaviour when using the 'netdev' trigger without any
hardware offloading.
Fixes: 71e794... | ```diff
diff --git a/drivers/net/phy/air_en8811h.c b/drivers/net/phy/air_en8811h.c
index 4c9a1c9c805e..3cdc8c6b30b6 100644
--- a/drivers/net/phy/air_en8811h.c
+++ b/drivers/net/phy/air_en8811h.c
@@ -544,6 +544,10 @@ static int air_hw_led_on_set(struct phy_device *phydev, u8 index, bool on)
changed |= (priv->led[ind... |
9d2fd8bdc12f403a5c35c971936a0e1d5cb5108e | Analyze and fix the following issue in the Linux kernel code: KEYS: asymmetric: Add missing dependencies of FIPS_SIGNATURE_SELFTEST | Problem Details:
Since the signature self-test uses RSA and SHA-256, it must only be
enabled when those algorithms are enabled. Otherwise it fails and
panics the kernel on boot-up.
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202404221528.51d75177-lkp@intel.com
Fixes: ... | ```diff
diff --git a/crypto/asymmetric_keys/Kconfig b/crypto/asymmetric_keys/Kconfig
index 3f089abd6fc9..684767ab23e2 100644
--- a/crypto/asymmetric_keys/Kconfig
+++ b/crypto/asymmetric_keys/Kconfig
@@ -86,5 +86,7 @@ config FIPS_SIGNATURE_SELFTEST
depends on ASYMMETRIC_KEY_TYPE
depends on PKCS7_MESSAGE_PARSER=X509_... |
dcaa86b904ea3761e62c849957dd0904e126bf4a | Analyze and fix the following issue in the Linux kernel code: KEYS: asymmetric: Add missing dependency on CRYPTO_SIG | Problem Details:
Make ASYMMETRIC_PUBLIC_KEY_SUBTYPE select CRYPTO_SIG to avoid build
errors like the following, which were possible with
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y && CONFIG_CRYPTO_SIG=n:
ld: vmlinux.o: in function `public_key_verify_signature':
(.text+0x306280): undefined reference to `crypto_allo... | ```diff
diff --git a/crypto/asymmetric_keys/Kconfig b/crypto/asymmetric_keys/Kconfig
index 59ec726b7c77..3f089abd6fc9 100644
--- a/crypto/asymmetric_keys/Kconfig
+++ b/crypto/asymmetric_keys/Kconfig
@@ -15,6 +15,7 @@ config ASYMMETRIC_PUBLIC_KEY_SUBTYPE
select MPILIB
select CRYPTO_HASH_INFO
select CRYPTO_AKCIPHER... |
959314c438caf1b62d787f02d54a193efda38880 | Analyze and fix the following issue in the Linux kernel code: drm/nouveau: use tile_mode and pte_kind for VM_BIND bo allocations | Problem Details:
Allow PTE kind and tile mode on BO create with VM_BIND, and add a
GETPARAM to indicate this change. This is needed to support modifiers in
NVK and ensure correctness when dealing with the nouveau GL driver.
The userspace modifiers implementation this is for can be found here:
https://gitlab.freedeskto... | ```diff
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c
index f465fe93b1f7..d56909071de6 100644
--- a/drivers/gpu/drm/nouveau/nouveau_abi16.c
+++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c
@@ -272,6 +272,9 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
getparam->value... |
aed9a1a4f7106ff99a882ad06318cebfa71016a2 | Analyze and fix the following issue in the Linux kernel code: drm/nouveau: use tile_mode and pte_kind for VM_BIND bo allocations | Problem Details:
Allow PTE kind and tile mode on BO create with VM_BIND, and add a
GETPARAM to indicate this change. This is needed to support modifiers in
NVK and ensure correctness when dealing with the nouveau GL driver.
The userspace modifiers implementation this is for can be found here:
https://gitlab.freedeskto... | ```diff
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c
index 80f74ee0fc78..47e53e17b4e5 100644
--- a/drivers/gpu/drm/nouveau/nouveau_abi16.c
+++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c
@@ -272,6 +272,9 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
getparam->value... |
b61467778e69c8e7e43dff9d1e2e8940c5df42fa | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix mqd corruption for gfx12 | Problem Details:
1. restore mqd from backup while resuming
2. use copy_toio and copy_fromio while mqd in vram
Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
index b6e5a2230622..924ab4a3a0d5 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
@@ -2691,17 +2691,15 @@ static int gfx_v12_0_gfx_init_queue(struct amdgpu_ring *ring)
... |
e6ae021adb79e5f4c4bc4362dd651d7b8b646340 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix the warning bad bit shift operation for aca_error_type type | Problem Details:
Filter invalid aca error types before performing a shift operation.
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
index 28febf33fb1b..9e3560c190e3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
@@ -534,7 +534,7 @@ int amdgpu_aca_get_error_data(struct amdgpu_device *adev, struct ... |
1a296827feef4dbad1e2863b0e2d7d7d8afc781a | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix enum feature compared against 0 | Problem Details:
This less-than-zero comparison of an unsigned value is never true. feature < 0U
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ```diff
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
index ac17e44ba85b..602aa6941231 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
@@ -760,7 +760,7 @@ static const char *__smu_feature_names[] = {
static const char *smu_... |
67024471616e090c994a46630bd23c42d6962a34 | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix enum type compared against 0 | Problem Details:
This less-than-zero comparison of an unsigned value is never true. type < 0U
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ```diff
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
index 6d1c3af927ca..ac17e44ba85b 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
@@ -56,7 +56,7 @@ static const char * const __smu_message_names[] = {
static const char ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.