id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
63b320aaac08ba267268ec21a195ce3c82dcb8ab | Analyze and fix the following issue in the Linux kernel code: perf stat-shadow: In prepare_metric fix guard on reading NULL perf_stat_evsel | Problem Details:
The aggr value is setup to always be non-null creating a redundant
guard for reading from it. Switch to using the perf_stat_evsel (ps)
and narrow the scope of aggr so that it is known valid when used.
Fixes: 3d65f6445fd93e3e ("perf stat-shadow: Read tool events directly")
Reported-by: Andres Freund <a... | ```diff
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c
index 5d8d09e0e6ae..59d2cd4f2188 100644
--- a/tools/perf/util/stat-shadow.c
+++ b/tools/perf/util/stat-shadow.c
@@ -57,7 +57,6 @@ static int prepare_metric(struct perf_stat_config *config,
bool is_tool_time =
tool_pmu__is_time_eve... |
1f12fb138de81e63c1140689257548966cfb88a3 | Analyze and fix the following issue in the Linux kernel code: tools build: Emit dependencies file for test-rust.bin | Problem Details:
Test it first by having rust installed, then removing it and building again.
Fixes: 6a32fa5ccd33da5d ("tools build: Add a feature test for rust compiler")
Signed-off-by: Dmitry Dolgov <9erthalion6@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index cc53d4e5f8d8..e959caa7f1c7 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -113,7 +113,7 @@ __BUILD = $(CC) $(CFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(
__BUILDXX = $(CXX) $(CXXFLA... |
84a654f786414a74a15a7b61929d1ced06687310 | Analyze and fix the following issue in the Linux kernel code: tools build: Make test-rust.bin be removed by the 'clean' target | Problem Details:
test-rust.bin is missing from the list of FILES, and thus is not removed by the
clean target. This could lead to a false feature detection, since the binary
stays there. Fix it.
Fixes: 6a32fa5ccd33da5d ("tools build: Add a feature test for rust compiler")
Tested-by: Arnaldo Carvalho de Melo <acme@redh... | ```diff
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 9ae69d857166..cc53d4e5f8d8 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -73,6 +73,7 @@ FILES= \
test-clang-bpf-co-re.bin \
test-file-han... |
fd3634312a04f336dcbfb481060219f0cd320738 | Analyze and fix the following issue in the Linux kernel code: debugobject: Make it work with deferred page initialization - again | Problem Details:
debugobjects uses __GFP_HIGH for allocations as it might be invoked
within locked regions. That worked perfectly fine until v6.18. It still
works correctly when deferred page initialization is disabled and works
by chance when no page allocation is required before deferred page
initialization has compl... | ```diff
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index ba36939fda79..a874146ad828 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -723,6 +723,7 @@ source "mm/Kconfig.debug"
config DEBUG_OBJECTS
bool "Debug object operations"
+ depends on PREEMPT_COUNT || !DEFERRED_STRUCT_PAGE_INIT
depends on ... |
8c5d17834ec104d0abd1bda52fbc04e647fab274 | Analyze and fix the following issue in the Linux kernel code: net: sunhme: Fix sbus regression | Problem Details:
Commit cc216e4b44ce ("net: sunhme: Switch SBUS to devres") changed
explicit sized of_ioremap with BMAC_REG_SIZEs to
devm_platform_ioremap_resource mapping all the resource. However,
this does not work on my Sun Ultra 2 with SBUS HMEs:
hme f0072f38: error -EBUSY: can't request region for resource [mem ... | ```diff
diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c
index 48f0a96c0e9e..666998082998 100644
--- a/drivers/net/ethernet/sun/sunhme.c
+++ b/drivers/net/ethernet/sun/sunhme.c
@@ -2551,6 +2551,9 @@ static int happy_meal_sbus_probe_one(struct platform_device *op, int is_qfe)
goto er... |
70b0faae3590c628a98a627a10e5d211310169d4 | Analyze and fix the following issue in the Linux kernel code: LoongArch: Guard percpu handler under !CONFIG_PREEMPT_RT | Problem Details:
After commit 88fd2b70120d ("LoongArch: Fix sleeping in atomic context for
PREEMPT_RT"), it should guard percpu handler under !CONFIG_PREEMPT_RT to
avoid redundant operations.
Cc: stable@vger.kernel.org
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.... | ```diff
diff --git a/arch/loongarch/kernel/unwind_prologue.c b/arch/loongarch/kernel/unwind_prologue.c
index 729e775bd40d..ee1c29686ab0 100644
--- a/arch/loongarch/kernel/unwind_prologue.c
+++ b/arch/loongarch/kernel/unwind_prologue.c
@@ -65,7 +65,7 @@ static inline bool scan_handlers(unsigned long entry_offset)
sta... |
77403a06d845db1caf9a6b0867b43e9dd8de8e4a | Analyze and fix the following issue in the Linux kernel code: LoongArch: Use %px to print unmodified unwinding address | Problem Details:
Currently, use %p to prevent leaking information about the kernel memory
layout when printing the PC address, but the kernel log messages are not
useful to debug problem if bt_address() returns 0. Given that the type of
"pc" variable is unsigned long, it should use %px to print the unmodified
unwinding... | ```diff
diff --git a/arch/loongarch/kernel/unwind_orc.c b/arch/loongarch/kernel/unwind_orc.c
index 8a6e3429a860..d6b3688a1ce9 100644
--- a/arch/loongarch/kernel/unwind_orc.c
+++ b/arch/loongarch/kernel/unwind_orc.c
@@ -494,7 +494,7 @@ bool unwind_next_frame(struct unwind_state *state)
state->pc = bt_address(pc);
... |
52c1dbf4cb8e9c1df2a911bc8938efaeff51dfbb | Analyze and fix the following issue in the Linux kernel code: LoongArch: Replace seq_printf() with seq_puts() for simple strings | Problem Details:
Fix warnings like: "Prefer seq_puts to seq_printf" by checkpatch.pl.
Replace seq_printf() calls with seq_puts() in show_cpuinfo() when
outputting simple constant strings without format specifiers.
This improves performance slightly as seq_puts() avoids parsing the
format string.
Signed-off-by: Georg... | ```diff
diff --git a/arch/loongarch/kernel/proc.c b/arch/loongarch/kernel/proc.c
index a60471b96440..a8127e83da65 100644
--- a/arch/loongarch/kernel/proc.c
+++ b/arch/loongarch/kernel/proc.c
@@ -50,33 +50,49 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, "Address Sizes\t\t: %d bits physical, %d... |
f0e4b1b6e295299f5c9c79ad546dedbdf7132f45 | Analyze and fix the following issue in the Linux kernel code: LoongArch: Add 128-bit atomic cmpxchg support | Problem Details:
Implement 128-bit atomic compare-and-exchange using LoongArch's
LL.D/SC.Q instructions.
At the same time, this fix the BPF scheduler test failures (scx_central
and scx_qmap) caused by kmalloc_nolock_noprof() returning NULL, due to
missing 128-bit atomics. The NULL returns lead to -ENOMEM errors during... | ```diff
diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index ae9d954aa052..bf5a5beab366 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -114,6 +114,7 @@ config LOONGARCH
select GENERIC_TIME_VSYSCALL
select GPIOLIB
select HAS_IOPORT
+ select HAVE_ALIGNED_STRUCT_PAGE
select HAVE_... |
aae9d6b616b5e4ad8bbb82aa3661baa1522684d2 | Analyze and fix the following issue in the Linux kernel code: hsr: Implement more robust duplicate discard for HSR | Problem Details:
The HSR duplicate discard algorithm had even more basic problems than the
described for PRP in the previous patch. It relied only on the last
received sequence number to decide if a new frame should be forwarded to
any port. This does not work correctly in any case where frames are
received out of orde... | ```diff
diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c
index 7e21e607efc6..7d87f304ded4 100644
--- a/net/hsr/hsr_framereg.c
+++ b/net/hsr/hsr_framereg.c
@@ -20,23 +20,6 @@
#include "hsr_framereg.h"
#include "hsr_netlink.h"
-/* seq_nr_after(a, b) - return true if a is after (higher in sequence than) b,... |
415e6367512bf8faca93eaaf46fbe23d841b4509 | Analyze and fix the following issue in the Linux kernel code: hsr: Implement more robust duplicate discard for PRP | Problem Details:
The PRP duplicate discard algorithm does not work reliably with certain
link faults. Especially with packet loss on one link, the duplicate discard
algorithm drops valid packets which leads to packet loss on the PRP
interface where the link fault should in theory be perfectly recoverable by
PRP. This h... | ```diff
diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c
index 3a2a2fa7a0a3..7e21e607efc6 100644
--- a/net/hsr/hsr_framereg.c
+++ b/net/hsr/hsr_framereg.c
@@ -11,6 +11,7 @@
* Same code handles filtering of duplicates for PRP as well.
*/
+#include <kunit/visibility.h>
#include <linux/if_ether.h>
#inc... |
f8f296ea1c61ce98a03dd9ede370adb864c4cde3 | Analyze and fix the following issue in the Linux kernel code: KVM: s390: vsie: Fix race in acquire_gmap_shadow() | Problem Details:
The shadow gmap returned by gmap_create_shadow() could get dropped
before taking the gmap->children_lock. This meant that the shadow gmap
was sometimes being used while its reference count was 0.
Fix this by taking the additional reference inside gmap_create_shadow()
while still holding gmap->children... | ```diff
diff --git a/arch/s390/kvm/gmap.c b/arch/s390/kvm/gmap.c
index da222962ef6d..26cd2b208b6f 100644
--- a/arch/s390/kvm/gmap.c
+++ b/arch/s390/kvm/gmap.c
@@ -1179,6 +1179,8 @@ static int gmap_protect_asce_top_level(struct kvm_s390_mmu_cache *mc, struct gma
* The shadow table will be removed automatically on any ... |
b6ab71a27c50942cfc10d12ca3f3c0cfb1634d19 | Analyze and fix the following issue in the Linux kernel code: KVM: s390: vsie: Fix race in walk_guest_tables() | Problem Details:
It is possible that walk_guest_tables() is called on a shadow gmap that
has been removed already, in which case its parent will be NULL.
In such case, return -EAGAIN and let the callers deal with it.
Fixes: e38c884df921 ("KVM: s390: Switch to new gmap")
Acked-by: Janosch Frank <frankja@linux.ibm.com>... | ```diff
diff --git a/arch/s390/kvm/gaccess.c b/arch/s390/kvm/gaccess.c
index 67de47a81a87..4630b2a067ea 100644
--- a/arch/s390/kvm/gaccess.c
+++ b/arch/s390/kvm/gaccess.c
@@ -1287,7 +1287,10 @@ static int walk_guest_tables(struct gmap *sg, unsigned long saddr, struct pgtwal
union asce asce;
int rc;
+ if (!parent)... |
898885477e0fa23d2e42b65bcb7c250215ecac37 | Analyze and fix the following issue in the Linux kernel code: KVM: s390: Use guest address to mark guest page dirty | Problem Details:
Stop using the userspace address to mark the guest page dirty.
mark_page_dirty() expects a guest frame number, but was being passed a
host virtual frame number. When slot == NULL, mark_page_dirty_in_slot()
does nothing and does not complain.
This means that in some circumstances the dirtiness of the g... | ```diff
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index f55eca9aa638..1c2bb5cd7e12 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -2768,13 +2768,13 @@ static int adapter_indicators_set(struct kvm *kvm,
bit = get_ind_bit(adapter_int->ind_addr,
adapter_int->ind_... |
ae88a5d2f29b69819dc7b04086734439d074a643 | Analyze and fix the following issue in the Linux kernel code: net: atm: fix crash due to unvalidated vcc pointer in sigd_send() | Problem Details:
Reproducer available at [1].
The ATM send path (sendmsg -> vcc_sendmsg -> sigd_send) reads the vcc
pointer from msg->vcc and uses it directly without any validation. This
pointer comes from userspace via sendmsg() and can be arbitrarily forged:
int fd = socket(AF_ATMSVC, SOCK_DGRAM, 0);
ioctl... | ```diff
diff --git a/net/atm/signaling.c b/net/atm/signaling.c
index e70ae2c113f9..358fbe5e4d1d 100644
--- a/net/atm/signaling.c
+++ b/net/atm/signaling.c
@@ -22,6 +22,36 @@
struct atm_vcc *sigd = NULL;
+/*
+ * find_get_vcc - validate and get a reference to a vcc pointer
+ * @vcc: the vcc pointer to validate
+ *
+... |
c431b00ca6afc5da3133636ecc34ee7edd38d6cc | Analyze and fix the following issue in the Linux kernel code: objtool/rust: add one more `noreturn` Rust function | Problem Details:
`objtool` with Rust 1.84.0 reports:
rust/kernel.o: error: objtool: _RNvXNtNtCsaRPFapPOzLs_6kernel3str9parse_intaNtNtB2_7private12FromStrRadix14from_str_radix()
falls through to next function _RNvXNtNtCsaRPFapPOzLs_6kernel3str9parse_intaNtNtB2_7private12FromStrRadix16from_u64_negated()
This is... | ```diff
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 3fd98c5b6e1a..37ec0d757e9b 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -197,7 +197,8 @@ static bool is_rust_noreturn(const struct symbol *func)
* as well as changes to the source code itself between versions (since
* th... |
2dcc93475559168a7d3ccffcc35d79f19416782b | Analyze and fix the following issue in the Linux kernel code: net: fec: remove unnecessary NULL pointer check when clearing TX BD ring | Problem Details:
The tx_buf pointer will not NULL when its type is FEC_TXBUF_T_XDP_NDO or
FEC_TXBUF_T_XDP_TX. If the type is FEC_TXBUF_T_SKB, dev_kfree_skb_any()
will do NULL pointer check. So it is unnecessary to do NULL pointer check
in fec_enet_bd_init() and fec_enet_tx_queue().
Signed-off-by: Wei Fang <wei.fang@nx... | ```diff
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index fd89947c5f5f..1b4ce004ae46 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1032,24 +1032,19 @@ static void fec_enet_bd_init(struct net_device *dev)
... |
a1e244a9f177894969c6cd5ebbc6d72c19fc4a7a | Analyze and fix the following issue in the Linux kernel code: mm/slab: use prandom if !allow_spin | Problem Details:
When CONFIG_SLAB_FREELIST_RANDOM is enabled and get_random_u32()
is called in an NMI context, lockdep complains because it acquires
a local_lock:
================================
WARNING: inconsistent lock state
6.19.0-rc5-slab-for-next+ #325 Tainted: G N
----------------------... | ```diff
diff --git a/mm/slub.c b/mm/slub.c
index 90f0e6667130..591e41e5acc4 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -43,6 +43,7 @@
#include <linux/prefetch.h>
#include <linux/memcontrol.h>
#include <linux/random.h>
+#include <linux/prandom.h>
#include <kunit/test.h>
#include <kunit/test-bug.h>
#include <linux/s... |
144080a5823b2dbd635acb6decf7ab23182664f3 | Analyze and fix the following issue in the Linux kernel code: mm/slab: do not access current->mems_allowed_seq if !allow_spin | Problem Details:
Lockdep complains when get_from_any_partial() is called in an NMI
context, because current->mems_allowed_seq is seqcount_spinlock_t and
not NMI-safe:
================================
WARNING: inconsistent lock state
6.19.0-rc5-kfree-rcu+ #315 Tainted: G N
----------------------... | ```diff
diff --git a/mm/slub.c b/mm/slub.c
index 11a99bd06ac7..90f0e6667130 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3791,6 +3791,7 @@ static void *get_from_any_partial(struct kmem_cache *s, struct partial_context *
struct zone *zone;
enum zone_type highest_zoneidx = gfp_zone(pc->flags);
unsigned int cpuset_mem... |
08b7ef16b6a03e8c966e286ee1ac608a6ffb3d4a | Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: Fix pipe BPP clamping due to HDR | Problem Details:
The pipe BPP value shouldn't be set outside of the source's / sink's
valid pipe BPP range, ensure this when increasing the minimum pipe BPP
value to 30 due to HDR.
While at it debug print if the HDR mode was requested for a connector by
setting the corresponding HDR connector property. This indicates
... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 4b786706ea2d..7fd20df10f26 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2703,6 +2703,7 @@ intel_dp_compute_config_limits(struct intel_dp *intel_dp,
... |
f743435f988cb0cf1f521035aee857851b25e06d | Analyze and fix the following issue in the Linux kernel code: tracing: Fix false sharing in hwlat get_sample() | Problem Details:
The get_sample() function in the hwlat tracer assumes the caller holds
hwlat_data.lock, but this is not actually happening. The result is
unprotected data access to hwlat_data, and in per-cpu mode can result in
false sharing which may show up as false positive latency events.
The specific case of fals... | ```diff
diff --git a/kernel/trace/trace_hwlat.c b/kernel/trace/trace_hwlat.c
index 2f7b94e98317..3fe274b84f1c 100644
--- a/kernel/trace/trace_hwlat.c
+++ b/kernel/trace/trace_hwlat.c
@@ -102,9 +102,9 @@ struct hwlat_sample {
/* keep the global state somewhere. */
static struct hwlat_data {
- struct mutex lock; /* ... |
b4bade506b18eb2e5e34ac84f915d7ee6156d4e2 | Analyze and fix the following issue in the Linux kernel code: tracing: Move d_max_latency out of CONFIG_FSNOTIFY protection | Problem Details:
The tracing_max_latency shouldn't be limited if CONFIG_FSNOTIFY is defined
or not and it was moved out of that protection to be always available with
CONFIG_TRACER_MAX_TRACE. All was moved out except the dentry descriptor
for it (d_max_latency) and it failed to build on some configs.
Move that out of ... | ```diff
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 649fdd20fc91..7894bf55743c 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -348,8 +348,8 @@ struct trace_array {
unsigned int snapshot;
#ifdef CONFIG_TRACER_MAX_TRACE
unsigned long max_latency;
-#ifdef CONFIG_FSNOTIFY
struct... |
0080608706b37c199c3c2c22bfadac9e75b223a4 | Analyze and fix the following issue in the Linux kernel code: ksmbd: fix missing chann_lock while iterating session channel list | Problem Details:
Add chann_lock while iterating ksmbd_chann_list in show_proc_session() and
show_proc_sessions(). This will prevents a race condition with concurrent
channel list modifications.
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com> | ```diff
diff --git a/fs/smb/server/mgmt/user_session.c b/fs/smb/server/mgmt/user_session.c
index 8c2b14ea7b0e..c35083f576c3 100644
--- a/fs/smb/server/mgmt/user_session.c
+++ b/fs/smb/server/mgmt/user_session.c
@@ -91,6 +91,7 @@ static int show_proc_session(struct seq_file *m, void *v)
ksmbd_user_session_get(sess);
... |
b29a7a8eee6a1ca974aaf053c0ffed1173d279c2 | Analyze and fix the following issue in the Linux kernel code: fs: fuse: fix max() of incompatible types | Problem Details:
The 'max()' value of a 'long long' and an 'unsigned int' is problematic
if the former is negative:
In function 'fuse_wr_pages',
inlined from 'fuse_perform_write' at fs/fuse/file.c:1347:27:
include/linux/compiler_types.h:652:45: error: call to '__compiletime_assert_390' declared with attribute erro... | ```diff
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index dffd454e30e2..80765ab6d04a 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1323,8 +1323,10 @@ static ssize_t fuse_fill_write_pages(struct fuse_io_args *ia,
static inline unsigned int fuse_wr_pages(loff_t pos, size_t len,
unsigned int max_pages)
... |
a30f999681126b128a43137793ac84b6a5b7443f | Analyze and fix the following issue in the Linux kernel code: drm/xe/mmio: Avoid double-adjust in 64-bit reads | Problem Details:
xe_mmio_read64_2x32() was adjusting register addresses and then
calling xe_mmio_read32(), which applies the adjustment again.
This may shift accesses twice if adj_offset < adj_limit. There is
no issue currently, as for media gt, adj_offset > adj_limit, so
the 2nd adjust will be a no-op. But it may not ... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
index bcb6674b7dac..a1a05c68dc7d 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -256,11 +256,11 @@ u64 xe_mmio_read64_2x32(struct xe_mmio *mmio, struct xe_reg reg)
struct xe_reg reg_udw = { .addr = reg.ad... |
849f05ae1ea6e1ff621243dce27fe455fdc9d0ff | Analyze and fix the following issue in the Linux kernel code: selftests: riscv: verify ptrace accepts valid vector csr values | Problem Details:
Add a test to v_ptrace test suite to verify that ptrace accepts the
valid input combinations of vector csr registers. Use kselftest
fixture variants to create multiple inputs for the test.
The test simulates a debug scenario with three breakpoints:
0. init: let the tracee set up its initial vector con... | ```diff
diff --git a/tools/testing/selftests/riscv/vector/validate_v_ptrace.c b/tools/testing/selftests/riscv/vector/validate_v_ptrace.c
index 3919df68edc8..3589549f7228 100644
--- a/tools/testing/selftests/riscv/vector/validate_v_ptrace.c
+++ b/tools/testing/selftests/riscv/vector/validate_v_ptrace.c
@@ -651,4 +651,26... |
f4be988f5b547dc4b305c15a078a52cdde76a8f5 | Analyze and fix the following issue in the Linux kernel code: riscv: ptrace: validate input vector csr registers | Problem Details:
Add strict validation for vector csr registers when setting them via
ptrace:
- reject attempts to set reserved bits or invalid field combinations
- enforce strict VL checks against calculated VLMAX values
Vector specs 0.7.1 and 1.0 allow normal applications to set candidate
VL values and read back the... | ```diff
diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c
index 97636fdfeb77..e592bd6b7665 100644
--- a/arch/riscv/kernel/ptrace.c
+++ b/arch/riscv/kernel/ptrace.c
@@ -128,6 +128,92 @@ static int riscv_vr_get(struct task_struct *target,
return membuf_write(&to, vstate->datap, riscv_v_vsize);
}
+... |
ef3ff40346db8476a9ef7269fc9d1837e7243c40 | Analyze and fix the following issue in the Linux kernel code: riscv: vector: init vector context with proper vlenb | Problem Details:
The vstate in thread_struct is zeroed when the vector context is
initialized. That includes read-only register vlenb, which holds
the vector register length in bytes. Zeroed state persists until
mstatus.VS becomes 'dirty' and a context switch saves the actual
hardware values.
This can expose the zero ... | ```diff
diff --git a/arch/riscv/kernel/vector.c b/arch/riscv/kernel/vector.c
index 3ed071dab9d8..b112166d51e9 100644
--- a/arch/riscv/kernel/vector.c
+++ b/arch/riscv/kernel/vector.c
@@ -111,8 +111,8 @@ bool insn_is_vector(u32 insn_buf)
return false;
}
-static int riscv_v_thread_zalloc(struct kmem_cache *cache,
- ... |
dd2fdc3504592d85e549c523b054898a036a6afe | Analyze and fix the following issue in the Linux kernel code: SUNRPC: fix gss_auth kref leak in gss_alloc_msg error path | Problem Details:
Commit 5940d1cf9f42 ("SUNRPC: Rebalance a kref in auth_gss.c") added
a kref_get(&gss_auth->kref) call to balance the gss_put_auth() done
in gss_release_msg(), but forgot to add a corresponding kref_put()
on the error path when kstrdup_const() fails.
If service_name is non-NULL and kstrdup_const() fail... | ```diff
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 5c095cb8cb20..bb3c3db2713b 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -39,6 +39,8 @@ static const struct rpc_authops authgss_ops;
static const struct rpc_credops gss_credops;
static cons... |
4e2796c8280ad21f1a252c05204845261d988e2f | Analyze and fix the following issue in the Linux kernel code: drm/xe/vf: Allow VF to initialize MCR tables | Problem Details:
While VFs can't access MCR registers, it's still safe to initialize
our per-platform MCR tables, as we might need them later in the LRC
programming, as engines itself may access MCR steer registers and
thanks to all our past fixes to the VF probe initialization order,
VFs are able to use values of the ... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c
index 7c1fe9ac120d..66c4efca80fe 100644
--- a/drivers/gpu/drm/xe/xe_gt_mcr.c
+++ b/drivers/gpu/drm/xe/xe_gt_mcr.c
@@ -505,9 +505,6 @@ void xe_gt_mcr_init_early(struct xe_gt *gt)
spin_lock_init(>->mcr_lock);
- if (IS_SRIOV_VF(xe... |
6c5c07bc85890a8eadcad484d9bbaa239ca8e623 | Analyze and fix the following issue in the Linux kernel code: docs: process: maintainer-pgp-guide: update kernel.org docs link | Problem Details:
Update http link to the documentation about how to add a kernel.org UID to
the maintainer's key. Add missing SPDX-License-Identifier to fix a
checkpatch warning.
Signed-off-by: Amitabh Srivastava <amitabh@amidevlab.com>
Reviewed-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Signed-off-by: ... | ```diff
diff --git a/Documentation/process/maintainer-pgp-guide.rst b/Documentation/process/maintainer-pgp-guide.rst
index 2e4da3de25d4..bfe877a1a7e4 100644
--- a/Documentation/process/maintainer-pgp-guide.rst
+++ b/Documentation/process/maintainer-pgp-guide.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
.... |
728bea264883031c377fcc9c465b650dbfd1bbf5 | Analyze and fix the following issue in the Linux kernel code: sunrpc: rpc_debug and others are defined even if CONFIG_SUNRPC_DEBUG unset | Problem Details:
The rpc_debug, nfs_debug, nfsd_debug and nlm_debug are exported
even if CONFIG_SUNRPC_DEBUG is not set. This means that the
debug header should also define these to remove the following
sparse warnings:
net/sunrpc/sysctl.c:29:17: warning: symbol 'rpc_debug' was not declared. Should it be static?
net/s... | ```diff
diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h
index 891f6173c951..eb4bd62df319 100644
--- a/include/linux/sunrpc/debug.h
+++ b/include/linux/sunrpc/debug.h
@@ -14,12 +14,10 @@
/*
* Debugging macros etc
*/
-#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
extern unsigned int rpc_debug;
exte... |
3d012b8614ee020666f3dd15af9f65dc487e3f5f | Analyze and fix the following issue in the Linux kernel code: perf test: Fix test case perftool-testsuite_report for s390 | Problem Details:
Test case perftool-testsuite_report fails on s390 for some time
now.
Root cause is a time out which is too tight for large s390 machines.
The time out value addr2line_timeout_ms is per default set to 1 second.
This is the maximum time the function read_addr2line_record() waits for
a reply from the fo... | ```diff
diff --git a/tools/perf/util/addr2line.c b/tools/perf/util/addr2line.c
index 0f1499350d47..31c0391fffa3 100644
--- a/tools/perf/util/addr2line.c
+++ b/tools/perf/util/addr2line.c
@@ -18,8 +18,8 @@
#define MAX_INLINE_NEST 1024
-/* If addr2line doesn't return data for 1 second then timeout. */
-int addr2line... |
e29a3e61eef6b6c2e60bc1872e9da3bcdbc46c17 | Analyze and fix the following issue in the Linux kernel code: NFSv4: limit lease period in nfs4_set_lease_period() | Problem Details:
In nfs4_set_lease_period(), the passed 32-bit lease period in seconds is
multiplied by HZ -- that might overflow before being implicitly cast to
*unsigned long* (32/64-bit type), while initializing the lease variable.
Cap the lease period at MAX_LEASE_PERIOD (#define'd to 1 hour for now),
before multip... | ```diff
diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c
index 043b2de8d416..30065df1482e 100644
--- a/fs/nfs/nfs4renewd.c
+++ b/fs/nfs/nfs4renewd.c
@@ -133,6 +133,8 @@ nfs4_kill_renewd(struct nfs_client *clp)
cancel_delayed_work_sync(&clp->cl_renewd);
}
+#define MAX_LEASE_PERIOD (60 * 60) /* 1 hour */
+
/*... |
fdc0396b3cc05dc9b678627af23c3fdc7dbe930e | Analyze and fix the following issue in the Linux kernel code: nfs: unify security_inode_listsecurity() calls | Problem Details:
commit 243fea134633 ("NFSv4.2: fix listxattr to return selinux
security label") introduced a direct call to
security_inode_listsecurity() in nfs4_listxattr(). However,
nfs4_listxattr() already indirectly called
security_inode_listsecurity() via nfs4_listxattr_nfs4_label() if
CONFIG_NFS_V4_SECURITY_LABE... | ```diff
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 405f3fdbc1f0..7c9cf0983366 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -7888,33 +7888,12 @@ static int nfs4_xattr_get_nfs4_label(const struct xattr_handler *handler,
return -EOPNOTSUPP;
}
-static ssize_t
-nfs4_listxattr_nfs4_label(struc... |
42e7c876b182da65723700f6bc507a8aecb10d3b | Analyze and fix the following issue in the Linux kernel code: fs/nfs: Fix readdir slow-start regression | Problem Details:
Commit 580f236737d1 ("NFS: Adjust the amount of readahead
performed by NFS readdir") reduces the amount of readahead names
caching done by the client.
The downside of this approach is READDIR now may suffer from
a slow-start issue, where initially it will fetch names that fit
in a single page, then in... | ```diff
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 8f9ea79b7882..b3f5c9461204 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -72,7 +72,7 @@ const struct address_space_operations nfs_dir_aops = {
.free_folio = nfs_readdir_clear_array,
};
-#define NFS_INIT_DTSIZE PAGE_SIZE
+#define NFS_INIT_DTSIZE SZ_64K
sta... |
1d3ffe6233b1b6e8697f5027b9441ce70385c997 | Analyze and fix the following issue in the Linux kernel code: perf tests workload: Formatting for code_with_type.rs | Problem Details:
One part of the rust code for code_with_type workload wasn't properly
formatted.
Pass it through rustfmt to fix that.
Closes: https://lore.kernel.org/oe-kbuild-all/202602091357.oyRv6hgQ-lkp@intel.com/
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-o... | ```diff
diff --git a/tools/perf/tests/workloads/code_with_type.rs b/tools/perf/tests/workloads/code_with_type.rs
index 3b91e51919dd..3dab39b22dd7 100644
--- a/tools/perf/tests/workloads/code_with_type.rs
+++ b/tools/perf/tests/workloads/code_with_type.rs
@@ -10,7 +10,11 @@ struct Buf {
#[no_mangle]
pub extern "C" f... |
ebcff9dacaf2c1418f8bc927388186d7d3674603 | Analyze and fix the following issue in the Linux kernel code: vduse: avoid adding implicit padding | Problem Details:
The vduse_iova_range_v2 and vduse_iotlb_entry_v2 structures are both
defined in a way that adds implicit padding and is incompatible between
i386 and x86_64 userspace because of the different structure alignment
requirements. Building the header with -Wpadded shows these new warnings:
vduse.h:305:1: e... | ```diff
diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
index 73d1d517dc6c..405d59610f76 100644
--- a/drivers/vdpa/vdpa_user/vduse_dev.c
+++ b/drivers/vdpa/vdpa_user/vduse_dev.c
@@ -1301,7 +1301,7 @@ static int vduse_dev_iotlb_entry(struct vduse_dev *dev,
int r = -EINVAL;
struct... |
c5226b96c08a010ebef5fdf4c90572bcd89e4299 | Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: avoid calling run_get_entry() when run == NULL in ntfs_read_run_nb_ra() | Problem Details:
When ntfs_read_run_nb_ra() is invoked with run == NULL the code later
assumes run is valid and may call run_get_entry(NULL, ...), and also
uses clen/idx without initializing them. Smatch reported uninitialized
variable warnings and this can lead to undefined behaviour. This patch
fixes it.
Reported-by... | ```diff
diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c
index e9c39c62aea4..2ef500f1a9fa 100644
--- a/fs/ntfs3/fsntfs.c
+++ b/fs/ntfs3/fsntfs.c
@@ -1256,6 +1256,12 @@ int ntfs_read_run_nb_ra(struct ntfs_sb_info *sbi, const struct runs_tree *run,
} while (len32);
+ if (!run) {
+ err = -EINVAL;
+ goto out;... |
4f3a06cc57976cafa8c6f716646be6c79a99e485 | Analyze and fix the following issue in the Linux kernel code: ksmbd: add chann_lock to protect ksmbd_chann_list xarray | Problem Details:
ksmbd_chann_list xarray lacks synchronization, allowing use-after-free in
multi-channel sessions (between lookup_chann_list() and ksmbd_chann_del).
Adds rw_semaphore chann_lock to struct ksmbd_session and protects
all xa_load/xa_store/xa_erase accesses.
Cc: stable@vger.kernel.org
Reported-by: Igor St... | ```diff
diff --git a/fs/smb/server/mgmt/user_session.c b/fs/smb/server/mgmt/user_session.c
index 68b3e0cb54d3..8c2b14ea7b0e 100644
--- a/fs/smb/server/mgmt/user_session.c
+++ b/fs/smb/server/mgmt/user_session.c
@@ -244,12 +244,14 @@ static void free_channel_list(struct ksmbd_session *sess)
struct channel *chann;
un... |
3f5dfa472ea6771c821ee0bb10dee7de41ef6021 | Analyze and fix the following issue in the Linux kernel code: tools build: Fix rust feature detection | Problem Details:
Features in FEATURE_TESTS_BASIC will be set as being available if
test-all.c builds, so since the rust test isn't included in test-all.c,
we can't have 'rust' in there, remove it from FEATURE_TESTS_BASIC and
use feature-check so that it tries to build test-rust.bin, doing the
actual feature detection.
... | ```diff
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index 64d21152fc81..0b7a7c38cb88 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -100,8 +100,7 @@ FEATURE_TESTS_BASIC := \
disassembler-four-args \
disassembler-init-style... |
95080648ed52c6b97153ad989252576a3c070036 | Analyze and fix the following issue in the Linux kernel code: cifs: Fix the copyright banner on smb1maperror.c | Problem Details:
Fix the copyright banner on smb1maperror.c to be the same as netmisc.c.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com> | ```diff
diff --git a/fs/smb/client/smb1maperror.c b/fs/smb/client/smb1maperror.c
index e8aa7d44cbc6..277ef0865be0 100644
--- a/fs/smb/client/smb1maperror.c
+++ b/fs/smb/client/smb1maperror.c
@@ -1,12 +1,11 @@
-/* smb1maperror.c: description
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
*
- * Copyright (C) 2025 Re... |
561f60dfd1c10acaaf81bf523de2fe1ff39e2645 | Analyze and fix the following issue in the Linux kernel code: ARM: 9470/1: Handle BE8 vs BE32 in ARCH_CC_CAN_LINK | Problem Details:
ARM big-endian has two different binary formats. BE8 and the older BE32.
They are incompatible with each other.
Handle those when evaluating ARCH_CC_CAN_LINK by using the respective
configuration of the kernel itself.
Fixes: 3df8585afd9b ("ARM: 9469/1: Implement ARCH_HAS_CC_CAN_LINK")
Signed-off-by: ... | ```diff
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5ca48361e1a0..d5cb85d82dad 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1719,12 +1719,14 @@ endmenu
config ARCH_CC_CAN_LINK
bool
default $(cc_can_link_user,-mlittle-endian) if CPU_LITTLE_ENDIAN
- default $(cc_can_link_user,-mbig-endian) if ... |
62918542b7bf08860a60ebbde7654486e0ac0776 | Analyze and fix the following issue in the Linux kernel code: dma-fence: Fix sparse warnings due __rcu annotations | Problem Details:
__rcu annotations on the return types from dma_fence_driver_name() and
dma_fence_timeline_name() cause sparse to complain because both the
constant signaled strings, and the strings return by the dma_fence_ops are
not __rcu annotated.
For a simple fix it is easiest to cast them with __rcu added and un... | ```diff
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
index c9a036b0d592..e05beae6e407 100644
--- a/drivers/dma-buf/dma-fence.c
+++ b/drivers/dma-buf/dma-fence.c
@@ -1133,9 +1133,9 @@ const char __rcu *dma_fence_driver_name(struct dma_fence *fence)
"RCU protection is required for safe acce... |
510e7261a7bcd6232e90f0b6b9f93303bdd29f8a | Analyze and fix the following issue in the Linux kernel code: drm/i915/quirks: Fix device id for QUIRK_EDP_LIMIT_RATE_HBR2 entry | Problem Details:
Update the device ID for Dell XPS 13 7390 2-in-1 in the quirk
`QUIRK_EDP_LIMIT_RATE_HBR2` entry. The previous ID (0x8a12) was
incorrect; the correct ID is 0x8a52.
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5969
Fixes: 21c586d9233a ("drm/i915/dp: Add device specific quirk to limit ... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_quirks.c b/drivers/gpu/drm/i915/display/intel_quirks.c
index d2e16b79d6be..1abbdd426e58 100644
--- a/drivers/gpu/drm/i915/display/intel_quirks.c
+++ b/drivers/gpu/drm/i915/display/intel_quirks.c
@@ -239,7 +239,7 @@ static struct intel_quirk intel_quirks[] = {
{ ... |
5af56f30c4fcbade4a92f94dadfea517d1db9703 | Analyze and fix the following issue in the Linux kernel code: spi: tools: Add include folder to .gitignore | Problem Details:
The Makefile for the SPI tools creates an include/linux/spi folder and some
symlinks inside it. After running `make -C spi/tools`, this folder shows up
as untracked in the git status.
Add the above folder to the .gitignore file.
Fixes: f325b73dc4db ("spi: tools: move to tools buildsystem")
Signed-off-... | ```diff
diff --git a/tools/spi/.gitignore b/tools/spi/.gitignore
index 14ddba3d2195..038261b34ed8 100644
--- a/tools/spi/.gitignore
+++ b/tools/spi/.gitignore
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
spidev_fdx
spidev_test
+include/
``` |
f8f774913b4b599169381073f6674e20976e5529 | Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: ipc4-control: Set correct error code in refresh_bytes_control | Problem Details:
Return -EINVAL in case the scontrol contains more data than the amount of
space available for it to store in sof_ipc4_refresh_bytes_control().
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-sound/aYXvFr-LVHVJSvS7@stanley.mountain/
Fixes: 2a28b5240f2b ("ASoC... | ```diff
diff --git a/sound/soc/sof/ipc4-control.c b/sound/soc/sof/ipc4-control.c
index 0500b690f9a3..596c3d77a34e 100644
--- a/sound/soc/sof/ipc4-control.c
+++ b/sound/soc/sof/ipc4-control.c
@@ -362,6 +362,7 @@ sof_ipc4_refresh_bytes_control(struct snd_sof_control *scontrol, bool lock)
"%s: no space for data in %s... |
3a7dbc729e42b95f1a82806a11128c1926ab26d8 | Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: Intel: select CONFIG_SND_HDA_EXT_CORE from SND_SOC_SOF_HDA_COMMON | Problem Details:
The _hda_dsp_stream_put() function now depends on the
snd_hdac_ext_stream_release() interface from SND_HDA_EXT_CORE:
x86_64-linux-ld: vmlinux.o: in function `_hda_dsp_stream_put':
hda-stream.c:(.text+0xfac605): undefined reference to `snd_hdac_ext_stream_release'
Select this symbol the same way the o... | ```diff
diff --git a/sound/soc/sof/intel/Kconfig b/sound/soc/sof/intel/Kconfig
index 54cd3807f8c6..e31f4c4061d8 100644
--- a/sound/soc/sof/intel/Kconfig
+++ b/sound/soc/sof/intel/Kconfig
@@ -319,6 +319,7 @@ config SND_SOC_SOF_NOVALAKE
config SND_SOC_SOF_HDA_COMMON
tristate
+ select SND_HDA_EXT_CORE
config SND_S... |
305ff6b3a03c230d3c07b61457e961406d979693 | Analyze and fix the following issue in the Linux kernel code: ceph: supply snapshot context in ceph_uninline_data() | Problem Details:
The ceph_uninline_data function was missing proper snapshot context
handling for its OSD write operations. Both CEPH_OSD_OP_CREATE and
CEPH_OSD_OP_WRITE requests were passing NULL instead of the appropriate
snapshot context, which could lead to unnecessary object clone.
Reproducer:
../src/vstart.sh --... | ```diff
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 63b75d214210..faecd9025ee9 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -2199,6 +2199,7 @@ int ceph_uninline_data(struct file *file)
struct ceph_osd_request *req = NULL;
struct ceph_cap_flush *prealloc_cf = NULL;
struct folio *folio = NULL;
+ struc... |
f16bd3fa74a2084ee7e16a8a2be7e7399b970907 | Analyze and fix the following issue in the Linux kernel code: ceph: supply snapshot context in ceph_zero_partial_object() | Problem Details:
The ceph_zero_partial_object function was missing proper snapshot
context for its OSD write operations, which could lead to data
inconsistencies in snapshots.
Reproducer:
../src/vstart.sh --new -x --localhost --bluestore
./bin/ceph auth caps client.fs_a mds 'allow rwps fsname=a' mon 'allow r fsname=a'... | ```diff
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 983390069f73..9152b4722710 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -2568,6 +2568,7 @@ static int ceph_zero_partial_object(struct inode *inode,
struct ceph_inode_info *ci = ceph_inode(inode);
struct ceph_fs_client *fsc = ceph_inode_to_fs_client(i... |
e93bb4b76cfefb302534246e892c7667491cb8cc | Analyze and fix the following issue in the Linux kernel code: MIPS: rb532: Fix MMIO UART resource registration | Problem Details:
Since commit 6e690d54cfa8 ("serial: 8250: fix return error code in
serial8250_request_std_resource()"), registering an 8250 MMIO port
without mapbase no longer works, as the resource range is derived from
mapbase/mapsize.
Populate mapbase and mapsize accordingly. Also drop ugly membase KSEG1
pointer a... | ```diff
diff --git a/arch/mips/rb532/devices.c b/arch/mips/rb532/devices.c
index b7f6f782d9a1..ffa4d38ca95d 100644
--- a/arch/mips/rb532/devices.c
+++ b/arch/mips/rb532/devices.c
@@ -212,11 +212,12 @@ static struct platform_device rb532_wdt = {
static struct plat_serial8250_port rb532_uart_res[] = {
{
.type ... |
30bfc2d6a1132a89a5f1c3b96c59cf3e4d076ea3 | Analyze and fix the following issue in the Linux kernel code: MIPS: Work around LLVM bug when gp is used as global register variable | Problem Details:
On MIPS, __current_thread_info is defined as global register variable
locating in $gp, and is simply assigned with new address during kernel
relocation.
This however is broken with LLVM, which always restores $gp if it finds
$gp is clobbered in any form, including when intentionally through a
global r... | ```diff
diff --git a/arch/mips/kernel/relocate.c b/arch/mips/kernel/relocate.c
index 7f1c136ad850..59833210542f 100644
--- a/arch/mips/kernel/relocate.c
+++ b/arch/mips/kernel/relocate.c
@@ -420,7 +420,20 @@ void *__init relocate_kernel(void)
goto out;
/* The current thread is now within the relocated image */... |
dc90ead44054736131f73b1dd319b8be06088d36 | Analyze and fix the following issue in the Linux kernel code: drm/xe/uapi: update used tracking kernel-doc | Problem Details:
In commit 4d0b035fd6da ("drm/xe/uapi: loosen used tracking restriction")
we dropped the CAP_PERMON restriction but missed updating the
corresponding kernel-doc. Fix that.
v2 (Sanjay):
- Don't drop the note around the extra cpu_visible_used expectations.
Reported-by: Ulisses Furquim <ulisses.furquim... | ```diff
diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
index 077e66a682e2..c9e70f78e723 100644
--- a/include/uapi/drm/xe_drm.h
+++ b/include/uapi/drm/xe_drm.h
@@ -335,10 +335,6 @@ struct drm_xe_mem_region {
__u64 total_size;
/**
* @used: Estimate of the memory used in bytes for this region.
-... |
944a3329b05510d55c69c2ef455136e2fc02de29 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Add bounds check on pat_index to prevent OOB kernel read in madvise | Problem Details:
When user provides a bogus pat_index value through the madvise IOCTL, the
xe_pat_index_get_coh_mode() function performs an array access without
validating bounds. This allows a malicious user to trigger an out-of-bounds
kernel read from the xe->pat.table array.
The vulnerability exists because the val... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_vm_madvise.c b/drivers/gpu/drm/xe/xe_vm_madvise.c
index add9a6ca2390..52147f5eaaa0 100644
--- a/drivers/gpu/drm/xe/xe_vm_madvise.c
+++ b/drivers/gpu/drm/xe/xe_vm_madvise.c
@@ -291,8 +291,13 @@ static bool madvise_args_are_sane(struct xe_device *xe, const struct drm_xe_madv
... |
c1f221c1be6f641506d647297062ce5d21d03867 | Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: add fall-through between switch labels | Problem Details:
Add fall-through to fix the warning in ntfs_fs_parse_param().
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202602041402.uojBz5QY-lkp@intel.com/
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | ```diff
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index 4f423d3a248c..a3c07f2b604f 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -385,6 +385,7 @@ static int ntfs_fs_parse_param(struct fs_context *fc,
break;
case Opt_acl_bool:
if (result.boolean) {
+ fallthrough;
case Opt_acl:
#ifdef CONFI... |
ecfcae7885f105b29898ff71d3cb70abd56ef96e | Analyze and fix the following issue in the Linux kernel code: power: sequencing: qcom-wcn: fix error path for VDDIO handling | Problem Details:
In case getting VDDIO regulator returned an error, WCN power sequencing
driver passes ret to dev_err_probe() as the error code, however it is
known that ret is 0 at this point. Pass PTR_ERR(ctx->vddio) instead.
Fixes: 0eb85f468ef5 ("power: sequencing: qcom-wcn: add support for WCN39xx")
Reported-by: D... | ```diff
diff --git a/drivers/power/sequencing/pwrseq-qcom-wcn.c b/drivers/power/sequencing/pwrseq-qcom-wcn.c
index 46a484b0b5a1..b55b4317e21b 100644
--- a/drivers/power/sequencing/pwrseq-qcom-wcn.c
+++ b/drivers/power/sequencing/pwrseq-qcom-wcn.c
@@ -489,7 +489,7 @@ static int pwrseq_qcom_wcn_probe(struct platform_devi... |
4efa91a28576054aae0e6dad9cba8fed8293aef8 | Analyze and fix the following issue in the Linux kernel code: xfrm: always flush state and policy upon NETDEV_UNREGISTER event | Problem Details:
syzbot is reporting that "struct xfrm_state" refcount is leaking.
unregister_netdevice: waiting for netdevsim0 to become free. Usage count = 2
ref_tracker: netdev@ffff888052f24618 has 1/1 users at
__netdev_tracker_alloc include/linux/netdevice.h:4400 [inline]
netdev_tracker_alloc inc... | ```diff
diff --git a/net/xfrm/xfrm_device.c b/net/xfrm/xfrm_device.c
index 52ae0e034d29..550457e4c4f0 100644
--- a/net/xfrm/xfrm_device.c
+++ b/net/xfrm/xfrm_device.c
@@ -544,6 +544,14 @@ static int xfrm_dev_down(struct net_device *dev)
return NOTIFY_DONE;
}
+static int xfrm_dev_unregister(struct net_device *dev)
... |
6fa45759cf43df3508a94dda7b6b02735ab19c4f | Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Fix the address range assert in ggtt_get_pte helper | Problem Details:
The ggtt_get_pte helper used for saving VF GGTT incorrectly assumes that
ggtt_size == ggtt_end.
Fix it to avoid triggering spurious asserts if VF GGTT object lands in
high GGTT range.
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patch.msgid.link/20260130215624.556099-1-mich... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 8b9d7c0bbe90..2ab880772847 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -193,7 +193,7 @@ static void xe_ggtt_set_pte_and_flush(struct xe_ggtt *ggtt, u64 addr, u64 pte)
static u64 xe_ggtt_get_pte(st... |
20df14666adfe05156902bec0a54b1aba05ec4d4 | Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: Restore the missing check for intel_dp_has_joiner | Problem Details:
Commit ad121a62d566 ("drm/i915/dp: Rework pipe joiner logic in mode_valid")
replaced intel_dp_num_joined_pipes() with an explicit joiner candidate
iteration. The previous code implicitly checked for DP joiner capability
via intel_dp_has_joiner(), but this check was lost during the refactor.
Restore th... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 08e834dbc42a..4b786706ea2d 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1397,9 +1397,14 @@ bool intel_dp_has_dsc(const struct intel_connector *connector)... |
b4ae8266a744927cd06f21326e169d2289e30434 | Analyze and fix the following issue in the Linux kernel code: smb: client: Avoid a dozen -Wflex-array-member-not-at-end warnings | Problem Details:
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.
Move the conflicting declaration to the end of the corresponding
structure. Notice that struct smb2_file_all_info is a flexible
structure, this is a structure that contains a flexible-array
member... | ```diff
diff --git a/fs/smb/client/cached_dir.h b/fs/smb/client/cached_dir.h
index 112f70277aa6..19d5592512e4 100644
--- a/fs/smb/client/cached_dir.h
+++ b/fs/smb/client/cached_dir.h
@@ -48,8 +48,10 @@ struct cached_fid {
struct dentry *dentry;
struct work_struct put_work;
struct work_struct close_work;
- struct ... |
4a93d1ee2d0206970b6eb13fbffe07938cd95948 | Analyze and fix the following issue in the Linux kernel code: smb: client: correct value for smbd_max_fragmented_recv_size | Problem Details:
When we download a file without rdma offload or get
a large directly enumeration from the server,
the server might want to send up to smbd_max_fragmented_recv_size
bytes, but if it is too large all our recv buffers
might already be moved to the recv_io.reassembly.list
and we're no longer able to grant ... | ```diff
diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c
index bb236f80b3c7..d44847c9d8fc 100644
--- a/fs/smb/client/smbdirect.c
+++ b/fs/smb/client/smbdirect.c
@@ -101,8 +101,23 @@ int smbd_send_credit_target = 255;
/* The maximum single message size can be sent to remote peer */
int smbd_max_send_... |
77ffbcac4e569566d0092d5f22627dfc0896b553 | Analyze and fix the following issue in the Linux kernel code: smb: server: fix leak of active_num_conn in ksmbd_tcp_new_connection() | Problem Details:
On kthread_run() failure in ksmbd_tcp_new_connection(), the transport is
freed via free_transport(), which does not decrement active_num_conn,
leaking this counter.
Replace free_transport() with ksmbd_tcp_disconnect().
Fixes: 0d0d4680db22e ("ksmbd: add max connections parameter")
Cc: stable@vger.kern... | ```diff
diff --git a/fs/smb/server/transport_tcp.c b/fs/smb/server/transport_tcp.c
index 4bb07937d7ef..2436dabada95 100644
--- a/fs/smb/server/transport_tcp.c
+++ b/fs/smb/server/transport_tcp.c
@@ -40,6 +40,7 @@ static const struct ksmbd_transport_ops ksmbd_tcp_transport_ops;
static void tcp_stop_kthread(struct tas... |
010eb01ce23b34b50531448b0da391c7f05a72af | Analyze and fix the following issue in the Linux kernel code: ksmbd: fix infinite loop caused by next_smb2_rcv_hdr_off reset in error paths | Problem Details:
The problem occurs when a signed request fails smb2 signature verification
check. In __process_request(), if check_sign_req() returns an error,
set_smb2_rsp_status(work, STATUS_ACCESS_DENIED) is called.
set_smb2_rsp_status() set work->next_smb2_rcv_hdr_off as zero. By resetting
next_smb2_rcv_hdr_off to... | ```diff
diff --git a/fs/smb/server/server.c b/fs/smb/server/server.c
index 554ae90df906..d2410a3f163a 100644
--- a/fs/smb/server/server.c
+++ b/fs/smb/server/server.c
@@ -126,21 +126,21 @@ static int __process_request(struct ksmbd_work *work, struct ksmbd_conn *conn,
andx_again:
if (command >= conn->max_cmds) {
c... |
92010ab6dbacc0e0f3566d92a84ff00a939e7fd4 | Analyze and fix the following issue in the Linux kernel code: lib/find_bit: fix uninitialized variable use in FIND_NTH_BIT | Problem Details:
In the FIND_NTH_BIT macro, if the 'size' parameter is 0, both the
loop conditions and the modulo condition are not met. Consequently,
the 'tmp' variable remains uninitialized before being used in the
'found' label.
This results in the following smatch errors:
lib/find_bit.c:164 __find_nth_bit() err... | ```diff
diff --git a/lib/find_bit.c b/lib/find_bit.c
index d4b5a29e3e72..5a0066c26d9a 100644
--- a/lib/find_bit.c
+++ b/lib/find_bit.c
@@ -71,7 +71,7 @@ out: \
#define FIND_NTH_BIT(FETCH, size, num) \
({ \
- unsigned long sz = (size), nr = (num), idx, w, tmp; \
+ unsigned long sz = (size), ... |
93ac432274e1361b4f6cd69e7c5d9b3ac21e13f5 | Analyze and fix the following issue in the Linux kernel code: smb: client: fix last send credit problem causing disconnects | Problem Details:
When we are about to use the last send credit that was
granted to us by the peer, we need to wait until
we are ourself able to grant at least one credit
to the peer. Otherwise it might not be possible
for the peer to grant more credits.
The following sections in MS-SMBD are related to this:
3.1.5.1 S... | ```diff
diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c
index dbb2d939bc44..20faa6d7f514 100644
--- a/fs/smb/client/smbdirect.c
+++ b/fs/smb/client/smbdirect.c
@@ -697,6 +697,15 @@ static void smbd_post_send_credits(struct work_struct *work)
atomic_add(posted, &sc->recv_io.credits.available);
+... |
21538121efe6c8c5b51c742fa02cbe820bc48714 | Analyze and fix the following issue in the Linux kernel code: smb: client: make use of smbdirect_socket.send_io.bcredits | Problem Details:
It turns out that our code will corrupt the stream of
reassabled data transfer messages when we trigger an
immendiate (empty) send.
In order to fix this we'll have a single 'batch' credit per
connection. And code getting that credit is free to use
as much messages until remaining_length reaches 0, the... | ```diff
diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c
index ef3b237bccc1..dbb2d939bc44 100644
--- a/fs/smb/client/smbdirect.c
+++ b/fs/smb/client/smbdirect.c
@@ -657,6 +657,7 @@ static bool process_negotiation_response(
sp->max_frmr_depth * PAGE_SIZE);
sp->max_frmr_depth = sp->max_read_write_... |
defb3c05fee94b296eebe05aaea16d2664b00252 | Analyze and fix the following issue in the Linux kernel code: smb: client: let recv_done() queue a refill when the peer is low on credits | Problem Details:
In captures I saw that Windows was granting 191 credits in a batch
when its peer posted a lot of messages. We are asking for a
credit target of 255 and 191 is 252*3/4.
So we also use that logic in order to fill the
recv buffers available to the peer.
Fixes: 02548c477a90 ("smb: client: queue post_recv... | ```diff
diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c
index 6679abbb9797..61693b4a83fc 100644
--- a/fs/smb/client/smbdirect.c
+++ b/fs/smb/client/smbdirect.c
@@ -663,6 +663,7 @@ static void recv_done(struct ib_cq *cq, struct ib_wc *wc)
container_of(wc->wr_cqe, struct smbdirect_recv_io, cqe);
s... |
9911b1ed187a770a43950bf51f340ad4b7beecba | Analyze and fix the following issue in the Linux kernel code: smb: client: make use of smbdirect_socket.recv_io.credits.available | Problem Details:
The logic off managing recv credits by counting posted recv_io and
granted credits is racy.
That's because the peer might already consumed a credit,
but between receiving the incoming recv at the hardware
and processing the completion in the 'recv_done' functions
we likely have a window where we grant... | ```diff
diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c
index 788a0670c4a8..6679abbb9797 100644
--- a/fs/smb/client/smbdirect.c
+++ b/fs/smb/client/smbdirect.c
@@ -618,6 +618,7 @@ static void smbd_post_send_credits(struct work_struct *work)
struct smbdirect_recv_io *response;
struct smbdirect_soc... |
8cf2bbac6281434065f5f3aeab19c9c08ff755a2 | Analyze and fix the following issue in the Linux kernel code: smb: server: fix last send credit problem causing disconnects | Problem Details:
When we are about to use the last send credit that was
granted to us by the peer, we need to wait until
we are ourself able to grant at least one credit
to the peer. Otherwise it might not be possible
for the peer to grant more credits.
The following sections in MS-SMBD are related to this:
3.1.5.1 S... | ```diff
diff --git a/fs/smb/server/transport_rdma.c b/fs/smb/server/transport_rdma.c
index 38248b6a1b5c..5c0cc5064e8c 100644
--- a/fs/smb/server/transport_rdma.c
+++ b/fs/smb/server/transport_rdma.c
@@ -1033,6 +1033,15 @@ static void smb_direct_post_recv_credits(struct work_struct *work)
atomic_add(credits, &sc->re... |
34abd408c8ba24d7c97bd02ba874d8c714f49db1 | Analyze and fix the following issue in the Linux kernel code: smb: server: make use of smbdirect_socket.send_io.bcredits | Problem Details:
It turns out that our code will corrupt the stream of
reassabled data transfer messages when we trigger an
immendiate (empty) send.
In order to fix this we'll have a single 'batch' credit per
connection. And code getting that credit is free to use
as much messages until remaining_length reaches 0, the... | ```diff
diff --git a/fs/smb/server/transport_rdma.c b/fs/smb/server/transport_rdma.c
index 4a473df1f2b3..38248b6a1b5c 100644
--- a/fs/smb/server/transport_rdma.c
+++ b/fs/smb/server/transport_rdma.c
@@ -221,6 +221,7 @@ static void smb_direct_disconnect_wake_up_all(struct smbdirect_socket *sc)
* in order to notice th... |
8106978d400cc88a99fb94927afe8fec7391ca3e | Analyze and fix the following issue in the Linux kernel code: smb: server: let recv_done() queue a refill when the peer is low on credits | Problem Details:
In captures I saw that Windows was granting 191 credits in a batch
when its peer posted a lot of messages. We are asking for a
credit target of 255 and 191 is 252*3/4.
So we also use that logic in order to fill the
recv buffers available to the peer.
Fixes: a7eef6144c97 ("smb: server: queue post_recv... | ```diff
diff --git a/fs/smb/server/transport_rdma.c b/fs/smb/server/transport_rdma.c
index c66f237dc106..4a473df1f2b3 100644
--- a/fs/smb/server/transport_rdma.c
+++ b/fs/smb/server/transport_rdma.c
@@ -644,6 +644,7 @@ static void recv_done(struct ib_cq *cq, struct ib_wc *wc)
struct smbdirect_data_transfer *data_tra... |
26ad87a2cfb8c1384620d1693a166ed87303046e | Analyze and fix the following issue in the Linux kernel code: smb: server: make use of smbdirect_socket.recv_io.credits.available | Problem Details:
The logic off managing recv credits by counting posted recv_io and
granted credits is racy.
That's because the peer might already consumed a credit,
but between receiving the incoming recv at the hardware
and processing the completion in the 'recv_done' functions
we likely have a window where we grant... | ```diff
diff --git a/fs/smb/server/transport_rdma.c b/fs/smb/server/transport_rdma.c
index e4273932e7e4..c66f237dc106 100644
--- a/fs/smb/server/transport_rdma.c
+++ b/fs/smb/server/transport_rdma.c
@@ -1028,6 +1028,8 @@ static void smb_direct_post_recv_credits(struct work_struct *work)
}
}
+ atomic_add(credits,... |
8e94268b21c8235d430ce1aa6dc0b15952744b9b | Analyze and fix the following issue in the Linux kernel code: smb: smbdirect: introduce smbdirect_socket.send_io.bcredits.* | Problem Details:
It turns out that our code will corrupt the stream of
reassabled data transfer messages when we trigger an
immendiate (empty) send.
In order to fix this we'll have a single 'batch' credit per
connection. And code getting that credit is free to use
as much messages until remaining_length reaches 0, the... | ```diff
diff --git a/fs/smb/common/smbdirect/smbdirect_socket.h b/fs/smb/common/smbdirect/smbdirect_socket.h
index 403a8b2cd30e..95265192bb01 100644
--- a/fs/smb/common/smbdirect/smbdirect_socket.h
+++ b/fs/smb/common/smbdirect/smbdirect_socket.h
@@ -162,6 +162,17 @@ struct smbdirect_socket {
mempool_t *pool;
}... |
6e3c5052f9686192e178806e017b7377155f4bab | Analyze and fix the following issue in the Linux kernel code: smb: smbdirect: introduce smbdirect_socket.recv_io.credits.available | Problem Details:
The logic off managing recv credits by counting posted recv_io and
granted credits is racy.
That's because the peer might already consumed a credit,
but between receiving the incoming recv at the hardware
and processing the completion in the 'recv_done' functions
we likely have a window where we grant... | ```diff
diff --git a/fs/smb/common/smbdirect/smbdirect_socket.h b/fs/smb/common/smbdirect/smbdirect_socket.h
index ee4c2726771a..403a8b2cd30e 100644
--- a/fs/smb/common/smbdirect/smbdirect_socket.h
+++ b/fs/smb/common/smbdirect/smbdirect_socket.h
@@ -239,6 +239,7 @@ struct smbdirect_socket {
*/
struct {
u16 ... |
e5ac3ff6c6e7ea3bd0859edb80b9241135fe10c0 | Analyze and fix the following issue in the Linux kernel code: cifs: SMB1 split: cifs_debug.c | Problem Details:
Split SMB1 bits from cifs_debug.c to smb1debug.c.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Steve French <sfrench@samba.org>
cc: Paulo Alcantara <pc@manguebit.org>
cc: Enzo Matsumiya <ematsumiya@suse.de>
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-kernel@vge... | ```diff
diff --git a/fs/smb/client/Makefile b/fs/smb/client/Makefile
index 9754b4776df8..c51f67a5caaa 100644
--- a/fs/smb/client/Makefile
+++ b/fs/smb/client/Makefile
@@ -34,6 +34,7 @@ cifs-$(CONFIG_CIFS_ROOT) += cifsroot.o
cifs-$(CONFIG_CIFS_ALLOW_INSECURE_LEGACY) += \
cifssmb.o \
+ smb1debug.o \
smb1ops.o \
... |
1e6f98f3e8b2f580e8a4666f77909d8122703b83 | Analyze and fix the following issue in the Linux kernel code: cifs: Fix cifs_dump_mids() to call ->dump_detail | Problem Details:
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Steve French <sfrench@samba.org>
cc: Paulo Alcantara <pc@manguebit.org>
cc: Enzo Matsumiya <ematsumiya@suse.de>
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-kernel@vger.kernel.org
Acked-by: Enzo Matsumiya <ematsumiya@s... | ```diff
diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c
index 415b73970143..ed23a0db1456 100644
--- a/fs/smb/client/cifs_debug.c
+++ b/fs/smb/client/cifs_debug.c
@@ -78,7 +78,7 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
cifs_dbg(VFS, "IsMult: %d IsEnd: %d\n",
mid_entry->multiRsp... |
7e335c003e18e9154dec1ba409f99f903f99cbac | Analyze and fix the following issue in the Linux kernel code: cifs: Scripted clean up fs/smb/client/cifs_debug.h | Problem Details:
Remove externs, correct argument names and reformat declarations.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Steve French <sfrench@samba.org>
cc: Paulo Alcantara <pc@manguebit.org>
cc: Enzo Matsumiya <ematsumiya@suse.de>
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: ... | ```diff
diff --git a/fs/smb/client/cifs_debug.h b/fs/smb/client/cifs_debug.h
index e0035ff42dba..35bd5c8e1d71 100644
--- a/fs/smb/client/cifs_debug.h
+++ b/fs/smb/client/cifs_debug.h
@@ -15,7 +15,8 @@
#define pr_fmt(fmt) "CIFS: " fmt
void cifs_dump_mem(char *label, void *data, int length);
-void cifs_dump_detail(vo... |
556bb341f9f2ead773f52ae466296ea0a9c927f8 | Analyze and fix the following issue in the Linux kernel code: smb: client: introduce multichannel async work during mount | Problem Details:
Mounts can experience large delays when servers advertise interfaces
that are unreachable from the client.
To fix this, decouple channel addition from the synchronous mount path
by introducing struct mchan_mount and running channel setup as
background work.
Reviewed-by: Shyam Prasad N <sprasad@micros... | ```diff
diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h
index 103c92442c28..5e70487decfb 100644
--- a/fs/smb/client/cifsglob.h
+++ b/fs/smb/client/cifsglob.h
@@ -1798,6 +1798,11 @@ struct cifs_mount_ctx {
struct cifs_tcon *tcon;
};
+struct mchan_mount {
+ struct work_struct work;
+ struct cifs_ses... |
ec306600d5ba7148c9dbf8f5a8f1f5c1a044a241 | Analyze and fix the following issue in the Linux kernel code: smb: client: split cached_fid bitfields to avoid shared-byte RMW races | Problem Details:
is_open, has_lease and on_list are stored in the same bitfield byte in
struct cached_fid but are updated in different code paths that may run
concurrently. Bitfield assignments generate byte read–modify–write
operations (e.g. `orb $mask, addr` on x86_64), so updating one flag can
restore stale values o... | ```diff
diff --git a/fs/smb/client/cached_dir.h b/fs/smb/client/cached_dir.h
index 1e383db7c337..5091bf45345e 100644
--- a/fs/smb/client/cached_dir.h
+++ b/fs/smb/client/cached_dir.h
@@ -36,10 +36,10 @@ struct cached_fid {
struct list_head entry;
struct cached_fids *cfids;
const char *path;
- bool has_lease:1;
- ... |
96c4af418586ee9a6aab61738644366426e05316 | Analyze and fix the following issue in the Linux kernel code: cifs: Fix locking usage for tcon fields | Problem Details:
We used to use the cifs_tcp_ses_lock to protect a lot of objects
that are not just the server, ses or tcon lists. We later introduced
srv_lock, ses_lock and tc_lock to protect fields within the
corresponding structs. This was done to provide a more granular
protection and avoid unnecessary serializatio... | ```diff
diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c
index df9977030d19..2a6b8ce80be2 100644
--- a/fs/smb/client/cached_dir.c
+++ b/fs/smb/client/cached_dir.c
@@ -792,11 +792,11 @@ static void cfids_laundromat_worker(struct work_struct *work)
cfid->dentry = NULL;
if (cfid->is_open) {
- ... |
a5ca32d031bbba5160e1f555aabb75a3f40f918d | Analyze and fix the following issue in the Linux kernel code: netfs: avoid double increment of retry_count in subreq | Problem Details:
This change fixes the instance of double incrementing of
retry_count. The increment of this count already happens
when netfs_reissue_write gets called. Incrementing this
value before is not necessary.
Fixes: 4acb665cf4f3 ("netfs: Work around recursion by abandoning retry if nothing read")
Acked-by: Da... | ```diff
diff --git a/fs/netfs/write_retry.c b/fs/netfs/write_retry.c
index fc9c3e0d34d8..29489a23a220 100644
--- a/fs/netfs/write_retry.c
+++ b/fs/netfs/write_retry.c
@@ -98,7 +98,6 @@ static void netfs_retry_write_stream(struct netfs_io_request *wreq,
subreq->start = start;
subreq->len = len;
__clear_bit(N... |
ebbbc4bfad4cb355d17c671223d0814ee3ef4eda | Analyze and fix the following issue in the Linux kernel code: smb: client: fix potential UAF and double free in smb2_open_file() | Problem Details:
Zero out @err_iov and @err_buftype before retrying SMB2_open() to
prevent an UAF bug if @data != NULL, otherwise a double free.
Fixes: e3a43633023e ("smb/client: fix memory leak in smb2_open_file()")
Reported-by: David Howells <dhowells@redhat.com>
Closes: https://lore.kernel.org/r/2892312.1770306653@... | ```diff
diff --git a/fs/smb/client/smb2file.c b/fs/smb/client/smb2file.c
index 2dd08388ea87..1f7f284a7844 100644
--- a/fs/smb/client/smb2file.c
+++ b/fs/smb/client/smb2file.c
@@ -179,6 +179,8 @@ int smb2_open_file(const unsigned int xid, struct cifs_open_parms *oparms,
&err_buftype);
if (rc == -EACCES && re... |
efdc383d1cc28d45cbf5a23b5ffa997010aaacb4 | Analyze and fix the following issue in the Linux kernel code: i2c: imx-lpi2c: fix SMBus block read NACK after byte count | Problem Details:
The LPI2C controller sends a NACK at the end of a receive command
unless another receive command is already queued in MTDR. During
SMBus block reads, this causes the controller to NACK immediately
after receiving the block length byte, aborting the transfer before
the data bytes are read.
Fix this by ... | ```diff
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c
index be7134eefc2f..f97f73faec82 100644
--- a/drivers/i2c/busses/i2c-imx-lpi2c.c
+++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
@@ -5,6 +5,7 @@
* Copyright 2016 Freescale Semiconductor, Inc.
*/
+#include <linux/bitfield.h>
#in... |
3a92733e052753d87fdd56bd6f621f969be28447 | Analyze and fix the following issue in the Linux kernel code: ALSA: ctxfi: Add quirk for SE-300PCIE variant (160b:0102) | Problem Details:
Add quirk for the Onkyo SE-300PCIE variant with PCI subsystem ID
(160b:0102). This variant (OK0011) was found in the official Windows
driver packages.
Also, reorder entries and fix the indentation to maintain
consistency.
Signed-off-by: Harin Lee <me@harin.net>
Link: https://patch.msgid.link/20260208... | ```diff
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c
index 227d8c8490e1..a25a599fc5be 100644
--- a/sound/pci/ctxfi/ctatc.c
+++ b/sound/pci/ctxfi/ctatc.c
@@ -52,18 +52,19 @@ static const struct snd_pci_quirk subsys_20k1_list[] = {
static const struct snd_pci_quirk subsys_20k2_list[] = {
SND_PCI_QUIR... |
ff9aeb6bd14dbc70651971c81e81fa8269c3101a | Analyze and fix the following issue in the Linux kernel code: perf test parse-metric: Ensure aggregate counts appear to have run | Problem Details:
Commit bb5a920b90991279 ("perf stat: Ensure metrics are displayed even
with failed events") with failed events") made it so that counters which
weren't enabled in the kernel were handled as NaN in metrics.
This caused the "Parse and process metrics" test to start failing as it
wasn't putting a non-zer... | ```diff
diff --git a/tools/perf/tests/parse-metric.c b/tools/perf/tests/parse-metric.c
index 6bbc209a5c6a..7c7f489a5eb0 100644
--- a/tools/perf/tests/parse-metric.c
+++ b/tools/perf/tests/parse-metric.c
@@ -41,6 +41,8 @@ static void load_runtime_stat(struct evlist *evlist, struct value *vals)
count = find_value(evse... |
c60ee958d625998422ff833ec0de0dcafc1165fa | Analyze and fix the following issue in the Linux kernel code: perf test record.sh: Fix shellcheck warning | Problem Details:
Add quotes to avoid the following warning:
```
In tests/shell/record.sh line 264:
[ $(uname -m) = "s390x" ] && {
^---------^ SC2046 (warning): Quote this to prevent word splitting.
For more information:
https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
```
Fixes: c73... | ```diff
diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
index 46b96d565680..7cb81cf3444a 100755
--- a/tools/perf/tests/shell/record.sh
+++ b/tools/perf/tests/shell/record.sh
@@ -261,7 +261,7 @@ test_uid() {
test_leader_sampling() {
echo "Basic leader sampling test"
events="{cycle... |
f5183ee97bd67b3dd3cc6fb2fc97f2a6d3e36458 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda/generic: fix typos in comments | Problem Details:
Fix 'ony' -> 'only' and 'evalute' -> 'evaluate' in code comments.
Signed-off-by: Pedro Amarante <ppedrolia@gmail.com>
Link: https://patch.msgid.link/20260208052439.11498-1-ppedrolia@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/hda/codecs/generic.c b/sound/hda/codecs/generic.c
index 443500a3518f..b75a5e9470df 100644
--- a/sound/hda/codecs/generic.c
+++ b/sound/hda/codecs/generic.c
@@ -1517,7 +1517,7 @@ static int count_multiio_pins(struct hda_codec *codec, hda_nid_t reference_pin)
/*
* multi-io helper
*
- * Whe... |
76149d53502cf17ef3ae454ff384551236fba867 | Analyze and fix the following issue in the Linux kernel code: procfs: fix missing RCU protection when reading real_parent in do_task_stat() | Problem Details:
When reading /proc/[pid]/stat, do_task_stat() accesses task->real_parent
without proper RCU protection, which leads to:
cpu 0 cpu 1
----- -----
do_task_stat
var = task->real_parent
release_task
... | ```diff
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 39e9246f6e4a..f447e734612a 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -529,7 +529,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
}
sid = task_session_nr_ns(task, ns);
- ppid = task_tgid_nr_ns(task->real_parent, ... |
cafe4074a7221dca2fa954dd1ab0cf99b6318e23 | Analyze and fix the following issue in the Linux kernel code: watchdog/softlockup: fix sample ring index wrap in need_counting_irqs() | Problem Details:
cpustat_tail indexes cpustat_util[], which is a NUM_SAMPLE_PERIODS-sized
ring buffer. need_counting_irqs() currently wraps the index using
NUM_HARDIRQ_REPORT, which only happens to match NUM_SAMPLE_PERIODS.
Use NUM_SAMPLE_PERIODS for the wrap to keep the ring math correct even if
the NUM_HARDIRQ_REPOR... | ```diff
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index b4d5fbdb933a..7d675781bc91 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -550,7 +550,7 @@ static bool need_counting_irqs(void)
u8 util;
int tail = __this_cpu_read(cpustat_tail);
- tail = (tail + NUM_HARDIRQ_REPORT - 1) % NUM_HARDIRQ_REPO... |
9dc052234da736f7749f19ab6936342ec7dbe3ac | Analyze and fix the following issue in the Linux kernel code: kcsan, compiler_types: avoid duplicate type issues in BPF Type Format | Problem Details:
Enabling KCSAN is causing a large number of duplicate types in BTF for
core kernel structs like task_struct [1]. This is due to the definition
in include/linux/compiler_types.h
`#ifdef __SANITIZE_THREAD__
...
`#define __data_racy volatile
..
`#else
...
`#define __data_racy
...
`#endif
Because some o... | ```diff
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index d3318a3c2577..86111a189a87 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -303,6 +303,22 @@ struct ftrace_likely_data {
# define __no_kasan_or_inline __always_inline
#endif
+#ifdef CONFIG_... |
0758293d5dc88a45b910f46a0c7558bf6b09e01d | Analyze and fix the following issue in the Linux kernel code: kho: fix doc for kho_restore_pages() | Problem Details:
This function returns NULL if kho_restore_page() returns NULL, which
happens in a couple of corner cases. It never returns an error code.
Link: https://lkml.kernel.org/r/20260123190506.1058669-1-tycho@kernel.org
Signed-off-by: Tycho Andersen (AMD) <tycho@kernel.org>
Reviewed-by: Mike Rapoport (Micros... | ```diff
diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c
index 8a2b2a7e50fc..fb3a7b67676e 100644
--- a/kernel/liveupdate/kexec_handover.c
+++ b/kernel/liveupdate/kexec_handover.c
@@ -299,7 +299,7 @@ EXPORT_SYMBOL_GPL(kho_restore_folio);
* Restore a contiguous list of order 0 pages ... |
989b3c5af63ecb1cbaf1598fe3f79865538bc1ea | Analyze and fix the following issue in the Linux kernel code: list: add primitives for private list manipulations | Problem Details:
Patch series "list private v2 & luo flb", v9.
This series introduces two connected infrastructure improvements: a new
API for handling private linked lists, and the "File-Lifecycle-Bound"
(FLB) mechanism for the Live Update Orchestrator.
1. Private List Primitives (patches 1-3)
Recently, Linux in... | ```diff
diff --git a/Documentation/core-api/list.rst b/Documentation/core-api/list.rst
index 86873ce9adbf..241464ca0549 100644
--- a/Documentation/core-api/list.rst
+++ b/Documentation/core-api/list.rst
@@ -774,3 +774,12 @@ Full List API
.. kernel-doc:: include/linux/list.h
:internal:
+
+Private List API
+======... |
90079798f1d748e97c74e23736491543577b8aee | Analyze and fix the following issue in the Linux kernel code: delayacct: fix uapi timespec64 definition | Problem Details:
The custom definition of 'struct timespec64' is incompatible with both the
kernel's internal definition and the glibc type, at least on big-endian
targets that have the tv_nsec field in a different place, and the
definition clashes with any userspace that also defines a timespec64
structure.
Running t... | ```diff
diff --git a/include/uapi/linux/taskstats.h b/include/uapi/linux/taskstats.h
index 1b31e8e14d2f..3ae25f3ce067 100644
--- a/include/uapi/linux/taskstats.h
+++ b/include/uapi/linux/taskstats.h
@@ -18,16 +18,7 @@
#define _LINUX_TASKSTATS_H
#include <linux/types.h>
-#ifdef __KERNEL__
-#include <linux/time64.h>
... |
007be4327e443d79c9dd9e56dc16c36f6395d208 | Analyze and fix the following issue in the Linux kernel code: hwmon: (max16065) Use READ/WRITE_ONCE to avoid compiler optimization induced race | Problem Details:
Simply copying shared data to a local variable cannot prevent data
races. The compiler is allowed to optimize away the local copy and
re-read the shared memory, causing a Time-of-Check Time-of-Use (TOCTOU)
issue if the data changes between the check and the usage.
To enforce the use of the local varia... | ```diff
diff --git a/drivers/hwmon/max16065.c b/drivers/hwmon/max16065.c
index 4c9e7892a73c..43fbb9b26b10 100644
--- a/drivers/hwmon/max16065.c
+++ b/drivers/hwmon/max16065.c
@@ -151,27 +151,27 @@ static struct max16065_data *max16065_update_device(struct device *dev)
int i;
for (i = 0; i < data->num_adc; i++)
... |
ddb2325ed1e1219316bff8f8126be297aedba6b6 | Analyze and fix the following issue in the Linux kernel code: hwmon: (nct6775) use sysfs_emit instead of sprintf | Problem Details:
Replace sprintf() with sysfs_emit() in sysfs 'show' functions.
sysfs_emit() is preferred because it automatically handles the
buffer size and PAGE_SIZE boundary checks, preventing potential
buffer overflows.
This aligns the legacy code with the new functions in the driver
that already utilize sysfs_em... | ```diff
diff --git a/drivers/hwmon/nct6775-core.c b/drivers/hwmon/nct6775-core.c
index 79bc67ffb998..d668dc390def 100644
--- a/drivers/hwmon/nct6775-core.c
+++ b/drivers/hwmon/nct6775-core.c
@@ -1721,8 +1721,8 @@ show_in_reg(struct device *dev, struct device_attribute *attr, char *buf)
if (IS_ERR(data))
return PTR... |
eaeb29ce7c4aecd9652797ee99e90f1523f3fc24 | Analyze and fix the following issue in the Linux kernel code: hwmon: pmbus: fix table in STEF48H28 documentation | Problem Details:
"make htmldocs" reports build errors/warnings:
Documentation/hwmon/stef48h28.rst:45: ERROR: Missing matching underline for section title overline.
=========================================================
in1_label "vin".
in1_input Measured voltage. From READ_VIN register. ... | ```diff
diff --git a/Documentation/hwmon/stef48h28.rst b/Documentation/hwmon/stef48h28.rst
index 00bef9e55651..63d75e9affd8 100644
--- a/Documentation/hwmon/stef48h28.rst
+++ b/Documentation/hwmon/stef48h28.rst
@@ -42,7 +42,7 @@ The driver supports standard PMBus driver platform data.
Sysfs entries
-------------
-=... |
669cf162f7a133099c7dc5db96f8283c98e73f1d | Analyze and fix the following issue in the Linux kernel code: hwmon: Add support for HiTRON HAC300S PSU | Problem Details:
Add Support for HiTRON HAC300S PSU. This is a AC/DC hot-swappable
CompactPCI Serial Dual output active current sharing switching power
supply with a 312W rating.
Signed-off-by: Vasileios Amoiridis <vasileios.amoiridis@cern.ch>
Link: https://lore.kernel.org/r/20260119190806.35276-3-vassilisamir@gmail.c... | ```diff
diff --git a/Documentation/hwmon/hac300s.rst b/Documentation/hwmon/hac300s.rst
new file mode 100644
index 000000000000..8b11d3e72295
--- /dev/null
+++ b/Documentation/hwmon/hac300s.rst
@@ -0,0 +1,37 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+Kernel driver hac300s
+=====================
+
+Supported chips:
+
+ ... |
438921da7b795018d832b40955d47a42d0d53e4d | Analyze and fix the following issue in the Linux kernel code: dt-bindings: trivial-devices: Add hitron,hac300s | Problem Details:
Add HiTRON HAC300S PSU to trivial devices since it is simple PMBUS
capable device.
Since this is the first supported device from this vendor, document its
name to the vendor-prefixes.yaml file as well.
Signed-off-by: Vasileios Amoiridis <vasileios.amoiridis@cern.ch>
Acked-by: Krzysztof Kozlowski <krz... | ```diff
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index 53b102b24950..ff1c6b4975c1 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -123,6 +123,8 @@ prope... |
9cb8b0f289560728dbb8b88158e7a957e2e90a14 | Analyze and fix the following issue in the Linux kernel code: workqueue: replace BUG_ON with panic in panic_on_wq_watchdog | Problem Details:
Replace BUG_ON() with panic() in panic_on_wq_watchdog(). This is not
a bug condition but a deliberate forced panic requested by the user
via module parameters to crash the system for debugging purposes.
Using panic() instead of BUG_ON() makes this intent clearer and provides
more informative output ab... | ```diff
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 68e664d7dbec..e6c249f2fb46 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -7637,10 +7637,14 @@ static void panic_on_wq_watchdog(unsigned int stall_time_sec)
if (wq_panic_on_stall) {
wq_stall++;
- BUG_ON(wq_stall >= wq_panic_on_stall... |
980cd426a25747daf8ed25e2a1904b2d26ffbb3d | Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: replace rtw_zmalloc() with kzalloc() | Problem Details:
Replace the wrapper function rtw_zmalloc() with standard kzalloc().
Use kzalloc() for rtw_malloc() calls that were followed by manual
zero initialization.
About GFP Flags:
- GFP_ATOMIC is used for allocations in atomic contexts such as
spinlock-protected sections, tasklets, and timer handlers.
- GFP... | ```diff
diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
index 9a40b107704d..79069055da7a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -1229,13 +1229,13 @@ u8 rtw_ap_set_pairwise_key(struct adapter *padapter, struct s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.