id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
ba0718a6d67130fd4bff664b86d2aa63fa49e241 | Analyze and fix the following issue in the Linux kernel code: nvme: don't call blk_mq_{,un}quiesce_tagset when ctrl->tagset is NULL | Problem Details:
The NVMe drivers support a mode where no tagset is allocated for the I/O
queues and only the admin queue is usable. In that case ctrl->tagset is
NULL and we must not call the block per-tagset quiesce helpers that
dereference it.
Fixes: 98d81f0df70c ("nvme: use blk_mq_[un]quiesce_tagset")
Reported-by:... | ```diff
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 3195ae17df30..fd2e26cb7a68 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -5215,6 +5215,8 @@ EXPORT_SYMBOL_GPL(nvme_start_freeze);
void nvme_quiesce_io_queues(struct nvme_ctrl *ctrl)
{
+ if (!ctrl->tagset)
+ ret... |
6f2d71524bcfdeb1fcbd22a4a92a5b7b161ab224 | Analyze and fix the following issue in the Linux kernel code: nvme initialize core quirks before calling nvme_init_subsystem | Problem Details:
A device might have a core quirk for NVME_QUIRK_IGNORE_DEV_SUBNQN
(such as Samsung X5) but it would still give a:
"missing or invalid SUBNQN field"
warning as core quirks are filled after calling nvme_init_subnqn. Fill
ctrl->quirks from struct core_quirks before calling nvme_init_subsystem
to fi... | ```diff
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 69e333922bea..7e3893d06bab 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3095,10 +3095,6 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl)
if (!ctrl->identified) {
unsigned int i;
- ret = nvme_init_s... |
b2ea130c2541a8439fd9a288f319cb257ee8e9a0 | Analyze and fix the following issue in the Linux kernel code: media: i2c: ov9282: Add missing clk_disable_unprepare to error path | Problem Details:
If ov9282_power_on failed the I2C write, it returned without releasing
clocks or regulators. Fix this.
Fixes: 6f7def3d8a65 ("media: i2c: ov9282: Add selection for CSI2 clock mode")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>... | ```diff
diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c
index 3749501c3104..37a55d53af56 100644
--- a/drivers/media/i2c/ov9282.c
+++ b/drivers/media/i2c/ov9282.c
@@ -1253,11 +1253,13 @@ static int ov9282_power_on(struct device *dev)
OV9282_GATED_CLOCK : 0);
if (ret) {
dev_err(ov9282->dev... |
483c84bf50e7ec0fc2887f35b76c8cc57ba81574 | Analyze and fix the following issue in the Linux kernel code: media: i2c: ov9282: Make common_regs_list static | Problem Details:
common_regs_list is only used within this file, so should
be static. Make it so.
Fixes: 7195aabf8f8b ("media: i2c: ov9282: Split registers into common and mode specific")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-of... | ```diff
diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c
index 7b1270df4263..3749501c3104 100644
--- a/drivers/media/i2c/ov9282.c
+++ b/drivers/media/i2c/ov9282.c
@@ -268,7 +268,7 @@ static const struct ov9282_reg common_regs[] = {
{0x5a08, 0x84},
};
-struct ov9282_reg_list common_regs_list = {... |
f9c77fea1270d34dda13aeaa4488bab710097bb7 | Analyze and fix the following issue in the Linux kernel code: media: i2c: ov9282: Fix missing documentation in structures | Problem Details:
Fix missing documentation entries for members of structures,
as flagged by smatch.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> | ```diff
diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c
index b44322640ee0..7b1270df4263 100644
--- a/drivers/media/i2c/ov9282.c
+++ b/drivers/media/i2c/ov9282.c
@@ -130,6 +130,7 @@ struct ov9282_reg_list {
* @vblank_min: Minimum vertical blanking in lines
* @vblank_max: Maximum vertical blanki... |
d7b41196927ba2a2b5badad1a85f9087eb90b076 | Analyze and fix the following issue in the Linux kernel code: media: ov5640: set correct default link frequency | Problem Details:
current_link_freq field in ov5640_dev structure is link frequency,
not link frequency array index, so correct it.
Fixes: 3c28588f35d3 ("media: ov5640: Update pixel_rate and link_freq")
Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Sakari Ail... | ```diff
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 2d740397a5d4..3f6d715efa82 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -3817,7 +3817,8 @@ static int ov5640_probe(struct i2c_client *client)
sensor->current_mode =
&ov5640_mode_data[OV5640_MODE_VGA_64... |
94ae11885fae1717f2017cb96ceef5d0f6d6dd4a | Analyze and fix the following issue in the Linux kernel code: media: rzg2l-cru: fix a test for timeout | Problem Details:
The test for if the loop timed out is wrong and Smatch complains:
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:411 rzg2l_csi2_mipi_link_disable()
warn: should this be 'timeout == -1'
Let's change it to a preop loop instead of a post op loop.
Fixes: 51e8415e39a9 ("media: platform: Ad... | ```diff
diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
index 3deb09be6400..33e08efa3039 100644
--- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
+++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
@@ -402,7 +402,7 @@ static vo... |
e54334cdf86960cc781a6d457fbad1277ca4267c | Analyze and fix the following issue in the Linux kernel code: media: rzg2l-cru: Fix missing error code in rzg2l_cru_start_streaming_vq() | Problem Details:
Failed to allocate scratch buffer, add the error code '-ENOMEM' to the
return value 'ret'.
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c:676 rzg2l_cru_start_streaming_vq() warn: missing error code 'ret'.
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3275
Reported-by: Abaci Robot <aba... | ```diff
diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
index 9533e4069ecd..91b57c7c2e56 100644
--- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
+++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
@@ -673,6 +673,7 @@ stati... |
3a664569b71b0a52be5ffb9fb87cc4f83d29bd71 | Analyze and fix the following issue in the Linux kernel code: media: dvbdev: fix refcnt bug | Problem Details:
Previous commit initialize the dvbdev->ref before the template copy,
which will overwrite the reference and cause refcnt bug.
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 0 PID: 1 at lib/refcount.c:25 refcount_warn_saturate+0x17c/0x1f0 lib/refcount.c:25
Modules linked in:
CPU: 0 PID: 1 Com... | ```diff
diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
index d45673cb3ce1..2a857cf70c94 100644
--- a/drivers/media/dvb-core/dvbdev.c
+++ b/drivers/media/dvb-core/dvbdev.c
@@ -482,8 +482,8 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
return -ENOMEM;... |
bc0cd1080a035ea64fd141f7f8138ca5373fb47b | Analyze and fix the following issue in the Linux kernel code: media: sun6i-csi: clarify return value, fix uninited variable and add missing static | Problem Details:
This fixes three smatch warnings:
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c:629:15: warning: 'enabled' may be used uninitialized [-Wmaybe-uninitialized]
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c:439 sun6i_csi_bridge_s_stream() warn: missing error code 'ret'
drivers/medi... | ```diff
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c
index 86d20c1c35ed..ebfc870d2af5 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c
@@ -415,8 +41... |
5edd1b4d58105dc0ee61ed6aa9f22e88d8425b08 | Analyze and fix the following issue in the Linux kernel code: media: i2c: tc358746: make DEFINE_RUNTIME_DEV_PM_OPS static | Problem Details:
DEFINE_RUNTIME_DEV_PM_OPS should be static.
This fixes this sparse warning:
drivers/media/i2c/tc358746.c:1671:1: warning: symbol 'tc358746_pm_ops' was not declared. Should it be static?
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-... | ```diff
diff --git a/drivers/media/i2c/tc358746.c b/drivers/media/i2c/tc358746.c
index 171309c62bb8..d1f552bd81d4 100644
--- a/drivers/media/i2c/tc358746.c
+++ b/drivers/media/i2c/tc358746.c
@@ -1668,8 +1668,8 @@ err:
return err;
}
-DEFINE_RUNTIME_DEV_PM_OPS(tc358746_pm_ops, tc358746_suspend,
- tc358746_resume... |
dc8239bd8979e66fd92d1fc41e8aa69fde4257b3 | Analyze and fix the following issue in the Linux kernel code: media: dvb-frontends: drx39xyj: set missing error code | Problem Details:
The rc return code was never set in hi_command().
This fixes this smatch warning:
drivers/media/dvb-frontends/drx39xyj/drxj.c:2351 hi_command() warn: missing error code 'rc'
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> | ```diff
diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c
index bf9e4ef35684..1dff59ca21a1 100644
--- a/drivers/media/dvb-frontends/drx39xyj/drxj.c
+++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c
@@ -2347,6 +2347,7 @@ hi_command(struct i2c_device_addr *dev_addr, co... |
3edfd14bb50fa6f94ed1a37bbb17d9f1c2793b57 | Analyze and fix the following issue in the Linux kernel code: media: dvbdev: fix build warning due to comments | Problem Details:
Previous commit that introduces reference counter does not add proper
comments, which will lead to warning when building htmldocs. Fix them.
Reported-by: "Stephen Rothwell" <sfr@canb.auug.org.au>
Fixes: 0fc044b2b5e2 ("media: dvbdev: adopts refcnt to avoid UAF")
Signed-off-by: Lin Ma <linma@zju.edu.cn>... | ```diff
diff --git a/include/media/dvbdev.h b/include/media/dvbdev.h
index fad9871157e2..29d25c8a6f13 100644
--- a/include/media/dvbdev.h
+++ b/include/media/dvbdev.h
@@ -130,6 +130,7 @@ struct dvb_adapter {
* struct dvb_device - represents a DVB device node
*
* @list_head: List head with all DVB devices
+ * @ref... |
e2fc6edd37ba487c64f4dd09f7118b3e45b12d88 | Analyze and fix the following issue in the Linux kernel code: media: videobuf2: revert "get_userptr: buffers are always writable" | Problem Details:
Commit 707947247e95 ("media: videobuf2-vmalloc: get_userptr: buffers are
always writable") caused problems in a corner case (passing read-only
shmem memory as a userptr). So revert this patch.
The original problem for which that commit was originally made is
something that I could not reproduce after ... | ```diff
diff --git a/drivers/media/common/videobuf2/frame_vector.c b/drivers/media/common/videobuf2/frame_vector.c
index 542dde9d2609..aad72640f055 100644
--- a/drivers/media/common/videobuf2/frame_vector.c
+++ b/drivers/media/common/videobuf2/frame_vector.c
@@ -14,6 +14,7 @@
* get_vaddr_frames() - map virtual addres... |
1aba7930c63ea57b4918dc61dcc315f451cec21e | Analyze and fix the following issue in the Linux kernel code: media: rzg2l-cru: Remove unnecessary shadowing of ret in rzg2l_csi2_s_stream() | Problem Details:
Clang warns:
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:445:7: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
if (ret)
^~~
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:475:9... | ```diff
diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
index aa752b80574c..3deb09be6400 100644
--- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
+++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
@@ -431,8 +431,6 @@ static in... |
d50fd948d3d086e2608430eb17a01948c3c0d0d2 | Analyze and fix the following issue in the Linux kernel code: media: dvb/frontend.h: fix kernel-doc warnings | Problem Details:
scripts/kernel-doc spouts multiple warnings, so fix them:
include/uapi/linux/dvb/frontend.h:399: warning: Enum value 'QAM_1024' not described in enum 'fe_modulation'
include/uapi/linux/dvb/frontend.h:399: warning: Enum value 'QAM_4096' not described in enum 'fe_modulation'
frontend.h:286: warning: con... | ```diff
diff --git a/include/uapi/linux/dvb/frontend.h b/include/uapi/linux/dvb/frontend.h
index 4fed9e316147..022a787815e0 100644
--- a/include/uapi/linux/dvb/frontend.h
+++ b/include/uapi/linux/dvb/frontend.h
@@ -282,7 +282,6 @@ enum fe_spectral_inversion {
/**
* enum fe_code_rate - Type of Forward Error Correctio... |
57fb35d7542384cac8f198cd1c927540ad38b61a | Analyze and fix the following issue in the Linux kernel code: media: saa7164: fix missing pci_disable_device() | Problem Details:
Add missing pci_disable_device() in the error path in saa7164_initdev().
Fixes: 443c1228d505 ("V4L/DVB (12923): SAA7164: Add support for the NXP SAA7164 silicon")
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Cheh... | ```diff
diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c
index 01d75ef2342d..a8a004f28ca0 100644
--- a/drivers/media/pci/saa7164/saa7164-core.c
+++ b/drivers/media/pci/saa7164/saa7164-core.c
@@ -1257,7 +1257,7 @@ static int saa7164_initdev(struct pci_dev *pci_dev,
if ... |
94151f5aa9667c562281abeaaa5e89b9d5c17729 | Analyze and fix the following issue in the Linux kernel code: xfrm: interface: Add unstable helpers for setting/getting XFRM metadata from TC-BPF | Problem Details:
This change adds xfrm metadata helpers using the unstable kfunc call
interface for the TC-BPF hooks. This allows steering traffic towards
different IPsec connections based on logic implemented in bpf programs.
This object is built based on the availability of BTF debug info.
When setting the xfrm met... | ```diff
diff --git a/include/net/dst_metadata.h b/include/net/dst_metadata.h
index a454cf4327fe..1b7fae4c6b24 100644
--- a/include/net/dst_metadata.h
+++ b/include/net/dst_metadata.h
@@ -26,6 +26,7 @@ struct macsec_info {
struct xfrm_md_info {
u32 if_id;
int link;
+ struct dst_entry *dst_orig;
};
struct metada... |
f07788079f515ca4a681c5f595bdad19cfbd7b1d | Analyze and fix the following issue in the Linux kernel code: ata: ahci: fix enum constants for gcc-13 | Problem Details:
gcc-13 slightly changes the type of constant expressions that are defined
in an enum, which triggers a compile time sanity check in libata:
linux/drivers/ata/libahci.c: In function 'ahci_led_store':
linux/include/linux/compiler_types.h:357:45: error: call to '__compiletime_assert_302' declared with at... | ```diff
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index da7ee8bec165..4cec725cf30a 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -24,6 +24,7 @@
#include <linux/libata.h>
#include <linux/phy/phy.h>
#include <linux/regulator/consumer.h>
+#include <linux/bits.h>
/* Enclosure Management Contr... |
7ecdadf7f8c659524f6b2aebf6be7bf619764d90 | Analyze and fix the following issue in the Linux kernel code: riscv: stacktrace: Make walk_stackframe cross pt_regs frame | Problem Details:
The current walk_stackframe with FRAME_POINTER would stop unwinding at
ret_from_exception:
BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1518
in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 1, name: init
CPU: 0 PID: 1 Comm: init Not tainted 5.10.113-00021-g15... | ```diff
diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S
index b9eda3fcbd6d..da44fe2d0d82 100644
--- a/arch/riscv/kernel/entry.S
+++ b/arch/riscv/kernel/entry.S
@@ -248,7 +248,7 @@ ret_from_syscall_rejected:
andi t0, t0, _TIF_SYSCALL_WORK
bnez t0, handle_syscall_trace_exit
-ret_from_exception:
+... |
e329e71013c9b5a4535b099208493c7826ee4a64 | Analyze and fix the following issue in the Linux kernel code: NFC: nci: Bounds check struct nfc_target arrays | Problem Details:
While running under CONFIG_FORTIFY_SOURCE=y, syzkaller reported:
memcpy: detected field-spanning write (size 129) of single field "target->sensf_res" at net/nfc/nci/ntf.c:260 (size 18)
This appears to be a legitimate lack of bounds checking in
nci_add_new_protocol(). Add the missing checks.
Report... | ```diff
diff --git a/net/nfc/nci/ntf.c b/net/nfc/nci/ntf.c
index 282c51051dcc..994a0a1efb58 100644
--- a/net/nfc/nci/ntf.c
+++ b/net/nfc/nci/ntf.c
@@ -240,6 +240,8 @@ static int nci_add_new_protocol(struct nci_dev *ndev,
target->sens_res = nfca_poll->sens_res;
target->sel_res = nfca_poll->sel_res;
target->nfci... |
5c3022e4a616d800cf5f4c3a981d7992179e44a1 | Analyze and fix the following issue in the Linux kernel code: riscv: stacktrace: Fixup ftrace_graph_ret_addr retp argument | Problem Details:
The 'retp' is a pointer to the return address on the stack, so we
must pass the current return address pointer as the 'retp'
argument to ftrace_push_return_trace(). Not parent function's
return address on the stack.
Fixes: b785ec129bd9 ("riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support")
Sig... | ```diff
diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c
index 08d11a53f39e..bcfe9eb55f80 100644
--- a/arch/riscv/kernel/stacktrace.c
+++ b/arch/riscv/kernel/stacktrace.c
@@ -58,7 +58,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,
} else {
fp = frame... |
e6b842741b4f39007215fd7e545cb55aa3d358a2 | Analyze and fix the following issue in the Linux kernel code: pstore: Avoid kcore oops by vmap()ing with VM_IOREMAP | Problem Details:
An oops can be induced by running 'cat /proc/kcore > /dev/null' on
devices using pstore with the ram backend because kmap_atomic() assumes
lowmem pages are accessible with __va().
Unable to handle kernel paging request at virtual address ffffff807ff2b000
Mem abort info:
ESR = 0x96000006
EC = 0x25:... | ```diff
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c
index 97dde525150a..966191d3a5ba 100644
--- a/fs/pstore/ram_core.c
+++ b/fs/pstore/ram_core.c
@@ -440,7 +440,11 @@ static void *persistent_ram_vmap(phys_addr_t start, size_t size,
phys_addr_t addr = page_start + i * PAGE_SIZE;
pages[i] = pfn_to_page... |
f2053d346615f2c6bb4c0663276274b2da3f6871 | Analyze and fix the following issue in the Linux kernel code: drm/i915/guc: enable GuC GGTT invalidation from the start | Problem Details:
Invalidating the GuC TLBs while GuC is not loaded does not have negative
consequences, so if we're starting the driver with GuC enabled we can
use the GGTT invalidation function from the get-go, instead of switching
to it when we initialize the GuC objects.
In MTL, this fixes and issue where we try to... | ```diff
diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c b/drivers/gpu/drm/i915/gt/intel_ggtt.c
index 7644738b9cdb..8e326332e7c3 100644
--- a/drivers/gpu/drm/i915/gt/intel_ggtt.c
+++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c
@@ -988,7 +988,10 @@ static int gen8_gmch_probe(struct i915_ggtt *ggtt)
I915_VMA_GLOBAL_BIND ... |
a84160fbf4f2c8c5ffa588e19ea8f92eabd7ad17 | Analyze and fix the following issue in the Linux kernel code: soc: qcom: Select REMAP_MMIO for ICC_BWMON driver | Problem Details:
ICC_BWMON driver uses REGMAP_MMIO for accessing the hardware registers.
So select the dependency in Kconfig. Without this, there will be errors
while building the driver with COMPILE_TEST only:
ERROR: modpost: "__devm_regmap_init_mmio_clk" [drivers/soc/qcom/icc-bwmon.ko] undefined!
make[1]: *** [scrip... | ```diff
diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index a6164b2d7b25..ae504c43d9e7 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -237,6 +237,7 @@ config QCOM_ICC_BWMON
tristate "QCOM Interconnect Bandwidth Monitor driver"
depends on ARCH_QCOM || COMPILE_TEST
select... |
5d2fe2d7b616b8baa18348ead857b504fc2de336 | Analyze and fix the following issue in the Linux kernel code: soc: qcom: Select REMAP_MMIO for LLCC driver | Problem Details:
LLCC driver uses REGMAP_MMIO for accessing the hardware registers. So
select the dependency in Kconfig. Without this, there will be errors
while building the driver with COMPILE_TEST only:
ERROR: modpost: "__devm_regmap_init_mmio_clk" [drivers/soc/qcom/llcc-qcom.ko] undefined!
make[1]: *** [scripts/Ma... | ```diff
diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index 024e420f1bb7..a6164b2d7b25 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -63,6 +63,7 @@ config QCOM_GSBI
config QCOM_LLCC
tristate "Qualcomm Technologies, Inc. LLCC driver"
depends on ARCH_QCOM || COMPILE_TEST
... |
a31b3cffbd8e5d032dcb267bf94ee48d71c1a28b | Analyze and fix the following issue in the Linux kernel code: net/9p: fix response size check in p9_check_errors() | Problem Details:
Since commit 60ece0833b6c ("net/9p: allocate appropriate reduced message
buffers") it is no longer appropriate to check server's response size
against msize. Check against the previously allocated buffer capacity
instead.
- Omit this size check entirely for zero-copy messages, as those always
alloca... | ```diff
diff --git a/net/9p/client.c b/net/9p/client.c
index a2b4a965a5a9..7b2a997662d9 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -519,10 +519,9 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req)
int ecode;
err = p9_parse_header(&req->rc, NULL, &type, NULL, 0);
- if (req->rc.size... |
104bb8a663451404a26331263ce5b96c34504049 | Analyze and fix the following issue in the Linux kernel code: power: supply: fix null pointer dereferencing in power_supply_get_battery_info | Problem Details:
when kmalloc() fail to allocate memory in kasprintf(), propname
will be NULL, strcmp() called by of_get_property() will cause
null pointer dereference.
So return ENOMEM if kasprintf() return NULL pointer.
Fixes: 3afb50d7125b ("power: supply: core: Add some helpers to use the battery OCV capacity tabl... | ```diff
diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
index 00cb19b46001..7c790c41e2fe 100644
--- a/drivers/power/supply/power_supply_core.c
+++ b/drivers/power/supply/power_supply_core.c
@@ -750,6 +750,11 @@ int power_supply_get_battery_info(struct power_supply *psy,
... |
e3031d4c7d2c5bff6b5944d61d4e31319739d216 | Analyze and fix the following issue in the Linux kernel code: blk-throttle: remove incorrect comment for tg_last_low_overflow_time | Problem Details:
Function tg_last_low_overflow_time is called with intermediate node as
following:
throtl_hierarchy_can_downgrade
throtl_tg_can_downgrade
tg_last_low_overflow_time
throtl_hierarchy_can_upgrade
throtl_tg_can_upgrade
tg_last_low_overflow_time
throtl_hierarchy_can_downgrade/throtl_hierarchy_c... | ```diff
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 7db8592dae38..e6a087de414d 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -1762,7 +1762,6 @@ static unsigned long __tg_last_low_overflow_time(struct throtl_grp *tg)
return min(rtime, wtime);
}
-/* tg should not be an intermedia... |
009df341714c6c20a44dd9268681a8bff10bb050 | Analyze and fix the following issue in the Linux kernel code: blk-throttle: fix typo in comment of throtl_adjusted_limit | Problem Details:
lapsed time -> elapsed time
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
Link: https://lore.kernel.org/r/20221205115709.251489-7-shikemeng@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk> | ```diff
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 1623507ed56e..7db8592dae38 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -129,7 +129,7 @@ static struct throtl_data *sq_to_td(struct throtl_service_queue *sq)
/*
* cgroup's limit in LIMIT_MAX is scaled if low limit is set. This ... |
183daeb11de871b073515d14ec1e3bc0da79e038 | Analyze and fix the following issue in the Linux kernel code: blk-throttle: correct calculation of wait time in tg_may_dispatch | Problem Details:
In C language, When executing "if (expression1 && expression2)" and
expression1 return false, the expression2 may not be executed.
For "tg_within_bps_limit(tg, bio, bps_limit, &bps_wait) &&
tg_within_iops_limit(tg, bio, iops_limit, &iops_wait))", if bps is
limited, tg_within_bps_limit will return false... | ```diff
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 75010110d481..d5b7a2354ad7 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -822,17 +822,15 @@ static void tg_update_carryover(struct throtl_grp *tg)
tg->carryover_ios[READ], tg->carryover_ios[WRITE]);
}
-static bool tg_withi... |
84aca0a7e039c8735abc0f89f3f48e9006c0dfc7 | Analyze and fix the following issue in the Linux kernel code: blk-throttle: Fix that bps of child could exceed bps limited in parent | Problem Details:
Consider situation as following (on the default hierarchy):
HDD
|
root (bps limit: 4k)
|
child (bps limit :8k)
|
fio bs=8k
Rate of fio is supposed to be 4k, but result is 8k. Reason is as
following:
Size of single IO from fio is larger than bytes allowed in one
throtl_slice in child, so IOs are ... | ```diff
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 8e2349b17936..2444ebf5f11d 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -1067,7 +1067,6 @@ static void tg_dispatch_one_bio(struct throtl_grp *tg, bool rw)
sq->nr_queued[rw]--;
throtl_charge_bio(tg, bio);
- bio_set_flag(bio, ... |
14628aec8415e4847ae7e470b175412896716cd8 | Analyze and fix the following issue in the Linux kernel code: cxl/acpi: Fail decoder add if CXIMS for HBIG is missing | Problem Details:
The BIOS provided CXIMS (CXL XOR Interleave Math Structure) is required
for calculating a targets position in an interleave list during region
creation. The CXL driver expects to discover a CXIMS that matches the
HBIG (Host Bridge Interleave Granularity) and stores the xormaps found
in that CXIMS for r... | ```diff
diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
index 657ef250d848..420e322c85a1 100644
--- a/drivers/cxl/acpi.c
+++ b/drivers/cxl/acpi.c
@@ -282,6 +282,11 @@ static int cxl_parse_cfmws(union acpi_subtable_headers *header, void *arg,
cxl_parse_cxims, &cxims_ctx);
if (rc < 0)
goto err_xor... |
cb4cdf74bd77af187085ab9d73ab9fd88283e3dc | Analyze and fix the following issue in the Linux kernel code: cxl/region: Fix spelling mistake "memergion" -> "memregion" | Problem Details:
There is a spelling mistake in a dev_warn message. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20221205091819.1943564-1-colin.i.king@gmail.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com> | ```diff
diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index f75df35b9d3d..c56ddfed3393 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -1969,7 +1969,7 @@ static int cxl_region_invalidate_memregion(struct cxl_region *cxlr)
if (IS_ENABLED(CONFIG_CXL_REGION_INVALIDATION_TE... |
397cd265815eae562685d9832dc8b61c927c1cfb | Analyze and fix the following issue in the Linux kernel code: cxl/regs: Fix sparse warning | Problem Details:
The 0day robot belatedly points out that @addr is not properly tagged as
an iomap pointer:
"drivers/cxl/core/regs.c:332:14: sparse: sparse: incorrect type in
assignment (different address spaces) @@ expected void *addr @@
got void [noderef] __iomem * @@"
Fixes: 1168271ca054 ("cxl/acpi: Extract co... | ```diff
diff --git a/drivers/cxl/core/regs.c b/drivers/cxl/core/regs.c
index dfce37d11df1..1476a0299c9b 100644
--- a/drivers/cxl/core/regs.c
+++ b/drivers/cxl/core/regs.c
@@ -337,8 +337,8 @@ resource_size_t cxl_rcrb_to_component(struct device *dev,
enum cxl_rcrb which)
{
resource_size_t component_reg_phys... |
be1b670f61443aa5d0d01782e9b8ea0ee825d018 | Analyze and fix the following issue in the Linux kernel code: x86/microcode/intel: Do not retry microcode reloading on the APs | Problem Details:
The retries in load_ucode_intel_ap() were in place to support systems
with mixed steppings. Mixed steppings are no longer supported and there is
only one microcode image at a time. Any retries will simply reattempt to
apply the same image over and over without making progress.
[ bp: Zap the circumst... | ```diff
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 4f93875f57b4..2dba4b53e683 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -495,7 +495,6 @@ void load_ucode_intel_ap(void)
else
iup = &intel_ucode_patch;
-reg... |
ce3895735cc26957dc6b2a8f5af07ddab09483ae | Analyze and fix the following issue in the Linux kernel code: vfio/ap/ccw/samples: Fix device_register() unwind path | Problem Details:
We always need to call put_device() if device_register() fails.
All vfio drivers calling device_register() include a similar unwind
stack via gotos, therefore split device_unregister() into its
device_del() and put_device() components in the unwind path, and
add a goto target to handle only the put_dev... | ```diff
diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
index c2a65808605a..54aba7cceb33 100644
--- a/drivers/s390/cio/vfio_ccw_drv.c
+++ b/drivers/s390/cio/vfio_ccw_drv.c
@@ -199,8 +199,9 @@ static int vfio_ccw_sch_probe(struct subchannel *sch)
return 0;
out_unreg:
- device_unregist... |
d01c6ed6db38a4db2921591e4f5425bee1931aca | Analyze and fix the following issue in the Linux kernel code: NFS4.x/pnfs: Fix up logging of layout stateids | Problem Details:
If the layout is invalid, then just log a '0' value.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> | ```diff
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index 2cff5901c689..e3fbdc8a98eb 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -1815,7 +1815,7 @@ TRACE_EVENT(pnfs_update_layout,
__entry->count = count;
__entry->iomode = iomode;
__entry->reason = reason;
- if (lo != NULL) {
+ i... |
cbc32023ddbdf4baa3d9dc513a2184a84080a5a2 | Analyze and fix the following issue in the Linux kernel code: RISC-V: kexec: Fix memory leak of elf header buffer | Problem Details:
This is reported by kmemleak detector:
unreferenced object 0xff2000000403d000 (size 4096):
comm "kexec", pid 146, jiffies 4294900633 (age 64.792s)
hex dump (first 32 bytes):
7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 .ELF............
04 00 f3 00 01 00 00 00 00 00 00 00 00 00 00 00 .... | ```diff
diff --git a/arch/riscv/kernel/elf_kexec.c b/arch/riscv/kernel/elf_kexec.c
index ff30fcb43f47..5372b708fae2 100644
--- a/arch/riscv/kernel/elf_kexec.c
+++ b/arch/riscv/kernel/elf_kexec.c
@@ -26,6 +26,10 @@ int arch_kimage_file_post_load_cleanup(struct kimage *image)
kvfree(image->arch.fdt);
image->arch.fdt ... |
96df59b1ae23f5c11698c3c2159aeb2ecd4944a4 | Analyze and fix the following issue in the Linux kernel code: RISC-V: kexec: Fix memory leak of fdt buffer | Problem Details:
This is reported by kmemleak detector:
unreferenced object 0xff60000082864000 (size 9588):
comm "kexec", pid 146, jiffies 4294900634 (age 64.788s)
hex dump (first 32 bytes):
d0 0d fe ed 00 00 12 ed 00 00 00 48 00 00 11 40 ...........H...@
00 00 00 28 00 00 00 11 00 00 00 02 00 00 00 00 .... | ```diff
diff --git a/arch/riscv/include/asm/kexec.h b/arch/riscv/include/asm/kexec.h
index eee260e8ab30..2b56769cb530 100644
--- a/arch/riscv/include/asm/kexec.h
+++ b/arch/riscv/include/asm/kexec.h
@@ -39,6 +39,7 @@ crash_setup_regs(struct pt_regs *newregs,
#define ARCH_HAS_KIMAGE_ARCH
struct kimage_arch {
+ void ... |
6e90293618ed476d6b11f82ce724efbb9e9a071b | Analyze and fix the following issue in the Linux kernel code: drm/vmwgfx: Don't use screen objects when SEV is active | Problem Details:
When SEV is enabled gmr's and mob's are explicitly disabled because
the encrypted system memory can not be used by the hypervisor.
The driver was disabling GMR's but the presentation code, which depends
on GMR's, wasn't honoring it which lead to black screen on hosts
with SEV enabled.
Make sure scree... | ```diff
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index ecd3c2fc978b..9c79873f62f0 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@ -949,6 +949,10 @@ int vmw_kms_sou_init_display(struct vmw_private *dev_priv)
struct drm_devi... |
b52be557e24c47286738276121177a41f54e3b83 | Analyze and fix the following issue in the Linux kernel code: ipc/sem: Fix dangling sem_array access in semtimedop race | Problem Details:
When __do_semtimedop() goes to sleep because it has to wait for a
semaphore value becoming zero or becoming bigger than some threshold, it
links the on-stack sem_queue to the sem_array, then goes to sleep
without holding a reference on the sem_array.
When __do_semtimedop() comes back out of sleep, one... | ```diff
diff --git a/ipc/sem.c b/ipc/sem.c
index c8496f98b139..00f88aa01ac5 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -2179,14 +2179,15 @@ long __do_semtimedop(int semid, struct sembuf *sops,
* scenarios where we were awakened externally, during the
* window between wake_q_add() and wake_up_q().
*/
+ rcu_r... |
27a6dea3ebaab3d6f8ded969ec3af710bcbe0c02 | Analyze and fix the following issue in the Linux kernel code: genirq/msi: Provide msi_create/free_device_irq_domain() | Problem Details:
Now that all prerequsites are in place, provide the actual interfaces for
creating and removing per device interrupt domains.
MSI device interrupt domains are created from the provided
msi_domain_template which is duplicated so that it can be modified for the
particular device.
The name of the domain... | ```diff
diff --git a/include/linux/msi.h b/include/linux/msi.h
index 08a0e2abf048..ef46a3ee18e4 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -547,6 +547,12 @@ struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode,
struct msi_domain_info *info,
struct irq_domain *parent);
... |
ebca4396ee18521e9e5d435a15e5d0ab2eb6b009 | Analyze and fix the following issue in the Linux kernel code: genirq/msi: Provide data structs for per device domains | Problem Details:
Provide struct msi_domain_template which contains a bundle of struct
irq_chip, struct msi_domain_ops and struct msi_domain_info and a name
field.
This template is used by MSI device domain implementations to provide the
domain specific functionality, feature bits etc.
When a MSI domain is created the... | ```diff
diff --git a/include/linux/msi.h b/include/linux/msi.h
index 9bf3cbad1114..7fb87371541a 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -24,6 +24,7 @@
#include <linux/xarray.h>
#include <linux/mutex.h>
#include <linux/list.h>
+#include <linux/irq.h>
#include <linux/bits.h>
#include <asm/msi... |
b78780d93b068706d04f8f2f02bd08db5da01479 | Analyze and fix the following issue in the Linux kernel code: genirq/msi: Provide struct msi_parent_ops | Problem Details:
MSI parent domains must have some control over the MSI domains which are
built on top. On domain creation they need to fill in e.g. architecture
specific chip callbacks or msi domain ops to make the outermost domain
parent agnostic which is obviously required for architecture independence
etc.
The str... | ```diff
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index 24b76688c2fb..a668cc015874 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -46,6 +46,7 @@ struct irq_desc;
struct cpumask;
struct seq_file;
struct irq_affinity_desc;
+struct msi_parent_ops;
#define IRQ_DOMAI... |
6842694c5088925d216529d4a2358ab5ee8bb862 | Analyze and fix the following issue in the Linux kernel code: PCI/MSI: Use bullet lists in kernel-doc comments of api.c | Problem Details:
Use bullet-list RST syntax for kernel-doc parameters' flags and interrupt
mode descriptions. Otherwise Sphinx produces "Unexpected identation" errors
and warnings.
Fixes: 5c0997dc33ac24 ("PCI/MSI: Move pci_alloc_irq_vectors() to api.c")
Fixes: 017239c8db2093 ("PCI/MSI: Move pci_irq_vector() to api.c")... | ```diff
diff --git a/drivers/pci/msi/api.c b/drivers/pci/msi/api.c
index 6c3ad4863850..2d46a0cfd541 100644
--- a/drivers/pci/msi/api.c
+++ b/drivers/pci/msi/api.c
@@ -142,12 +142,15 @@ EXPORT_SYMBOL(pci_disable_msix);
* @min_vecs: minimum required number of vectors (must be >= 1)
* @max_vecs: maximum desired number... |
1b41beaa7a58467505ec3023af8aad74f878b888 | Analyze and fix the following issue in the Linux kernel code: ASoC: sof_es8336: fix possible use-after-free in sof_es8336_remove() | Problem Details:
sof_es8336_remove() calls cancel_delayed_work(). However, that
function does not wait until the work function finishes. This
means that the callback function may still be running after
the driver's remove function has finished, which would result
in a use-after-free.
Fix by calling cancel_delayed_work... | ```diff
diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c
index 70713e4b07dc..773e5d1d87d4 100644
--- a/sound/soc/intel/boards/sof_es8336.c
+++ b/sound/soc/intel/boards/sof_es8336.c
@@ -783,7 +783,7 @@ static int sof_es8336_remove(struct platform_device *pdev)
struct snd_soc_card ... |
66310b5a0fc1ccdce9a3a5e6c6a12c08e4e0b7b1 | Analyze and fix the following issue in the Linux kernel code: soc: fsl: qe: request pins non-exclusively | Problem Details:
Commit 84582f9ed090 ("soc: fsl: qe: Avoid using gpio_to_desc()") changed
qe_pin_request() to request and hold GPIO corresponding to a given pin.
Unfortunately this does not work, as fhci-hcd requests these GPIOs
first, befor calling qe_pin_request() (see
drivers/usb/host/fhci-hcd.c::of_fhci_probe()).
T... | ```diff
diff --git a/drivers/soc/fsl/qe/gpio.c b/drivers/soc/fsl/qe/gpio.c
index af9193e7e49b..1440922341d8 100644
--- a/drivers/soc/fsl/qe/gpio.c
+++ b/drivers/soc/fsl/qe/gpio.c
@@ -13,19 +13,12 @@
#include <linux/err.h>
#include <linux/io.h>
#include <linux/of.h>
-#include <linux/of_gpio.h>
+#include <linux/of_gpi... |
c04712efb3755306ff3ab72a91df94108bff1f30 | Analyze and fix the following issue in the Linux kernel code: drm/i915/mtl: Check full IP version when applying hw steering semaphore | Problem Details:
When determining whether the platform has a hardware-level steering
semaphore (i.e., MTL and beyond), we need to use GRAPHICS_VER_FULL() to
compare the full version rather than just the major version number
returned by GRAPHICS_VER().
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 3100240bf846 ... | ```diff
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_mcr.c b/drivers/gpu/drm/i915/gt/intel_gt_mcr.c
index 087e4ac5b68d..41a237509dcf 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_mcr.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_mcr.c
@@ -367,7 +367,7 @@ void intel_gt_mcr_lock(struct intel_gt *gt, unsigned long *flags)
... |
b7af0635c87ff78d6bd523298ab7471f9ffd3ce5 | Analyze and fix the following issue in the Linux kernel code: btrfs: print transaction aborted messages with an error level | Problem Details:
Currently we print the transaction aborted message with a debug level, but
a transaction abort is an exceptional event that indicates something went
wrong and it's useful to have it printed with an error level as it helps
analysing problems in a production environment, where debug level messages
are ty... | ```diff
diff --git a/fs/btrfs/messages.h b/fs/btrfs/messages.h
index 5ac410e313e4..190af1f698d9 100644
--- a/fs/btrfs/messages.h
+++ b/fs/btrfs/messages.h
@@ -197,13 +197,13 @@ do { \
&((trans)->fs_info->fs_state))) { \
first = true; \
if (WARN(abort_should_print_stack(errno), \
- KER... |
162d053e15fe985f754ef495a96eb3db970c43ed | Analyze and fix the following issue in the Linux kernel code: btrfs: do not BUG_ON() on ENOMEM when dropping extent items for a range | Problem Details:
If we get -ENOMEM while dropping file extent items in a given range, at
btrfs_drop_extents(), due to failure to allocate memory when attempting to
increment the reference count for an extent or drop the reference count,
we handle it with a BUG_ON(). This is excessive, instead we can simply
abort the tr... | ```diff
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 448b143a5cb2..91b00eb2440e 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -380,7 +380,10 @@ next_slot:
args->start - extent_offset,
0, false);
ret = btrfs_inc_extent_ref(trans, &ref);
- BUG_ON(ret); /* -ENOMEM */
+ if (ret) {
+... |
1742e1c90c3da344f3bb9b1f1309b3f47482756a | Analyze and fix the following issue in the Linux kernel code: btrfs: fix extent map use-after-free when handling missing device in read_one_chunk | Problem Details:
Store the error code before freeing the extent_map. Though it's
reference counted structure, in that function it's the first and last
allocation so this would lead to a potential use-after-free.
The error can happen eg. when chunk is stored on a missing device and
the degraded mount option is missing.... | ```diff
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index acab20f2863d..aa25fa335d3e 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6976,8 +6976,9 @@ static int read_one_chunk(struct btrfs_key *key, struct extent_buffer *leaf,
map->stripes[i].dev = handle_missing_device(fs_info,
... |
3eb423442483d454937cdc8853e58c399ffe5514 | Analyze and fix the following issue in the Linux kernel code: btrfs: remove outdated logic from overwrite_item() and add assertion | Problem Details:
As of commit 193df6245704 ("btrfs: search for last logged dir index if
it's not cached in the inode"), the overwrite_item() function is always
called for a root that is from a fs/subvolume tree. In other words, now
it's only used during log replay to modify a fs/subvolume tree. Therefore
we can remove ... | ```diff
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index bcc8717f51fd..a3c43f0b1c95 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -391,11 +391,16 @@ static int overwrite_item(struct btrfs_trans_handle *trans,
int save_old_i_size = 0;
unsigned long src_ptr;
unsigned long dst_ptr;
- int ... |
26df39a9e5a8985674e814f0b27b25e8b4eb9ba7 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix uninitialized variable in find_first_clear_extent_bit | Problem Details:
This was caught when syncing extent-io-tree.c into btrfs-progs. This
however isn't really a problem, the only way next would be uninitialized
is if we found the range we were looking for, and in this case we don't
care about next. However it's a compile error, so fix it up.
Signed-off-by: Josef Baci... | ```diff
diff --git a/fs/btrfs/extent-io-tree.c b/fs/btrfs/extent-io-tree.c
index 82ca6a11e11a..9ae9cd1e7035 100644
--- a/fs/btrfs/extent-io-tree.c
+++ b/fs/btrfs/extent-io-tree.c
@@ -1425,7 +1425,7 @@ void find_first_clear_extent_bit(struct extent_io_tree *tree, u64 start,
u64 *start_ret, u64 *end_ret, u32 bits)
... |
d7c9e1be2876f63fb2178a24e0c1d5733ff98d47 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix uninitialized parent in insert_state | Problem Details:
I don't know how this isn't caught when we build this in the kernel, but
while syncing extent-io-tree.c into btrfs-progs I got an error because
parent could potentially be uninitialized when we link in a new node,
specifically when the extent_io_tree is empty. This means we could have
garbage in the p... | ```diff
diff --git a/fs/btrfs/extent-io-tree.c b/fs/btrfs/extent-io-tree.c
index 21fa15123af8..82ca6a11e11a 100644
--- a/fs/btrfs/extent-io-tree.c
+++ b/fs/btrfs/extent-io-tree.c
@@ -395,7 +395,7 @@ static int insert_state(struct extent_io_tree *tree,
u32 bits, struct extent_changeset *changeset)
{
struct rb_nod... |
637e3b48c22e52daa645b49b73630af3f09328ae | Analyze and fix the following issue in the Linux kernel code: btrfs: add helpers for manipulating leaf items and data | Problem Details:
We have some gnarly memmove and copy_extent_buffer calls for leaf
manipulation. This is because our item offsets aren't absolute, they're
based on 0 being where the items start in the leaf, which is after the
btrfs_header. This means any manipulation of the data requires adding
sizeof(struct btrfs_he... | ```diff
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 32facf8d7319..b5d203045dc7 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -65,6 +65,91 @@ static unsigned int leaf_data_end(const struct extent_buffer *leaf)
return btrfs_item_offset(leaf, nr - 1);
}
+/*
+ * Move data in a @leaf (using memmove... |
7a3150723061ba1ac2ba10b1392b1cd75234172a | Analyze and fix the following issue in the Linux kernel code: btrfs: raid56: do data csum verification during RMW cycle | Problem Details:
[BUG]
For the following small script, btrfs will be unable to recover the
content of file1:
mkfs.btrfs -f -m raid1 -d raid5 -b 1G $dev1 $dev2 $dev3
mount $dev1 $mnt
xfs_io -f -c "pwrite -S 0xff 0 64k" -c sync $mnt/file1
md5sum $mnt/file1
umount $mnt
# Corrupt the above 64K data stripe.
... | ```diff
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 5ef4fbb49df2..2d90a6b5eb00 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -21,6 +21,7 @@
#include "raid56.h"
#include "async-thread.h"
#include "file-item.h"
+#include "btrfs_inode.h"
/* set when additional merges to this rbio are not all... |
cb3e217bdb39e390f8e64af519acb02af336b53d | Analyze and fix the following issue in the Linux kernel code: btrfs: use btrfs_dev_name() helper to handle missing devices better | Problem Details:
[BUG]
If dev-replace failed to re-construct its data/metadata, the kernel
message would be incorrect for the missing device:
BTRFS info (device dm-1): dev_replace from <missing disk> (devid 2) to /dev/mapper/test-scratch2 started
BTRFS error (device dm-1): failed to rebuild valid logical 38862848 fo... | ```diff
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index 7ff0703ef3e4..82e49d985019 100644
--- a/fs/btrfs/check-integrity.c
+++ b/fs/btrfs/check-integrity.c
@@ -757,7 +757,7 @@ static int btrfsic_process_superblock_dev_mirror(
btrfs_info_in_rcu(fs_info,
"new initial S-block (bdev %p, %... |
3c32c7212f1639471ec0197ff1179b8ef2e0f3d3 | Analyze and fix the following issue in the Linux kernel code: btrfs: use cached state when looking for delalloc ranges with lseek | Problem Details:
During lseek (SEEK_HOLE/DATA), whenever we find a hole or prealloc extent,
we will look for delalloc in that range, and one of the things we do for
that is to find out ranges in the inode's io_tree marked with
EXTENT_DELALLOC, using calls to count_range_bits().
Typically there's a single, or few, sear... | ```diff
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 5649f8907984..99defab7e1f6 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -426,6 +426,7 @@ struct btrfs_drop_extents_args {
struct btrfs_file_private {
void *filldir_buf;
+ struct extent_state *llseek_cached_state;
};
static inline u32 BTR... |
ad3daf1c3f5bcbba49a302d8d0e46467556bf6f3 | Analyze and fix the following issue in the Linux kernel code: btrfs: raid56: remove the old error tracking system | Problem Details:
Since all the recovery paths have been migrated to the new error bitmap
based system, we can remove the old stripe number based system.
This cleanup involves one behavior change:
- Rebuild rbio can no longer be merged
Previously a rebuild rbio (caused by retry after data csum mismatch)
can be mer... | ```diff
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index fd67ba4648c9..11be5d0a7eab 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -66,8 +66,6 @@ struct sector_ptr {
static void rmw_rbio_work(struct work_struct *work);
static void rmw_rbio_work_locked(struct work_struct *work);
-static int fail_b... |
e2a041657774102b184cc41369a53be3d024e8ee | Analyze and fix the following issue in the Linux kernel code: btrfs: send: bump the extent reference count limit for backref walking | Problem Details:
After the previous patchset which is comprised of the following patches:
01/17 btrfs: fix inode list leak during backref walking at resolve_indirect_refs()
02/17 btrfs: fix inode list leak during backref walking at find_parent_nodes()
03/17 btrfs: fix ulist leaks in error paths of qgroup self te... | ```diff
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 383bc8a5cb6c..67f7c698ade3 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -39,7 +39,7 @@
* avoid hitting limitations of the backreference walking code (taking a lot of
* time and using too much memory for extents with large number of references).
... |
adf0241868bd46c7be8012ef99cb88c7f47c16ce | Analyze and fix the following issue in the Linux kernel code: btrfs: send: skip resolution of our own backref when finding clone source | Problem Details:
When doing backref walking to determine a source range to clone from, it
is worthless to collect and resolve our own data backref, as we can't
obviously use it as a clone source and it represents the range we want to
clone into. Collecting the backref implies doing the extra work to resolve
it, doing t... | ```diff
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 33056c4c0528..430974cf3b96 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -1111,10 +1111,12 @@ static int add_inline_refs(struct btrfs_backref_walk_ctx *ctx,
root = btrfs_extent_data_ref_root(leaf, dref);
- ret = add_indirect_ref(... |
f73853c7168aef0e071c160979af05a148691e61 | Analyze and fix the following issue in the Linux kernel code: btrfs: send: avoid double extent tree search when finding clone source | Problem Details:
At find_extent_clone() we search twice for the extent item corresponding
to the data extent that the current file extent items points to:
1) Once with a call to extent_from_logical();
2) Once again during backref walking, through iterate_extent_inodes()
which eventually leads to find_parent_nodes(... | ```diff
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index bb59ba68d7ee..33056c4c0528 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -1003,8 +1003,8 @@ static int add_delayed_refs(const struct btrfs_fs_info *fs_info,
*
* Returns 0 on success, <0 on error, or BACKREF_FOUND_SHARED.
*/
-static i... |
88ffb665c894b1929b30b09e05506ff359d9fb89 | Analyze and fix the following issue in the Linux kernel code: btrfs: send: skip unnecessary backref iterations | Problem Details:
When looking for a clone source for an extent, we are iterating over all
the backreferences for an extent. This is often a waste of time, because
once we find a good clone source we could stop immediately instead of
continuing backref walking, which is expensive.
Basically what happens currently is th... | ```diff
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 9dacf487017d..bb59ba68d7ee 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -31,15 +31,18 @@ struct extent_inode_elem {
struct extent_inode_elem *next;
};
-static int check_extent_in_eb(const struct btrfs_key *key,
+static int check_exte... |
66d04209e5a8d3fc47900de6bd0c319790a52b3e | Analyze and fix the following issue in the Linux kernel code: btrfs: send: cache leaf to roots mapping during backref walking | Problem Details:
During a send operation, when doing backref walking to determine which
inodes/offsets/roots we can clone from, the most repetitive and expensive
step is to map each leaf that has file extent items pointing to the target
data extent to the IDs of the roots from which the leaves are accessible,
which hap... | ```diff
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index dc276ce3afe0..9dacf487017d 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -2303,21 +2303,14 @@ int iterate_extent_inodes(struct btrfs_backref_walk_ctx *ctx,
ASSERT(ctx->trans == NULL);
ASSERT(ctx->roots == NULL);
- ctx->roots = ulist_... |
c7499a64dcf62bf27968b0e9cce353c490b9ada1 | Analyze and fix the following issue in the Linux kernel code: btrfs: send: optimize clone detection to increase extent sharing | Problem Details:
Currently send does not do the best decisions when it comes to decide
between multiple clone sources, which results in clone operations for
partial extent ranges, which has the following disadvantages:
1) We get less shared extents at the destination;
2) We have to read more data during the send oper... | ```diff
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 04cb608e7cfb..9be11a342de5 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -27,6 +27,7 @@
struct extent_inode_elem {
u64 inum;
u64 offset;
+ u64 num_bytes;
struct extent_inode_elem *next;
};
@@ -37,6 +38,7 @@ static int check_exten... |
22a3c0ac8ed0043af209a15928ae4c4855b0a4c4 | Analyze and fix the following issue in the Linux kernel code: btrfs: send: avoid unnecessary backref lookups when finding clone source | Problem Details:
At find_extent_clone(), unless we are given an inline extent, a file
extent item that represents hole or an extent that starts beyond the
i_size, we always do backref walking to look for clone sources, unless
if we have more than SEND_MAX_EXTENT_REFS (64) known references on the
extent.
However if we ... | ```diff
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 7d289bdc6de1..d9e01b66b32b 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -1354,6 +1354,7 @@ static int find_extent_clone(struct send_ctx *sctx,
u64 disk_byte;
u64 num_bytes;
u64 extent_item_pos;
+ u64 extent_refs;
u64 flags = 0;
struct btrfs... |
c30ff698da87aeabb459cca75fe4a77a858609fb | Analyze and fix the following issue in the Linux kernel code: btrfs: fix SPDX comment in tree-mod-log.h | Problem Details:
The header files should use the /* */ comment style, introduced in
commit f3a84ccd28d0 ("btrfs: move the tree mod log code into its own
file").
Signed-off-by: David Sterba <dsterba@suse.com> | ```diff
diff --git a/fs/btrfs/tree-mod-log.h b/fs/btrfs/tree-mod-log.h
index 8cffe0bc2a39..94f10afeee97 100644
--- a/fs/btrfs/tree-mod-log.h
+++ b/fs/btrfs/tree-mod-log.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
#ifndef BTRFS_TREE_MOD_LOG_H
#define BTRFS_TREE_MOD_... |
6976201f188f0a899fe5f0dfde32b9855d1d22cc | Analyze and fix the following issue in the Linux kernel code: btrfs: avoid unnecessary resolution of indirect backrefs during fiemap | Problem Details:
During fiemap, when determining if a data extent is shared or not, if we
don't find the extent is directly shared, then we need to determine if
it's shared through subtrees. For that we need to resolve the indirect
reference we found in order to figure out the path in the inode's fs tree,
which is a pa... | ```diff
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 94a3c6deafbb..232f49415ab9 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -140,6 +140,7 @@ struct share_check {
struct btrfs_root *root;
u64 inum;
u64 data_bytenr;
+ u64 data_extent_gen;
/*
* Counts number of inodes that refer to... |
877c14767f106a5c8af271ebf1294c514eb76d0c | Analyze and fix the following issue in the Linux kernel code: btrfs: avoid duplicated resolution of indirect backrefs during fiemap | Problem Details:
During fiemap, when determining if a data extent is shared or not, if we
don't find the extent is directly shared, then we need to determine if
it's shared through subtrees. For that we need to resolve the indirect
reference we found in order to figure out the path in the inode's fs tree,
which is a pa... | ```diff
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 1b1575b3a7b0..94a3c6deafbb 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -16,8 +16,9 @@
#include "misc.h"
#include "tree-mod-log.h"
-/* Just an arbitrary number so we can be sure this happened */
-#define BACKREF_FOUND_SHARED 6
+/* Jus... |
73e339e6ab74cc3edcd1f1ed3d9b822baf8534e1 | Analyze and fix the following issue in the Linux kernel code: btrfs: cache sharedness of the last few data extents during fiemap | Problem Details:
During fiemap we process all the file extent items of an inode, by their
file offset order (left to right b+tree order), and then check if the data
extent they point at is shared or not. Until now we didn't cache those
results, we only did it for b+tree nodes/leaves since for each unique
b+tree path we... | ```diff
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 22ab13821ada..64bea9b30f6b 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -137,7 +137,25 @@ struct preftrees {
struct share_check {
u64 root_objectid;
u64 inum;
+ u64 data_bytenr;
+ /*
+ * Counts number of inodes that refer to an exte... |
ff2b64a22a2efcc087520e94ad06b005268a5f9d | Analyze and fix the following issue in the Linux kernel code: btrfs: raid56: cleanup for function __free_raid_bio() | Problem Details:
The cleanup involves two things:
- Remove the "__" prefix
There is no naming confliction.
- Remove the forward declaration
There is no special function call involved.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com> | ```diff
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 82c8e991300e..371b2a182544 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -69,7 +69,6 @@ static void rmw_work(struct work_struct *work);
static void read_rebuild_work(struct work_struct *work);
static int fail_bio_stripe(struct btrfs_raid_bio... |
9c5c9604631ae5fcdc5124c79d01d75f80b5ffd4 | Analyze and fix the following issue in the Linux kernel code: btrfs: use a cached_state everywhere in relocation | Problem Details:
All of the relocation code avoids using the cached state, despite
everywhere using the normal
lock_extent()
// do something
unlock_extent()
pattern. Fix this by plumbing a cached state throughout all of these
functions in order to allow for less tree searches.
Reviewed-by: Filipe Manana <fdma... | ```diff
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index e81a21082e58..9dcf9b39c798 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -1113,6 +1113,8 @@ int replace_file_extents(struct btrfs_trans_handle *trans,
inode = find_next_inode(root, key.objectid);
}
if (inode && btr... |
2912cdda734d9136615ed05636d9fcbca2a7a3c5 | Analyze and fix the following issue in the Linux kernel code: ALSA: patch_realtek: Fix Dell Inspiron Plus 16 | Problem Details:
The Dell Inspiron Plus 16, in both laptop and 2in1 form factor, has top
speakers connected on NID 0x17, which the codec reports as unconnected.
These speakers should be connected to the DAC on NID 0x03.
Signed-off-by: Philipp Jungkamp <p.jungkamp@gmx.net>
Link: https://lore.kernel.org/r/20221205163713... | ```diff
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index cf7c825078dc..5f51f8fc7fdc 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6903,6 +6903,34 @@ static void alc287_fixup_yoga9_14iap7_bass_spk_pin(struct hda_codec *codec,
}
}
+static void alc2... |
d64aaf3f7869f915fd120763d75f11d6b116424d | Analyze and fix the following issue in the Linux kernel code: i40e: Disallow ip4 and ip6 l4_4_bytes | Problem Details:
Return -EOPNOTSUPP, when user requests l4_4_bytes for raw IP4 or
IP6 flow director filters. Flow director does not support filtering
on l4 bytes for PCTYPEs used by IP4 and IP6 filters.
Without this patch, user could create filters with l4_4_bytes fields,
which did not do any filtering on L4, but only ... | ```diff
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 4a6a6e48c615..f6fa63e4253c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -4464,11 +4464,7 @@ static int i40e_check_fdir_input_s... |
08501970472077ed5de346ad89943a37d1692e9b | Analyze and fix the following issue in the Linux kernel code: i40e: Fix for VF MAC address 0 | Problem Details:
After spawning max VFs on a PF, some VFs were not getting resources and
their MAC addresses were 0. This was caused by PF sleeping before flushing
HW registers which caused VIRTCHNL_VFR_VFACTIVE to not be set in time for
VF.
Fix by adding a sleep after hw flush.
Fixes: e4b433f4a741 ("i40e: reset all ... | ```diff
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 72ddcefc45b1..635f93d60318 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -1578,6 +1578,7 @@ bool i40e_reset_vf(... |
82e0572b23029b380464fa9fdc125db9c1506d0a | Analyze and fix the following issue in the Linux kernel code: i40e: Fix not setting default xps_cpus after reset | Problem Details:
During tx rings configuration default XPS queue config is set and
__I40E_TX_XPS_INIT_DONE is locked. __I40E_TX_XPS_INIT_DONE state is
cleared and set again with default mapping only during queues build,
it means after first setup or reset with queues rebuild. (i.e.
ethtool -L <interface> combined <numb... | ```diff
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index b3cb587a2032..6416322d7c18 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -10654,6 +10654,21 @@ static int i40e_rebuild_channels(struct i40e... |
bc80c2e438dcbfcf748452ec0f7ad5b79ff3ad88 | Analyze and fix the following issue in the Linux kernel code: PM: runtime: Do not call __rpm_callback() from rpm_idle() | Problem Details:
Calling __rpm_callback() from rpm_idle() after adding device links
support to the former is a clear mistake.
Not only it causes rpm_idle() to carry out unnecessary actions, but it
is also against the assumption regarding the stability of PM-runtime
status across __rpm_callback() invocations, because r... | ```diff
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index b52049098d4e..14088b5adb55 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -484,7 +484,17 @@ static int rpm_idle(struct device *dev, int rpmflags)
dev->power.idle_notification = true;
- retval = ... |
3b84efc066f8793a6581018d92da9b304abd8ce8 | Analyze and fix the following issue in the Linux kernel code: arm64: kprobes: Return DBG_HOOK_ERROR if kprobes can not handle a BRK | Problem Details:
Return DBG_HOOK_ERROR if kprobes can not handle a BRK because it
fails to find a kprobe corresponding to the address.
Since arm64 kprobes uses stop_machine based text patching for removing
BRK, it ensures all running kprobe_break_handler() is done at that point.
And after removing the BRK, it removes ... | ```diff
diff --git a/arch/arm64/kernel/probes/kprobes.c b/arch/arm64/kernel/probes/kprobes.c
index d2ae37f89774..f35d059a9a36 100644
--- a/arch/arm64/kernel/probes/kprobes.c
+++ b/arch/arm64/kernel/probes/kprobes.c
@@ -298,7 +298,8 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr)
return 0... |
30a421552373d2becb378282408a399702a0f00a | Analyze and fix the following issue in the Linux kernel code: arm64: kprobes: Let arch do_page_fault() fix up page fault in user handler | Problem Details:
Since arm64's do_page_fault() can handle the page fault correctly
than kprobe_fault_handler() according to the context, let it handle
the page fault instead of simply call fixup_exception() in the
kprobe_fault_handler().
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Acked-by: Mark Rut... | ```diff
diff --git a/arch/arm64/kernel/probes/kprobes.c b/arch/arm64/kernel/probes/kprobes.c
index c9e4d0720285..d2ae37f89774 100644
--- a/arch/arm64/kernel/probes/kprobes.c
+++ b/arch/arm64/kernel/probes/kprobes.c
@@ -294,14 +294,6 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr)
}
... |
0fbcd8abf3375052cc7627cc53aba6f2eb189fbb | Analyze and fix the following issue in the Linux kernel code: arm64: Prohibit instrumentation on arch_stack_walk() | Problem Details:
Mark arch_stack_walk() as noinstr instead of notrace and inline functions
called from arch_stack_walk() as __always_inline so that user does not
put any instrumentations on it, because this function can be used from
return_address() which is used by lockdep.
Without this, if the kernel built with CONF... | ```diff
diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c
index 634279b3b03d..117e2c180f3c 100644
--- a/arch/arm64/kernel/stacktrace.c
+++ b/arch/arm64/kernel/stacktrace.c
@@ -23,8 +23,8 @@
*
* The regs must be on a stack currently owned by the calling task.
*/
-static inline void unwin... |
219072c09abde0f1d0a6ce091be375e8eb7d08f0 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Fix benign bug with incorrect use of VA_BITS | Problem Details:
get_user_mapping_size() uses kvm's pgtable library to walk a user space
page table created by the kernel, and in doing so, passes metadata
that the library needs, including ia_bits, which defines the size of the
input address.
For the case where the kernel is compiled for 52 VA bits but runs on HW
tha... | ```diff
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index 4efb983cff43..1ef0704420d9 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -641,7 +641,7 @@ static int get_user_mapping_size(struct kvm *kvm, u64 addr)
{
struct kvm_pgtable pgt = {
.pgd = (kvm_pte_t *)kvm->mm->pgd,
- .ia_bits... |
8a5a05583a04fcfa094072147eb8f6c9bb2af852 | Analyze and fix the following issue in the Linux kernel code: ASoC: dt-bindings: maxim,max98357a: Convert to DT schema | Problem Details:
Convert the Maxim Integrated MAX98357A/MAX98360A amplifier bindings to
DT schema. Add missing properties ('#sound-dai-cells' and
'sound-name-prefix' from common DAI properties).
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221203160442.69594-3-... | ```diff
diff --git a/Documentation/devicetree/bindings/sound/max98357a.txt b/Documentation/devicetree/bindings/sound/max98357a.txt
deleted file mode 100644
index 75db84d06240..000000000000
--- a/Documentation/devicetree/bindings/sound/max98357a.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-Maxim MAX98357A/MAX98360A audio DAC
-
-... |
3fda85324b8d7aa01ccfa1bb82c46befc6af518f | Analyze and fix the following issue in the Linux kernel code: ASoC: dt-bindings: Extend name-prefix.yaml into common DAI properties | Problem Details:
Rename name-prefix.yaml into common DAI schema and document
'#sound-dai-cells' for completeness. The '#sound-dai-cells' cannot be
really constrained, as there are users with value of 0, 1 and 2, but at
least it brings definition to one common place.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlo... | ```diff
diff --git a/Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml b/Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml
index 7cdffdb131ac..74cefdf1b843 100644
--- a/Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml
+++ b/Documentation/devicetree/bindings/disp... |
ab148b461c5cd767762bfcba5749c770ca836079 | Analyze and fix the following issue in the Linux kernel code: ASoC: qcom: lpass-sc7280: Add maybe_unused tag for system PM ops | Problem Details:
Add __maybe_unused tag for system PM ops suspend and resume.
This is required to fix allmodconfig compilation issue.
Fixes: a3a96e93cc88 ("ASoC: qcom: lpass-sc7280: Add system suspend/resume PM ops")
Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Link: https://lore.kernel.org/r/16... | ```diff
diff --git a/sound/soc/qcom/lpass-sc7280.c b/sound/soc/qcom/lpass-sc7280.c
index 65a04d341859..d43f480cbae3 100644
--- a/sound/soc/qcom/lpass-sc7280.c
+++ b/sound/soc/qcom/lpass-sc7280.c
@@ -235,14 +235,14 @@ static int sc7280_lpass_exit(struct platform_device *pdev)
return 0;
}
-static int sc7280_lpass_de... |
85ac9c8c8eed76e8a320a9e017c6d36e2a52745b | Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: avs: Allow for dumping debug window snapshot | Problem Details:
Add new read-only debugfs entry which dumps entire content of the SRAM
window 2 i.e.: the debug window.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221202152841.672536-17-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org> | ```diff
diff --git a/sound/soc/intel/avs/debugfs.c b/sound/soc/intel/avs/debugfs.c
index e9042d4328c4..bdd388ec01ea 100644
--- a/sound/soc/intel/avs/debugfs.c
+++ b/sound/soc/intel/avs/debugfs.c
@@ -71,6 +71,31 @@ static const struct file_operations fw_regs_fops = {
.llseek = no_llseek,
};
+static ssize_t debug_wi... |
f7de161fc8d5e1ebac3c361a37b1d748e7086330 | Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: avs: Drop usage of debug members in non-debug code | Problem Details:
Switch to debug-context aware wrappers instead of accessing debug
members directly allowing for readable separation of debug and non-debug
related code. Duplicates are removed along the way.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221202152841.67253... | ```diff
diff --git a/sound/soc/intel/avs/apl.c b/sound/soc/intel/avs/apl.c
index beef308c9428..02683dce277a 100644
--- a/sound/soc/intel/avs/apl.c
+++ b/sound/soc/intel/avs/apl.c
@@ -59,21 +59,18 @@ static int apl_log_buffer_status(struct avs_dev *adev, union avs_notify_msg *msg
memcpy_fromio(&layout, addr, sizeof(... |
b3eefa5d8dbfe5286c3308fa706fc9c45b38fe19 | Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: avs: Make enable_logs() dependent on DEBUG_FS | Problem Details:
Without debug filesystem present, this code is redundant.
Operations: log_buffer_status and log_buffer_offset are left as is as
EXCEPTION_CAUGHT and even unexpected LOG_BUFFER_STATUS notifications may
occur without user ever touching debugfs.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
... | ```diff
diff --git a/sound/soc/intel/avs/apl.c b/sound/soc/intel/avs/apl.c
index 66672ffd95df..beef308c9428 100644
--- a/sound/soc/intel/avs/apl.c
+++ b/sound/soc/intel/avs/apl.c
@@ -13,8 +13,9 @@
#include "path.h"
#include "topology.h"
-static int apl_enable_logs(struct avs_dev *adev, enum avs_log_enable enable, u... |
9e3c15beb8976771f95ba30b3da8bd35dc7188ac | Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: avs: Introduce debug-context aware helpers | Problem Details:
Debug-related fields and log-dumping are useful when debugfs is enabled.
Define them under CONFIG_DEBUG_FS and provide stubs when the config is
disabled so that the code that makes use of these needs not to be
complicated unnecessarily.
Members that are duplicated by this patch will be removed by the ... | ```diff
diff --git a/sound/soc/intel/avs/Makefile b/sound/soc/intel/avs/Makefile
index 919212825f21..a211a0b7b4a8 100644
--- a/sound/soc/intel/avs/Makefile
+++ b/sound/soc/intel/avs/Makefile
@@ -9,6 +9,10 @@ snd-soc-avs-objs += trace.o
# tell define_trace.h where to find the trace header
CFLAGS_trace.o := -I$(src)
... |
60f07e22a73d318cddaafa5ef41a10476807cc07 | Analyze and fix the following issue in the Linux kernel code: arm64:uprobe fix the uprobe SWBP_INSN in big-endian | Problem Details:
We use uprobe in aarch64_be, which we found the tracee task would exit
due to SIGILL when we enable the uprobe trace.
We can see the replace inst from uprobe is not correct in aarch big-endian.
As in Armv8-A, instruction fetches are always treated as little-endian,
we should treat the UPROBE_SWBP_INSN ... | ```diff
diff --git a/arch/arm64/include/asm/uprobes.h b/arch/arm64/include/asm/uprobes.h
index 315eef654e39..ba4bff5ca674 100644
--- a/arch/arm64/include/asm/uprobes.h
+++ b/arch/arm64/include/asm/uprobes.h
@@ -12,7 +12,7 @@
#define MAX_UINSN_BYTES AARCH64_INSN_SIZE
-#define UPROBE_SWBP_INSN BRK64_OPCODE_UPROBES
... |
5de2322d7b8ecba37152334ebaaddf687fd63a38 | Analyze and fix the following issue in the Linux kernel code: vfio/ccw: identify CCW data addresses as physical | Problem Details:
The CCW data address created by vfio-ccw is that of an IDAL
built by this code. Since this address is used by real hardware,
it should be a physical address rather than a virtual one.
Let's clarify it as such in the ORB.
Similarly, once the I/O has completed the memory for that IDAL
needs to be releas... | ```diff
diff --git a/drivers/s390/cio/vfio_ccw_cp.c b/drivers/s390/cio/vfio_ccw_cp.c
index 7b02e97f4b29..c0a09fa8991a 100644
--- a/drivers/s390/cio/vfio_ccw_cp.c
+++ b/drivers/s390/cio/vfio_ccw_cp.c
@@ -394,7 +394,7 @@ static void ccwchain_cda_free(struct ccwchain *chain, int idx)
if (ccw_is_tic(ccw))
return;
- ... |
21c7996917cb5c9d8669409b00d990b75d22a849 | Analyze and fix the following issue in the Linux kernel code: vfio/ccw: sort out physical vs virtual pointers usage | Problem Details:
The ORB's interrupt parameter field is stored unmodified into the
interruption code when an I/O interrupt occurs. As this reflects
a real device, let's store the physical address of the subchannel
struct so it can be used when processing an interrupt.
Note: this currently doesn't fix a real bug, since... | ```diff
diff --git a/drivers/s390/cio/vfio_ccw_fsm.c b/drivers/s390/cio/vfio_ccw_fsm.c
index a59c758869f8..0a5e8b4a6743 100644
--- a/drivers/s390/cio/vfio_ccw_fsm.c
+++ b/drivers/s390/cio/vfio_ccw_fsm.c
@@ -29,7 +29,7 @@ static int fsm_io_helper(struct vfio_ccw_private *private)
spin_lock_irqsave(sch->lock, flags);... |
81c95fbaebfa5990c3c786c8c3e87426a33106fe | Analyze and fix the following issue in the Linux kernel code: iommu/vt-d: Fix buggy QAT device mask | Problem Details:
Impacted QAT device IDs that need extra dtlb flush quirk is ranging
from 0x4940 to 0x4943. After bitwise AND device ID with 0xfffc the
result should be 0x4940 instead of 0x494c to identify these devices.
Fixes: e65a6897be5e ("iommu/vt-d: Add a fix for devices need extra dtlb flush")
Reported-by: Raghu... | ```diff
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 5287efe247b1..644ca49e8cf8 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -1402,7 +1402,7 @@ static void domain_update_iotlb(struct dmar_domain *domain)
* check because it applies only to the built-in Q... |
e661c4886965e6f48d9378d8608f1d7dd7401a41 | Analyze and fix the following issue in the Linux kernel code: ALSA: pcm: Handle XRUN at trigger START | Problem Details:
When the driver returns -EPIPE for indicating an XRUN already at PCM
trigger START, we should treat properly and set it to the XRUN state.
Otherwise the state is missing and the application would try to issue
trigger again without knowing that it's in an error state.
This is just for a theoretical bug... | ```diff
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index e3deec62b9a1..9c122e757efe 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -1424,9 +1424,15 @@ static int snd_pcm_pre_start(struct snd_pcm_substream *substream,
static int snd_pcm_do_start(struct snd_pcm_substream *subst... |
5c8cc93b06d1ff860327a273abf3ac006290d242 | Analyze and fix the following issue in the Linux kernel code: ALSA: pcm: Set missing stop_operating flag at undoing trigger start | Problem Details:
When a PCM trigger-start fails at snd_pcm_do_start(), PCM core tries
to undo the action at snd_pcm_undo_start() by issuing the trigger STOP
manually. At that point, we forgot to set the stop_operating flag,
hence the sync-stop won't be issued at the next prepare or other
calls.
This patch adds the mi... | ```diff
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index ba6e44d02faa..e3deec62b9a1 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -1432,8 +1432,10 @@ static int snd_pcm_do_start(struct snd_pcm_substream *substream,
static void snd_pcm_undo_start(struct snd_pcm_substream *sub... |
8b997b2bb2c53b76a6db6c195930e9ab8e4b0c79 | Analyze and fix the following issue in the Linux kernel code: xen/privcmd: Fix a possible warning in privcmd_ioctl_mmap_resource() | Problem Details:
As 'kdata.num' is user-controlled data, if user tries to allocate
memory larger than(>=) MAX_ORDER, then kcalloc() will fail, it
creates a stack trace and messes up dmesg with a warning.
Call trace:
-> privcmd_ioctl
--> privcmd_ioctl_mmap_resource
Add __GFP_NOWARN in order to avoid too large allocati... | ```diff
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
index fae50a24630b..1edf45ee9890 100644
--- a/drivers/xen/privcmd.c
+++ b/drivers/xen/privcmd.c
@@ -760,7 +760,7 @@ static long privcmd_ioctl_mmap_resource(struct file *file,
goto out;
}
- pfns = kcalloc(kdata.num, sizeof(*pfns), GFP_KERNEL);
+ p... |
00b5497d642bec3ceef85f3abe642d991a75ddf0 | Analyze and fix the following issue in the Linux kernel code: drm/simple-kms: Remove drm_gem_simple_display_pipe_prepare_fb() | Problem Details:
The helper drm_gem_simple_display_pipe_prepare_fb() is simple-KMS'
default implementation for prepare_fb. Remove the call from drivers
that set it explicitly. Then inline the helper into the only caller
within simple-kms helpers. No functional changes.
Simple-KMS drivers that implement the prepare_fb ... | ```diff
diff --git a/drivers/gpu/drm/drm_gem_atomic_helper.c b/drivers/gpu/drm/drm_gem_atomic_helper.c
index e42800718f51..5d4b9cd077f7 100644
--- a/drivers/gpu/drm/drm_gem_atomic_helper.c
+++ b/drivers/gpu/drm/drm_gem_atomic_helper.c
@@ -26,11 +26,8 @@
* call drm_gem_plane_helper_prepare_fb() from their implementati... |
7bef797d707f1744f71156b21d41e3b8c946631f | Analyze and fix the following issue in the Linux kernel code: vme: Fix error not catched in fake_init() | Problem Details:
In fake_init(), __root_device_register() is possible to fail but it's
ignored, which can cause unregistering vme_root fail when exit.
general protection fault,
probably for non-canonical address 0xdffffc000000008c
KASAN: null-ptr-deref in range [0x0000000000000460-0x0000000000000467]
RIP: 0010:roo... | ```diff
diff --git a/drivers/staging/vme_user/vme_fake.c b/drivers/staging/vme_user/vme_fake.c
index a9d3a7f5c440..6454ccf6e5b4 100644
--- a/drivers/staging/vme_user/vme_fake.c
+++ b/drivers/staging/vme_user/vme_fake.c
@@ -1070,6 +1070,8 @@ static int __init fake_init(void)
/* We need a fake parent device */
vme_... |
7e8e5e879729b238cd17dcc292d86c1e6cc83ecc | Analyze and fix the following issue in the Linux kernel code: perf arm64: Fix mksyscalltbl, don't lose syscalls due to sort -nu | Problem Details:
When using "sort -nu", arm64 syscalls were lost. That is, the io_setup
syscall (number 0) and all but one (typically ftruncate; 64) of the
syscalls that are defined symbolically (like "#define __NR_ftruncate
__NR3264_ftruncate") at the point where "sort" is applied.
This creation-of-syscalls.c-scheme... | ```diff
diff --git a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl
index 459469b7222c..a7ca48d1e37b 100755
--- a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl
+++ b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl
@@ -58,5 +58,5 @@ create_table()
$gcc -E -... |
20ed9fa4965875fdde5bfd65d838465e38d46b22 | Analyze and fix the following issue in the Linux kernel code: perf branch: Fix interpretation of branch records | Problem Details:
Commit 93315e46b000fc80 ("perf/core: Add speculation info to branch
entries") added a new field in between type and new_type. Perf has its
own copy of this struct so update it to match the kernel side.
This doesn't currently cause any issues because new_type is only used by
the Arm BRBE driver which i... | ```diff
diff --git a/tools/perf/util/branch.h b/tools/perf/util/branch.h
index d6017c9b1872..3ed792db1125 100644
--- a/tools/perf/util/branch.h
+++ b/tools/perf/util/branch.h
@@ -22,9 +22,10 @@ struct branch_flags {
u64 abort:1;
u64 cycles:16;
u64 type:4;
+ u64 spec:2;
u64 new_type:4;
u64 priv:3;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.