id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
30188bd7838c16a98a520db1fe9df01ffc6ed368 | Analyze and fix the following issue in the Linux kernel code: rtnetlink: Reject negative ifindexes in RTM_NEWLINK | Problem Details:
Negative ifindexes are illegal, but the kernel does not validate the
ifindex in the ancillary header of RTM_NEWLINK messages, resulting in
the kernel generating a warning [1] when such an ifindex is specified.
Fix by rejecting negative ifindexes.
[1]
WARNING: CPU: 0 PID: 5031 at net/core/dev.c:9593 d... | ```diff
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index bcebdeb59163..00c94d9622b4 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -3561,6 +3561,9 @@ replay:
if (ifm->ifi_index > 0) {
link_specified = true;
dev = __dev_get_by_index(net, ifm->ifi_index);
+ } else if (ifm->ifi_index... |
c40cad3b0aa47d6d0995637178fb6607ac3d45c1 | Analyze and fix the following issue in the Linux kernel code: ARC: boot log: fix warning | Problem Details:
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308221549.XKufWEWp-lkp@intel.com/
Signed-off-by: Vineet Gupta <vgupta@kernel.org> | ```diff
diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
index 0aa49308d792..4dcf8589b708 100644
--- a/arch/arc/kernel/setup.c
+++ b/arch/arc/kernel/setup.c
@@ -102,8 +102,10 @@ arcompact_mumbojumbo(int c, struct cpuinfo_arc *info, char *buf, int len)
else
cpu_nm = "ARC770";
- n += scnprintf(buf + ... |
f3bdb54f09ab4cdbca48bf7befa8997cadd8d6a1 | Analyze and fix the following issue in the Linux kernel code: libbpf: fix signedness determination in CO-RE relo handling logic | Problem Details:
Extracting btf_int_encoding() is only meaningful for BTF_KIND_INT, so we
need to check that first before inferring signedness.
Closes: https://github.com/libbpf/libbpf/issues/704
Reported-by: Lorenz Bauer <lmb@isovalent.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <y... | ```diff
diff --git a/tools/lib/bpf/relo_core.c b/tools/lib/bpf/relo_core.c
index a26b2f5fa0fc..63a4d5ad12d1 100644
--- a/tools/lib/bpf/relo_core.c
+++ b/tools/lib/bpf/relo_core.c
@@ -776,7 +776,7 @@ static int bpf_core_calc_field_relo(const char *prog_name,
break;
case BPF_CORE_FIELD_SIGNED:
*val = (btf_is_any_... |
a182e64147f7db006691c181077e456321f23bff | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: add uprobe_multi test binary to .gitignore | Problem Details:
It seems like it was forgotten to add uprobe_multi binary to .gitignore.
Fix this trivial omission.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20230824000016.2658017-1-andrii@kernel.org
Signed-off-by: Martin KaFa... | ```diff
diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore
index 110518ba4804..f1aebabfb017 100644
--- a/tools/testing/selftests/bpf/.gitignore
+++ b/tools/testing/selftests/bpf/.gitignore
@@ -44,6 +44,7 @@ test_cpp
/bench
/veristat
/sign-file
+/uprobe_multi
*.ko
*.tmp
xs... |
88c1e6efb7a58ff64ce196ec09d831263793c858 | Analyze and fix the following issue in the Linux kernel code: net: ethernet: mtk_eth_soc: add reset bits for MT7988 | Problem Details:
Add bits needed to reset the frame engine on MT7988.
Fixes: 445eb6448ed3 ("net: ethernet: mtk_eth_soc: add basic support for MT7988 SoC")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://lore.kernel.org/r/89b6c38380e7a3800c1362aa7575600717bc7543.1692721443.git.daniel@makrotopia.org
Si... | ```diff
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index fe05c9020269..2482f4731308 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3613,19 +3613,34 @@ static void mtk_hw_reset(struct mtk_eth *eth)... |
cfb5677de5babe3664356155a391e2ff781c9ee1 | Analyze and fix the following issue in the Linux kernel code: net: ethernet: mtk_eth_soc: fix register definitions for MT7988 | Problem Details:
More register macros need to be adjusted for the 3rd GMAC on MT7988.
Account for added bit in SYSCFG0_SGMII_MASK.
Fixes: 445eb6448ed3 ("net: ethernet: mtk_eth_soc: add basic support for MT7988 SoC")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: ... | ```diff
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
index 4a2470fbad2c..8d2d35b32235 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -133,10 +133,12 @@
#define MTK_GDMA_XGDM_SEL BIT(31)
/* Unicas... |
58ec916803cd8d3732f21c828f0cc8a103e47cb4 | Analyze and fix the following issue in the Linux kernel code: of: unittest-data: Fix whitespace - angular brackets | Problem Details:
No space after opening or before closing angular bracket.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/af37e6e73f16d0240a2a1696e21d1d6a3c423ba4.1690533838.git.geert+renesas@glider.be
Signed-off-by: Rob Herring <robh@kernel.org> | ```diff
diff --git a/drivers/of/unittest-data/overlay.dtso b/drivers/of/unittest-data/overlay.dtso
index 0c078b08ef08..b3e807b99852 100644
--- a/drivers/of/unittest-data/overlay.dtso
+++ b/drivers/of/unittest-data/overlay.dtso
@@ -7,8 +7,8 @@
hvac_2: hvac-large-1 {
compatible = "ot,hvac-large";
- heat-range = <... |
367dcb487695e1f219ccac09abf0d7a94bff3355 | Analyze and fix the following issue in the Linux kernel code: of: unittest-data: Fix whitespace - indentation | Problem Details:
Single space for each indentation level.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/4df783995a7d34364cb06002bdfeb9eaf2ad4e80.1690533838.git.geert+renesas@glider.be
Signed-off-by: Rob Herring <robh@kernel.org> | ```diff
diff --git a/drivers/of/unittest-data/overlay_bad_add_dup_node.dtso b/drivers/of/unittest-data/overlay_bad_add_dup_node.dtso
index a8d8534f725c..11aa1401244d 100644
--- a/drivers/of/unittest-data/overlay_bad_add_dup_node.dtso
+++ b/drivers/of/unittest-data/overlay_bad_add_dup_node.dtso
@@ -21,7 +21,7 @@
};
... |
517dba9711f9c872d5c607d6ac69b90947e0d8be | Analyze and fix the following issue in the Linux kernel code: of: unittest-data: Fix whitespace - blank lines | Problem Details:
Blank line between properties and subnodes.
Blank line between subsequent subnodes.
No blank line after subnode opening curly brace.
No blank line after subnode closing curly brace.
No blank line at end of file.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/... | ```diff
diff --git a/drivers/of/unittest-data/overlay.dtso b/drivers/of/unittest-data/overlay.dtso
index 3bbc59e922fe..0c078b08ef08 100644
--- a/drivers/of/unittest-data/overlay.dtso
+++ b/drivers/of/unittest-data/overlay.dtso
@@ -3,7 +3,6 @@
/plugin/;
&electric_1 {
-
status = "okay";
hvac_2: hvac-large-1 {
@... |
0676aeeca537740a03ecdb8b699b37e98ec60289 | Analyze and fix the following issue in the Linux kernel code: of: unittest: Cleanup partially-applied overlays | Problem Details:
When of_overlay_fdt_apply() fails, the changeset may be partially
applied, and the caller is still expected to call of_overlay_remove() to
clean up this partial state. However, overlay_17 is the only test that
takes care of cleaning up after an (expected) failure.
Instead of adding cleanup code to ea... | ```diff
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 57fd7cde5840..f450c434a403 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -2997,12 +2997,6 @@ static void __init of_unittest_overlay_notify(void)
unittest(ovcs_id, "ovcs_id not created for overlay_17\n");
- if (ovcs_id) {
... |
35df904df899dba916ceb5248d815bfe71e9367d | Analyze and fix the following issue in the Linux kernel code: of: unittest: Improve messages and comments in apply/revert checks | Problem Details:
Miscellaneous improvements for the apply and apply/revert checks,
making them more similar:
- Fix inverted comment for before state check,
- Add more comments to improve symmetry,
- Fix grammar s/must be to set to/must be in/,
- Avoid saying "create" in messages, as the actual operation depends... | ```diff
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index c01b94a51195..35a621e0226c 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -2141,7 +2141,7 @@ static int __init of_unittest_apply_overlay_check(int overlay_nr,
{
int ret, ovcs_id;
- /* unittest device must not be in before s... |
8f50c20118ec55b0dd1273b6e789de146d08e579 | Analyze and fix the following issue in the Linux kernel code: of: unittest: Restore indentation in overlay_bad_add_dup_prop test | Problem Details:
When updating the expected error messages for the
overlay_bad_add_dup_prop test, indentation of the EXPECT_END()
statements was accidentally changed.
Fixes: 29acfb65598f9167 ("of: unittest: kmemleak in duplicate property update")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https:... | ```diff
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 4b6775af3c7e..c01b94a51195 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -3725,11 +3725,11 @@ static __init void of_unittest_overlay_high_level(void)
"Adding overlay 'overlay_bad_add_dup_prop' failed\n");
EXPECT_END(KER... |
6becf8f845ae1f0b1cfed395bbeccbd23654162d | Analyze and fix the following issue in the Linux kernel code: of: unittest: Fix overlay type in apply/revert check | Problem Details:
The removal check in of_unittest_apply_revert_overlay_check()
always uses the platform device overlay type, while it should use the
actual overlay type, as passed as a parameter to the function.
This has no impact on any current test, as all tests calling
of_unittest_apply_revert_overlay_check() use t... | ```diff
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 064a41007a50..4b6775af3c7e 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -2213,7 +2213,7 @@ static int __init of_unittest_apply_revert_overlay_check(int overlay_nr,
of_unittest_untrack_overlay(save_ovcs_id);
/* unittest d... |
a9515ff4fb142b690a0d2b58782b15903b990dba | Analyze and fix the following issue in the Linux kernel code: of: overlay: Call of_changeset_init() early | Problem Details:
When of_overlay_fdt_apply() fails, the changeset may be partially
applied, and the caller is still expected to call of_overlay_remove() to
clean up this partial state.
However, of_overlay_apply() calls of_resolve_phandles() before
init_overlay_changeset(). Hence if the overlay fails to apply due to a... | ```diff
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index 6f3ae30c878d..dfb6fb962fc7 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -769,8 +769,6 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs,
if (!of_node_is_root(ovcs->overlay_root))
pr_debug("%s() ovcs->overlay... |
443f9e0b1ab5e3b95abf8606097d13e30e2f2413 | Analyze and fix the following issue in the Linux kernel code: drm/nouveau: uapi: don't pass NO_PREFETCH flag implicitly | Problem Details:
Currently, NO_PREFETCH is passed implicitly through
drm_nouveau_gem_pushbuf_push::length and drm_nouveau_exec_push::va_len.
Since this is a direct representation of how the HW is programmed it
isn't really future proof for a uAPI. Hence, fix this up for the new
uAPI and split up the va_len field of st... | ```diff
diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.c b/drivers/gpu/drm/nouveau/nouveau_dma.c
index b90cac6d5772..b01c029f3a90 100644
--- a/drivers/gpu/drm/nouveau/nouveau_dma.c
+++ b/drivers/gpu/drm/nouveau/nouveau_dma.c
@@ -69,16 +69,19 @@ READ_GET(struct nouveau_channel *chan, uint64_t *prev_get, int *timeout)
... |
c6b9075cfbd624f2b33bd6fd388dc6f0b7027472 | Analyze and fix the following issue in the Linux kernel code: drm/nouveau: uvmm: fix unset region pointer on remap | Problem Details:
Transfer the region pointer of a uvma to the new uvma(s) on re-map to
prevent potential shader faults when the re-mapped uvma(s) are unmapped.
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230820222... | ```diff
diff --git a/drivers/gpu/drm/nouveau/nouveau_uvmm.c b/drivers/gpu/drm/nouveau/nouveau_uvmm.c
index 3a1e8538f205..aae780e4a4aa 100644
--- a/drivers/gpu/drm/nouveau/nouveau_uvmm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_uvmm.c
@@ -639,6 +639,7 @@ nouveau_uvmm_sm_prepare(struct nouveau_uvmm *uvmm,
struct drm_gpu... |
b715dcd3db4a9a57b3fbe7820db37cae930f0867 | Analyze and fix the following issue in the Linux kernel code: drm/nouveau: uapi: don't pass NO_PREFETCH flag implicitly | Problem Details:
Currently, NO_PREFETCH is passed implicitly through
drm_nouveau_gem_pushbuf_push::length and drm_nouveau_exec_push::va_len.
Since this is a direct representation of how the HW is programmed it
isn't really future proof for a uAPI. Hence, fix this up for the new
uAPI and split up the va_len field of st... | ```diff
diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.c b/drivers/gpu/drm/nouveau/nouveau_dma.c
index b90cac6d5772..b01c029f3a90 100644
--- a/drivers/gpu/drm/nouveau/nouveau_dma.c
+++ b/drivers/gpu/drm/nouveau/nouveau_dma.c
@@ -69,16 +69,19 @@ READ_GET(struct nouveau_channel *chan, uint64_t *prev_get, int *timeout)
... |
e63227c83cff755c4d3b326d317d2e88451a637f | Analyze and fix the following issue in the Linux kernel code: clk: lmk04832: Don't disable vco clock on probe fail | Problem Details:
The probe() method never calls clk_prepare_enable(), so it should not
call clk_disable_unprepare() for the vco.clk in the error path. Fixes
a "lmk-vco already disabled" BUG when probe fails.
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Link: https://lore.kernel.org/r/20230802064100.15793-2-... | ```diff
diff --git a/drivers/clk/clk-lmk04832.c b/drivers/clk/clk-lmk04832.c
index 188085e7a30b..dd1f0c59ee71 100644
--- a/drivers/clk/clk-lmk04832.c
+++ b/drivers/clk/clk-lmk04832.c
@@ -1505,21 +1505,21 @@ static int lmk04832_probe(struct spi_device *spi)
ret = clk_set_rate(lmk->vco.clk, lmk->vco_rate);
if (ret)... |
b37c60d23df71ae6c09856cab4b853aea11f0615 | Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: pps: Update pps-gpio bindings location | Problem Details:
The pps-gpio bindings have been converted to yaml.
Update the file path accordingly.
Fixes: 7ceb60ece856 ("dt-bindings: pps: pps-gpio: Convert to yaml")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308230517.n0rrszYH-lkp@intel.com/
Signed-off-by: Fab... | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index 3be1bdfe8ecc..e6345e623b3a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17021,7 +17021,7 @@ L: linuxpps@ml.enneenne.com (subscribers-only)
S: Maintained
W: http://wiki.enneenne.com/index.php/LinuxPPS_support
F: Documentation/ABI/testing/sysfs-pps
-F: Documentati... |
af0ead42f69389cd4ed68e1a4c6cde45c0adb35c | Analyze and fix the following issue in the Linux kernel code: riscv: Add CFI error handling | Problem Details:
With CONFIG_CFI_CLANG, the compiler injects a type preamble immediately
before each function and a check to validate the target function type
before indirect calls:
; type preamble
.word <id>
function:
...
; indirect call check
lw t1, -4(a0)
lui t2, <hi20>
addiw t2... | ```diff
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index a475ef1a0c1c..29fdba9d8514 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -49,6 +49,7 @@ config RISCV
select ARCH_SUPPORTS_PER_VMA_LOCK if MMU
select ARCH_USE_MEMTEST
select ARCH_USE_QUEUED_RWLOCKS
+ select ARCH_USES_CFI_TRAPS if CFI_... |
f3a0c23f2539a69792df4586485225fda5fab988 | Analyze and fix the following issue in the Linux kernel code: riscv: Add ftrace_stub_graph | Problem Details:
Commit 883bbbffa5a4 ("ftrace,kcfi: Separate ftrace_stub() and
ftrace_stub_graph()") added a separate ftrace_stub_graph function for
CFI_CLANG. Add the stub to fix FUNCTION_GRAPH_TRACER compatibility
with CFI.
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Nathan Chancellor <nathan@kernel.or... | ```diff
diff --git a/arch/riscv/kernel/mcount.S b/arch/riscv/kernel/mcount.S
index 6c9469050f4c..8818a8fa9ff3 100644
--- a/arch/riscv/kernel/mcount.S
+++ b/arch/riscv/kernel/mcount.S
@@ -57,6 +57,10 @@ SYM_TYPED_FUNC_START(ftrace_stub)
SYM_FUNC_END(ftrace_stub)
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
+SYM_TYPED_FUNC_ST... |
08d0ce30e0e4fcb5f06c90fe40387b1ce9324833 | Analyze and fix the following issue in the Linux kernel code: riscv: Implement syscall wrappers | Problem Details:
Commit f0bddf50586d ("riscv: entry: Convert to generic entry") moved
syscall handling to C code, which exposed function pointer type
mismatches that trip fine-grained forward-edge Control-Flow Integrity
(CFI) checks as syscall handlers are all called through the same
syscall_t pointer type. To fix the ... | ```diff
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 4c07b9189c86..a475ef1a0c1c 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -35,6 +35,7 @@ config RISCV
select ARCH_HAS_SET_MEMORY if MMU
select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL
select ARCH_HAS_STRICT_MODULE_RWX if MMU &... |
cfd48ad8c4a9137b0fde7f0ecf463d44b01875dc | Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix HPD polling, reenabling the output poll work as needed | Problem Details:
After the commit in the Fixes: line below, HPD polling stopped working
on i915, since after that change calling drm_kms_helper_poll_enable()
doesn't restart drm_mode_config::output_poll_work if the work was
stopped (no connectors needing polling) and enabling polling for a
connector (during runtime sus... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c
index 0ff5ed46ae1e..69a83dcc1996 100644
--- a/drivers/gpu/drm/i915/display/intel_hotplug.c
+++ b/drivers/gpu/drm/i915/display/intel_hotplug.c
@@ -211,7 +211,7 @@ intel_hpd_irq_storm_switch_to_polling(struct ... |
1dcc437427bbcebc8381226352f7ade08a271191 | Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix HPD polling, reenabling the output poll work as needed | Problem Details:
After the commit in the Fixes: line below, HPD polling stopped working
on i915, since after that change calling drm_kms_helper_poll_enable()
doesn't restart drm_mode_config::output_poll_work if the work was
stopped (no connectors needing polling) and enabling polling for a
connector (during runtime sus... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c
index 1160fa20433b..5eac7032bb5a 100644
--- a/drivers/gpu/drm/i915/display/intel_hotplug.c
+++ b/drivers/gpu/drm/i915/display/intel_hotplug.c
@@ -211,7 +211,7 @@ intel_hpd_irq_storm_switch_to_polling(struct ... |
61182c796d74f54ba66d17bac6f516183ec09af2 | Analyze and fix the following issue in the Linux kernel code: SUNRPC: kmap() the xdr pages during decode | Problem Details:
If the pages are in HIGHMEM then we need to make sure they're mapped
before trying to read data off of them, otherwise we could end up with a
NULL pointer dereference.
The downside to this is that we need an extra cleanup step at the end of
decode to kunmap() the last page. I introduced an xdr_finish_... | ```diff
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
index f89ec4b5ea16..adc844db1ea5 100644
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -224,6 +224,7 @@ struct xdr_stream {
struct kvec *iov; /* pointer to the current kvec */
struct kvec scratch; /* Scratch buffer */... |
303a78052091c81e9003915c521fdca1c7e117af | Analyze and fix the following issue in the Linux kernel code: NFSv4.2: Rework scratch handling for READ_PLUS (again) | Problem Details:
I found that the read code might send multiple requests using the same
nfs_pgio_header, but nfs4_proc_read_setup() is only called once. This is
how we ended up occasionally double-freeing the scratch buffer, but also
means we set a NULL pointer but non-zero length to the xdr scratch
buffer. This result... | ```diff
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 913c09806c7f..41abea340ad8 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -493,6 +493,7 @@ extern const struct nfs_pgio_completion_ops nfs_async_read_completion_ops;
extern void nfs_pageio_init_read(struct nfs_pageio_descriptor *pgio,
stru... |
8d18f6c5bb864d97a730f471c56cdecf313efe64 | Analyze and fix the following issue in the Linux kernel code: NFSv4.2: Fix READ_PLUS size calculations | Problem Details:
I bump the decode_read_plus_maxsz to account for hole segments, but I
need to subtract out this increase when calling
rpc_prepare_reply_pages() so the common case of single data segment
replies can be directly placed into the xdr pages without needing to be
shifted around.
Reported-by: Chuck Lever <ch... | ```diff
diff --git a/fs/nfs/nfs42xdr.c b/fs/nfs/nfs42xdr.c
index d0919c5bf61c..78193f04d892 100644
--- a/fs/nfs/nfs42xdr.c
+++ b/fs/nfs/nfs42xdr.c
@@ -54,10 +54,16 @@
(1 /* data_content4 */ + \
2 /* data_info4.di_offset */ + \
1 /* data_info4.di_length */)
+#define NFS42_READ_PLUS_HOLE_SEGMENT_SIZE ... |
bb05a617f06b7a882e19c4f475b8e37f14d9ceac | Analyze and fix the following issue in the Linux kernel code: NFSv4.2: Fix READ_PLUS smatch warnings | Problem Details:
Smatch reports:
fs/nfs/nfs42xdr.c:1131 decode_read_plus() warn: missing error code? 'status'
Which Dan suggests to fix by doing a hardcoded "return 0" from the
"if (segments == 0)" check.
Additionally, smatch reports that the "status = -EIO" assignment is not
used. This patch addresses both these i... | ```diff
diff --git a/fs/nfs/nfs42xdr.c b/fs/nfs/nfs42xdr.c
index 95234208dc9e..d0919c5bf61c 100644
--- a/fs/nfs/nfs42xdr.c
+++ b/fs/nfs/nfs42xdr.c
@@ -1056,13 +1056,12 @@ static int decode_read_plus(struct xdr_stream *xdr, struct nfs_pgio_res *res)
res->eof = be32_to_cpup(p++);
segments = be32_to_cpup(p++);
if (s... |
50452f2f76852322620b63e62922b85e955abe94 | Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix HPD polling, reenabling the output poll work as needed | Problem Details:
After the commit in the Fixes: line below, HPD polling stopped working
on i915, since after that change calling drm_kms_helper_poll_enable()
doesn't restart drm_mode_config::output_poll_work if the work was
stopped (no connectors needing polling) and enabling polling for a
connector (during runtime sus... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c
index e3ca192eb569..e8562f6f8bb4 100644
--- a/drivers/gpu/drm/i915/display/intel_hotplug.c
+++ b/drivers/gpu/drm/i915/display/intel_hotplug.c
@@ -212,7 +212,7 @@ intel_hpd_irq_storm_switch_to_polling(struct ... |
6e39c1ac688161b4db3617aabbca589b395242bc | Analyze and fix the following issue in the Linux kernel code: gpio: sim: pass the GPIO device's software node to irq domain | Problem Details:
Associate the swnode of the GPIO device's (which is the interrupt
controller here) with the irq domain. Otherwise the interrupt-controller
device attribute is a no-op.
Fixes: cb8c474e79be ("gpio: sim: new testing module")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by:... | ```diff
diff --git a/drivers/gpio/gpio-sim.c b/drivers/gpio/gpio-sim.c
index 8fb11a5395eb..533d81572579 100644
--- a/drivers/gpio/gpio-sim.c
+++ b/drivers/gpio/gpio-sim.c
@@ -411,7 +411,7 @@ static int gpio_sim_add_bank(struct fwnode_handle *swnode, struct device *dev)
if (!chip->pull_map)
return -ENOMEM;
- chip... |
ab4109f91b328ff5cb5e1279f64d443241add2d1 | Analyze and fix the following issue in the Linux kernel code: gpio: sim: dispose of irq mappings before destroying the irq_sim domain | Problem Details:
If a GPIO simulator device is unbound with interrupts still requested,
we will hit a use-after-free issue in __irq_domain_deactivate_irq(). The
owner of the irq domain must dispose of all mappings before destroying
the domain object.
Fixes: cb8c474e79be ("gpio: sim: new testing module")
Signed-off-by:... | ```diff
diff --git a/drivers/gpio/gpio-sim.c b/drivers/gpio/gpio-sim.c
index f1f6f1c32987..8fb11a5395eb 100644
--- a/drivers/gpio/gpio-sim.c
+++ b/drivers/gpio/gpio-sim.c
@@ -291,6 +291,15 @@ static void gpio_sim_mutex_destroy(void *data)
mutex_destroy(lock);
}
+static void gpio_sim_dispose_mappings(void *data)
+{... |
9b80b9676be901eb980c48543a19d7026d2f84b8 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: pmu: Guard PMU emulation definitions with CONFIG_KVM | Problem Details:
Most of the internal definitions for PMU emulation are guarded with
CONFIG_HW_PERF_EVENTS. However, this isn't enough, and leads to
these definitions leaking if CONFIG_KVM isn't enabled.
This leads to some compilation breakage in this exact configuration.
Fix it by falling back to the dummy stubs if e... | ```diff
diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h
index 3a8a70a60794..31029f4f7be8 100644
--- a/include/kvm/arm_pmu.h
+++ b/include/kvm/arm_pmu.h
@@ -12,7 +12,7 @@
#define ARMV8_PMU_CYCLE_IDX (ARMV8_PMU_MAX_COUNTERS - 1)
-#ifdef CONFIG_HW_PERF_EVENTS
+#if IS_ENABLED(CONFIG_HW_PERF_EVENTS) && IS_E... |
a74048432fbb30e7a574747f6e1f47aef17010b0 | Analyze and fix the following issue in the Linux kernel code: ASoC: cs42l43: Initialize ret in default case in cs42l43_pll_ev() | Problem Details:
clang warns (or errors with CONFIG_WERROR=y):
sound/soc/codecs/cs42l43.c:1371:2: error: variable 'ret' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
1371 | default:
| ^~~~~~~
sound/soc/codecs/cs42l43.c:1377:9: note: uninitiali... | ```diff
diff --git a/sound/soc/codecs/cs42l43.c b/sound/soc/codecs/cs42l43.c
index 55a79219af35..18178ffa82f2 100644
--- a/sound/soc/codecs/cs42l43.c
+++ b/sound/soc/codecs/cs42l43.c
@@ -1369,6 +1369,7 @@ static int cs42l43_pll_ev(struct snd_soc_dapm_widget *w,
clk_disable_unprepare(priv->mclk);
break;
default... |
091a4dfbb1d32b06c031edbfe2a44af100c4604f | Analyze and fix the following issue in the Linux kernel code: f2fs: compress: fix to assign compress_level for lz4 correctly | Problem Details:
After remount, F2FS_OPTION().compress_level was assgin to
LZ4HC_DEFAULT_CLEVEL incorrectly, result in lz4hc:9 was enabled, fix it.
1. mount /dev/vdb
/dev/vdb on /mnt/f2fs type f2fs (...,compress_algorithm=lz4,compress_log_size=2,...)
2. mount -t f2fs -o remount,compress_log_size=3 /mnt/f2fs/
3. mount|... | ```diff
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index a067466a694c..8d9d2ee7f3c7 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -591,7 +591,7 @@ static int f2fs_set_lz4hc_level(struct f2fs_sb_info *sbi, const char *str)
unsigned int level;
if (strlen(str) == 3) {
- F2FS_OPTION(sbi).compress_level =... |
5118697f7215711f83c339cedab68399d6a01314 | Analyze and fix the following issue in the Linux kernel code: f2fs: fix error path of f2fs_submit_page_read() | Problem Details:
In error path of f2fs_submit_page_read(), it missed to call
iostat_update_and_unbind_ctx() and free bio_post_read_ctx, fix it.
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> | ```diff
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 5d9697717353..916e317ac925 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1167,6 +1167,9 @@ static int f2fs_submit_page_read(struct inode *inode, struct page *page,
f2fs_wait_on_block_writeback(inode, blkaddr);
if (bio_add_page(bio, page, PAGE_SIZE,... |
f9e96bf1905479f18e83a3a4c314a8dfa56ede2c | Analyze and fix the following issue in the Linux kernel code: drm/vmwgfx: Fix possible invalid drm gem put calls | Problem Details:
vmw_bo_unreference sets the input buffer to null on exit, resulting in
null ptr deref's on the subsequent drm gem put calls.
This went unnoticed because only very old userspace would be exercising
those paths but it wouldn't be hard to hit on old distros with brand
new kernels.
Introduce a new functi... | ```diff
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
index 82094c137855..c43853597776 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
@@ -497,10 +497,9 @@ static int vmw_user_bo_synccpu_release(struct drm_file *filp,
if (!(flags & drm_v... |
14abdfae508228a7307f7491b5c4215ae70c6542 | Analyze and fix the following issue in the Linux kernel code: drm/vmwgfx: Fix shader stage validation | Problem Details:
For multiple commands the driver was not correctly validating the shader
stages resulting in possible kernel oopses. The validation code was only.
if ever, checking the upper bound on the shader stages but never a lower
bound (valid shader stages start at 1 not 0).
Fixes kernel oopses ending up in vmw... | ```diff
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index 3810a9984a7f..58bfdf203eca 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -1513,4 +1513,16 @@ static inline bool vmw_has_fences(struct vmw_private *vmw)
return (vmw_fifo_... |
d75e30dddf73449bc2d10bb8e2f1a2c446bc67a2 | Analyze and fix the following issue in the Linux kernel code: bpf: Fix issue in verifying allow_ptr_leaks | Problem Details:
After we converted the capabilities of our networking-bpf program from
cap_sys_admin to cap_net_admin+cap_bpf, our networking-bpf program
failed to start. Because it failed the bpf verifier, and the error log
is "R3 pointer comparison prohibited".
A simple reproducer as follows,
SEC("cls-ingress")
in... | ```diff
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 3d51c737a034..0680569f9bd0 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -14041,6 +14041,12 @@ static int check_cond_jmp_op(struct bpf_verifier_env *env,
return -EINVAL;
}
+ /* check src2 operand */
+ err = check_reg_arg... |
1d0eb6143c1e85d3f9a3f5a616ee7e5dc351d33b | Analyze and fix the following issue in the Linux kernel code: ALSA: ymfpci: Fix the missing snd_card_free() call at probe error | Problem Details:
Like a few other drivers, YMFPCI driver needs to clean up with
snd_card_free() call at an error path of the probe; otherwise the
other devres resources are released before the card and it results in
the UAF.
This patch uses the helper for handling the probe error gracefully.
Fixes: f33fc1576757 ("ALS... | ```diff
diff --git a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c
index b033bd290940..48444dda44de 100644
--- a/sound/pci/ymfpci/ymfpci.c
+++ b/sound/pci/ymfpci/ymfpci.c
@@ -152,8 +152,8 @@ static inline int snd_ymfpci_create_gameport(struct snd_ymfpci *chip, int dev, i
void snd_ymfpci_free_gameport(struct sn... |
9f944d2e0ab39296bfadb29167dc333815ba9f48 | Analyze and fix the following issue in the Linux kernel code: riscv: Require FRAME_POINTER for some configurations | Problem Details:
Some V configurations implicitly turn on '-fno-omit-frame-pointer',
but leaving FRAME_POINTER disabled. This makes it hard to reason about
the FRAME_POINTER config, and also triggers build failures introduced
in by the commit in the Fixes: tag.
Select FRAME_POINTER explicitly for these configurations.... | ```diff
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index f52dd125ac5e..afa7160b136c 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -62,6 +62,7 @@ config RISCV
select COMMON_CLK
select CPU_PM if CPU_IDLE || HIBERNATION
select EDAC_SUPPORT
+ select FRAME_POINTER if PERF_EVENTS || (FUNCTION_TR... |
91b1ad0815fbb1095c8b9e8a2bf4201186afe304 | Analyze and fix the following issue in the Linux kernel code: erofs: release ztailpacking pclusters properly | Problem Details:
Currently ztailpacking pclusters are chained with FOLLOWED_NOINPLACE and
not recorded into the managed_pslots XArray.
After commit 7674a42f35ea ("erofs: use struct lockref to replace
handcrafted approach"), ztailpacking pclusters won't be freed with
erofs_workgroup_put() anymore, which will cause the ... | ```diff
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index da52b1cccd38..036f610e044b 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -1369,7 +1369,10 @@ static void z_erofs_decompress_queue(const struct z_erofs_decompressqueue *io,
owned = READ_ONCE(be.pcl->next);
z_erofs_decompress_pcluster(&be, i... |
e4c1cf523d820730a86cae2c6d55924833b6f7ac | Analyze and fix the following issue in the Linux kernel code: erofs: tidy up z_erofs_do_read_page() | Problem Details:
- Fix a typo: spiltted => split;
- Move !EROFS_MAP_MAPPED and EROFS_MAP_FRAGMENT upwards;
- Increase `split` in advance to avoid unnecessary repeats.
Reviewed-by: Yue Hu <huyue2@coolpad.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https:/... | ```diff
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 9b67991edc7b..6c78566efb92 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -981,49 +981,34 @@ static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe,
struct erofs_map_blocks *const map = &fe->map;
const loff_t offset = page_offse... |
da9a7f6ef0abcff12d2fc0381d7c0a7ac2c96c6d | Analyze and fix the following issue in the Linux kernel code: platform: mellanox: Cosmetic changes | Problem Details:
Fix routines and labels names by s/topolgy/topology.
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Michael Shych <michaelsh@nvidia.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20230822... | ```diff
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index a505f619f337..1010064d54e9 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -6265,7 +6265,7 @@ mlxplat_i2c_mux_complition_notify(void *handle, struct i2c_adapter *parent,
r... |
0848cab765c634597636810bf76d0934003cce28 | Analyze and fix the following issue in the Linux kernel code: platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifications | Problem Details:
rshim console does not show all entries of dmesg.
Fixed by setting MLXBF_TM_TX_LWM_IRQ for every CONSOLE notification.
Signed-off-by: Shih-Yi Chen <shihyic@nvidia.com>
Reviewed-by: Liming Sung <limings@nvidia.com>
Reviewed-by: David Thompson <davthompson@nvidia.com>
Link: https://lore.kernel.org/r/20... | ```diff
diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
index a79318e90a13..b600b77d91ef 100644
--- a/drivers/platform/mellanox/mlxbf-tmfifo.c
+++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
@@ -887,6 +887,7 @@ static bool mlxbf_tmfifo_virtio_notify(struct virtqueue *vq)
... |
81e1d9a39569d315f747c2af19ce502cd08645ed | Analyze and fix the following issue in the Linux kernel code: nvmem: core: Return NULL when no nvmem layout is found | Problem Details:
Currently, of_nvmem_layout_get_container() returns NULL on error, or an
error pointer if either CONFIG_NVMEM or CONFIG_OF is turned off. We
should likely avoid this kind of mix for two reasons: to clarify the
intend and anyway fix the !CONFIG_OF which will likely always if we use
this helper somewhere ... | ```diff
diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
index fa030d93b768..27373024856d 100644
--- a/include/linux/nvmem-consumer.h
+++ b/include/linux/nvmem-consumer.h
@@ -256,7 +256,7 @@ static inline struct nvmem_device *of_nvmem_device_get(struct device_node *np,
static inline struct ... |
1006ebe9f1b5dad6b9e8b34ca9b982cc8c16ccee | Analyze and fix the following issue in the Linux kernel code: nvmem: u-boot-env:: Replace zero-length array with DECLARE_FLEX_ARRAY() helper | Problem Details:
We are moving toward replacing zero-length arrays with C99 flexible-array
members since they are deprecated. Therefore, the new DECLARE_FLEX_ARRAY()
helper macro should be used to replace the zero-length array declaration.
This fixes warnings such as:
./drivers/nvmem/u-boot-env.c:50:9-13: WARNING use ... | ```diff
diff --git a/drivers/nvmem/u-boot-env.c b/drivers/nvmem/u-boot-env.c
index 80c5382b361c..c4ae94af4af7 100644
--- a/drivers/nvmem/u-boot-env.c
+++ b/drivers/nvmem/u-boot-env.c
@@ -47,7 +47,7 @@ struct u_boot_env_image_broadcom {
__le32 magic;
__le32 len;
__le32 crc32;
- uint8_t data[0];
+ DECLARE_FLEX_ARRA... |
23b7b491983f9678b3c6d99dca91f981d49c9d2a | Analyze and fix the following issue in the Linux kernel code: nvmem: Kconfig: Fix typo "drive" -> "driver" | Problem Details:
Fix typo where "driver" was meant instead of "drive".
While at it, also capitalize "OTP".
Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/2023082313... | ```diff
diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index 5c5d7414f78c..7ab12fc1044c 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -247,7 +247,7 @@ config NVMEM_ROCKCHIP_EFUSE
depends on ARCH_ROCKCHIP || COMPILE_TEST
depends on HAS_IOMEM
help
- This is a simple drive to dump s... |
afb522b36e76acaa9f8fc06d0a9742d841c47c16 | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Fix memory leak in rx_desc and tx_desc | Problem Details:
Currently when ath12k_dp_cc_desc_init() is called we allocate
memory to rx_descs and tx_descs. In ath12k_dp_cc_cleanup(), during
descriptor cleanup rx_descs and tx_descs memory is not freed.
This is cause of memory leak. These allocated memory should be
freed in ath12k_dp_cc_cleanup.
In ath12k_dp_cc_... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/dp.c b/drivers/net/wireless/ath/ath12k/dp.c
index ae1645d0f42a..f933896f2a68 100644
--- a/drivers/net/wireless/ath/ath12k/dp.c
+++ b/drivers/net/wireless/ath/ath12k/dp.c
@@ -1129,6 +1129,7 @@ static void ath12k_dp_cc_cleanup(struct ath12k_base *ab)
struct ath12k_dp... |
e10ec6ea612ca54e3266996875b0742619dac20f | Analyze and fix the following issue in the Linux kernel code: wifi: ath5k: ath5k_hw_get_median_noise_floor(): use swap() | Problem Details:
coccinielle reported the following:
./drivers/net/wireless/ath/ath5k/phy.c:1573:25-26: WARNING opportunity for swap()
while trying to fix the above warning, it reveals that ath5k_hw_get_median_noise_floor()
had open-coded sort() functionality. Since ath5k_hw_get_median_noise_floor() only
executes once... | ```diff
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index 5797ef9c73d7..7ee4e1616f45 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -26,6 +26,7 @@
#include <linux/delay.h>
#include <linux/slab.h>
+#include <linux/sort.h>
... |
8e51830e29e12670b4c10df070a4ea4c9593e961 | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: defer gc run if previous batch is still pending | Problem Details:
Don't queue more gc work, else we may queue the same elements multiple
times.
If an element is flagged as dead, this can mean that either the previous
gc request was invalidated/discarded by a transaction or that the previous
request is still pending in the system work queue.
The latter will happen i... | ```diff
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index ffcbdf08380f..dd40c75011d2 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -587,6 +587,11 @@ static inline void *nft_set_priv(const struct nft_set *set)
return (void *)set->data;
... |
5e1be4cdc98c989d5387ce94ff15b5ad06a5b681 | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: fix out of memory error handling | Problem Details:
Several instances of pipapo_resize() don't propagate allocation failures,
this causes a crash when fault injection is enabled for gfp_kernel slabs.
Fixes: 3c4287f62044 ("nf_tables: Add set type for arbitrary concatenation of ranges")
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Stefano ... | ```diff
diff --git a/net/netfilter/nft_set_pipapo.c b/net/netfilter/nft_set_pipapo.c
index 3757fcc55723..6af9c9ed4b5c 100644
--- a/net/netfilter/nft_set_pipapo.c
+++ b/net/netfilter/nft_set_pipapo.c
@@ -902,12 +902,14 @@ static void pipapo_lt_bits_adjust(struct nft_pipapo_field *f)
static int pipapo_insert(struct nft_... |
de43b07db2a1af0d11ed167bb028f1038ae04086 | Analyze and fix the following issue in the Linux kernel code: wifi: ath10k: fix Wvoid-pointer-to-enum-cast warning | Problem Details:
'hw_rev' is an enum, thus cast of pointer on 64-bit compile test with W=1
causes:
ath10k/ahb.c:736:11: error: cast to smaller integer type 'enum ath10k_hw_rev' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Jef... | ```diff
diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c
index 76efea2f1138..a378bc48b1d2 100644
--- a/drivers/net/wireless/ath/ath10k/ahb.c
+++ b/drivers/net/wireless/ath/ath10k/ahb.c
@@ -733,7 +733,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
int ret;
st... |
6763ef191d672ff3c2db0622652d49b0c0a60c4a | Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: fix Wvoid-pointer-to-enum-cast warning | Problem Details:
'hw_rev' is an enum, thus cast of pointer on 64-bit compile test with W=1
causes:
h11k/ahb.c:1124:11: error: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Jeff... | ```diff
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index 20eee5881a31..1215ebdf173a 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -1096,7 +1096,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev)
return -EI... |
8357bc946a2abc2a10ca40e5a2105d2b4c57515e | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: use correct lock to protect gc_list | Problem Details:
Use nf_tables_gc_list_lock spinlock, not nf_tables_destroy_list_lock to
protect the gc list.
Fixes: 5f68718b34a5 ("netfilter: nf_tables: GC transaction API to avoid race with control plane")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de> | ```diff
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index a255456efae4..eb8b1167dced 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -9456,9 +9456,9 @@ static void nft_trans_gc_work(struct work_struct *work)
struct nft_trans_gc *trans, *next;
LIST_HEA... |
720344340fb9be2765bbaab7b292ece0a4570eae | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: GC transaction race with abort path | Problem Details:
Abort path is missing a synchronization point with GC transactions. Add
GC sequence number hence any GC transaction losing race will be
discarded.
Fixes: 5f68718b34a5 ("netfilter: nf_tables: GC transaction API to avoid race with control plane")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Si... | ```diff
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index d299e7aa1b96..a255456efae4 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -10337,8 +10337,12 @@ static int nf_tables_abort(struct net *net, struct sk_buff *skb,
enum nfnl_abort_action actio... |
2c9f0293280e258606e54ed2b96fa71498432eae | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: flush pending destroy work before netlink notifier | Problem Details:
Destroy work waits for the RCU grace period then it releases the objects
with no mutex held. All releases objects follow this path for
transactions, therefore, order is guaranteed and references to top-level
objects in the hierarchy remain valid.
However, netlink notifier might interfer with pending d... | ```diff
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index a76a62ebe9c9..d299e7aa1b96 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -11073,7 +11073,7 @@ static int nft_rcv_nl_event(struct notifier_block *this, unsigned long event,
gc_seq = nft_gc_seq_b... |
4b80ced971b0d118f9a11dd503a5833a5016de92 | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: validate all pending tables | Problem Details:
We have to validate all tables in the transaction that are in
VALIDATE_DO state, the blamed commit below did not move the break
statement to its right location so we only validate one table.
Moreover, we can't init table->validate to _SKIP when a table object
is allocated.
If we do, then if a transca... | ```diff
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index e9ae567c037d..ffcbdf08380f 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -1729,6 +1729,7 @@ struct nftables_pernet {
u64 table_handle;
unsigned int base_seq;
unsigned int... |
4f1dbb4904c3d06b0f0d5f2dda8ccff839110726 | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Fix a few spelling errors | Problem Details:
Fix a few issues flagged by 'codespell'.
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230822-ath_spelling-v1-3-8e2698759564@quicinc.com | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/dp.h b/drivers/net/wireless/ath/ath12k/dp.h
index 7c5dafce5a68..6e7b7281d549 100644
--- a/drivers/net/wireless/ath/ath12k/dp.h
+++ b/drivers/net/wireless/ath/ath12k/dp.h
@@ -712,7 +712,7 @@ enum htt_stats_internal_ppdu_frametype {
* b'24 - status_swap: ... |
d68a283bfc39aeed2a51c67804e014bf4b35c7e1 | Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: Fix a few spelling errors | Problem Details:
Fix a few issues flagged by 'codespell'.
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230822-ath_spelling-v1-2-8e2698759564@quicinc.com | ```diff
diff --git a/drivers/net/wireless/ath/ath11k/dp.h b/drivers/net/wireless/ath/ath11k/dp.h
index d04f78ab6b37..15815af453b2 100644
--- a/drivers/net/wireless/ath/ath11k/dp.h
+++ b/drivers/net/wireless/ath/ath11k/dp.h
@@ -635,7 +635,7 @@ enum htt_ppdu_stats_tag_type {
* b'24 - status_swap: 1 is to sw... |
3ced39049d4d87231c3ddabfb335fe78a99591c2 | Analyze and fix the following issue in the Linux kernel code: wifi: ath10k: Fix a few spelling errors | Problem Details:
Fix a few issues flagged by 'codespell'.
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230822-ath_spelling-v1-1-8e2698759564@quicinc.com | ```diff
diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h
index e0c9f45e7476..7b24297146e7 100644
--- a/drivers/net/wireless/ath/ath10k/htt.h
+++ b/drivers/net/wireless/ath/ath10k/htt.h
@@ -69,7 +69,7 @@ struct htt_ver_req {
* The HTT tx descriptor is defined in two manners: b... |
29d15589f084d71a4ea8c544039c5839db0236e2 | Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: Cleanup mac80211 references on failure during tx_complete | Problem Details:
When a function is using functions from mac80211 to free an skb then it
should do it consistently and not switch to the generic dev_kfree_skb_any
(or similar functions). Otherwise (like in the error handlers), mac80211
will will not be aware of the freed skb and thus not clean up related
information in... | ```diff
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index 27c976f52c7a..b85a4a03b37a 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -344,7 +344,7 @@ ath11k_dp_tx_htt_tx_complete_buf(struct ath11k_base *ab,
dma_un... |
400ece6c7f346b0a30867bd00b03b5b2563d4357 | Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: Don't drop tx_status when peer cannot be found | Problem Details:
When a station idles for a long time, hostapd will try to send a QoS Null
frame to the station as "poll". NL80211_CMD_PROBE_CLIENT is used for this
purpose. And the skb will be added to ack_status_frame - waiting for a
completion via ieee80211_report_ack_skb().
But when the peer was already removed be... | ```diff
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index a34833de7c67..27c976f52c7a 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -369,7 +369,7 @@ ath11k_dp_tx_htt_tx_complete_buf(struct ath11k_base *ab,
"... |
6dd11b945951315ba4986844f20e83a0c27c1d38 | Analyze and fix the following issue in the Linux kernel code: ASoC: Delete UDA134x/L3 audio codec | Problem Details:
This codec was used by the deleted S3C board
sound/soc/samsung/s3c24xx_uda134x.c.
Fixes: 503278c12701 ("ASoC: samsung: remove unused drivers")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230822-delete-l3-v2-1-b3ffc07348af@linaro.org
Signed-off-by: Mark Bro... | ```diff
diff --git a/include/sound/l3.h b/include/sound/l3.h
deleted file mode 100644
index b6f58072237a..000000000000
--- a/include/sound/l3.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _L3_H_
-#define _L3_H_ 1
-
-struct l3_pins {
- void (*setdat)(struct l3_pins *, int);
- void (*s... |
38592ae6dc9f84b7a994c43de2136b8115ca30f6 | Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: amd: clear dsp to host interrupt status | Problem Details:
DSP_SW_INTR_STAT_OFFSET is a common interrupt register which will be
accessed by both ACP firmware and driver. This register contains register
bits corresponds to host to dsp interrupts and vice versa.
when dsp to host interrupt is reported, only clear dsp to host
interrupt bit in DSP_SW_INTR_STAT_OFF... | ```diff
diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c
index eceba9b794ab..19a801908b56 100644
--- a/sound/soc/sof/amd/acp.c
+++ b/sound/soc/sof/amd/acp.c
@@ -367,9 +367,9 @@ static irqreturn_t acp_irq_handler(int irq, void *dev_id)
unsigned int val;
val = snd_sof_dsp_read(sdev, ACP_DSP_BAR, base ... |
60eb816ed850b33f5410b1223c5d4d935a6ceb79 | Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: amd: add module parameter for firmware debug | Problem Details:
Add module parameter for firmware debug. If firmware debug
flag is enabled, clear the fusion stall bit which is required
for enabling firmware debugging through JTAG.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-3-Vijendar.Mukunda@am... | ```diff
diff --git a/sound/soc/sof/amd/acp-loader.c b/sound/soc/sof/amd/acp-loader.c
index a63c00b53a5e..a427673cfb03 100644
--- a/sound/soc/sof/amd/acp-loader.c
+++ b/sound/soc/sof/amd/acp-loader.c
@@ -207,6 +207,7 @@ EXPORT_SYMBOL_NS(acp_dsp_pre_fw_run, SND_SOC_SOF_AMD_COMMON);
int acp_sof_dsp_run(struct snd_sof_d... |
35a7a1ce7c7d61664ee54f5239a1f120ab95a87e | Analyze and fix the following issue in the Linux kernel code: wifi: mwifiex: avoid possible NULL skb pointer dereference | Problem Details:
In 'mwifiex_handle_uap_rx_forward()', always check the value
returned by 'skb_copy()' to avoid potential NULL pointer
dereference in 'mwifiex_uap_queue_bridged_pkt()', and drop
original skb in case of copying failure.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 838e4f4492... | ```diff
diff --git a/drivers/net/wireless/marvell/mwifiex/uap_txrx.c b/drivers/net/wireless/marvell/mwifiex/uap_txrx.c
index b9866f2e2644..318bd4ed8399 100644
--- a/drivers/net/wireless/marvell/mwifiex/uap_txrx.c
+++ b/drivers/net/wireless/marvell/mwifiex/uap_txrx.c
@@ -253,7 +253,15 @@ int mwifiex_handle_uap_rx_forwar... |
9525a3c38accd2e186f52443e35e633e296cc7f5 | Analyze and fix the following issue in the Linux kernel code: i40e: fix potential NULL pointer dereferencing of pf->vf i40e_sync_vsi_filters() | Problem Details:
Add check for pf->vf not being NULL before dereferencing
pf->vf[vsi->vf_id] in updating VSI filter sync.
Add a similar check before dereferencing !pf->vf[vsi->vf_id].trusted
in the condition for clearing promisc mode bit.
Fixes: c87c938f62d8 ("i40e: Add VF VLAN pruning")
Signed-off-by: Andrii Staikov ... | ```diff
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 29ad1797adce..a86bfa3bba74 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -2609,7 +2609,7 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)... |
78e0ea4277546debf7e96797ac3b768539cc44f6 | Analyze and fix the following issue in the Linux kernel code: tcpm: Avoid soft reset when partner does not support get_status | Problem Details:
When partner does not support get_status message, tcpm right now
responds with soft reset message. This causes PD renegotiation to
happen and resets PPS link. Avoid soft resetting the link when
partner does not support get_status message to mitigate PPS resets.
[ 208.926752] Setting voltage/current l... | ```diff
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index 3051b8a8db81..d962f67c95ae 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -2754,6 +2754,13 @@ static void tcpm_pd_ctrl_request(struct tcpm_port *port,
port->sink_cap_done = true;
tcpm_set_... |
c97cd0b4b54eb42aed7f6c3c295a2d137f6d2416 | Analyze and fix the following issue in the Linux kernel code: usb: typec: tcpm: set initial svdm version based on pd revision | Problem Details:
When sending Discover Identity messages to a Port Partner that uses Power
Delivery v2 and SVDM v1, we currently send PD v2 messages with SVDM v2.0,
expecting the port partner to respond with its highest supported SVDM
version as stated in Section 6.4.4.2.3 in the Power Delivery v3
specification. Howeve... | ```diff
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index ab7e3d7249ab..df728a066c58 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -3859,6 +3859,29 @@ static enum typec_cc_status tcpm_pwr_opmode_to_rp(enum typec_pwr_opmode opmode)
}
}
+static void ... |
da71714e359b64bd7aab3bd56ec53f307f058133 | Analyze and fix the following issue in the Linux kernel code: net/sched: fix a qdisc modification with ambiguous command request | Problem Details:
When replacing an existing root qdisc, with one that is of the same kind, the
request boils down to essentially a parameterization change i.e not one that
requires allocation and grafting of a new qdisc. syzbot was able to create a
scenario which resulted in a taprio qdisc replacing an existing taprio... | ```diff
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index aa6b1fe65151..e9eaf637220e 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1547,10 +1547,28 @@ static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n,
return 0;
}
+static bool req_create_or_replace(struct nlmsghdr *n)
+{
+... |
2e0c8ee2b56ffaf4ceac934d75f131a9c9becf72 | Analyze and fix the following issue in the Linux kernel code: net: dsa: rzn1-a5psw: remove redundant logs | Problem Details:
Remove debug logs in port vlan management, since there are already multiple
tracepoints defined for those operations in DSA
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/dsa/rzn1_a5psw.c b/drivers/net/dsa/rzn1_a5psw.c
index 9167e83fbceb..2eda10b33f2e 100644
--- a/drivers/net/dsa/rzn1_a5psw.c
+++ b/drivers/net/dsa/rzn1_a5psw.c
@@ -735,10 +735,6 @@ static int a5psw_port_vlan_add(struct dsa_switch *ds, int port,
u16 vid = vlan->vid;
int vlan_res_id;
... |
dae64749db25be11ebfef2cf704cd451a25d3cfa | Analyze and fix the following issue in the Linux kernel code: virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting | Problem Details:
The virtio_net driver currently deals with different versions and types
of virtio net headers, such as virtio_net_hdr_mrg_rxbuf,
virtio_net_hdr_v1_hash, etc. Due to these variations, the code relies
on multiple type casts to convert memory between different structures,
potentially leading to bugs when ... | ```diff
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 494242bb9cf6..231ad91a919d 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -312,6 +312,14 @@ struct padded_vnet_hdr {
char padding[12];
};
+struct virtio_net_common_hdr {
+ union {
+ struct virtio_net_hdr hdr;
+... |
e531fdb5cd5ee2564b7fe10c8a9219e2b2fac61e | Analyze and fix the following issue in the Linux kernel code: dma-buf/sw_sync: Avoid recursive lock during fence signal | Problem Details:
If a signal callback releases the sw_sync fence, that will trigger a
deadlock as the timeline_fence_release recurses onto the fence->lock
(used both for signaling and the the timeline tree).
To avoid that, temporarily hold an extra reference to the signalled
fences until after we drop the lock.
(This... | ```diff
diff --git a/drivers/dma-buf/sw_sync.c b/drivers/dma-buf/sw_sync.c
index 63f0aeb66db6..f0a35277fd84 100644
--- a/drivers/dma-buf/sw_sync.c
+++ b/drivers/dma-buf/sw_sync.c
@@ -191,6 +191,7 @@ static const struct dma_fence_ops timeline_fence_ops = {
*/
static void sync_timeline_signal(struct sync_timeline *obj... |
e7f2e65699e2290fd547ec12a17008764e5d9620 | Analyze and fix the following issue in the Linux kernel code: media: vcodec: Fix potential array out-of-bounds in encoder queue_setup | Problem Details:
variable *nplanes is provided by user via system call argument. The
possible value of q_data->fmt->num_planes is 1-3, while the value
of *nplanes can be 1-8. The array access by index i can cause array
out-of-bounds.
Fix this bug by checking *nplanes against the array size.
Fixes: 4e855a6efa54 ("[med... | ```diff
diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c
index 9ff439a50f53..315e97a2450e 100644
--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c
+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c
@@ -821,6 +821,8 @@ s... |
e2fb47d4eb5cd245c38c8c57d969ac6b12efc764 | Analyze and fix the following issue in the Linux kernel code: mlx4: Move the bond work to the core driver | Problem Details:
Function mlx4_en_queue_bond_work() is used in mlx4_en to start a bond
reconfiguration. It gathers data about a new port map setting, takes
a reference on the netdev that triggered the change and queues a work
object on mlx4_en_priv.mdev.workqueue to perform the operation. The
scheduled work is mlx4_en_... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 7066c426b95c..33bbcced8105 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -2894,63 +2894,6 @@ static const struct xdp_metadata_o... |
c265735ff5b1f13272e2bfb196f5c55f9b3c9bac | Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Mark some functions static and add missing includes to fix no previous prototype error | Problem Details:
corenet{32/64}_smp_defconfig leads to:
CC arch/powerpc/sysdev/ehv_pic.o
arch/powerpc/sysdev/ehv_pic.c:45:6: error: no previous prototype for 'ehv_pic_unmask_irq' [-Werror=missing-prototypes]
45 | void ehv_pic_unmask_irq(struct irq_data *d)
| ^~~~~~~~~~~~~~~~~~
arch/powerpc/sysdev/... | ```diff
diff --git a/arch/powerpc/kernel/pmc.c b/arch/powerpc/kernel/pmc.c
index 15414c8a2837..9fabb4d9235e 100644
--- a/arch/powerpc/kernel/pmc.c
+++ b/arch/powerpc/kernel/pmc.c
@@ -74,7 +74,7 @@ void release_pmc_hardware(void)
}
EXPORT_SYMBOL_GPL(release_pmc_hardware);
-#ifdef CONFIG_PPC64
+#ifdef CONFIG_PPC_BOOK... |
0e2a34c467a0de2b0309d033e2700ce608e3fbf4 | Analyze and fix the following issue in the Linux kernel code: powerpc/64e: Fix circular dependency with CONFIG_SMP disabled | Problem Details:
asm/percpu.h includes asm/paca.h which needs struct tlb_core_data
which is defined in mmu-e500.h
asm/percpu.h is included from asm/mmu.h in a #ifdef CONFIG_E500
before the inclusion of mmu-e500.h
To fix that, move the inclusion of asm/percpu.h into mmu-e500.h
after the definition of struct tlb_core_d... | ```diff
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
index 82af2e2c5eca..52cc25864a1b 100644
--- a/arch/powerpc/include/asm/mmu.h
+++ b/arch/powerpc/include/asm/mmu.h
@@ -144,11 +144,6 @@
typedef pte_t *pgtable_t;
-#ifdef CONFIG_PPC_E500
-#include <asm/percpu.h>
-DECLARE_PER_CPU(int... |
429356fac0440b962aaa6d3688709813a21dd122 | Analyze and fix the following issue in the Linux kernel code: powerpc/powernv: fix debugfs_create_dir() error checking | Problem Details:
The debugfs_create_dir returns ERR_PTR incase of an error and the
correct way of checking it by using the IS_ERR inline function, and
not the simple null comparision. This patch fixes this.
Suggested-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Signed-off-by: Immad Mir <mirimmad17@gmail.com>
Signed-off-b... | ```diff
diff --git a/arch/powerpc/platforms/powernv/opal-xscom.c b/arch/powerpc/platforms/powernv/opal-xscom.c
index 6b4eed2ef4fa..262cd6fac907 100644
--- a/arch/powerpc/platforms/powernv/opal-xscom.c
+++ b/arch/powerpc/platforms/powernv/opal-xscom.c
@@ -168,7 +168,7 @@ static int scom_debug_init_one(struct dentry *roo... |
86e619c922e616d8780833562a14a5bda329f0c3 | Analyze and fix the following issue in the Linux kernel code: x86/hyperv: Fix undefined reference to isolation_type_en_snp without CONFIG_HYPERV | Problem Details:
When CONFIG_HYPERV is not set, arch/x86/hyperv/ivm.c is not built (see
arch/x86/Kbuild), so 'isolation_type_en_snp' in the ivm.c is not defined,
and this failure happens:
ld: arch/x86/kernel/cpu/mshyperv.o: in function `ms_hyperv_init_platform':
arch/x86/kernel/cpu/mshyperv.c:417: undefined reference ... | ```diff
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 26b9fcabd7d9..c8d3ca2b0e0e 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -413,10 +413,11 @@ static void __init ms_hyperv_init_platform(void)
ms_hyperv.isolation_config_a, ms_hyperv.isolat... |
f0a3d1de89876f4ca54fccb4103b504d50a8347f | Analyze and fix the following issue in the Linux kernel code: x86/hyperv: Add missing 'inline' to hv_snp_boot_ap() stub | Problem Details:
When building without CONFIG_AMD_MEM_ENCRYPT, there are several
repeated instances of -Wunused-function due to missing 'inline' on
the stub of hy_snp_boot_ap():
In file included from drivers/hv/hv_common.c:29:
./arch/x86/include/asm/mshyperv.h:272:12: error: 'hv_snp_boot_ap' defined but not used [... | ```diff
diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
index 6bd9ae04d9c3..b6be267ff3d0 100644
--- a/arch/x86/include/asm/mshyperv.h
+++ b/arch/x86/include/asm/mshyperv.h
@@ -269,7 +269,7 @@ static inline void hv_ghcb_msr_read(u64 msr, u64 *value) {}
static inline bool hv_ghcb_negotiate... |
8e6cf5fbb7b47d337998faab3fcacdceaa547ead | Analyze and fix the following issue in the Linux kernel code: jbd2: jbd2_journal_init_{dev,inode} return proper error return value | Problem Details:
Current jbd2_journal_init_{dev,inode} return NULL if some error
happens, make them to pass out proper error return value.
[ Fix from Yang Yingliang folded in. ]
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230811063610.2980059-11... | ```diff
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 4613264344b0..279e37c3b275 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5815,7 +5815,7 @@ static journal_t *ext4_get_journal(struct super_block *sb,
return NULL;
journal = jbd2_journal_init_inode(journal_inode);
- if (!journal) {
+ if (IS_ERR... |
556fb7131e03b0283672fb40f6dc2d151752aaa7 | Analyze and fix the following issue in the Linux kernel code: tools/nolibc: avoid undesired casts in the __sysret() macro | Problem Details:
Having __sysret() as an inline function has the unfortunate effect of
adding casts and large constants comparisons after the syscall returns
that significantly inflate some light code that's otherwise syscall-
heavy. Even nolibc-test grew by ~1%.
Let's switch back to a macro for this, and use it only ... | ```diff
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index bfe1647a3a30..fdb6bd6c0e2f 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -28,22 +28,21 @@
#include "types.h"
-/* Syscall return helper for library routines, set errno as -ret when ret is in
- * range of... |
fb01ff635efd0aba862c843587554167aacc4d2f | Analyze and fix the following issue in the Linux kernel code: tools/nolibc: keep brk(), sbrk(), mmap() away from __sysret() | Problem Details:
The __sysret() function causes some undesirable casts so we'll revert
it. In order to keep it simple it will now only support integer return
values like in the past, so we must basically revert the changes that
were made to these 3 syscalls which return a pointer so that they
simply rely on their own t... | ```diff
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index 833d6c5e86dc..bfe1647a3a30 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -82,7 +82,13 @@ void *sys_brk(void *addr)
static __attribute__((unused))
int brk(void *addr)
{
- return __sysret(sys_brk(addr) ? 0 ... |
418c846821506d01882a948ce90947f264afc606 | Analyze and fix the following issue in the Linux kernel code: selftests/nolibc: libc-test: use HOSTCC instead of CC | Problem Details:
libc-test is mainly added to compare the behavior of nolibc to the
system libc, it is meaningless and error-prone with cross compiling.
Let's use HOSTCC instead of CC to avoid wrongly use cross compiler when
CROSS_COMPILE is passed or customized.
Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
Fixes:... | ```diff
diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index 56abe044173c..dfe66776a331 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -178,7 +178,7 @@ nolibc-test: nolibc-test.c
endif
libc-test: nolibc-test.c
- $... |
0cb0675ec37e1640e0304dc9ff7e4ba0b9ea8965 | Analyze and fix the following issue in the Linux kernel code: tools/nolibc: add support for powerpc | Problem Details:
Both syscall declarations and _start code definition are added for
powerpc to nolibc.
Like mips, powerpc uses a register (exactly, the summary overflow bit)
to record the error occurred, and uses another register to return the
value [1]. So, the return value of every syscall declaration must be
normal... | ```diff
diff --git a/tools/include/nolibc/arch-powerpc.h b/tools/include/nolibc/arch-powerpc.h
new file mode 100644
index 000000000000..8332c9d3e5d6
--- /dev/null
+++ b/tools/include/nolibc/arch-powerpc.h
@@ -0,0 +1,197 @@
+/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
+/*
+ * PowerPC specific definitions for NOLIBC
+... |
ca283457b3c675e5ab6762a750b1b9c495864993 | Analyze and fix the following issue in the Linux kernel code: selftests/nolibc: avoid warnings during intptr tests | Problem Details:
Recent fix ceb528feb7c8 ("selftests/nolibc: avoid gaps in test numbers")
had the annoying side effect of always returning skipped tests, which
are normally supposed to happen only when certain features are missing
to run the test (missing kernel options, toolchain not supporting
stack-protector etc). A... | ```diff
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index 31f2bd789e2d..c6b8d05f7f46 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -976,18 +976,13 @@ int run_stdlib(int min, int max)
CASE_TE... |
640775022572380b6f78247f10c036e69d404947 | Analyze and fix the following issue in the Linux kernel code: tools/nolibc: fix return type of getpagesize() | Problem Details:
It's documented as returning int which is also implemented by glibc and
musl, so adopt that return type.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu> | ```diff
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index e12dd962c578..c151533ba8e9 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -460,11 +460,11 @@ pid_t gettid(void)
static unsigned long getauxval(unsigned long key);
/*
- * long getpagesize(void);
+ * int ge... |
e7d0129df681aa23bb6528f44186accc38d655f0 | Analyze and fix the following issue in the Linux kernel code: selftests/nolibc: mmap_munmap_good: fix up return value | Problem Details:
The other tests use 1 as failure, mmap_munmap_good uses -1 as failure,
let's fix up this.
Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu> | ```diff
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index 3f5a256631ca..4d39823a567e 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -726,7 +726,7 @@ int test_mmap_munmap(void)
page_size = ge... |
447e56023fc281c588e4977add552f4d49d78b22 | Analyze and fix the following issue in the Linux kernel code: selftests/nolibc: avoid buffer underrun in space printing | Problem Details:
If the test description is longer than the status alignment the
parameter 'n' to putcharn() would lead to a signed underflow that then
gets converted to a very large unsigned value.
This in turn leads out-of-bound writes in memset() crashing the
application.
The failure case of EXPECT_PTRER() used in ... | ```diff
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index 737205702e3d..3f5a256631ca 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -151,7 +151,8 @@ static void result(int llen, enum RESULT r)
... |
4893c22eb2f4364bc037e9451dfc3bd36a231901 | Analyze and fix the following issue in the Linux kernel code: tools/nolibc/stdio: add setvbuf() to set buffering mode | Problem Details:
Add a minimal implementation of setvbuf(), which error checks the mode
argument (as required by spec) and returns. Since nolibc never buffers
output, nothing needs to be done.
The kselftest framework recently added a call to setvbuf(). As a result,
any tests that use the kselftest framework and nolibc... | ```diff
diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h
index 0eef91daf289..a3778aff4fa9 100644
--- a/tools/include/nolibc/stdio.h
+++ b/tools/include/nolibc/stdio.h
@@ -21,6 +21,11 @@
#define EOF (-1)
#endif
+/* Buffering mode used by setvbuf. */
+#define _IOFBF 0 /* Fully buffered. */
+#... |
850fad7de8277d3ad1009c766d0edfdd67e744eb | Analyze and fix the following issue in the Linux kernel code: selftests/nolibc: allow test -include /path/to/nolibc.h | Problem Details:
As the head comment of nolibc-test.c shows, it can be built in 3 ways:
$(CC) -nostdlib -include /path/to/nolibc.h => NOLIBC already defined
$(CC) -nostdlib -I/path/to/nolibc/sysroot => _NOLIBC_* guards are present
$(CC) with default libc => NOLIBC* never defined
Only l... | ```diff
diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index b42e67b1a7e2..f42adef87e12 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -126,9 +126,15 @@ sysroot/$(ARCH)/include:
$(Q)$(MAKE) -C ../../../include/nolib... |
bff60150f7c464d80d86f289c056c2ad2afb3c05 | Analyze and fix the following issue in the Linux kernel code: tools/nolibc: fix up startup failures for -O0 under gcc < 11.1.0 | Problem Details:
As gcc doc [1] shows:
Most optimizations are completely disabled at -O0 or if an -O level is
not set on the command line, even if individual optimization flags are
specified.
Test result [2] shows, gcc>=11.1.0 deviates from the above description,
but before gcc 11.1.0, "-O0" still forcely uses ... | ```diff
diff --git a/tools/include/nolibc/arch-aarch64.h b/tools/include/nolibc/arch-aarch64.h
index 6151be6cd7a9..21e9482a4235 100644
--- a/tools/include/nolibc/arch-aarch64.h
+++ b/tools/include/nolibc/arch-aarch64.h
@@ -175,7 +175,7 @@ char **environ __attribute__((weak));
const unsigned long *_auxv __attribute__((... |
20233498359a29f7b2ff4e8fbdb0a1a7c8d5744c | Analyze and fix the following issue in the Linux kernel code: tools/nolibc: arch-*.h: add missing space after ',' | Problem Details:
Fix up such errors reported by scripts/checkpatch.pl:
ERROR: space required after that ',' (ctx:VxV)
#148: FILE: tools/include/nolibc/arch-aarch64.h:148:
+void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) __no_stack_protector _start(void)
^
... | ```diff
diff --git a/tools/include/nolibc/arch-aarch64.h b/tools/include/nolibc/arch-aarch64.h
index 6227b77a4a09..6151be6cd7a9 100644
--- a/tools/include/nolibc/arch-aarch64.h
+++ b/tools/include/nolibc/arch-aarch64.h
@@ -175,7 +175,7 @@ char **environ __attribute__((weak));
const unsigned long *_auxv __attribute__((... |
b8b26108e4d5a0d004393e8a53d374b2b076ba20 | Analyze and fix the following issue in the Linux kernel code: selftests/nolibc: fix up failures when CONFIG_PROC_FS=n | Problem Details:
For CONFIG_PROC_FS=n, the /proc is not mountable, but the /proc
directory has been created in the prepare() stage whenever /proc is
there or not.
so, the checking of /proc in the run_syscall() stage will be always true
and at last it will fail all of the procfs dependent test cases, which
deviates fro... | ```diff
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index bb39a1e7fd46..55cc2296c292 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -1057,8 +1057,11 @@ int prepare(void)
/* try to mount /pro... |
c388c9920da2679f62bec48d00ca9e80e9d0a364 | Analyze and fix the following issue in the Linux kernel code: selftests/nolibc: fix up kernel parameters support | Problem Details:
kernel parameters allow pass two types of strings, one type is like
'noapic', another type is like 'panic=5', the first type is passed as
arguments of the init program, the second type is passed as environment
variables of the init program.
when users pass kernel parameters like this:
noapic NOLI... | ```diff
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index dc080add9637..c15a4211ff26 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -1073,6 +1073,35 @@ static const struct test test_names[] = {
... |
989abf1c7bc590969ef1b19b8e64b69423bfacc7 | Analyze and fix the following issue in the Linux kernel code: selftests/nolibc: fix up int_fast16/32_t test cases for musl | Problem Details:
musl limits the fast signed int in 32bit, but glibc and nolibc don't, to
let such test cases work on musl, let's provide the type based
SINT_MAX_OF_TYPE(type) and SINT_MIN_OF_TYPE(type).
Suggested-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/lkml/bc635c4f-67fe-4e86-bfdf-bc... | ```diff
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index 60bbc272cdcf..bc7a54cef42a 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -41,6 +41,10 @@
#endif
#endif
+/* for the type of int_fast... |
5f2de00e2c9ce00708bbf24f70ceda2ed35e9780 | Analyze and fix the following issue in the Linux kernel code: selftests/nolibc: add _LARGEFILE64_SOURCE for musl | Problem Details:
_GNU_SOURCE Implies _LARGEFILE64_SOURCE in glibc, but in musl, the
default configuration doesn't enable _LARGEFILE64_SOURCE.
>From include/dirent.h of musl, getdents64 is provided as getdents when
_LARGEFILE64_SOURCE is defined.
#if defined(_LARGEFILE64_SOURCE)
...
#define getdents64 getd... | ```diff
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index d51eac56ceac..60bbc272cdcf 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
#defin... |
4201cfce15fe35d9d90ae870aba12eb84c0452ab | Analyze and fix the following issue in the Linux kernel code: tools/nolibc: clean up sbrk() routine | Problem Details:
Fix up the error reported by scripts/checkpatch.pl:
ERROR: do not use assignment in if condition
#95: FILE: tools/include/nolibc/sys.h:95:
+ if ((ret = sys_brk(0)) && (sys_brk(ret + inc) == ret + inc))
Apply the new generic __sysret() to merge the SET_ERRNO() and return
lines.
Signed-off... | ```diff
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index 3d01a24e6f7a..61a3204b00d7 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -89,14 +89,13 @@ int brk(void *addr)
static __attribute__((unused))
void *sbrk(intptr_t inc)
{
- void *ret;
-
/* first call to fi... |
f134c7066c9064b4c9756dd86b2ace6b5cb89d20 | Analyze and fix the following issue in the Linux kernel code: tools/nolibc: arch-*.h: fix up code indent errors | Problem Details:
More than 8 whitespaces of the code indent are replaced with "tab +
whitespaces" to fix up such errors reported by scripts/checkpatch.pl:
ERROR: code indent should use tabs where possible
#64: FILE: tools/include/nolibc/arch-mips.h:64:
+^I ... | ```diff
diff --git a/tools/include/nolibc/arch-aarch64.h b/tools/include/nolibc/arch-aarch64.h
index 11f294a406b7..c911f61365d1 100644
--- a/tools/include/nolibc/arch-aarch64.h
+++ b/tools/include/nolibc/arch-aarch64.h
@@ -56,7 +56,7 @@ struct sys_stat_struct {
({ ... |
b1d1e90490b671444ebf66292201572c1059d323 | Analyze and fix the following issue in the Linux kernel code: tracing/probes: Support BTF argument on module functions | Problem Details:
Since the btf returned from bpf_get_btf_vmlinux() only covers functions in
the vmlinux, BTF argument is not available on the functions in the modules.
Use bpf_find_btf_id() instead of bpf_get_btf_vmlinux()+btf_find_name_kind()
so that BTF argument can find the correct struct btf and btf_type in it.
Wit... | ```diff
diff --git a/include/linux/btf.h b/include/linux/btf.h
index cac9f304e27a..dbfe41a09c4b 100644
--- a/include/linux/btf.h
+++ b/include/linux/btf.h
@@ -211,6 +211,7 @@ struct btf_record *btf_parse_fields(const struct btf *btf, const struct btf_type
int btf_check_and_fixup_fields(const struct btf *btf, struct bt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.