id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
ac0b5591321330d65001f15f8672ac12b612d7a9 | Analyze and fix the following issue in the Linux kernel code: m68k: amiga: pcmcia: Replace set but not used variable by READ_ONCE() | Problem Details:
When building with W=1:
arch/m68k/amiga/pcmcia.c: In function ‘pcmcia_reset’:
arch/m68k/amiga/pcmcia.c:29:23: warning: variable ‘b’ set but not used [-Wunused-but-set-variable]
29 | unsigned char b;
| ^
Fix this by using READ_ONCE(), and removing the va... | ```diff
diff --git a/arch/m68k/amiga/pcmcia.c b/arch/m68k/amiga/pcmcia.c
index 7106f0c3639b..63cce6b590df 100644
--- a/arch/m68k/amiga/pcmcia.c
+++ b/arch/m68k/amiga/pcmcia.c
@@ -26,11 +26,10 @@ static unsigned char cfg_byte = GAYLE_CFG_0V|GAYLE_CFG_150NS;
void pcmcia_reset(void)
{
unsigned long reset_start_time = ... |
45dacf07fb1c308df3e95154f427f6ae49b56705 | Analyze and fix the following issue in the Linux kernel code: m68k: emu: Mark version[] __maybe_unused | Problem Details:
When building with W=1:
arch/m68k/emu/nfeth.c:42:19: warning: ‘version’ defined but not used [-Wunused-const-variable=]
42 | static const char version[] =
| ^~~~~~~
Fix this while obeying the wishes of the original copyright holders by
marking version[] with __maybe_un... | ```diff
diff --git a/arch/m68k/emu/nfeth.c b/arch/m68k/emu/nfeth.c
index 1a5d1e8eb4c8..26e68813f351 100644
--- a/arch/m68k/emu/nfeth.c
+++ b/arch/m68k/emu/nfeth.c
@@ -39,7 +39,7 @@ enum {
#define MAX_UNIT 8
/* These identify the driver base version and may not be removed. */
-static const char version[] =
+static c... |
6156086e554cd9837b81e77a06451b811da2216e | Analyze and fix the following issue in the Linux kernel code: m68k: emu: Remove unused vsnprintf() return value in nfprint() | Problem Details:
When building with W=1:
arch/m68k/emu/natfeat.c: In function ‘nfprint’:
arch/m68k/emu/natfeat.c:59:13: warning: variable ‘n’ set but not used [-Wunused-but-set-variable]
59 | int n;
| ^
As the return value of vsnprintf() is unused, and serves no practical
purpose... | ```diff
diff --git a/arch/m68k/emu/natfeat.c b/arch/m68k/emu/natfeat.c
index d124c62022c2..777c7b42a50f 100644
--- a/arch/m68k/emu/natfeat.c
+++ b/arch/m68k/emu/natfeat.c
@@ -56,10 +56,9 @@ void nfprint(const char *fmt, ...)
{
static char buf[256];
va_list ap;
- int n;
va_start(ap, fmt);
- n = vsnprintf(buf, 2... |
217614e937ce4ce7e7ee112fd11fc791beeef2a7 | Analyze and fix the following issue in the Linux kernel code: m68k: mm: Add and use "fault.h" | Problem Details:
When building with W=1:
arch/m68k/mm/fault.c:22:5: warning: no previous prototype for ‘send_fault_sig’ [-Wmissing-prototypes]
22 | int send_fault_sig(struct pt_regs *regs)
| ^~~~~~~~~~~~~~
arch/m68k/mm/fault.c:68:5: warning: no previous prototype for ‘do_page_fault’ [-Wmissing-pr... | ```diff
diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c
index 14055d676161..1af5e6082467 100644
--- a/arch/m68k/kernel/sys_m68k.c
+++ b/arch/m68k/kernel/sys_m68k.c
@@ -35,8 +35,7 @@
#include <asm/tlb.h>
-asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address,
- unsig... |
87d7186e61854262b2d56c7639fd8aeec6122bd2 | Analyze and fix the following issue in the Linux kernel code: m68k: mm: Move paging_init() to common <asm/pgtable.h> | Problem Details:
When building with W=1:
arch/m68k/mm/motorola.c:414:13: warning: no previous prototype for ‘paging_init’ [-Wmissing-prototypes]
414 | void __init paging_init(void)
| ^~~~~~~~~~~
arch/m68k/mm/sun3mmu.c:36:13: warning: no previous prototype for ‘paging_init’ [-Wmissing-proto... | ```diff
diff --git a/arch/m68k/include/asm/pgtable.h b/arch/m68k/include/asm/pgtable.h
index ad15d655a9bf..27525c6a12fd 100644
--- a/arch/m68k/include/asm/pgtable.h
+++ b/arch/m68k/include/asm/pgtable.h
@@ -1,6 +1,15 @@
/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __M68K_PGTABLE_H
+#define __M68K_PGTABLE_H
+
#ifde... |
2c0bb8cb99317a59d913dd3be5fd97bf8009be76 | Analyze and fix the following issue in the Linux kernel code: m68k: mm: Include <asm/hwtest.h> for hwreg_() | Problem Details:
When building with W=1:
arch/m68k/mm/hwtest.c:29:5: warning: no previous prototype for ‘hwreg_present’ [-Wmissing-prototypes]
29 | int hwreg_present(volatile void *regp)
| ^~~~~~~~~~~~~
arch/m68k/mm/hwtest.c:62:5: warning: no previous prototype for ‘hwreg_write’ [-Wmissing-protot... | ```diff
diff --git a/arch/m68k/mm/hwtest.c b/arch/m68k/mm/hwtest.c
index fe99aa99987e..8ee7a3368688 100644
--- a/arch/m68k/mm/hwtest.c
+++ b/arch/m68k/mm/hwtest.c
@@ -26,6 +26,8 @@
#include <linux/module.h>
+#include <asm/hwtest.h>
+
int hwreg_present(volatile void *regp)
{
int ret = 0;
``` |
53cab6a2b348fceffc6c20323ca84eff3bab53d3 | Analyze and fix the following issue in the Linux kernel code: m68k: kernel: Add and use "vectors.h" | Problem Details:
When building with W=1:
arch/m68k/kernel/vectors.c:52:13: warning: no previous prototype for ‘base_trap_init’ [-Wmissing-prototypes]
52 | void __init base_trap_init(void)
| ^~~~~~~~~~~~~~
Fix this by introducing a new header file "vectors.h" for holding the
prototypes of fun... | ```diff
diff --git a/arch/m68k/kernel/vectors.c b/arch/m68k/kernel/vectors.c
index 68762fc1dc97..667e848070f4 100644
--- a/arch/m68k/kernel/vectors.c
+++ b/arch/m68k/kernel/vectors.c
@@ -28,6 +28,8 @@
#include <asm/fpu.h>
#include <asm/traps.h>
+#include "vectors.h"
+
/* assembler routines */
asmlinkage void syst... |
90829e82127d8d98abb1cdebeb7ef675d4e90521 | Analyze and fix the following issue in the Linux kernel code: m68k: kernel: Add and use "traps.h" | Problem Details:
When building with W=1:
arch/m68k/kernel/traps.c:754:17: warning: no previous prototype for ‘buserr_c’ [-Wmissing-prototypes]
754 | asmlinkage void buserr_c(struct frame *fp)
| ^~~~~~~~
arch/m68k/kernel/traps.c:1140:17: warning: no previous prototype for ‘set_esp0’ [-W... | ```diff
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c
index b3fee39f8f51..d408334712f7 100644
--- a/arch/m68k/kernel/traps.c
+++ b/arch/m68k/kernel/traps.c
@@ -41,6 +41,8 @@
#include <asm/siginfo.h>
#include <asm/tlbflush.h>
+#include "traps.h"
+
static const char *vec_names[] = {
[VEC_RESETSP... |
dbe93977e523ff70ff66da824513d203207e394a | Analyze and fix the following issue in the Linux kernel code: m68k: kernel: Add and use "signal.h" | Problem Details:
When building with W=1:
arch/m68k/kernel/signal.c:756:18: warning: no previous prototype for ‘do_sigreturn’ [-Wmissing-prototypes]
756 | asmlinkage void *do_sigreturn(struct pt_regs *regs, struct switch_stack *sw)
| ^~~~~~~~~~~~
arch/m68k/kernel/signal.c:783:18: warni... | ```diff
diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c
index 459c5ff69fcf..e628b859ef21 100644
--- a/arch/m68k/kernel/signal.c
+++ b/arch/m68k/kernel/signal.c
@@ -51,6 +51,8 @@
#include <asm/ucontext.h>
#include <asm/cacheflush.h>
+#include "signal.h"
+
#ifdef CONFIG_MMU
/*
diff --git a/arch... |
7afc185016087b5181500f0394bec1feb8bdade0 | Analyze and fix the following issue in the Linux kernel code: m68k: kernel: Add and use "ptrace.h" | Problem Details:
When building with W=1:
arch/m68k/kernel/ptrace.c:275:16: warning: no previous prototype for ‘syscall_trace_enter’ [-Wmissing-prototypes]
275 | asmlinkage int syscall_trace_enter(void)
| ^~~~~~~~~~~~~~~~~~~
arch/m68k/kernel/ptrace.c:288:17: warning: no previous prototyp... | ```diff
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c
index cd0172d29430..c20d590e4297 100644
--- a/arch/m68k/kernel/ptrace.c
+++ b/arch/m68k/kernel/ptrace.c
@@ -26,6 +26,8 @@
#include <asm/page.h>
#include <asm/processor.h>
+#include "ptrace.h"
+
/*
* does not yet catch signals sent when th... |
ab8151fc5e68f6208ee24fddbeb7daf5f6fe347d | Analyze and fix the following issue in the Linux kernel code: m68k: kernel: Add and use "process.h" | Problem Details:
When building with W=1:
arch/m68k/kernel/process.c:115:16: warning: no previous prototype for ‘m68k_clone’ [-Wmissing-prototypes]
115 | asmlinkage int m68k_clone(struct pt_regs *regs)
| ^~~~~~~~~~
arch/m68k/kernel/process.c:136:16: warning: no previous prototype for ‘m6... | ```diff
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c
index e06ce147c0b7..2584e94e2134 100644
--- a/arch/m68k/kernel/process.c
+++ b/arch/m68k/kernel/process.c
@@ -38,6 +38,7 @@
#include <asm/machdep.h>
#include <asm/setup.h>
+#include "process.h"
asmlinkage void ret_from_fork(void);
asml... |
ef69fb4dce17c1e19bef7ba1b34fa37115171fee | Analyze and fix the following issue in the Linux kernel code: m68k: kernel: Add and use "ints.h" | Problem Details:
When building with W=1:
arch/m68k/kernel/ints.c:165:17: warning: no previous prototype for ‘handle_badint’ [-Wmissing-prototypes]
165 | asmlinkage void handle_badint(struct pt_regs *regs)
| ^~~~~~~~~~~~~
Fix this by introducing a new header file "ints.h" for holding the
p... | ```diff
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 5b8d66fbf383..cf2b13488476 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -26,6 +26,8 @@
#include <asm/q40ints.h>
#endif
+#include "ints.h"
+
extern u32 auto_irqhandler_fixup[];
extern u16 user_irqvec_fixup[];
di... |
0891c4740c22e8408bece7ff266791a523061041 | Analyze and fix the following issue in the Linux kernel code: m68k: kernel: Add and use <asm/syscalls.h> | Problem Details:
When building with W=1:
arch/m68k/kernel/sys_m68k.c:40:17: warning: no previous prototype for ‘sys_mmap2’ [-Wmissing-prototypes]
40 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
| ^~~~~~~~~
arch/m68k/kernel/sys_m68k.c:378:1: warning: no previous p... | ```diff
diff --git a/arch/m68k/include/asm/syscalls.h b/arch/m68k/include/asm/syscalls.h
new file mode 100644
index 000000000000..fb3639acd07b
--- /dev/null
+++ b/arch/m68k/include/asm/syscalls.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef _ASM_M68K_SYSCALLS_H
+#define _ASM_M68K_SYSCALLS_H
+
... |
e036678a4b8f2bcb362a2ca8adfd6a428321a38e | Analyze and fix the following issue in the Linux kernel code: m68k: kernel: Make bad_super_trap() static | Problem Details:
When building with W=1:
arch/m68k/kernel/traps.c:968:6: warning: no previous prototype for ‘bad_super_trap’ [-Wmissing-prototypes]
968 | void bad_super_trap (struct frame *fp)
| ^~~~~~~~~~~~~~
Fix this by making bad_super_trap() static.
There was never a user outside arch/m68k/kerne... | ```diff
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c
index a700807c9b6d..b3fee39f8f51 100644
--- a/arch/m68k/kernel/traps.c
+++ b/arch/m68k/kernel/traps.c
@@ -965,7 +965,7 @@ void show_stack(struct task_struct *task, unsigned long *stack,
* real 68k parts, but it won't hurt either.
*/
-void ba... |
e34b4acdf6488fbcdf890e72ecf925650c944503 | Analyze and fix the following issue in the Linux kernel code: m68k: kernel: Include <linux/cpu.h> for trap_init() | Problem Details:
When building with W=1:
arch/m68k/kernel/vectors.c:74:13: warning: no previous prototype for ‘trap_init’ [-Wmissing-prototypes]
74 | void __init trap_init (void)
| ^~~~~~~~~
Fix this by including <linux/cpu.h>.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-... | ```diff
diff --git a/arch/m68k/kernel/vectors.c b/arch/m68k/kernel/vectors.c
index 322c977bb9ec..68762fc1dc97 100644
--- a/arch/m68k/kernel/vectors.c
+++ b/arch/m68k/kernel/vectors.c
@@ -17,6 +17,7 @@
/*
* Sets up all exception vectors
*/
+#include <linux/cpu.h>
#include <linux/sched.h>
#include <linux/kernel.h>... |
b149353da471ddfc5d6e698784cf22bc55bff68b | Analyze and fix the following issue in the Linux kernel code: m68k: emu: Replace strlcpy() with strscpy() | Problem Details:
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
Direct r... | ```diff
diff --git a/arch/m68k/emu/natfeat.c b/arch/m68k/emu/natfeat.c
index b19dc00026d9..d124c62022c2 100644
--- a/arch/m68k/emu/natfeat.c
+++ b/arch/m68k/emu/natfeat.c
@@ -42,10 +42,10 @@ long nf_get_id(const char *feature_name)
{
/* feature_name may be in vmalloc()ed memory, so make a copy */
char name_copy[32... |
1fee121f8f2ade1ef2937f1b7d7b08775086fba9 | Analyze and fix the following issue in the Linux kernel code: m68k: math-emu: Add missing prototypes | Problem Details:
When building with W=1:
arch/m68k/math-emu/fp_arith.c:301:16: warning: no previous prototype for ‘fp_fsglmul’ [-Wmissing-prototypes]
301 | struct fp_ext *fp_fsglmul(struct fp_ext *dest, struct fp_ext *src)
| ^~~~~~~~~~
arch/m68k/math-emu/fp_arith.c:357:16: warning: no p... | ```diff
diff --git a/arch/m68k/math-emu/fp_arith.h b/arch/m68k/math-emu/fp_arith.h
index 65b11e3f452d..3f9c58b6d504 100644
--- a/arch/m68k/math-emu/fp_arith.h
+++ b/arch/m68k/math-emu/fp_arith.h
@@ -26,6 +26,8 @@ struct fp_ext *fp_fcmp(struct fp_ext *dest, struct fp_ext *src);
struct fp_ext *fp_ftst(struct fp_ext *des... |
54b76dc9707a12b063bcb4a5d68bdaad2dc28514 | Analyze and fix the following issue in the Linux kernel code: m68k: math-emu: Fix incorrect file reference in fp_log.c | Problem Details:
The file comment header refers to the wrong file.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/faf2244c3c80a4d70da5a18dd2a170a15b3ebd88.1692283195.git.geert@linux-m68k.org | ```diff
diff --git a/arch/m68k/math-emu/fp_log.c b/arch/m68k/math-emu/fp_log.c
index 0663067870f2..a8eac8c81757 100644
--- a/arch/m68k/math-emu/fp_log.c
+++ b/arch/m68k/math-emu/fp_log.c
@@ -1,6 +1,6 @@
/*
- fp_trig.c: floating-point math routines for the Linux-m68k
+ fp_log.c: floating-point math routines for the... |
184ff4f721638e37a5a5907bf98962b6d9318ef6 | Analyze and fix the following issue in the Linux kernel code: OPP: Fix -Wunsequenced in _of_add_opp_table_v1() | Problem Details:
Clang warns (or errors with CONFIG_WERROR=y):
drivers/opp/of.c:1081:28: error: multiple unsequenced modifications to 'val' [-Werror,-Wunsequenced]
1081 | .freq = be32_to_cpup(val++) * 1000,
| ^
1082 | ... | ```diff
diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index ade6d42cae46..ae5c405bbf9a 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -1077,9 +1077,11 @@ static int _of_add_opp_table_v1(struct device *dev, struct opp_table *opp_table)
val = prop->value;
while (nr) {
+ unsigned long freq = be32_to_cpu... |
9af867c05b5d9f54f190743a1c761d70038c83b3 | Analyze and fix the following issue in the Linux kernel code: HID: i2c-hid: fix handling of unpopulated devices | Problem Details:
A recent commit reordered probe so that the interrupt line is now
requested before making sure that the device exists.
This breaks machines like the Lenovo ThinkPad X13s which rely on the
HID driver to probe second-source devices and only register the variant
that is actually populated. Specifically, ... | ```diff
diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
index 9601c0605fd9..2735cd585af0 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -998,45 +998,29 @@ static int i2c_hid_core_resume(struct i2c_hid *ihid)
return hid_driver_reset_resu... |
339818380868e34ff2c482db05031bf47a67d609 | Analyze and fix the following issue in the Linux kernel code: cxl/memdev: Fix sanitize vs decoder setup locking | Problem Details:
The sanitize operation is destructive and the expectation is that the
device is unmapped while in progress. The current implementation does a
lockless check for decoders being active, but then does nothing to
prevent decoders from racing to be committed. Introduce state tracking
to resolve this race.
... | ```diff
diff --git a/drivers/cxl/core/core.h b/drivers/cxl/core/core.h
index 45e7e044cf4a..8e5f3d84311e 100644
--- a/drivers/cxl/core/core.h
+++ b/drivers/cxl/core/core.h
@@ -75,6 +75,7 @@ resource_size_t __rcrb_to_component(struct device *dev,
enum cxl_rcrb which);
extern struct rw_semaphore cxl_dpa_rwsem;... |
5f2da19714465739da2449253b13ac06cb353a26 | Analyze and fix the following issue in the Linux kernel code: cxl/pci: Fix sanitize notifier setup | Problem Details:
Fix a race condition between the mailbox-background command interrupt
firing and the security-state sysfs attribute being removed.
The race is difficult to see due to the awkward placement of the
sanitize-notifier setup code and the multiple places the teardown calls
are made, cxl_memdev_security_init... | ```diff
diff --git a/drivers/cxl/core/memdev.c b/drivers/cxl/core/memdev.c
index 63353d990374..4c2e24a1a89c 100644
--- a/drivers/cxl/core/memdev.c
+++ b/drivers/cxl/core/memdev.c
@@ -556,20 +556,11 @@ void clear_exclusive_cxl_commands(struct cxl_memdev_state *mds,
}
EXPORT_SYMBOL_NS_GPL(clear_exclusive_cxl_commands, ... |
3aa872546783b146d821bbce6b1507aa33b77fc9 | Analyze and fix the following issue in the Linux kernel code: OPP: debugfs: Fix warning with W=1 builds | Problem Details:
We currently get the following warning:
debugfs.c: In function ‘opp_debug_create_one’:
debugfs.c:63:42: warning: ‘%.1d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 2 [-Wformat-truncation=]
snprintf(name, sizeof(name), "icc-path-%.1d", i);
... | ```diff
diff --git a/drivers/opp/debugfs.c b/drivers/opp/debugfs.c
index 17543c0aa5b6..ec030b19164a 100644
--- a/drivers/opp/debugfs.c
+++ b/drivers/opp/debugfs.c
@@ -56,7 +56,7 @@ static void opp_debug_create_bw(struct dev_pm_opp *opp,
struct dentry *pdentry)
{
struct dentry *d;
- char name[11];
+ char name[20... |
cca14de56986905013a83df4e512358b9c6a54a8 | Analyze and fix the following issue in the Linux kernel code: OPP: Remove doc style comments for internal routines | Problem Details:
These were previously exposed outside of the OPP core and needed doc
style commenting. They aren't public now and don't need the same.
This fixes warnings generated for builds with `W=1`:
core.c:2105: warning: Function parameter or member 'opp_table' not described in '_opp_set_supported_hw'
core.c:21... | ```diff
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index cdac46698021..f42b663a4d8b 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -2124,12 +2124,7 @@ free_opp:
return ret;
}
-/**
- * _opp_set_supported_hw() - Set supported platforms
- * @dev: Device for which supported-hw has to be set.
- *... |
9c8c3fa3a52bc55696ccc4dfcb8a49f969b5fb0e | Analyze and fix the following issue in the Linux kernel code: bpf: Fix the comment for bpf_restore_data_end() | Problem Details:
The comment used to say:
> Restore data saved by bpf_compute_data_pointers().
But bpf_compute_data_pointers() does not save the data;
bpf_compute_and_save_data_end() does.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Acked-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.o... | ```diff
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 27406aee2d40..ff7ecc89d3dd 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -736,7 +736,7 @@ static inline void bpf_compute_and_save_data_end(
cb->data_end = skb->data + skb_headlen(skb);
}
-/* Restore data saved by bpf_... |
152d0bcdf1efcb54a4fa20f694e9c7bbb6d06cbf | Analyze and fix the following issue in the Linux kernel code: dm crypt: Fix reqsize in crypt_iv_eboiv_gen | Problem Details:
A skcipher_request object is made up of struct skcipher_request
followed by a variable-sized trailer. The allocation of the
skcipher_request and IV in crypt_iv_eboiv_gen is missing the
memory for struct skcipher_request. Fix it by adding it to
reqsize.
Fixes: e3023094dffb ("dm crypt: Avoid using MAX... | ```diff
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index f2662c21a6df..5315fd261c23 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -753,7 +753,8 @@ static int crypt_iv_eboiv_gen(struct crypt_config *cc, u8 *iv,
int err;
u8 *buf;
- reqsize = ALIGN(crypto_skcipher_reqsize(tfm), __... |
2f94711b098bc55285ac74aba2f2b83fd72b555f | Analyze and fix the following issue in the Linux kernel code: ext4: call ext4_mb_mark_context in ext4_mb_mark_diskspace_used | Problem Details:
Call ext4_mb_mark_context in ext4_mb_mark_diskspace_used to:
1. Remove repeat code to normally update bitmap and group descriptor
on disk.
2. Now that we have a common API for marking blocks inuse/free in block
bitmap, use that instead of open coding it in function
ext4_mb_mark_diskspace_used(). The cu... | ```diff
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 5b3940e3afea..7d1b78fd6c97 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4053,13 +4053,13 @@ static noinline_for_stack int
ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
handle_t *handle, unsigned int reserv_clstrs)
{
... |
61187fce8600e8ef90e601be84f9d0f3222c1206 | Analyze and fix the following issue in the Linux kernel code: jbd2: fix potential data lost in recovering journal raced with synchronizing fs bdev | Problem Details:
JBD2 makes sure journal data is fallen on fs device by sync_blockdev(),
however, other process could intercept the EIO information from bdev's
mapping, which leads journal recovering successful even EIO occurs during
data written back to fs device.
We found this problem in our product, iscsi + multipa... | ```diff
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index 0567f1aa189b..01f744cb97a4 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -289,6 +289,8 @@ int jbd2_journal_recover(journal_t *journal)
journal_superblock_t * sb;
struct recovery_info info;
+ errseq_t wb_err;
+ struct address_space *... |
484fd6c1de13b336806a967908a927cc0356e312 | Analyze and fix the following issue in the Linux kernel code: ext4: apply umask if ACL support is disabled | Problem Details:
The function ext4_init_acl() calls posix_acl_create() which is
responsible for applying the umask. But without
CONFIG_EXT4_FS_POSIX_ACL, ext4_init_acl() is an empty inline function,
and nobody applies the umask.
This fixes a bug which causes the umask to be ignored with O_TMPFILE
on ext4:
https://g... | ```diff
diff --git a/fs/ext4/acl.h b/fs/ext4/acl.h
index 0c5a79c3b5d4..ef4c19e5f570 100644
--- a/fs/ext4/acl.h
+++ b/fs/ext4/acl.h
@@ -68,6 +68,11 @@ extern int ext4_init_acl(handle_t *, struct inode *, struct inode *);
static inline int
ext4_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
{
+ /* ... |
2cd8bdb5efc1e0d5b11a4b7ba6b922fd2736a87f | Analyze and fix the following issue in the Linux kernel code: ext4: mark buffer new if it is unwritten to avoid stale data exposure | Problem Details:
** Short Version **
In ext4 with dioread_nolock, we could have a scenario where the bh returned by
get_blocks (ext4_get_block_unwritten()) in __block_write_begin_int() has
UNWRITTEN and MAPPED flag set. Since such a bh does not have NEW flag set we
never zero out the range of bh that is not under writ... | ```diff
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 4ce35f1c8b0a..d7732320431a 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -789,10 +789,22 @@ int ext4_get_block(struct inode *inode, sector_t iblock,
int ext4_get_block_unwritten(struct inode *inode, sector_t iblock,
struct buffer_head *bh_re... |
af90a8f4a09ec4a3de20142e37f37205d4687f28 | Analyze and fix the following issue in the Linux kernel code: ext4: move 'ix' sanity check to corrent position | Problem Details:
Check 'ix' before it is used.
Fixes: 80e675f906db ("ext4: optimize memmmove lengths in extent/index insertions")
Signed-off-by: Gou Hao <gouhao@uniontech.com>
Link: https://lore.kernel.org/r/20230906013341.7199-1-gouhao@uniontech.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 202c76996b62..4d8496d1a8ac 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -1010,6 +1010,11 @@ static int ext4_ext_insert_index(handle_t *handle, struct inode *inode,
ix = curp->p_idx;
}
+ if (unlikely(ix > EXT_MAX_INDEX(curp->p_hdr))) {
... |
8b6b562121f1981315e76b6ae1f8a5cbbcf14bd7 | Analyze and fix the following issue in the Linux kernel code: jbd2: fix printk format type for 'io_block' in do_one_pass() | Problem Details:
'io_block' is unsinged long but print it by '%ld'.
Signed-off-by: Ye Bin <yebin10@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230904105817.1728356-3-yebin10@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | ```diff
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index 11380ff1fe51..0567f1aa189b 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -632,7 +632,7 @@ static int do_one_pass(journal_t *journal,
success = err;
printk(KERN_ERR
"JBD2: IO error %d recovering "
- "block %ld in log... |
95b635689b58e0ebe5197bf99c82c681eabe17ee | Analyze and fix the following issue in the Linux kernel code: ext4: remove EXT4FS_DEBUG defination in resize.c | Problem Details:
Remove EXT4FS_DEBUG defination in resize.c for following reasons:
1. EXT4FS_DEBUG will enable debug messages, it should only be defined
when debugging.
2. ext4.h included from ext4_jbd2.h after EXT4FS_DEBUG defination will
"#undef EXT4FS_DEBUG", then EXT4FS_DEBUG defination in resize.c can't
actually t... | ```diff
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 3ad2b1a900ad..d4ab2cde0a03 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -10,8 +10,6 @@
*/
-#define EXT4FS_DEBUG
-
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
``` |
1fc1bd2d18bbade157f7b14270f509ebbd89881b | Analyze and fix the following issue in the Linux kernel code: ext4: calculate free_clusters_count in cluster unit in verify_group_input | Problem Details:
The field free_cluster_count in struct ext4_new_group_data should be
in units of clusters. In verify_group_input() this field is being
filled in units of blocks. Fortunately, we don't support online
resizing of bigalloc file systems, and for non-bigalloc file systems,
the cluster size == block size. ... | ```diff
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index a370ca1a2bd6..3ad2b1a900ad 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -154,8 +154,9 @@ static int verify_group_input(struct super_block *sb,
overhead = ext4_group_overhead_blocks(sb, group);
metaend = start + overhead;
- input->free_clust... |
e44fc921b84ff08a9e2fb827a146fa4021d016f3 | Analyze and fix the following issue in the Linux kernel code: ext4: fix typo in setup_new_flex_group_blocks | Problem Details:
grop -> group
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Link: https://lore.kernel.org/r/20230826174712.4059355-6-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | ```diff
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 667381180b26..5e4856d68c4a 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -609,7 +609,7 @@ static int setup_new_flex_group_blocks(struct super_block *sb,
}
handle_itb:
- /* Initialize group tables of the grop @group */
+ /* Initialize group... |
31f13421c004a420c0e9d288859c9ea9259ea0cc | Analyze and fix the following issue in the Linux kernel code: ext4: correct offset of gdb backup in non meta_bg group to update_backups | Problem Details:
Commit 0aeaa2559d6d5 ("ext4: fix corruption when online resizing a 1K
bigalloc fs") found that primary superblock's offset in its group is
not equal to offset of backup superblock in its group when block size
is 1K and bigalloc is enabled. As group descriptor blocks are right
after superblock, we can't... | ```diff
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 0361c20910de..87cd5b07a970 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1601,6 +1601,8 @@ exit_journal:
int gdb_num_end = ((group + flex_gd->count - 1) /
EXT4_DESC_PER_BLOCK(sb));
int meta_bg = ext4_has_feature_meta_bg(sb);
+ sect... |
ebf6cb7c6e1241984f75f29f1bdbfa2fe7168f88 | Analyze and fix the following issue in the Linux kernel code: ext4: no need to generate from free list in mballoc | Problem Details:
Commit 7a2fcbf7f85 ("ext4: don't use blocks freed but not yet committed in
buddy cache init") added a code to mark as used blocks in the list of not yet
committed freed blocks during initialization of a buddy page. However
ext4_mb_free_metadata() makes sure buddy page is already loaded and takes a
refe... | ```diff
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 1d65c738c4c9..6e304c18d390 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -417,8 +417,6 @@ static const char * const ext4_groupinfo_slab_names[NR_GRPINFO_CACHES] = {
static void ext4_mb_generate_from_pa(struct super_block *sb, void *bitmap,
... |
8fedebb5ea183994aca39af3f80623f5db42fff7 | Analyze and fix the following issue in the Linux kernel code: ext4: fix incorrect offset | Problem Details:
The last argument of ext4_check_dir_entry is dentry offset int the
file. Luckily this error only results in the wrong offset being
printed in the eventual error message.
Signed-off-by: Wang Jianjian <wangjianjian0@foxmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/tence... | ```diff
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index bbda587f76b8..cbe756144d8d 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2280,8 +2280,7 @@ static int make_indexed_dir(handle_t *handle, struct ext4_filename *fname,
top = data2 + len;
while ((char *)(de2 = ext4_next_entry(de, blocksize)) < top) ... |
40ea98396a3659062267d1fe5f99af4f7e4f05e3 | Analyze and fix the following issue in the Linux kernel code: ext4: correct the start block of counting reserved clusters | Problem Details:
When big allocate feature is enabled, we need to count and update
reserved clusters before removing a delayed only extent_status entry.
{init|count|get}_rsvd() have already done this, but the start block
number of this counting isn't correct in the following case.
lblk end
| ... | ```diff
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 6f7de14c0fa8..5e625ea4545d 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -1405,8 +1405,8 @@ static int __es_remove_extent(struct inode *inode, ext4_lblk_t lblk,
}
}
if (count_reserved)
- count_rsvd(inode... |
6313e096dbfaf1377ba8f5f8ccd720cc36c576c6 | Analyze and fix the following issue in the Linux kernel code: KVM: selftests: Zero-initialize entire test_result in memslot perf test | Problem Details:
Zero-initialize the entire test_result structure used by memslot_perf_test
instead of zeroing only the fields used to guard the pr_info() calls.
gcc 13.2.0 is a bit overzealous and incorrectly thinks that rbestslottime's
slot_runtime may be used uninitialized.
In file included from memslot_perf_tes... | ```diff
diff --git a/tools/testing/selftests/kvm/memslot_perf_test.c b/tools/testing/selftests/kvm/memslot_perf_test.c
index 20eb2e730800..8698d1ab60d0 100644
--- a/tools/testing/selftests/kvm/memslot_perf_test.c
+++ b/tools/testing/selftests/kvm/memslot_perf_test.c
@@ -1033,9 +1033,8 @@ static bool test_loop(const str... |
a8c1eb77edfc92a64788dad70fedf9277cbafe76 | Analyze and fix the following issue in the Linux kernel code: ext4: fix traditional comparison using max/min method | Problem Details:
It would be better to replace the traditional ternary conditional
operator with max()/min()
Signed-off-by: Lu Hongfei <luhongfei@vivo.com>
Reviewed-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230529070930.37949-1-luhongfei@vivo.com
... | ```diff
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index 79b20d6ae39e..4d08bb2bd184 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -111,10 +111,8 @@ static unsigned ext4_num_overhead_clusters(struct super_block *sb,
itbl_blk_start = ext4_inode_table(sb, gdp);
itbl_blk_end = itbl_blk_start + sbi->s_it... |
745f17a4166e79315e4b7f33ce89d03e75a76983 | Analyze and fix the following issue in the Linux kernel code: ext4: fix race between writepages and remount | Problem Details:
We got a WARNING in ext4_add_complete_io:
==================================================================
WARNING: at fs/ext4/page-io.c:231 ext4_put_io_end_defer+0x182/0x250
CPU: 10 PID: 77 Comm: ksoftirqd/10 Tainted: 6.3.0-rc2 #85
RIP: 0010:ext4_put_io_end_defer+0x182/0x250 [ext4]
[...]
Call T... | ```diff
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 9418359b1d9d..cd4ccae1e28a 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1676,7 +1676,8 @@ struct ext4_sb_info {
/*
* Barrier between writepages ops and changing any inode's JOURNAL_DATA
- * or EXTENTS flag.
+ * or EXTENTS flag or between writep... |
ee6a12d0d4d85f3833d177cd382cd417f0ef011b | Analyze and fix the following issue in the Linux kernel code: ext4: add missing initialization of call_notify_error in update_super_work() | Problem Details:
Fixes: ff0722de896e ("ext4: add periodic superblock update check")
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | ```diff
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index dbebd8b3127e..6f48dec19f4a 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -768,7 +768,8 @@ static void update_super_work(struct work_struct *work)
*/
if (!sb_rdonly(sbi->s_sb) && journal) {
struct buffer_head *sbh = sbi->s_sbh;
- bool call_not... |
e959c279d391c10b35ce300fb4b0fe3b98e86bd2 | Analyze and fix the following issue in the Linux kernel code: objtool: Propagate early errors | Problem Details:
If objtool runs into a problem that causes it to exit early, the overall
tool still returns a status code of 0, which causes the build to
continue as if nothing went wrong.
Note this only affects early errors, as later errors are still ignored
by check().
Fixes: b51277eb9775 ("objtool: Ditch subcomma... | ```diff
diff --git a/tools/objtool/objtool.c b/tools/objtool/objtool.c
index c54f7235c5d9..f40febdd6e36 100644
--- a/tools/objtool/objtool.c
+++ b/tools/objtool/objtool.c
@@ -146,7 +146,5 @@ int main(int argc, const char **argv)
exec_cmd_init("objtool", UNUSED, UNUSED, UNUSED);
pager_init(UNUSED);
- objtool_run(a... |
e0a3e7bf62dfbf6a1730f244b2adf53fac07003b | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Drop unnecessary return statements | Problem Details:
There is no reason to call return at the end of function that
returns void.
Fixes the below:
WARNING: void function return statements are not generally useful
Thus remove such a statement in the affected functions.
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@a... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h
index 3c988cc406e4..381101d2bf05 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h
@@ -112,7 +112,6 @@ fallback:
cur->remaining = size;
... |
cbad0dd13ac9976a66f197a8f8d00f7bd534bc1a | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix ip count query for xcp partitions | Problem Details:
fix wrong ip count INFO on spatial partitions. update the query
to return the instance count corresponding to the partition id.
v2:
initialize variables only when required to be (Christian)
move variable declarations to the beginning of function (Christian)
Signed-off-by: Sathishkumar S <sathishkum... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 6cd77c21048b..63f608c0bfa9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -595,11 +595,16 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struc... |
2b6b29f33fddc8d61527d5f5cf1dec9e1821b16c | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix complex macros error | Problem Details:
Fixes the below:
ERROR: Macros with complex values should be enclosed in parentheses
WARNING: macros should not use a trailing semicolon
+#define amdgpu_inc_vram_lost(adev) atomic_inc(&((adev)->vram_lost_counter));
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@am... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 4bb7e46f7619..daec39387f70 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1321,7 +1321,7 @@ int emu_soc_asic_init(struct amdgpu_device *adev);
((adev)->asic_funcs->updat... |
9c77dcf6a5b179a9574b2f9633c6e2cdf52fafec | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Remove migrate_en/dis from dc_fpu_begin(). | Problem Details:
This is a revert of the commit mentioned below while it is not wrong, as
in the kernel will explode, having migrate_disable() here it is
complete waste of resources.
Additionally commit message is plain wrong the review tag does not make
it any better. The migrate_disable() interface has a fat comment... | ```diff
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c b/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c
index 172aa10a8800..86f4c0e04654 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c
@@ -91,7 +91,6 @@ void dc_fpu_begin(const char *function_... |
0029e4d46b8958c2b2cd249f9fd820954713463e | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: amdgpu_drm.h: fix comment typos | Problem Details:
Correct typos of "occurred".
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Reviewed-by: Christian König <christian.koenig@amd.com>
... | ```diff
diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index d627d0c6ac87..ad21c613fec8 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -249,9 +249,9 @@ union drm_amdgpu_bo_list {
/* unknown cause */
#define AMDGPU_CTX_UNKNOWN_RESET 3
-/* indicate gpu re... |
071af0c9e582bc47e379e39490a2bc1adfe4ec68 | Analyze and fix the following issue in the Linux kernel code: selftests: timers: Convert posix_timers test to generate KTAP output | Problem Details:
Currently the posix_timers test does not produce KTAP output but rather a
custom format. This means that we only get a pass/fail for the suite, not
for each individual test that the suite does. Convert to using the standard
kselftest output functions which result in KTAP output being generated.
As par... | ```diff
diff --git a/tools/testing/selftests/timers/posix_timers.c b/tools/testing/selftests/timers/posix_timers.c
index 8a17c0e8d82b..d49dd3ffd0d9 100644
--- a/tools/testing/selftests/timers/posix_timers.c
+++ b/tools/testing/selftests/timers/posix_timers.c
@@ -76,22 +76,21 @@ static int check_diff(struct timeval star... |
1c71a121c7ff41bf6605b2604408d109eab047ae | Analyze and fix the following issue in the Linux kernel code: selftests: static_keys: fix test name in messages | Problem Details:
As a general rule, the name of the selftest is printed at the beginning
of every message.
Use "static_keys" (name of the test itself) consistently instead of mixing
"static_key" and "static_keys" at the beginning of the messages in the
test_static_keys script.
Signed-off-by: Javier Carrasco <javier.c... | ```diff
diff --git a/tools/testing/selftests/static_keys/test_static_keys.sh b/tools/testing/selftests/static_keys/test_static_keys.sh
index fc9f8cde7d42..3b0f17b81ac2 100755
--- a/tools/testing/selftests/static_keys/test_static_keys.sh
+++ b/tools/testing/selftests/static_keys/test_static_keys.sh
@@ -6,18 +6,18 @@
ks... |
5b45a753776be5d21cf395ec97e81c9187fbeaca | Analyze and fix the following issue in the Linux kernel code: selftests: uevent filtering: fix return on error in uevent_listener | Problem Details:
The ret variable is used to check function return values and assigning
values to it on error has no effect as it is an unused value.
The current implementation uses an additional variable (fret) to return
the error value, which in this case is unnecessary and lead to the above
described misuse. There ... | ```diff
diff --git a/tools/testing/selftests/uevent/uevent_filtering.c b/tools/testing/selftests/uevent/uevent_filtering.c
index 5cebfb356345..dbe55f3a66f4 100644
--- a/tools/testing/selftests/uevent/uevent_filtering.c
+++ b/tools/testing/selftests/uevent/uevent_filtering.c
@@ -78,7 +78,7 @@ static int uevent_listener(... |
0f8baa3c9802fbfe313c901e1598397b61b91ada | Analyze and fix the following issue in the Linux kernel code: io-wq: fully initialize wqe before calling cpuhp_state_add_instance_nocalls() | Problem Details:
I received a bug report with the following signature:
[ 1759.937637] BUG: unable to handle page fault for address: ffffffffffffffe8
[ 1759.944564] #PF: supervisor read access in kernel mode
[ 1759.949732] #PF: error_code(0x0000) - not-present page
[ 1759.954901] PGD 7ab615067 P4D 7ab615067 PUD 7ab6170... | ```diff
diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c
index 1ecc8c748768..522196dfb0ff 100644
--- a/io_uring/io-wq.c
+++ b/io_uring/io-wq.c
@@ -1151,9 +1151,6 @@ struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data)
wq = kzalloc(sizeof(struct io_wq), GFP_KERNEL);
if (!wq)
return ERR_PTR(-ENOME... |
9e0bc36ab07c550d791bf17feeb479f1dfc42d89 | Analyze and fix the following issue in the Linux kernel code: cpufreq: schedutil: Update next_freq when cpufreq_limits change | Problem Details:
When cpufreq's policy is 'single', there is a scenario that will
cause sg_policy's next_freq to be unable to update.
When the CPU's util is always max, the cpufreq will be max,
and then if we change the policy's scaling_max_freq to be a
lower freq, indeed, the sg_policy's next_freq need change to
be t... | ```diff
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 4492608b7d7f..458d359f5991 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -350,7 +350,8 @@ static void sugov_update_single_freq(struct update_util_data *hook, u64 time,
* Except whe... |
137f59d5dab4bd55ab3d40080de18bf641bdc26a | Analyze and fix the following issue in the Linux kernel code: can: at91_can: switch to rx-offload implementation | Problem Details:
The current at91_can driver uses NAPI to handle RX'ed CAN frames, the
RX IRQ is disabled and a NAPI poll is scheduled. Then in
at91_poll_rx() the RX'ed CAN frames are tried to read in order from
the device.
This approach has 2 drawbacks:
- Under high system load it might take too long from the initia... | ```diff
diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig
index 649453a3c858..8d6fc0852bf7 100644
--- a/drivers/net/can/Kconfig
+++ b/drivers/net/can/Kconfig
@@ -89,6 +89,7 @@ config CAN_RX_OFFLOAD
config CAN_AT91
tristate "Atmel AT91 onchip CAN controller"
depends on (ARCH_AT91 || COMPILE_TEST) && HA... |
ccd7cd07051fbd50bbbc6a55547d965c3392f318 | Analyze and fix the following issue in the Linux kernel code: can: at91_can: at91_set_bittiming(): demote register output to debug level | Problem Details:
This message isn't really helpful for the general reader of the kernel
logs, so should not be printed with info level.
Link: https://lore.kernel.org/all/20231005-at91_can-rx_offload-v2-13-9987d53600e0@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> | ```diff
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index 092652fd7352..f92d8a75d1b1 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -393,7 +393,7 @@ static int at91_set_bittiming(struct net_device *dev)
FIELD_PREP(AT91_BR_PHASE1_MASK, bt->phase_seg1 - 1) |
FIE... |
6411959c10fe917288cbb1038886999148560057 | Analyze and fix the following issue in the Linux kernel code: can: dev: can_put_echo_skb(): don't crash kernel if can_priv::echo_skb is accessed out of bounds | Problem Details:
If the "struct can_priv::echoo_skb" is accessed out of bounds, this
would cause a kernel crash. Instead, issue a meaningful warning
message and return with an error.
Fixes: a6e4bc530403 ("can: make the number of echo skb's configurable")
Link: https://lore.kernel.org/all/20231005-can-dev-fix-can-resta... | ```diff
diff --git a/drivers/net/can/dev/skb.c b/drivers/net/can/dev/skb.c
index f6d05b3ef59a..3ebd4f779b9b 100644
--- a/drivers/net/can/dev/skb.c
+++ b/drivers/net/can/dev/skb.c
@@ -49,7 +49,11 @@ int can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
{
struct can_priv *priv = netdev_priv(dev);
- BUG_O... |
f0e0c809c0be05fe865b9ac128ef3ee35c276021 | Analyze and fix the following issue in the Linux kernel code: can: dev: can_restart(): move debug message and stats after successful restart | Problem Details:
Move the debug message "restarted" and the CAN restart stats_after_
the successful restart of the CAN device, because the restart may
fail.
While there update the error message from printing the error number to
printing symbolic error names.
Link: https://lore.kernel.org/all/20231005-can-dev-fix-can-... | ```diff
diff --git a/drivers/net/can/dev/dev.c b/drivers/net/can/dev/dev.c
index 9014256c486a..82b12902fc35 100644
--- a/drivers/net/can/dev/dev.c
+++ b/drivers/net/can/dev/dev.c
@@ -147,15 +147,15 @@ static void can_restart(struct net_device *dev)
netif_rx(skb);
}
- netdev_dbg(dev, "restarted\n");
- priv->can_s... |
8f3ec204d340af183fb2bb21b8e797ac2ed012b2 | Analyze and fix the following issue in the Linux kernel code: can: dev: can_restart(): reverse logic to remove need for goto | Problem Details:
Reverse the logic in the if statement and eliminate the need for a
goto to simplify code readability.
Link: https://lore.kernel.org/all/20231005-can-dev-fix-can-restart-v2-3-91b5c1fd922c@pengutronix.de
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@peng... | ```diff
diff --git a/drivers/net/can/dev/dev.c b/drivers/net/can/dev/dev.c
index 735d5de3caa0..9014256c486a 100644
--- a/drivers/net/can/dev/dev.c
+++ b/drivers/net/can/dev/dev.c
@@ -142,14 +142,11 @@ static void can_restart(struct net_device *dev)
/* send restart message upstream */
skb = alloc_can_err_skb(dev, ... |
6841cab8c4504835e4011689cbdb3351dec693fd | Analyze and fix the following issue in the Linux kernel code: can: dev: can_restart(): fix race condition between controller restart and netif_carrier_on() | Problem Details:
This race condition was discovered while updating the at91_can driver
to use can_bus_off(). The following scenario describes how the
converted at91_can driver would behave.
When a CAN device goes into BUS-OFF state, the driver usually
stops/resets the CAN device and calls can_bus_off().
This function... | ```diff
diff --git a/drivers/net/can/dev/dev.c b/drivers/net/can/dev/dev.c
index a5bbdfa9a269..735d5de3caa0 100644
--- a/drivers/net/can/dev/dev.c
+++ b/drivers/net/can/dev/dev.c
@@ -154,11 +154,12 @@ restart:
priv->can_stats.restarts++;
/* Now restart the device */
- err = priv->do_set_mode(dev, CAN_MODE_START);... |
fe5c9940dfd8ba0c73672dddb30acd1b7a11d4c7 | Analyze and fix the following issue in the Linux kernel code: can: dev: can_restart(): don't crash kernel if carrier is OK | Problem Details:
During testing, I triggered a can_restart() with the netif carrier
being OK [1]. The BUG_ON, which checks if the carrier is OK, results
in a fatal kernel crash. This is neither helpful for debugging nor for
a production system.
[1] The root cause is a race condition in can_restart() which will be
fixe... | ```diff
diff --git a/drivers/net/can/dev/dev.c b/drivers/net/can/dev/dev.c
index 7f9334a8af50..a5bbdfa9a269 100644
--- a/drivers/net/can/dev/dev.c
+++ b/drivers/net/can/dev/dev.c
@@ -132,7 +132,8 @@ static void can_restart(struct net_device *dev)
struct can_frame *cf;
int err;
- BUG_ON(netif_carrier_ok(dev));
+ i... |
ae6df65dabc3f8bd89663d96203963323e266d90 | Analyze and fix the following issue in the Linux kernel code: rust: upgrade to Rust 1.72.1 | Problem Details:
This is the third upgrade to the Rust toolchain, from 1.71.1 to 1.72.1
(i.e. the latest) [1].
See the upgrade policy [2] and the comments on the first upgrade in
commit 3ed03f4da06e ("rust: upgrade to Rust 1.68.2").
# Unstable features
No unstable features (that we use) were stabilized.
Therefore, ... | ```diff
diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst
index b48da698d6f2..731cc104c56f 100644
--- a/Documentation/process/changes.rst
+++ b/Documentation/process/changes.rst
@@ -31,7 +31,7 @@ you probably needn't concern yourself with pcmciautils.
====================== ===========... |
fae633cfb729da2771b5433f6b84ae7e8b4aa5f7 | Analyze and fix the following issue in the Linux kernel code: thermal: intel: powerclamp: fix mismatch in get function for max_idle | Problem Details:
KASAN reported this
[ 444.853098] BUG: KASAN: global-out-of-bounds in param_get_int+0x77/0x90
[ 444.853111] Read of size 4 at addr ffffffffc16c9220 by task cat/2105
...
[ 444.853442] The buggy address belongs to the variable:
[ 444.853443] max_idle+0x0/0xffffffffffffcde0 ... | ```diff
diff --git a/drivers/thermal/intel/intel_powerclamp.c b/drivers/thermal/intel/intel_powerclamp.c
index 36243a3972fd..5ac5cb60bae6 100644
--- a/drivers/thermal/intel/intel_powerclamp.c
+++ b/drivers/thermal/intel/intel_powerclamp.c
@@ -256,7 +256,7 @@ skip_limit_set:
static const struct kernel_param_ops max_i... |
690acef3c47f96cd89853fad90f02ba80a497306 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: gpio: vf610: update gpio-ranges | Problem Details:
i.MX93 supports four gpio-ranges at max. To fix below issue:
"gpio@43820080: gpio-ranges: [[30, 0, 84, 8], [30, 8, 66, 18],
[30, 26, 34, 2], [30, 28, 0, 4]] is too long"
Update the gpio-ranges property
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Fabio Estevam <festev... | ```diff
diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
index 7c2d152e8617..59427d97adf5 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
@@ -59,7 +59,8 @@ propert... |
10f20628c9b8e924b8046e63b36b2cea4d2c85e4 | Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: fail dpu_plane_atomic_check() based on mdp clk limits | Problem Details:
Currently, dpu_plane_atomic_check() does not check whether the
plane can process the image without exceeding the per chipset
limits for MDP clock. This leads to underflow issues because the
SSPP is not able to complete the processing for the data rate of
the display.
Fail the dpu_plane_atomic_check() ... | ```diff
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index 98c1b22e9bca..0be195f9149c 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -733,9 +733,11 @@ static int dpu_plane_check_inline_rotation(struct dpu_pl... |
fd39d9668f2ce9f4b05ad55e8c8d80c098073e0b | Analyze and fix the following issue in the Linux kernel code: iio: pressure: ms5611: ms5611_prom_is_valid false negative bug | Problem Details:
The ms5611 driver falsely rejects lots of MS5607-02BA03-50 chips
with "PROM integrity check failed" because it doesn't accept a prom crc
value of zero as legitimate.
According to the datasheet for this chip (and the manufacturer's
application note about the PROM CRC), none of the possible values for t... | ```diff
diff --git a/drivers/iio/pressure/ms5611_core.c b/drivers/iio/pressure/ms5611_core.c
index 627497e61a63..2fc706f9d8ae 100644
--- a/drivers/iio/pressure/ms5611_core.c
+++ b/drivers/iio/pressure/ms5611_core.c
@@ -76,7 +76,7 @@ static bool ms5611_prom_is_valid(u16 *prom, size_t len)
crc = (crc >> 12) & 0x000F;... |
87b9a0e3ff31d857ed1d13637898c472964aab7d | Analyze and fix the following issue in the Linux kernel code: dt-bindings: iio: adc: adi,ad7292: Fix additionalProperties on channel nodes | Problem Details:
"additionalProperties: true" is only for incomplete schemas such as bus
child nodes in a bus's schema. That doesn't apply to the "channel" nodes
in the adi,ad7292 binding, so fix additionalProperties to be false.
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Conor Dooley <conor.dooley@microch... | ```diff
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml
index 7cc4ddc4e9b7..2aa1f4b063eb 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml
@@ -61,7 +61,... |
7e7dcab620cd6d34939f615cac63fc0ef7e81c72 | Analyze and fix the following issue in the Linux kernel code: iio: adc: ad7192: Correct reference voltage | Problem Details:
The avdd and the reference voltage are two different sources but the
reference voltage was assigned according to the avdd supply.
Add vref regulator structure and set the reference voltage according to
the vref supply from the devicetree.
In case vref supply is missing, reference voltage is set accor... | ```diff
diff --git a/drivers/iio/adc/ad7192.c b/drivers/iio/adc/ad7192.c
index 69d1103b9508..b64fd365f83f 100644
--- a/drivers/iio/adc/ad7192.c
+++ b/drivers/iio/adc/ad7192.c
@@ -177,6 +177,7 @@ struct ad7192_chip_info {
struct ad7192_state {
const struct ad7192_chip_info *chip_info;
struct regulator *avdd;
+ str... |
7e87ab38eed09c9dec56da361d74158159ae84a3 | Analyze and fix the following issue in the Linux kernel code: iio: light: vcnl4000: Don't power on/off chip in config | Problem Details:
After enabling/disabling interrupts on the vcnl4040 chip the als and/or
ps sensor is powered on or off depending on the interrupt enable bits.
This is made as a last step in write_event_config.
But there is no reason to do this as the runtime PM handles the power
state of the sensors. Interfering with... | ```diff
diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c
index 3a52b09c2823..fdf763a04b0b 100644
--- a/drivers/iio/light/vcnl4000.c
+++ b/drivers/iio/light/vcnl4000.c
@@ -1513,7 +1513,6 @@ static int vcnl4040_write_event_config(struct iio_dev *indio_dev,
out:
mutex_unlock(&data->vcnl4000_lo... |
b120dd3a15582fb7a959cecb05e4d9814fcba386 | Analyze and fix the following issue in the Linux kernel code: iio: addac: Kconfig: update ad74413r selections | Problem Details:
Building ad74413r without selecting IIO_BUFFER and
IIO_TRIGGERED_BUFFER generates error with respect to the iio trigger
functions that are used within the driver.
Update the Kconfig accordingly.
Fixes: fea251b6a5db ("iio: addac: add AD74413R driver")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@ana... | ```diff
diff --git a/drivers/iio/addac/Kconfig b/drivers/iio/addac/Kconfig
index 877f9124803c..397544f23b85 100644
--- a/drivers/iio/addac/Kconfig
+++ b/drivers/iio/addac/Kconfig
@@ -24,6 +24,8 @@ config AD74413R
depends on GPIOLIB && SPI
select REGMAP_SPI
select CRC8
+ select IIO_BUFFER
+ select IIO_TRIGGERED_BU... |
901a293fd96fb9bab843ba4cc7be3094a5aa7c94 | Analyze and fix the following issue in the Linux kernel code: iio: pressure: dps310: Adjust Timeout Settings | Problem Details:
The DPS310 sensor chip has been encountering intermittent errors while
reading the sensor device across various system designs. This issue causes
the chip to become "stuck," preventing the indication of "ready" status
for pressure and temperature measurements in the MEAS_CFG register.
To address this ... | ```diff
diff --git a/drivers/iio/pressure/dps310.c b/drivers/iio/pressure/dps310.c
index b10dbf5cf494..1ff091b2f764 100644
--- a/drivers/iio/pressure/dps310.c
+++ b/drivers/iio/pressure/dps310.c
@@ -57,8 +57,8 @@
#define DPS310_RESET_MAGIC 0x09
#define DPS310_COEF_BASE 0x10
-/* Make sure sleep time is <= 20ms for ... |
c9b9cfe7d342683f624a89c3b617be18aff879e8 | Analyze and fix the following issue in the Linux kernel code: iio: imu: bno055: Fix missing Kconfig dependencies | Problem Details:
This driver uses IIO triggered buffers so it needs to select them in
Kconfig.
on riscv-32bit:
/opt/crosstool/gcc-13.2.0-nolibc/riscv32-linux/bin/riscv32-linux-ld: drivers/iio/imu/bno055/bno055.o: in function `.L367':
bno055.c:(.text+0x2c96): undefined reference to `devm_iio_triggered_buffer_setup_ext... | ```diff
diff --git a/drivers/iio/imu/bno055/Kconfig b/drivers/iio/imu/bno055/Kconfig
index fa79b1ac4f85..83e53acfbe88 100644
--- a/drivers/iio/imu/bno055/Kconfig
+++ b/drivers/iio/imu/bno055/Kconfig
@@ -2,6 +2,8 @@
config BOSCH_BNO055
tristate
+ select IIO_BUFFER
+ select IIO_TRIGGERED_BUFFER
config BOSCH_BNO05... |
850101b3598277794f92a9e363a60a66e0d42890 | Analyze and fix the following issue in the Linux kernel code: iio: adc: imx8qxp: Fix address for command buffer registers | Problem Details:
The ADC Command Buffer Register high and low are currently pointing to
the wrong address and makes it impossible to perform correct
ADC measurements over all channels.
According to the datasheet of the imx8qxp the ADC_CMDL register starts
at address 0x100 and the ADC_CMDH register starts at address 0x... | ```diff
diff --git a/drivers/iio/adc/imx8qxp-adc.c b/drivers/iio/adc/imx8qxp-adc.c
index f5a0fc9e64c5..fff6e5a2d956 100644
--- a/drivers/iio/adc/imx8qxp-adc.c
+++ b/drivers/iio/adc/imx8qxp-adc.c
@@ -38,8 +38,8 @@
#define IMX8QXP_ADR_ADC_FCTRL 0x30
#define IMX8QXP_ADR_ADC_SWTRIG 0x34
#define IMX8QXP_ADR_ADC_TCTRL(t... |
7771c8c80d62ad065637ef74ed2962983f6c5f6d | Analyze and fix the following issue in the Linux kernel code: iio: cros_ec: fix an use-after-free in cros_ec_sensors_push_data() | Problem Details:
cros_ec_sensors_push_data() reads `indio_dev->active_scan_mask` and
calls iio_push_to_buffers_with_timestamp() without making sure the
`indio_dev` stays in buffer mode. There is a race if `indio_dev` exits
buffer mode right before cros_ec_sensors_push_data() accesses them.
An use-after-free on `indio... | ```diff
diff --git a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
index b72d39fc2434..6bfe5d6847e7 100644
--- a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
+++ b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
@@ -190,8 +19... |
ea191d0fd361fb569b6c3d19e5410510aa6b6bac | Analyze and fix the following issue in the Linux kernel code: iio: irsd200: fix -Warray-bounds bug in irsd200_trigger_handler | Problem Details:
When compiling with gcc 13 with -Warray-bounds enabled:
In file included from drivers/iio/proximity/irsd200.c:15:
In function ‘iio_push_to_buffers_with_timestamp’,
inlined from ‘irsd200_trigger_handler’ at drivers/iio/proximity/irsd200.c:770:2:
./include/linux/iio/buffer.h:42:46: error: array subs... | ```diff
diff --git a/drivers/iio/proximity/irsd200.c b/drivers/iio/proximity/irsd200.c
index 5bd791b46d98..bdff91f6b1a3 100644
--- a/drivers/iio/proximity/irsd200.c
+++ b/drivers/iio/proximity/irsd200.c
@@ -759,14 +759,14 @@ static irqreturn_t irsd200_trigger_handler(int irq, void *pollf)
{
struct iio_dev *indio_dev... |
c6fd91276d64039d068f5ceaf7ad335475bb0389 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: iio: rohm,bu27010: add missing vdd-supply to example | Problem Details:
Bindings require vdd-supply but the example DTS was missing one. This
fixes dt_binding_check error:
Documentation/devicetree/bindings/iio/light/rohm,bu27010.example.dtb: light-sensor@38: 'vdd-supply' is a required property
Fixes: ce2a8c160066 ("dt-bindings: iio: ROHM BU27010 RGBC + flickering sens... | ```diff
diff --git a/Documentation/devicetree/bindings/iio/light/rohm,bu27010.yaml b/Documentation/devicetree/bindings/iio/light/rohm,bu27010.yaml
index 8376d64a641a..bed42d5d0d94 100644
--- a/Documentation/devicetree/bindings/iio/light/rohm,bu27010.yaml
+++ b/Documentation/devicetree/bindings/iio/light/rohm,bu27010.ya... |
c38d23a54445f9a8aa6831fafc9af0496ba02f9e | Analyze and fix the following issue in the Linux kernel code: RDMA/core: Require admin capabilities to set system parameters | Problem Details:
Like any other set command, require admin permissions to do it.
Cc: stable@vger.kernel.org
Fixes: 2b34c5580226 ("RDMA/core: Add command to set ib_core device net namspace sharing mode")
Link: https://lore.kernel.org/r/75d329fdd7381b52cbdf87910bef16c9965abb1f.1696443438.git.leon@kernel.org
Reviewed-by:... | ```diff
diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
index d5d3e4f0de77..6d1dbc978759 100644
--- a/drivers/infiniband/core/nldev.c
+++ b/drivers/infiniband/core/nldev.c
@@ -2529,6 +2529,7 @@ static const struct rdma_nl_cbs nldev_cb_table[RDMA_NLDEV_NUM_OPS] = {
},
[RDMA_NLDEV_CMD_S... |
e5ed101a602873d65d2d64edaba93e8c73ec1b0f | Analyze and fix the following issue in the Linux kernel code: mptcp: userspace pm allow creating id 0 subflow | Problem Details:
This patch drops id 0 limitation in mptcp_nl_cmd_sf_create() to allow
creating additional subflows with the local addr ID 0.
There is no reason not to allow additional subflows from this local
address: we should be able to create new subflows from the initial
endpoint. This limitation was breaking ful... | ```diff
diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c
index b5a8aa4c1ebd..d042d32beb4d 100644
--- a/net/mptcp/pm_userspace.c
+++ b/net/mptcp/pm_userspace.c
@@ -307,12 +307,6 @@ int mptcp_nl_cmd_sf_create(struct sk_buff *skb, struct genl_info *info)
goto create_err;
}
- if (addr_l.id == 0) {
- ... |
a5efdbcece83af94180e8d7c0a6e22947318499d | Analyze and fix the following issue in the Linux kernel code: mptcp: fix delegated action races | Problem Details:
The delegated action infrastructure is prone to the following
race: different CPUs can try to schedule different delegated
actions on the same subflow at the same time.
Each of them will check different bits via mptcp_subflow_delegate(),
and will try to schedule the action on the related per-cpu napi
... | ```diff
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index e252539b1e19..c3b83cb390d9 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -3425,24 +3425,21 @@ static void schedule_3rdack_retransmission(struct sock *ssk)
sk_reset_timer(ssk, &icsk->icsk_delack_timer, timeout);
}
-void mptcp_s... |
56df345917c09ffc00b7834f88990a7a7c338b5c | Analyze and fix the following issue in the Linux kernel code: i40e: Remove circular header dependencies and fix headers | Problem Details:
Similarly as for ice driver [1] there are also circular header
dependencies in i40e driver:
i40e.h -> i40e_virtchnl_pf.h -> i40e.h
Another issue is that i40e header files does not contain their own
dependencies on other header files (both private and standard) so their
inclusion in .c file require to ... | ```diff
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 7f79d5929be6..107826c040c1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -4,47 +4,20 @@
#ifndef _I40E_H_
#define _I40E_H_
-#include <net/tcp.h>
-#include <... |
3eef8555891026628aa1cc6dbc01db86df88aa26 | Analyze and fix the following issue in the Linux kernel code: net: stmmac: remove unneeded stmmac_poll_controller | Problem Details:
Using netconsole netpoll_poll_dev could be called from interrupt
context, thus using disable_irq() would cause the following kernel
warning with CONFIG_DEBUG_ATOMIC_SLEEP enabled:
BUG: sleeping function called from invalid context at kernel/irq/manage.c:137
in_atomic(): 1, irqs_disabled(): 128, no... | ```diff
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 83c567a89a46..ed1a5a31a491 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -6002,33 +6002,6 @@ static irqreturn_t stm... |
5dfd37c37a44ba47c35ff8e6eaff14c226141111 | Analyze and fix the following issue in the Linux kernel code: i40e: Split i40e_osdep.h | Problem Details:
Header i40e_osdep.h contains only IO primitives and couple of debug
printing macros. Split this header file to i40e_io.h and i40e_debug.h
and move i40e_debug_mask enum to i40e_debug.h
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-b... | ```diff
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.h b/drivers/net/ethernet/intel/i40e/i40e_adminq.h
index 1c3d2bc5c3f7..80125bea80a2 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.h
@@ -4,8 +4,8 @@
#ifndef _I40E_ADMINQ_H_
#define _I40E_ADMIN... |
24d813b2ec7dc7b617fee835baaf91c42436367b | Analyze and fix the following issue in the Linux kernel code: PCI: Make pci_assign_unassigned_resources() non-init | Problem Details:
Fix a section mismatch warning on Sparc 32-bit:
WARNING: modpost: vmlinux: section mismatch in reference: leon_pci_init+0xf8 (section: .text) -> pci_assign_unassigned_resources (section: .init.text)
This is due to this comment from arch/sparc/kernel/leon_pci.c:
The LEON architecture does not rel... | ```diff
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index dae490f25641..fd74f1c99dba 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -2129,7 +2129,7 @@ dump:
pci_bus_dump_resources(bus);
}
-void __init pci_assign_unassigned_resources(void)
+void pci_assign_unassigned_resour... |
566aeed6871ac2189b5bfe03e1a5b3b7be5eca38 | Analyze and fix the following issue in the Linux kernel code: net: lan743x: also select PHYLIB | Problem Details:
Since FIXED_PHY depends on PHYLIB, PHYLIB needs to be set to avoid
a kconfig warning:
WARNING: unmet direct dependencies detected for FIXED_PHY
Depends on [n]: NETDEVICES [=y] && PHYLIB [=n]
Selected by [y]:
- LAN743X [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_MICROCHIP [=y] && PCI [... | ```diff
diff --git a/drivers/net/ethernet/microchip/Kconfig b/drivers/net/ethernet/microchip/Kconfig
index 329e374b9539..43ba71e82260 100644
--- a/drivers/net/ethernet/microchip/Kconfig
+++ b/drivers/net/ethernet/microchip/Kconfig
@@ -46,6 +46,7 @@ config LAN743X
tristate "LAN743x support"
depends on PCI
depends ... |
9031e0013f819ca697a65046e5b86cd1a21b86ea | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix mst hub unplug warning | Problem Details:
[Why]
Unplug mst hub will cause warning. That's because
dm_helpers_construct_old_payload() is changed to be called after
payload removement from dc link.
In dm_helpers_construct_old_payload(), We refer to the vcpi in
payload allocation table of dc link to construct the old payload
and payload is no lo... | ```diff
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index c4c35f6844f4..f91d759793f0 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -204,15 +2... |
63e5aa69b821472a3203a29e17c025329c1b151f | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am62a7-sk: Drop i2c-1 to 100Khz | Problem Details:
The TLV320AIC3106 audio codec is interfaced on the i2c-1 bus. With the
default rate of 400Khz the i2c register writes fail to sync:
[ 36.026387] tlv320aic3x 1-001b: Unable to sync registers 0x16-0x16. -110
[ 38.101130] omap_i2c 20010000.i2c: controller timed out
Dropping the rate to 100Khz fixes ... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
index c689d3da2def..866b2725f775 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
@@ -261,7 +261,7 @@
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&m... |
c7368ddba2ffcc5d200122c5bb122c3825ecb976 | Analyze and fix the following issue in the Linux kernel code: ARM: 9326/1: make <linux/uaccess.h> self-contained for ARM | Problem Details:
When I compiled the following code for ARM, I encountered numerous
errors.
[Test Code]
#include <linux/compiler.h>
#include <linux/uaccess.h>
int foo(int *x, int __user *ptr)
{
return get_user(*x, ptr);
}
To fix the errors, make some asm headers self-contained:
1. ... | ```diff
diff --git a/arch/arm/include/asm/domain.h b/arch/arm/include/asm/domain.h
index 41536feb4392..d48859fdf32c 100644
--- a/arch/arm/include/asm/domain.h
+++ b/arch/arm/include/asm/domain.h
@@ -8,8 +8,8 @@
#define __ASM_PROC_DOMAIN_H
#ifndef __ASSEMBLY__
+#include <linux/thread_info.h>
#include <asm/barrier.h... |
2d3dff577dd0ea8fe9637a13822f7603c4a881c8 | Analyze and fix the following issue in the Linux kernel code: tools: iio: iio_generic_buffer ensure alignment | Problem Details:
The iio_generic_buffer can return garbage values when the total size of
scan data is not a multiple of the largest element in the scan. This can be
demonstrated by reading a scan, consisting, for example of one 4-byte and
one 2-byte element, where the 4-byte element is first in the buffer.
The IIO gen... | ```diff
diff --git a/tools/iio/iio_generic_buffer.c b/tools/iio/iio_generic_buffer.c
index 44bbf80f0cfd..0d0a7a19d6f9 100644
--- a/tools/iio/iio_generic_buffer.c
+++ b/tools/iio/iio_generic_buffer.c
@@ -54,9 +54,12 @@ enum autochan {
static unsigned int size_from_channelarray(struct iio_channel_info *channels, int num... |
24d3ba0a7b44c1617c27f5045eecc4f34752ab03 | Analyze and fix the following issue in the Linux kernel code: ARM: 9324/1: fix get_user() broken with veneer | Problem Details:
The 32-bit ARM kernel stops working if the kernel grows to the point
where veneers for __get_user_* are created.
AAPCS32 [1] states, "Register r12 (IP) may be used by a linker as a
scratch register between a routine and any subroutine it calls. It
can also be used within a routine to hold intermediate... | ```diff
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
index bb5c81823117..c28f5ec21e41 100644
--- a/arch/arm/include/asm/uaccess.h
+++ b/arch/arm/include/asm/uaccess.h
@@ -109,16 +109,6 @@ extern int __get_user_64t_1(void *);
extern int __get_user_64t_2(void *);
extern int __get_user_64... |
399da29ff5eb3f675c71423bec4cf2208f218576 | Analyze and fix the following issue in the Linux kernel code: ARM: 9323/1: mm: Fix ARCH_LOW_ADDRESS_LIMIT when CONFIG_ZONE_DMA | Problem Details:
Configuring VMSPLIT_2G + LPAE on Raspberry Pi 4 leads to SWIOTLB
buffer allocation beyond platform dma_zone_size of SZ_1G, which
results in broken SD card boot.
So fix this be setting ARCH_LOW_ADDRESS_LIMIT in CONFIG_ZONE_DMA
case.
Suggested-by: Russell King <rmk+kernel@armlinux.org.uk>
Fixes: e9faf9... | ```diff
diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h
index c6aded1b069c..e2a1916013e7 100644
--- a/arch/arm/include/asm/dma.h
+++ b/arch/arm/include/asm/dma.h
@@ -12,6 +12,9 @@
extern phys_addr_t arm_dma_zone_size; \
arm_dma_zone_size && arm_dma_zone_size < (0x100000000ULL - PAGE_OFFSET) ? \... |
c0e824661f443b8cab3897006c1bbc69fd0e7bc4 | Analyze and fix the following issue in the Linux kernel code: ARM: 9321/1: memset: cast the constant byte to unsigned char | Problem Details:
memset() description in ISO/IEC 9899:1999 (and elsewhere) says:
The memset function copies the value of c (converted to an
unsigned char) into each of the first n characters of the
object pointed to by s.
The kernel's arm32 memset does not cast c to unsigned char. This results
in the following cod... | ```diff
diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S
index d71ab61430b2..de75ae4d5ab4 100644
--- a/arch/arm/lib/memset.S
+++ b/arch/arm/lib/memset.S
@@ -17,6 +17,7 @@ ENTRY(__memset)
ENTRY(mmioset)
WEAK(memset)
UNWIND( .fnstart )
+ and r1, r1, #255 @ cast to unsigned char
ands r3, r0, #3 @ ... |
b0150014878c32197cfa66e3e2f79e57f66babc0 | Analyze and fix the following issue in the Linux kernel code: ARM: 9320/1: fix stack depot IRQ stack filter | Problem Details:
Place IRQ handlers such as gic_handle_irq() in the irqentry section even
if FUNCTION_GRAPH_TRACER is not enabled. Without this, the stack
depot's filter_irq_stacks() does not correctly filter out IRQ stacks in
those configurations, which hampers deduplication and eventually leads
to "Stack depot reach... | ```diff
diff --git a/arch/arm/include/asm/exception.h b/arch/arm/include/asm/exception.h
index 58e039a851af..3c82975d46db 100644
--- a/arch/arm/include/asm/exception.h
+++ b/arch/arm/include/asm/exception.h
@@ -10,10 +10,6 @@
#include <linux/interrupt.h>
-#ifdef CONFIG_FUNCTION_GRAPH_TRACER
#define __exception_ir... |
414f28a94222fe372a5b2378415895b9c4dc540f | Analyze and fix the following issue in the Linux kernel code: ARM: 9319/1: sa1111: fix sa1111_probe kernel-doc warnings | Problem Details:
Document only the platform_driver probe entry point in kernel-doc
to prevent kernel-doc warnings:
sa1111.c:802: warning: Function parameter or member 'me' not described in '__sa1111_probe'
sa1111.c:802: warning: Function parameter or member 'mem' not described in '__sa1111_probe'
sa1111.c:802: warning... | ```diff
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 77c83ba81715..1fbd7363cf11 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -785,19 +785,6 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
return ret;
}
-/**
- * sa1111_probe - probe for a... |
33269ac0b768b07da017df173d52952625c57870 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am625-beagleplay: Fix typo in ramoops reg | Problem Details:
Seems like the address value of the reg property was mistyped.
Update reg to 0x9ca00000 to match node's definition.
Fixes: f5a731f0787f ("arm64: dts: ti: Add k3-am625-beagleplay")
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Reviewed-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/2... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
index f646d1ec4c05..00891a0f8fc3 100644
--- a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
+++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
@@ -59,7 +59,7 @@
ramoops: ramoops@9ca00000 {
co... |
848f68c760ab1e14a9046ea6e45e3304ab9fa50b | Analyze and fix the following issue in the Linux kernel code: iio: magnetometer: ak8975: Fix 'Unexpected device' error | Problem Details:
Explicity specify array indices to fix mapping between
asahi_compass_chipset and ak_def_array.
While at it, remove unneeded AKXXXX.
Fixes: 4f9ea93afde1 ("iio: magnetometer: ak8975: Convert enum->pointer for data in the match tables")
Signed-off-by: André Apitzsch <git@apitzsch.eu>
Reviewed-by: Biju Da... | ```diff
diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c
index 8cfceb007936..dd466c5fa621 100644
--- a/drivers/iio/magnetometer/ak8975.c
+++ b/drivers/iio/magnetometer/ak8975.c
@@ -204,7 +204,6 @@ static long ak09912_raw_to_gauss(u16 data)
/* Compatible Asahi Kasei Compass parts */
... |
5ddd8baa4857709b4e5d84b376d735152851955b | Analyze and fix the following issue in the Linux kernel code: tracing: Make system_callback() function static | Problem Details:
The system_callback() function in trace_events.c is only used within that
file. The "static" annotation was missed.
Fixes: 5790b1fb3d672 ("eventfs: Remove eventfs_file and just use eventfs_inode")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310051743... | ```diff
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 0e3a1c70e410..db46d2116500 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -2282,7 +2282,7 @@ create_new_subsystem(const char *name)
return NULL;
}
-int system_callback(const char *name, umode_t *mode... |
2819f23ac12ce93ff79ca7a54597df9a4a1f6331 | Analyze and fix the following issue in the Linux kernel code: eventfs: Use eventfs_remove_events_dir() | Problem Details:
The update to removing the eventfs_file changed the way the events top
level directory was handled. Instead of returning a dentry, it now returns
the eventfs_inode. In this changed, the removing of the events top level
directory is not much different than removing any of the other
directories. Because ... | ```diff
diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c
index eab18b157ef5..1ccd100bc565 100644
--- a/fs/tracefs/event_inode.c
+++ b/fs/tracefs/event_inode.c
@@ -901,22 +901,17 @@ void eventfs_remove_dir(struct eventfs_inode *ei)
}
/**
- * eventfs_remove_events_dir - remove eventfs dir or file from... |
f74c746e476b9dad51448b9a9421aae72b60e25f | Analyze and fix the following issue in the Linux kernel code: io_uring/kbuf: Allow the full buffer id space for provided buffers | Problem Details:
nbufs tracks the number of buffers and not the last bgid. In 16-bit, we
have 2^16 valid buffers, but the check mistakenly rejects the last
bid. Let's fix it to make the interface consistent with the
documentation.
Fixes: ddf0322db79c ("io_uring: add IORING_OP_PROVIDE_BUFFERS")
Signed-off-by: Gabriel K... | ```diff
diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c
index 52dba81c3f50..12a357348733 100644
--- a/io_uring/kbuf.c
+++ b/io_uring/kbuf.c
@@ -19,12 +19,15 @@
#define BGID_ARRAY 64
+/* BIDs are addressed by a 16-bit field in a CQE */
+#define MAX_BIDS_PER_BGID (1 << 16)
+
struct io_provide_buf {
struct file *... |
ab69838e7c75b0edb699c1a8f42752b30333c46f | Analyze and fix the following issue in the Linux kernel code: io_uring/kbuf: Fix check of BID wrapping in provided buffers | Problem Details:
Commit 3851d25c75ed0 ("io_uring: check for rollover of buffer ID when
providing buffers") introduced a check to prevent wrapping the BID
counter when sqe->off is provided, but it's off-by-one too
restrictive, rejecting the last possible BID (65534).
i.e., the following fails with -EINVAL.
io_uri... | ```diff
diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c
index 556f4df25b0f..52dba81c3f50 100644
--- a/io_uring/kbuf.c
+++ b/io_uring/kbuf.c
@@ -352,7 +352,7 @@ int io_provide_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe
tmp = READ_ONCE(sqe->off);
if (tmp > USHRT_MAX)
return -E2BIG;
- if (tmp ... |
67142d6f1e2fd97c035a42612b5b28809dc5f6ea | Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: fix Analog Devices website link | Problem Details:
The http://ez.analog.com/community/linux-device-drivers link is broken.
Update website link to the new available one:
https://ez.analog.com/linux-software-drivers
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Link: https://lore.kernel.org/r/20230926100149.4611-1-antoniu.miclaus@analog.c... | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index 337a4244ee30..0782484cceb8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1119,7 +1119,7 @@ ANALOG DEVICES INC AD4130 DRIVER
M: Cosmin Tanislav <cosmin.tanislav@analog.com>
L: linux-iio@vger.kernel.org
S: Supported
-W: http://ez.analog.com/community/linux-device-d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.