id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
7e27cb6ad4d85fc8bac2a2a896da62ef66b8598e | Analyze and fix the following issue in the Linux kernel code: cgroup/cpuset: Make cpuset_attach_task() skip subpartitions CPUs for top_cpuset | Problem Details:
It is found that attaching a task to the top_cpuset does not currently
ignore CPUs allocated to subpartitions in cpuset_attach_task(). So the
code is changed to fix that.
Signed-off-by: Waiman Long <longman@redhat.com>
Reviewed-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.o... | ```diff
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 166a45019f66..505d86b16642 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -2535,7 +2535,8 @@ static void cpuset_attach_task(struct cpuset *cs, struct task_struct *task)
if (cs != &top_cpuset)
guarantee_online_cpus(task,... |
eee87853794187f6adbe19533ed79c8b44b36a91 | Analyze and fix the following issue in the Linux kernel code: cgroup/cpuset: Add cpuset_can_fork() and cpuset_cancel_fork() methods | Problem Details:
In the case of CLONE_INTO_CGROUP, not all cpusets are ready to accept
new tasks. It is too late to check that in cpuset_fork(). So we need
to add the cpuset_can_fork() and cpuset_cancel_fork() methods to
pre-check it before we can allow attachment to a different cpuset.
We also need to set the attach_... | ```diff
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 2ccfae74acf9..166a45019f66 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -2453,6 +2453,20 @@ static int fmeter_getrate(struct fmeter *fmp)
static struct cpuset *cpuset_attach_old_cs;
+/*
+ * Check to see if a cpuset ca... |
42a11bf5c5436e91b040aeb04063be1710bb9f9c | Analyze and fix the following issue in the Linux kernel code: cgroup/cpuset: Make cpuset_fork() handle CLONE_INTO_CGROUP properly | Problem Details:
By default, the clone(2) syscall spawn a child process into the same
cgroup as its parent. With the use of the CLONE_INTO_CGROUP flag
introduced by commit ef2c41cf38a7 ("clone3: allow spawning processes
into cgroups"), the child will be spawned into a different cgroup which
is somewhat similar to writi... | ```diff
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index ff7eb8e2efdc..2ccfae74acf9 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -2515,16 +2515,33 @@ static void cpuset_cancel_attach(struct cgroup_taskset *tset)
}
/*
- * Protected by cpuset_rwsem. cpus_attach is used only b... |
ba9182a89626d5f83c2ee4594f55cb9c1e60f0e2 | Analyze and fix the following issue in the Linux kernel code: cgroup/cpuset: Wake up cpuset_attach_wq tasks in cpuset_cancel_attach() | Problem Details:
After a successful cpuset_can_attach() call which increments the
attach_in_progress flag, either cpuset_cancel_attach() or cpuset_attach()
will be called later. In cpuset_attach(), tasks in cpuset_attach_wq,
if present, will be woken up at the end. That is not the case in
cpuset_cancel_attach(). So mis... | ```diff
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index f310915d1257..ff7eb8e2efdc 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -2502,11 +2502,15 @@ out_unlock:
static void cpuset_cancel_attach(struct cgroup_taskset *tset)
{
struct cgroup_subsys_state *css;
+ struct cpuset ... |
2442b7473ad03671378d2d95651bd6bbe09a0943 | Analyze and fix the following issue in the Linux kernel code: dmaengine: idxd: process batch descriptor completion record faults | Problem Details:
Add event log processing for faulting of user batch descriptor completion
record.
When encountering an event log entry for a page fault on a completion
record, the driver is expected to do the following:
1. If the "first error in batch" bit in event log entry error info is
set, discard any previously ... | ```diff
diff --git a/drivers/dma/idxd/idxd.h b/drivers/dma/idxd/idxd.h
index 3963c83165a6..4c4baa80c731 100644
--- a/drivers/dma/idxd/idxd.h
+++ b/drivers/dma/idxd/idxd.h
@@ -265,6 +265,8 @@ struct idxd_driver_data {
int compl_size;
int align;
int evl_cr_off;
+ int cr_status_off;
+ int cr_result_off;
};
struc... |
f8435befd81dd85b7b610598551fadf675849bc1 | Analyze and fix the following issue in the Linux kernel code: dmaengine: at_xdmac: do not enable all cyclic channels | Problem Details:
Do not global enable all the cyclic channels in at_xdmac_resume(). Instead
save the global status in at_xdmac_suspend() and re-enable the cyclic
channel only if it was active before suspend.
Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
Signed-off-by... | ```diff
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index 34c004a4b23c..96f1b69f8a75 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -246,6 +246,7 @@ struct at_xdmac {
int irq;
struct clk *clk;
u32 save_gim;
+ u32 save_gs;
struct dma_pool *at_xdmac_desc_pool;
const... |
7c5eb63d16b01c202aaa95f374ae15a807745a73 | Analyze and fix the following issue in the Linux kernel code: dmaengine: at_xdmac: restore the content of grws register | Problem Details:
In case the system suspends to a deep sleep state where power to DMA
controller is cut-off we need to restore the content of GRWS register.
This is a write only register and writing bit X tells the controller
to suspend read and write requests for channel X. Thus set GRWS before
restoring the content o... | ```diff
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index fa1e2e0da02f..34c004a4b23c 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -2211,6 +2211,15 @@ static int __maybe_unused atmel_xdmac_resume(struct device *dev)
return ret;
at_xdmac_device_resume_internal(atchan);
... |
44fe8440bda545b5d167329df88c47609a645168 | Analyze and fix the following issue in the Linux kernel code: dmaengine: at_xdmac: do not resume channels paused by consumers | Problem Details:
In case there are DMA channels not paused by consumers in suspend
process (valid on AT91 SoCs for serial driver when no_console_suspend) the
driver pauses them (using at_xdmac_device_pause() which is also the same
function called by dmaengine_pause()) and then in the resume process the
driver resumes t... | ```diff
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index af3b494f9ba9..fa1e2e0da02f 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -187,6 +187,7 @@
enum atc_status {
AT_XDMAC_CHAN_IS_CYCLIC = 0,
AT_XDMAC_CHAN_IS_PAUSED,
+ AT_XDMAC_CHAN_IS_PAUSED_INTERNAL,
};
struct at_xdm... |
e53957e1ec5196671e49a48f90a5c9555153189a | Analyze and fix the following issue in the Linux kernel code: dmaengine: at_xdmac: fix imbalanced runtime PM reference counter | Problem Details:
In case there are channels not paused during suspend (which on AT91 case
is valid for serial driver when no_console_suspend boot argument is used)
the at_xdmac_runtime_suspend_descriptors() was called more than
one time due to at_xdmac_off(). To fix this add a new argument to
at_xdmac_off() to specify ... | ```diff
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index f654ecaafb90..af3b494f9ba9 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -412,7 +412,7 @@ static bool at_xdmac_chan_is_enabled(struct at_xdmac_chan *atchan)
return ret;
}
-static void at_xdmac_off(struct at_xdmac *atxd... |
2de5ddb5e68c94b781b3789bca1ce52000d7d0e0 | Analyze and fix the following issue in the Linux kernel code: dmaengine: at_xdmac: disable/enable clock directly on suspend/resume | Problem Details:
Runtime PM APIs for at_xdmac just plays with clk_enable()/clk_disable()
letting aside the clk_prepare()/clk_unprepare() that needs to be
executed as the clock is also prepared on probe. Thus instead of using
runtime PM force suspend/resume APIs use
clk_disable_unprepare() + pm_runtime_put_noidle() on s... | ```diff
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index 1f0fab180f8f..f654ecaafb90 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -2130,7 +2130,11 @@ static int __maybe_unused atmel_xdmac_suspend(struct device *dev)
atxdmac->save_gim = at_xdmac_read(atxdmac, AT_XDMAC_GIM);
... |
bcab1adeaad4b39a1e04cb98979a367d08253f03 | Analyze and fix the following issue in the Linux kernel code: selinux: fix Makefile dependencies of flask.h | Problem Details:
Make the flask.h target depend on the genheaders binary instead of
classmap.h to ensure that it is rebuilt if any of the dependencies of
genheaders are changed.
Notably this fixes flask.h not being rebuilt when
initial_sid_to_string.h is modified.
Fixes: 8753f6bec352 ("selinux: generate flask headers... | ```diff
diff --git a/security/selinux/Makefile b/security/selinux/Makefile
index 776162444882..103c2776478a 100644
--- a/security/selinux/Makefile
+++ b/security/selinux/Makefile
@@ -23,8 +23,8 @@ ccflags-y := -I$(srctree)/security/selinux -I$(srctree)/security/selinux/include
$(addprefix $(obj)/,$(selinux-y)): $(obj)... |
57dcd64c7e036299ef526b400a8d12b8a2352f26 | Analyze and fix the following issue in the Linux kernel code: cgroup,freezer: hold cpu_hotplug_lock before freezer_mutex | Problem Details:
syzbot is reporting circular locking dependency between cpu_hotplug_lock
and freezer_mutex, for commit f5d39b020809 ("freezer,sched: Rewrite core
freezer logic") replaced atomic_inc() in freezer_apply_state() with
static_branch_inc() which holds cpu_hotplug_lock.
cpu_hotplug_lock => cgroup_threadgroup... | ```diff
diff --git a/kernel/cgroup/legacy_freezer.c b/kernel/cgroup/legacy_freezer.c
index 1b6b21851e9d..936473203a6b 100644
--- a/kernel/cgroup/legacy_freezer.c
+++ b/kernel/cgroup/legacy_freezer.c
@@ -22,6 +22,7 @@
#include <linux/freezer.h>
#include <linux/seq_file.h>
#include <linux/mutex.h>
+#include <linux/cpu... |
10fd5f70c397782a97f411f25bfb312ea92b55bc | Analyze and fix the following issue in the Linux kernel code: bpf: Handle NULL in bpf_local_storage_free. | Problem Details:
During OOM bpf_local_storage_alloc() may fail to allocate 'storage' and
call to bpf_local_storage_free() with NULL pointer will cause a crash like:
[ 271718.917646] BUG: kernel NULL pointer dereference, address: 00000000000000a0
[ 271719.019620] RIP: 0010:call_rcu+0x2d/0x240
[ 271719.216274] bpf_local... | ```diff
diff --git a/kernel/bpf/bpf_local_storage.c b/kernel/bpf/bpf_local_storage.c
index dab2ff4c99d9..47d9948d768f 100644
--- a/kernel/bpf/bpf_local_storage.c
+++ b/kernel/bpf/bpf_local_storage.c
@@ -157,6 +157,9 @@ static void bpf_local_storage_free(struct bpf_local_storage *local_storage,
struct bpf_local_... |
970b17dfe264a9085ba4e593730ecfd496b950ab | Analyze and fix the following issue in the Linux kernel code: dmaengine: dw-edma: Fix to enable to issue dma request on DMA processing | Problem Details:
The issue_pending request is ignored while driver is processing a DMA
request. Fix to issue the pending requests on any dma channel status.
Fixes: e63d79d1ffcd ("dmaengine: Add Synopsys eDMA IP core driver")
Signed-off-by: Shunsuke Mie <mie@igel.co.jp>
Link: https://lore.kernel.org/r/20230411101758.43... | ```diff
diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c
index 26a395d02f5d..7d2b73ef0872 100644
--- a/drivers/dma/dw-edma/dw-edma-core.c
+++ b/drivers/dma/dw-edma/dw-edma-core.c
@@ -308,9 +308,12 @@ static void dw_edma_device_issue_pending(struct dma_chan *dchan)
struct dw_edma_ch... |
a251994a441ee0a69ba7062c8cd2d08ead3db379 | Analyze and fix the following issue in the Linux kernel code: dmaengine: dw-edma: Fix to change for continuous transfer | Problem Details:
The dw-edma driver stops after processing a DMA request even if a request
remains in the issued queue, which is not the expected behavior. The DMA
engine API requires continuous processing.
Add a trigger to start after one processing finished if there are requests
remain.
Fixes: e63d79d1ffcd ("dmaeng... | ```diff
diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c
index 1906a836f0aa..26a395d02f5d 100644
--- a/drivers/dma/dw-edma/dw-edma-core.c
+++ b/drivers/dma/dw-edma/dw-edma-core.c
@@ -181,7 +181,7 @@ static void vchan_free_desc(struct virt_dma_desc *vdesc)
dw_edma_free_desc(vd2dw_ed... |
91d6a468e335571f1e67e046050dea9af5fa4ebe | Analyze and fix the following issue in the Linux kernel code: dma: gpi: remove spurious unlock in gpi_ch_init | Problem Details:
gpi_ch_init() doesn't lock the ctrl_lock mutex, so there is no need to
unlock it too. Instead the mutex is handled by the function
gpi_alloc_chan_resources(), which properly locks and unlocks the mutex.
=====================================
WARNING: bad unlock balance detected!
6.3.0-rc5-00253-g997925... | ```diff
diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c
index 59a36cbf9b5f..932628b319c8 100644
--- a/drivers/dma/qcom/gpi.c
+++ b/drivers/dma/qcom/gpi.c
@@ -1966,7 +1966,6 @@ error_alloc_ev_ring:
error_config_int:
gpi_free_ring(&gpii->ev_ring, gpii);
exit_gpi_init:
- mutex_unlock(&gpii->ctrl_lock);
... |
50f9a76ef127367847cf62999c79304e48018cfa | Analyze and fix the following issue in the Linux kernel code: iov_iter: Mark copy_compat_iovec_from_user() noinline | Problem Details:
After commit 6376ce56feb6 ("iov_iter: import single vector iovecs as
ITER_UBUF"), GCC does an inter-procedural compiler optimization which
moves the user_access_begin() out of copy_compat_iovec_from_user() and
into its callers:
lib/iov_iter.o: warning: objtool: .altinstr_replacement+0x0: redundant U... | ```diff
diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index 3e6c9bcfa612..86a066aa9bcc 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -1702,7 +1702,7 @@ const void *dup_iter(struct iov_iter *new, struct iov_iter *old, gfp_t flags)
}
EXPORT_SYMBOL(dup_iter);
-static int copy_compat_iovec_from_user(struct iovec *... |
701608bd030a888f654862295a49c5d0f42f864c | Analyze and fix the following issue in the Linux kernel code: rust: sync: reduce stack usage of `UniqueArc::try_new_uninit` | Problem Details:
`UniqueArc::try_new_uninit` calls `Arc::try_new(MaybeUninit::uninit())`.
This results in the uninitialized memory being placed on the stack,
which may be arbitrarily large due to the generic `T` and thus could
cause a stack overflow for large types.
Change the implementation to use the pin-init API wh... | ```diff
diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs
index 821bd067151c..2d7606135ef6 100644
--- a/rust/kernel/lib.rs
+++ b/rust/kernel/lib.rs
@@ -28,7 +28,6 @@
#[cfg(not(CONFIG_RUST))]
compile_error!("Missing kernel configuration for conditional compilation");
-#[allow(unused_extern_crates)]
// Allow proc... |
57c0e1362fdd57d0cea7ab1e583b58abf4bd8c2d | Analyze and fix the following issue in the Linux kernel code: phy: ti: j721e-wiz: Fix unreachable code in wiz_mode_select() | Problem Details:
In the wiz_mode_select() function, the configuration performed for
PHY_TYPE_USXGMII is unreachable. Fix it.
Fixes: b64a85fb8f53 ("phy: ti: phy-j721e-wiz.c: Add usxgmii support in wiz driver")
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Link: h... | ```diff
diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c
index d2fd2143450a..d59918457799 100644
--- a/drivers/phy/ti/phy-j721e-wiz.c
+++ b/drivers/phy/ti/phy-j721e-wiz.c
@@ -443,18 +443,17 @@ static int wiz_mode_select(struct wiz *wiz)
int i;
for (i = 0; i < num_lanes; i++) {
- if (w... |
39a594dc0b4ac949edf221db33c7061c45e2c90b | Analyze and fix the following issue in the Linux kernel code: ASoC: cs35l56: Remove quick-cancelling of dsp_work() | Problem Details:
Delete the 'removing' flag and don't kick init_completion to make a
quick cancel of dsp_work(). Just let it timeout on the wait for the
completion.
Simplify the code to standard cancelling or flushing of the work.
This avoids introducing corner cases from a layer of custom signalling.
It also avoids p... | ```diff
diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index 74e8de2f81f5..eb85c27ab087 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -875,7 +875,7 @@ static void cs35l56_dsp_work(struct work_struct *work)
goto complete;
}
- if (!cs35l56->init_done || cs35l56->... |
7816e3407110d887726687740aa18c9ce8eeb0d2 | Analyze and fix the following issue in the Linux kernel code: ASoC: cs35l56: Skip first init_completion wait in dsp_work if init_done | Problem Details:
At the start of dsp_work() only wait for init_completion if !init_done.
This allows system suspend to re-queue dsp_work() without having to
do a dummy complete() of init_completion.
A dummy completion in system suspend would have to be conditional on
init_done. But that would create a possible race co... | ```diff
diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index 71565e0fccd8..14cdbf5fd523 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -866,7 +866,8 @@ static void cs35l56_dsp_work(struct work_struct *work)
unsigned int val;
int ret = 0;
- if (!wait_for_completio... |
0bcc4025550403ae28d2984bddacafbca0a2f112 | Analyze and fix the following issue in the Linux kernel code: netfs: Fix netfs_extract_iter_to_sg() for ITER_UBUF/IOVEC | Problem Details:
Fix netfs_extract_iter_to_sg() for ITER_UBUF and ITER_IOVEC to set the
size of the page to the part of the page extracted, not the remaining
amount of data in the extracted page array at that point.
This doesn't yet affect anything as cifs, the only current user, only
passes in non-user-backed iterato... | ```diff
diff --git a/fs/netfs/iterator.c b/fs/netfs/iterator.c
index e9a45dea748a..8a4c86687429 100644
--- a/fs/netfs/iterator.c
+++ b/fs/netfs/iterator.c
@@ -139,7 +139,7 @@ static ssize_t netfs_extract_user_to_sg(struct iov_iter *iter,
size_t seg = min_t(size_t, PAGE_SIZE - off, len);
*pages++ = NULL;
- s... |
e024854048e733391b31fe5a398704b31b9af803 | Analyze and fix the following issue in the Linux kernel code: phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port | Problem Details:
The tegra_xusb_port_unregister should be called when usb2_port
and ulpi_port map fails in tegra_xusb_add_usb2_port() or in
tegra_xusb_add_ulpi_port(), fix it.
Fixes: 53d2a715c240 ("phy: Add Tegra XUSB pad controller support")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Acked-by: Thierry Redi... | ```diff
diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index ec335668563d..b55d4e9f42b5 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -805,6 +805,7 @@ static int tegra_xusb_add_usb2_port(struct tegra_xusb_padctl *padctl,
usb2->base.lane = usb2->base.ops->map(&usb2->base);
... |
a50abe2e6d4906c4d83c6da155dc1fc4624e1280 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: phy: ti,phy-j721e-wiz: document clock-output-names | Problem Details:
Document the clock-output-names property of clock children, even though
the nodes are actually deprecated, to fix dtbs_check warnings like:
k3-j7200-common-proc-board.dtb: wiz@5060000: refclk-dig: 'clock-output-names' does not match any of the regexes: 'pinctrl-[0-9]+'
Signed-off-by: Krzysztof Kozl... | ```diff
diff --git a/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml b/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml
index 051cf31c5eea..9ea30eaba314 100644
--- a/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml
+++ b/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml
@@ -8... |
67a00d29c360f4d7b2ca7b1ccf24b145f60d14b8 | Analyze and fix the following issue in the Linux kernel code: RDMA/rxe: Fix incorrect TASKLET_STATE_SCHED check in rxe_task.c | Problem Details:
In a previous patch TASKLET_STATE_SCHED was used as a mask but it is a bit
position instead. Add the missing shift.
Link: https://lore.kernel.org/r/20230329193308.7489-1-rpearsonhpe@gmail.com
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/linux-rdma/8a054b78-6d50-4bc6-8d8... | ```diff
diff --git a/drivers/infiniband/sw/rxe/rxe_task.c b/drivers/infiniband/sw/rxe/rxe_task.c
index fea9a517c8d9..fb9a6bc8e620 100644
--- a/drivers/infiniband/sw/rxe/rxe_task.c
+++ b/drivers/infiniband/sw/rxe/rxe_task.c
@@ -21,7 +21,7 @@ static bool __reserve_if_idle(struct rxe_task *task)
{
WARN_ON(rxe_read(task... |
5af507bef93c09a94fb8f058213b489178f4cbe5 | Analyze and fix the following issue in the Linux kernel code: x86/ioapic: Don't return 0 from arch_dynirq_lower_bound() | Problem Details:
arch_dynirq_lower_bound() is invoked by the core interrupt code to
retrieve the lowest possible Linux interrupt number for dynamically
allocated interrupts like MSI.
The x86 implementation uses this to exclude the IO/APIC GSI space.
This works correctly as long as there is an IO/APIC registered, but
r... | ```diff
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 1f83b052bb74..f980b38b0227 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2477,17 +2477,21 @@ static int io_apic_get_redir_entries(int ioapic)
unsigned int arch_dynirq_lower_bound(unsigned... |
a4ee40b6ac281125c3b7aa3e42401b271c50c7bc | Analyze and fix the following issue in the Linux kernel code: selftests: hid: import hid-tools hid-sony and hid-playstation tests | Problem Details:
These tests have been developed in the hid-tools[0] tree for a while.
Now that we have a proper selftests/hid kernel entry and that the tests
are more reliable, it is time to directly include those in the kernel
tree.
The code is taken from [1] to fix a change in v6.3.
[0] https://gitlab.freedesktop... | ```diff
diff --git a/tools/testing/selftests/hid/Makefile b/tools/testing/selftests/hid/Makefile
index 3ca696c44aab..dcea4f1e9369 100644
--- a/tools/testing/selftests/hid/Makefile
+++ b/tools/testing/selftests/hid/Makefile
@@ -12,6 +12,7 @@ TEST_PROGS += hid-ite.sh
TEST_PROGS += hid-keyboard.sh
TEST_PROGS += hid-mous... |
9b8e17813aeccc29c2f9f2e6e68997a6eac2d26d | Analyze and fix the following issue in the Linux kernel code: sched/core: Make sched_dynamic_mutex static | Problem Details:
The sched_dynamic_mutex is only used within the file. Make it static.
Fixes: e3ff7c609f39 ("livepatch,sched: Add livepatch task switching to cond_resched()")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peter... | ```diff
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index b9616f153946..d861db8aa7ab 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -8674,7 +8674,7 @@ int sched_dynamic_mode(const char *str)
#error "Unsupported PREEMPT_DYNAMIC mechanism"
#endif
-DEFINE_MUTEX(sched_dynamic_mutex);
+static D... |
91dcf1e8068e9a8823e419a7a34ff4341275fb70 | Analyze and fix the following issue in the Linux kernel code: sched/fair: Fix imbalance overflow | Problem Details:
When local group is fully busy but its average load is above system load,
computing the imbalance will overflow and local group is not the best
target for pulling this load.
Fixes: 0b0695f2b34a ("sched/fair: Rework load_balance()")
Reported-by: Tingjia Cao <tjcao980311@gmail.com>
Signed-off-by: Vincen... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 6986ea31c984..5f6587d94c1d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -10238,6 +10238,16 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s
sds->avg_load = (sds->total_load * SCHED_CAPACITY_SCAL... |
ed4da0d3de1e1781f8fbdc9cf1028b39cc658c7f | Analyze and fix the following issue in the Linux kernel code: tools headers: Remove s390 ptrace.h in check-headers.sh | Problem Details:
After commit 1f265d2aea0dff1f ("selftests/bpf: Remove not used headers"),
tools/arch/s390/include/uapi/asm/ptrace.h has been removed, so remove
it in check-headers.sh too, otherwise we can see the following build
warning:
diff: tools/arch/s390/include/uapi/asm/ptrace.h: No such file or directory
Fi... | ```diff
diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index eacca9a874e2..e4a8b5348678 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -52,7 +52,6 @@ arch/x86/include/uapi/asm/vmx.h
arch/powerpc/include/uapi/asm/kvm.h
arch/s390/include/uapi/asm/kvm.h
arch/s390/i... |
57f14b5ae1a97537f2abd2828ee7212cada7036e | Analyze and fix the following issue in the Linux kernel code: perf pmu: zfree() expects a pointer to a pointer to zero it after freeing its contents | Problem Details:
An audit showed just this one problem with zfree(), fix it.
Fixes: 9fbc61f832ebf432 ("perf pmu: Add support for PMU capabilities")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 01533302d5f9..561e2616861f 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -1852,7 +1852,7 @@ static int perf_pmu__new_caps(struct list_head *list, char *name, char *value)
return 0;
free_name:
- zfree(caps->name);
+ zfree(&... |
11ff9bcd7dfeefa6a9a9fcd4c7775b8066c46a31 | Analyze and fix the following issue in the Linux kernel code: perf metricgroups: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
This file already used zfree() in other places, so this just plugs some
leftovers.
Signed-off-by: Arnaldo Carvalho de Melo <... | ```diff
diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
index 5783f4c2d1ef..4b9a16291b96 100644
--- a/tools/perf/util/metricgroup.c
+++ b/tools/perf/util/metricgroup.c
@@ -90,9 +90,9 @@ static void metric_event_delete(struct rblist *rblist __maybe_unused,
struct metric_expr *expr, *tmp;
... |
2e384400549be734795072b1d904880efc0db2f9 | Analyze and fix the following issue in the Linux kernel code: perf arm-spe: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c
index d4c234076541..ef497a29e814 100644
--- a/tools/perf/arch/arm64/util/arm-spe.c
+++ b/tools/perf/arch/arm64/util/arm-spe.c
@@ -479,7 +479,7 @@ static void arm_spe_recording_free(struct auxtrace_record *itr)
struct arm_... |
9ccbc21166ce149c5f7429cad22f9073d3fab0b1 | Analyze and fix the following issue in the Linux kernel code: perf tests api-io: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/tests/api-io.c b/tools/perf/tests/api-io.c
index 6aea84ca6673..0ba3d5ccebcf 100644
--- a/tools/perf/tests/api-io.c
+++ b/tools/perf/tests/api-io.c
@@ -12,6 +12,7 @@
#include "tests.h"
#include <api/io.h>
#include <linux/kernel.h>
+#include <linux/zalloc.h>
#define TEMPL "/tmp/perf-... |
97d0dd1e283a9a11ede495928c9c2a148b47cef4 | Analyze and fix the following issue in the Linux kernel code: perf bench inject-buildid: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/bench/inject-buildid.c b/tools/perf/bench/inject-buildid.c
index 4561bda0ce6a..49331743c743 100644
--- a/tools/perf/bench/inject-buildid.c
+++ b/tools/perf/bench/inject-buildid.c
@@ -12,6 +12,7 @@
#include <linux/time64.h>
#include <linux/list.h>
#include <linux/err.h>
+#include <linu... |
e413f9f13f6a8a591af0ac39ef50af02b42a0df8 | Analyze and fix the following issue in the Linux kernel code: perf genelf: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/util/genelf_debug.c b/tools/perf/util/genelf_debug.c
index 8786c366566e..aa5dcc56b2ac 100644
--- a/tools/perf/util/genelf_debug.c
+++ b/tools/perf/util/genelf_debug.c
@@ -11,6 +11,7 @@
* @author Philippe Elie
*/
#include <linux/compiler.h>
+#include <linux/zalloc.h>
#include <sys/t... |
f0e7c06f2be9673d008e866bff1a97e1823637e9 | Analyze and fix the following issue in the Linux kernel code: MIPS: loongson2ef: Add missing break in cs5536_isa | Problem Details:
Fixes build error:
arch/mips/loongson2ef/common/cs5536/cs5536_isa.c:217:2: error:
unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
default:
^
arch/mips/loongson2ef/common/cs5536/cs5536_isa.c:217:2:
note: insert 'break;' to avoid fall-through
defau... | ```diff
diff --git a/arch/mips/loongson2ef/common/cs5536/cs5536_isa.c b/arch/mips/loongson2ef/common/cs5536/cs5536_isa.c
index 5ad38f86ee62..d60dd9992377 100644
--- a/arch/mips/loongson2ef/common/cs5536/cs5536_isa.c
+++ b/arch/mips/loongson2ef/common/cs5536/cs5536_isa.c
@@ -213,7 +213,7 @@ void pci_isa_write_reg(int re... |
2bfc8134f95852bd8b0190641c2d2b059cb1c8cc | Analyze and fix the following issue in the Linux kernel code: perf evlist: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index df6af38ca22e..2260e27adf44 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -2325,7 +2325,7 @@ int evlist__parse_event_enable_time(struct evlist *evlist, struct record_opts *o
close_timerfd:
close(eet->timerfd);
fr... |
c77ceb2eb03eefd92e6b84a509ecec1db8d97858 | Analyze and fix the following issue in the Linux kernel code: perf annotate: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Also include the missing linux/zalloc.h header directive.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 55f2e3a7577e..e2693a1c28d5 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -38,6 +38,7 @@
#include <linux/bitops.h>
#include <linux/kernel.h>
#include <linux/string.h>
+#include <linux/zalloc.h>
#include <... |
ee1809ed7bc456a72dc8410b475b73021a3a68d5 | Analyze and fix the following issue in the Linux kernel code: MIPS: fw: Allow firmware to pass a empty env | Problem Details:
fw_getenv will use env entry to determine style of env,
however it is legal for firmware to just pass a empty list.
Check if first entry exist before running strchr to avoid
null pointer dereference.
Cc: stable@vger.kernel.org
Link: https://github.com/clbr/n64bootloader/issues/5
Signed-off-by: Jiaxun... | ```diff
diff --git a/arch/mips/fw/lib/cmdline.c b/arch/mips/fw/lib/cmdline.c
index f24cbb4a39b5..892765b742bb 100644
--- a/arch/mips/fw/lib/cmdline.c
+++ b/arch/mips/fw/lib/cmdline.c
@@ -53,7 +53,7 @@ char *fw_getenv(char *envname)
{
char *result = NULL;
- if (_fw_envp != NULL) {
+ if (_fw_envp != NULL && fw_envp(... |
25feb605fe3b2674142d084379e0737a99945aba | Analyze and fix the following issue in the Linux kernel code: perf parse-events: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Also remove one NULL test before free(), as it accepts a NULL arg and we
get one line shaved not doing it explicitely.
Signe... | ```diff
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index f341995cb04e..d71019dcd614 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -2020,7 +2020,7 @@ int perf_pmu__test_parse_init(void)
err_free:
for (j = 0, tmp = list; j < i; j++, tmp++)
- fr... |
a77f8184a07cbe81cdee30582640ed1b412705fc | Analyze and fix the following issue in the Linux kernel code: perf expr: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Also remove one NULL test before free(), as it accepts a NULL arg and we
get one line shaved not doing it explicitely.
Signe... | ```diff
diff --git a/tools/perf/util/expr.c b/tools/perf/util/expr.c
index bb6ddad7e021..f4e52919324e 100644
--- a/tools/perf/util/expr.c
+++ b/tools/perf/util/expr.c
@@ -86,8 +86,8 @@ void ids__free(struct hashmap *ids)
return;
hashmap__for_each_entry(ids, cur, bkt) {
- free((void *)cur->pkey);
- free((void *... |
cdf13c0918c9b1b233d6db690fc4c06afbc29e57 | Analyze and fix the following issue in the Linux kernel code: perf evsel: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Also remove one NULL test before free(), as it accepts a NULL arg and we
get one line shaved not doing it explicitely.
Signe... | ```diff
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index fe3ce765a4f3..a85a987128aa 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2917,8 +2917,7 @@ bool evsel__fallback(struct evsel *evsel, int err, char *msg, size_t msgsize)
if (asprintf(&new_name, "%s%su", name, sep) < ... |
efe98a7a39777ce266142159f303fb52c3b817c0 | Analyze and fix the following issue in the Linux kernel code: perf pmu: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 91cccfb3c515..01533302d5f9 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -972,8 +972,7 @@ static struct perf_pmu *pmu_lookup(int dirfd, const char *lookup_name)
return pmu;
err:
- if (pmu->name)
- free(pmu->name);
+ zfree... |
9fbde6c8002bce61acd0c2187cc41c43a7c99968 | Analyze and fix the following issue in the Linux kernel code: perf env: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c
index 5b8cf6a421a4..ebf2e801c275 100644
--- a/tools/perf/util/env.c
+++ b/tools/perf/util/env.c
@@ -149,7 +149,7 @@ static void perf_env__purge_bpf(struct perf_env *env)
node = rb_entry(next, struct bpf_prog_info_node, rb_node);
next = rb_next(&no... |
313b4c1ccdb273f6733e8c44948f8c7141f592a4 | Analyze and fix the following issue in the Linux kernel code: perf x86 iostat: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/arch/x86/util/iostat.c b/tools/perf/arch/x86/util/iostat.c
index 7eb0a7b00b95..df7b5dfcc26a 100644
--- a/tools/perf/arch/x86/util/iostat.c
+++ b/tools/perf/arch/x86/util/iostat.c
@@ -10,6 +10,7 @@
#include <api/fs/fs.h>
#include <linux/kernel.h>
#include <linux/err.h>
+#include <linux... |
d729163d0641d8b4c50fdca1b2b9d5d24d9d376d | Analyze and fix the following issue in the Linux kernel code: perf symbol: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index c55981116f68..35724f6a84fa 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -396,7 +396,7 @@ static bool get_ifunc_name(Elf *elf, struct dso *dso, GElf_Ehdr *ehdr,
static void exit_rel(struct rel_inf... |
b20c63084eb2c591006109aefbdeb3cad7a57d23 | Analyze and fix the following issue in the Linux kernel code: perf list: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index 29f09cefed88..1f5dbd5f0ba4 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -127,7 +127,7 @@ static void default_print_event(void *ps, const char *pmu_name, const char *topi
if (strcmp(print_state->last_topic, to... |
190de75481439205f3a9362bd0511fd48ad1a718 | Analyze and fix the following issue in the Linux kernel code: perf c2c: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 6c12f0865860..08455e26b606 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -165,8 +165,8 @@ static void *c2c_he_zalloc(size_t size)
return &c2c_he->he;
out_free:
- free(c2c_he->nodeset);
- free(c2c_he->cpuset);
+... |
9997d5dd177c52017fa0541bf236a4232c8148e6 | Analyze and fix the following issue in the Linux kernel code: perf trace: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 72ef0bebb06b..8ee3a45c3c54 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2288,7 +2288,7 @@ static void syscall__exit(struct syscall *sc)
if (!sc)
return;
- free(sc->arg_fmt);
+ zfree(&sc->arg_fmt);
... |
789eae7f203edc1301d7122ad9b3046e7c56937c | Analyze and fix the following issue in the Linux kernel code: perf daemon: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/builtin-daemon.c b/tools/perf/builtin-daemon.c
index 7036ec92d47d..34cbe3e959aa 100644
--- a/tools/perf/builtin-daemon.c
+++ b/tools/perf/builtin-daemon.c
@@ -193,7 +193,7 @@ static int session_config(struct daemon *daemon, const char *var, const char *va
if (!same) {
if (sessio... |
49e5d16b6fc003407a33a9961b4bcbb970bd1c76 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: vgic: Don't acquire its_lock before config_lock | Problem Details:
commit f00327731131 ("KVM: arm64: Use config_lock to protect vgic
state") was meant to rectify a longstanding lock ordering issue in KVM
where the kvm->lock is taken while holding vcpu->mutex. As it so
happens, the aforementioned commit introduced yet another locking issue
by acquiring the its_lock bef... | ```diff
diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c
index 7713cd06104e..750e51e3779a 100644
--- a/arch/arm64/kvm/vgic/vgic-its.c
+++ b/arch/arm64/kvm/vgic/vgic-its.c
@@ -1958,6 +1958,16 @@ static int vgic_its_create(struct kvm_device *dev, u32 type)
mutex_init(&its->its_lock);
mutex... |
79b40a1b182bcca381bb59d0219e1dd681a64981 | Analyze and fix the following issue in the Linux kernel code: perf inject: Use zfree() to reduce chances of use after free | Problem Details:
Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | ```diff
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index fd2b38458a5d..76723ac314b6 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -1311,10 +1311,10 @@ static void guest_session__exit(struct guest_session *gs)
if (gs->tmp_fd >= 0)
close(gs->tmp_fd);
u... |
6d2555cde2918409b0331560e66f84a0ad4849c6 | Analyze and fix the following issue in the Linux kernel code: ipmi: fix SSIF not responding under certain cond. | Problem Details:
The ipmi communication is not restored after a specific version of BMC is
upgraded on our server.
The ipmi driver does not respond after printing the following log:
ipmi_ssif: Invalid response getting flags: 1c 1
I found that after entering this branch, ssif_info->ssif_state always
holds SSIF_GET... | ```diff
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index e4f6ecc12ed7..0eca46eea35c 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -786,9 +786,9 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
} else if (data[0] != (IPMI_NETF... |
c4a413e56d16a2ae84e6d8992f215c4dcc7fac20 | Analyze and fix the following issue in the Linux kernel code: regulator: stm32-pwr: fix of_iomap leak | Problem Details:
Smatch reports:
drivers/regulator/stm32-pwr.c:166 stm32_pwr_regulator_probe() warn:
'base' from of_iomap() not released on lines: 151,166.
In stm32_pwr_regulator_probe(), base is not released
when devm_kzalloc() fails to allocate memory or
devm_regulator_register() fails to register a new regulator de... | ```diff
diff --git a/drivers/regulator/stm32-pwr.c b/drivers/regulator/stm32-pwr.c
index 2803a199826f..68aa9d92953d 100644
--- a/drivers/regulator/stm32-pwr.c
+++ b/drivers/regulator/stm32-pwr.c
@@ -129,17 +129,16 @@ static const struct regulator_desc stm32_pwr_desc[] = {
static int stm32_pwr_regulator_probe(struct ... |
d93ee84e3eb5d1afc081e57ca37f1411a01f2c94 | Analyze and fix the following issue in the Linux kernel code: ASoC: tas5720: add missing unwind goto in tas5720_codec_probe | Problem Details:
Smatch complains that missing unwind goto in tas5720_codec_probe.
When tas5720 has an invalid devtype, it is expected to invoke
regulator_bulk_disable to handle the failure. But the default
option return an error code directly. Fix it by reusing the
probe_fail label.
Signed-off-by: Ying Liu <lyre@hus... | ```diff
diff --git a/sound/soc/codecs/tas5720.c b/sound/soc/codecs/tas5720.c
index de6d01c8fdd3..4d27b60bd804 100644
--- a/sound/soc/codecs/tas5720.c
+++ b/sound/soc/codecs/tas5720.c
@@ -339,7 +339,8 @@ static int tas5720_codec_probe(struct snd_soc_component *component)
break;
default:
dev_err(component->dev, "... |
ef0128afa1655f8d024dc5058fbfa0c6deecf117 | Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: Intel: mtl: fix page fault in dspless mode when DSP is disabled | Problem Details:
The patch to make DSPless mode work even if the DSP is
disabled in BIOS missed to touch the MTL code to add
the needed checks.
If the DSP is disabled this can lead to page fault due to not
accesible registers.
Fixes: 9fc6786f549c ("ASoC: SOF: Intel: hda: make DSPless mode work with DSP disabled in BIO... | ```diff
diff --git a/sound/soc/sof/intel/mtl.c b/sound/soc/sof/intel/mtl.c
index 882ce5536ab6..9f969e07fc27 100644
--- a/sound/soc/sof/intel/mtl.c
+++ b/sound/soc/sof/intel/mtl.c
@@ -60,6 +60,9 @@ static bool mtl_dsp_check_ipc_irq(struct snd_sof_dev *sdev)
u32 irq_status;
u32 hfintipptr;
+ if (sdev->dspless_mode_... |
67572c8dc64412880b81d4bbc2f354dd5eddaa7d | Analyze and fix the following issue in the Linux kernel code: soundwire: intel_auxdevice: improve pm_prepare step | Problem Details:
In the case where multiple peripherals are attached on the same link,
it's possible that they are in different pm_runtime states.
The device_for_each_child() loop to resume all devices before a system
suspend would not work if one peripheral was active and others
suspended. pm_runtime_resume() returns... | ```diff
diff --git a/drivers/soundwire/intel_auxdevice.c b/drivers/soundwire/intel_auxdevice.c
index 5021be0f4158..b21e86084f7b 100644
--- a/drivers/soundwire/intel_auxdevice.c
+++ b/drivers/soundwire/intel_auxdevice.c
@@ -358,10 +358,12 @@ static int intel_resume_child_device(struct device *dev, void *data)
}
re... |
e9537962519e88969f5f69cd0571eb4f6984403c | Analyze and fix the following issue in the Linux kernel code: soundwire: bus: Fix unbalanced pm_runtime_put() causing usage count underflow | Problem Details:
This reverts commit
443a98e649b4 ("soundwire: bus: use pm_runtime_resume_and_get()")
Change calls to pm_runtime_resume_and_get() back to pm_runtime_get_sync().
This fixes a usage count underrun caused by doing a pm_runtime_put() even
though pm_runtime_resume_and_get() returned an error.
The three aff... | ```diff
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index e157a39a82ce..1ea6a64f8c4a 100644
--- a/drivers/soundwire/bus.c
+++ b/drivers/soundwire/bus.c
@@ -584,9 +584,11 @@ int sdw_nread(struct sdw_slave *slave, u32 addr, size_t count, u8 *val)
{
int ret;
- ret = pm_runtime_resume_and_get(&slave... |
0a0d1740bd8fd7dafb81fcb102fb5d0b83b1ce73 | Analyze and fix the following issue in the Linux kernel code: soundwire: intel: don't save hw_params for use in prepare | Problem Details:
The existing code copies the hw_params pointer and reuses it later in
.prepare, specifically to re-initialize the ALH DMA channel
information that's lost in suspend-resume cycles.
This is not needed, we can directly access the information from the
substream/rtd - as done for the HDAudio DAIs in
sound/... | ```diff
diff --git a/drivers/soundwire/cadence_master.h b/drivers/soundwire/cadence_master.h
index b653734085d9..27c56274217f 100644
--- a/drivers/soundwire/cadence_master.h
+++ b/drivers/soundwire/cadence_master.h
@@ -84,7 +84,6 @@ struct sdw_cdns_stream_config {
* @bus: Bus handle
* @stream_type: Stream type
* ... |
756a7f90878f0866fd2fe167ef37e90b47326b96 | Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: fix writing to unintended memory region | Problem Details:
While initializing spectral, the magic value is getting written to the
invalid memory address leading to random boot-up crash. This occurs
due to the incorrect index increment in ath11k_dbring_fill_magic_value
function. Fix it by replacing the existing logic with memset32 to ensure
there is no invalid ... | ```diff
diff --git a/drivers/net/wireless/ath/ath11k/dbring.c b/drivers/net/wireless/ath/ath11k/dbring.c
index 2107ec05d14f..5536e8642331 100644
--- a/drivers/net/wireless/ath/ath11k/dbring.c
+++ b/drivers/net/wireless/ath/ath11k/dbring.c
@@ -26,13 +26,13 @@ int ath11k_dbring_validate_buffer(struct ath11k *ar, void *bu... |
9ddae9dad09e8bdaa33909bdcbb062c883c3c332 | Analyze and fix the following issue in the Linux kernel code: soundwire: bandwidth allocation: Use hweight32() to calculate set bits | Problem Details:
Replace the call to sdw_ch_mask_to_ch() with a call to hweight32().
sdw_ch_mask_to_ch() is counting the number of set bits. The hweight()
family of functions already do this, and they have an advantage of
using a bit-counting instruction if it is available on the target CPU.
This also fixes a potentia... | ```diff
diff --git a/drivers/soundwire/bus.h b/drivers/soundwire/bus.h
index 96927a143796..f0a59e5df631 100644
--- a/drivers/soundwire/bus.h
+++ b/drivers/soundwire/bus.h
@@ -158,17 +158,6 @@ int sdw_transfer_defer(struct sdw_bus *bus, struct sdw_msg *msg);
int sdw_fill_msg(struct sdw_msg *msg, struct sdw_slave *slave... |
2367e0ecb498764e95cfda691ff0828f7d25f9a4 | Analyze and fix the following issue in the Linux kernel code: soundwire: qcom: gracefully handle too many ports in DT | Problem Details:
There are two issues related to the number of ports coming from
Devicetree when exceeding in total QCOM_SDW_MAX_PORTS. Both lead to
incorrect memory accesses:
1. With DTS having too big value of input or output ports, the driver,
when copying port parameters from local/stack arrays into 'pconfig'
... | ```diff
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 79bebcecde6d..c296e0bf897b 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -1218,6 +1218,9 @@ static int qcom_swrm_get_port_config(struct qcom_swrm_ctrl *ctrl)
ctrl->num_dout_ports = val;
nports = ctrl->num_dout... |
447b0398a9cd41ca343dfd43e555af92d6214487 | Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: Fix invalid management rx frame length issue | Problem Details:
The WMI management rx event has multiple arrays of TLVs, however the common
WMI TLV parser won't handle multiple TLV tags of same type.
So the multiple array tags of WMI management rx TLV is parsed incorrectly
and the length calculated becomes wrong when the target sends multiple
array tags.
Add separ... | ```diff
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 27f3fceb33c5..f338d4447f11 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -82,6 +82,12 @@ struct wmi_tlv_fw_stats_parse {
bool chain_rssi_done;
};
+struct wmi_... |
bd934f77eeac377e81ddac8673803e7334b82d3d | Analyze and fix the following issue in the Linux kernel code: soundwire: qcom: correct setting ignore bit on v1.5.1 | Problem Details:
According to the comment and to downstream sources, the
SWRM_CONTINUE_EXEC_ON_CMD_IGNORE in SWRM_CMD_FIFO_CFG_ADDR register
should be set for v1.5.1 and newer, so fix the >= operator.
Fixes: 542d3491cdd7 ("soundwire: qcom: set continue execution flag for ignored commands")
Cc: <stable@vger.kernel.org>... | ```diff
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 335424870290..ba502129150d 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -704,7 +704,7 @@ static int qcom_swrm_init(struct qcom_swrm_ctrl *ctrl)
}
/* Configure number of retries of a read/write cmd */
- if (ct... |
031ffa6c2cd305a57ccc6d610f2decd956b2e7f6 | Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: fix rssi station dump not updated in QCN9074 | Problem Details:
In QCN9074, station dump signal values display default value which
is -95 dbm, since there is firmware header change for HAL_RX_MPDU_START
between QCN9074 and IPQ8074 which cause wrong peer_id fetch from msdu.
Fix this by updating hal_rx_mpdu_info with corresponding QCN9074 tlv
format.
Tested-on: QCN9... | ```diff
diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.c b/drivers/net/wireless/ath/ath11k/hal_rx.c
index 7f39c6fb7408..b9939c5a4ecd 100644
--- a/drivers/net/wireless/ath/ath11k/hal_rx.c
+++ b/drivers/net/wireless/ath/ath11k/hal_rx.c
@@ -865,6 +865,12 @@ ath11k_hal_rx_populate_mu_user_info(void *rx_tlv, struct hal... |
a56ef25619e079bd7d744636cf18d054d1e91982 | Analyze and fix the following issue in the Linux kernel code: net: wwan: iosm: Fix error handling path in ipc_pcie_probe() | Problem Details:
Smatch reports:
drivers/net/wwan/iosm/iosm_ipc_pcie.c:298 ipc_pcie_probe()
warn: missing unwind goto?
When dma_set_mask fails it directly returns without disabling pci
device and freeing ipc_pcie. Fix this my calling a correct goto label
As dma_set_mask returns either 0 or -EIO, we can use a goto l... | ```diff
diff --git a/drivers/net/wwan/iosm/iosm_ipc_pcie.c b/drivers/net/wwan/iosm/iosm_ipc_pcie.c
index 5bf5a93937c9..04517bd3325a 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_pcie.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_pcie.c
@@ -295,7 +295,7 @@ static int ipc_pcie_probe(struct pci_dev *pci,
ret = dma_set_mask(ipc_p... |
9744d2bf19762703704ecba885b7ac282c02eacf | Analyze and fix the following issue in the Linux kernel code: smc: Fix use-after-free in tcp_write_timer_handler(). | Problem Details:
With Eric's ref tracker, syzbot finally found a repro for
use-after-free in tcp_write_timer_handler() by kernel TCP
sockets. [0]
If SMC creates a kernel socket in __smc_create(), the kernel
socket is supposed to be freed in smc_clcsock_release() by
calling sock_release() when we close() the parent SMC... | ```diff
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index c6b4a62276f6..50c38b624f77 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -3270,6 +3270,17 @@ static int __smc_create(struct net *net, struct socket *sock, int protocol,
sk_common_release(sk);
goto out;
}
+
+ /* smc_clcsock_release() do... |
81b21c0f0138ff5a499eafc3eb0578ad2a99622c | Analyze and fix the following issue in the Linux kernel code: fs: hfsplus: remove WARN_ON() from hfsplus_cat_{read,write}_inode() | Problem Details:
syzbot is hitting WARN_ON() in hfsplus_cat_{read,write}_inode(), for
crafted filesystem image can contain bogus length. There conditions are
not kernel bugs that can justify kernel to panic.
Reported-by: syzbot <syzbot+e2787430e752a92b8750@syzkaller.appspotmail.com>
Link: https://syzkaller.appspot.com... | ```diff
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
index abb91f5fae92..b21660475ac1 100644
--- a/fs/hfsplus/inode.c
+++ b/fs/hfsplus/inode.c
@@ -511,7 +511,11 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd)
if (type == HFSPLUS_FOLDER) {
struct hfsplus_cat_folder *folder = &en... |
c76c6c4ecbec0deb56a4f9e932b26866024a508f | Analyze and fix the following issue in the Linux kernel code: ARM: 9294/2: vfp: Fix broken softirq handling with instrumentation enabled | Problem Details:
Commit 62b95a7b44d1 ("ARM: 9282/1: vfp: Manipulate task VFP state with
softirqs disabled") replaced the en/disable preemption calls inside the
VFP state handling code with en/disabling of soft IRQs, which is
necessary to allow kernel use of the VFP/SIMD unit when handling a soft
IRQ.
Unfortunately, wh... | ```diff
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index 06b48ce23e1c..505a306e0271 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -244,19 +244,6 @@ THUMB( fpreg .req r7 )
.endm
#endif
- .macro local_bh_disable, ti, tmp
- ldr \tmp, [\ti... |
5c9177c2a5efe9608fa414e40cb351e04398fe58 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: pinctrl: qcom,sdm845: simplify with unevaluatedProperties | Problem Details:
All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar
capabilities regarding pin properties, thus we can just accept entire
set provided by qcom,tlmm-common.yaml schema.
This also fixes warnings like:
sdm845-cheza-r1.dtb: pinctrl@3400000: qspi-sleep-state: 'oneOf' conditional fai... | ```diff
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sdm845-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sdm845-pinctrl.yaml
index 23d7c030fec0..d301881ddfa8 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,sdm845-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qc... |
64688acfac28ccd11b07cadca91041e9987a9361 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: pinctrl: qcom,sc7280-tlmm: simplify with unevaluatedProperties | Problem Details:
All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar
capabilities regarding pin properties, thus we can just accept entire
set provided by qcom,tlmm-common.yaml schema.
This also fixes warnings like:
sc7280-herobrine-evoker.dtb: pinctrl@f100000: qspi-sleep-state: 'oneOf' conditi... | ```diff
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml
index 36502173cb79..368d44ff5468 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qc... |
ffa4c15883f0929ace6228e079e29766013d7da0 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: pinctrl: qcom,sc7180-tlmm: simplify with unevaluatedProperties | Problem Details:
All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar
capabilities regarding pin properties, thus we can just accept entire
set provided by qcom,tlmm-common.yaml schema.
This also fixes warnings like:
c7180-trogdor-coachz-r1.dtb: pinctrl@3500000: qspi-sleep-state: 'oneOf' conditi... | ```diff
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sc7180-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sc7180-pinctrl.yaml
index f33792a1af6c..573e459b1c44 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,sc7180-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qc... |
97b5576b01166a6aed6a267df059128e5d98b15e | Analyze and fix the following issue in the Linux kernel code: arm64/sme: Fix some comments of ARM SME | Problem Details:
When TIF_SME is clear, fpsimd_restore_current_state will disable
SME trap during ret_to_user, then SME access trap is impossible
in userspace, not SVE.
Besides, fix typo: alocated->allocated.
Signed-off-by: Dongxu Sun <sundongxu3@huawei.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://... | ```diff
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 9e7e50a0fd76..2fbafa5cc7ac 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -299,7 +299,7 @@ void task_set_vl_onexec(struct task_struct *task, enum vec_type type,
/*
* TIF_SME controls whether a task can use... |
be690daa224ec41889bf8f293a5bcd8a3ea6a420 | Analyze and fix the following issue in the Linux kernel code: ionic: Don't overwrite the cyclecounter bitmask | Problem Details:
The driver was incorrectly overwriting the cyclecounter bitmask,
which was truncating it and not aligning to the hardware mask value.
This isn't causing any issues, but it's wrong. Fix this by not
constraining the cyclecounter/hardware mask.
Luckily, this seems to cause no issues, which is why this ch... | ```diff
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_phc.c b/drivers/net/ethernet/pensando/ionic/ionic_phc.c
index eac2f0e3576e..7505efdff8e9 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_phc.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_phc.c
@@ -579,11 +579,10 @@ void ionic_lif_alloc_phc(struct... |
db21973263f8c56750cb610f1d5e8bee00a513b9 | Analyze and fix the following issue in the Linux kernel code: net: ethernet: stmmac: dwmac-rk: fix optional phy regulator handling | Problem Details:
The usual devm_regulator_get() call already handles "optional"
regulators by returning a valid dummy and printing a warning
that the dummy regulator should be described properly. This
code open coded the same behaviour, but masked any errors that
are not -EPROBE_DEFER and is quite noisy.
This change e... | ```diff
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 7ac9ca9b4935..4ea31ccf24d0 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1586,9 +1586,6 @@ static int phy_power_on(struct rk_p... |
ea449f7fa0bf3fcd02e04a770b9ff707bf5e8f96 | Analyze and fix the following issue in the Linux kernel code: net: ethernet: stmmac: dwmac-rk: rework optional clock handling | Problem Details:
The clock requesting code is quite repetitive. Fix this by requesting
the clocks via devm_clk_bulk_get_optional. The optional variant has been
used, since this is effectively what the old code did. The exact clocks
required depend on the platform and configuration. As a side effect
this change adds cor... | ```diff
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 4b8fd11563e4..7ac9ca9b4935 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -39,6 +39,24 @@ struct rk_gmac_ops {
u32 regs[];
};... |
e12b6893d2333f08dc108ab045b7744adc198bed | Analyze and fix the following issue in the Linux kernel code: dt-bindings: PCI: qcom-ep: Fix the unit address used in example | Problem Details:
Unit address of PCIe EP node should be 0x1c00000 as it has to match the
first address specified in the reg property.
Link: https://lore.kernel.org/r/20230308082424.140224-5-manivannan.sadhasivam@linaro.org
Fixes: 31c9ef002580 ("dt-bindings: PCI: Add Qualcomm PCIe Endpoint controller")
Signed-off-by: M... | ```diff
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
index 89cfdee4b89f..b7f6fbaa0ba0 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
@@ -166,7 +166,7 @@ e... |
a8ca0cf1ff53c011e7654c4c2e9c1bcf297204b3 | Analyze and fix the following issue in the Linux kernel code: media: imx-jpeg: Fix incorrect indentation | Problem Details:
Variable initialization code in notify_src_chg() is incorrectly
indented. Fix it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> | ```diff
diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
index 6b0d47e3530f..b0677bbb3660 100644
--- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
+++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
@@ -497,10 +497,9 @@ static void notify_eos(struct mxc_jp... |
a1e259872f3ea282ba3c5d600c99eee286512443 | Analyze and fix the following issue in the Linux kernel code: media: Fix indentation issues introduced by subdev-wide state struct | Problem Details:
Commit 0d346d2a6f54 ("media: v4l2-subdev: add subdev-wide state struct")
applied a large media tree-wide change produced by coccinelle. It was so
large that a set of identical indentation issues went unnoticed during
review. Fix them.
While at it, and because it's easy to review both changes together,... | ```diff
diff --git a/drivers/media/pci/saa7134/saa7134-empress.c b/drivers/media/pci/saa7134/saa7134-empress.c
index aafbb34765b0..434fa1ee1c33 100644
--- a/drivers/media/pci/saa7134/saa7134-empress.c
+++ b/drivers/media/pci/saa7134/saa7134-empress.c
@@ -139,8 +139,8 @@ static int empress_try_fmt_vid_cap(struct file *f... |
9538ebce88ffa074202d592d468521995cb1e714 | Analyze and fix the following issue in the Linux kernel code: net: dsa: add trace points for FDB/MDB operations | Problem Details:
DSA performs non-trivial housekeeping of unicast and multicast addresses
on shared (CPU and DSA) ports, and puts a bit of pressure on higher
layers, requiring them to behave correctly (remove these addresses
exactly as many times as they were added). Otherwise, either addresses
linger around forever, o... | ```diff
diff --git a/net/dsa/Makefile b/net/dsa/Makefile
index 3835de286116..12e305824a96 100644
--- a/net/dsa/Makefile
+++ b/net/dsa/Makefile
@@ -16,7 +16,8 @@ dsa_core-y += \
slave.o \
switch.o \
tag.o \
- tag_8021q.o
+ tag_8021q.o \
+ trace.o
# tagging formats
obj-$(CONFIG_NET_DSA_TAG_AR9331) += tag_ar9331... |
a9d45ec74c8e68aaafe90191928eddbf79f4644f | Analyze and fix the following issue in the Linux kernel code: media: venus: dec: Fix capture formats enumeration order | Problem Details:
Commit 9593126dae3e ("media: venus: Add a handling of QC08C compressed
format") and commit cef92b14e653 ("media: venus: Add a handling of QC10C
compressed format") added support for the QC08C and QC10C compressed
formats respectively.
But these also caused a regression, because the new formats where a... | ```diff
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index 800dbc48e410..1b62c644c99b 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -31,15 +31,15 @@
*/
static const struct venus_format vdec_formats[] = {
{... |
bfe1326573ff9ddd9032f556f0f5aba581b6688c | Analyze and fix the following issue in the Linux kernel code: venus: Fix for H265 decoding failure. | Problem Details:
Aligned the mismatch of persist1 and scratch1 buffer calculation,
as per the firmware requirements.
Signed-off-by: Vikash Garodia <vgarodia@qti.qualcomm.com>
Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
Tested-by: Nathan Hebert <nhebert@chromium.org>
Signed-off-by: Stanimir Varbanov <stanimi... | ```diff
diff --git a/drivers/media/platform/qcom/venus/hfi_plat_bufs_v6.c b/drivers/media/platform/qcom/venus/hfi_plat_bufs_v6.c
index ea25c451222b..a9be31ec6927 100644
--- a/drivers/media/platform/qcom/venus/hfi_plat_bufs_v6.c
+++ b/drivers/media/platform/qcom/venus/hfi_plat_bufs_v6.c
@@ -93,7 +93,7 @@
#define LCU_MI... |
50248ad9f190d527cbd578190ca769729518b703 | Analyze and fix the following issue in the Linux kernel code: media: venus: dec: Fix handling of the start cmd | Problem Details:
The decoder driver should clear the last_buffer_dequeued flag of the
capture queue upon receiving V4L2_DEC_CMD_START.
The last_buffer_dequeued flag is set upon receiving EOS (which always
happens upon receiving V4L2_DEC_CMD_STOP).
Without this patch, after issuing the V4L2_DEC_CMD_STOP and
V4L2_DEC_C... | ```diff
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index d47c22015770..800dbc48e410 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -526,6 +526,7 @@ static int
vdec_decoder_cmd(struct file *file, void *fh, str... |
7573099e10ca69c3be33995c1fcd0d241226816d | Analyze and fix the following issue in the Linux kernel code: qlcnic: check pci_reset_function result | Problem Details:
Static code analyzer complains to unchecked return value.
The result of pci_reset_function() is unchecked.
Despite, the issue is on the FLR supported code path and in that
case reset can be done with pcie_flr(), the patch uses less invasive
approach by adding the result check of pci_reset_function().
... | ```diff
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
index 87f76bac2e46..eb827b86ecae 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
@@ -628,7 +628,13 @@ int qlcnic_fw_create_ctx(struct ... |
9c592f8ab114875fdb3b2040f01818e53de44991 | Analyze and fix the following issue in the Linux kernel code: media: rc: gpio-ir-recv: Fix support for wake-up | Problem Details:
The driver was intended from the start to be a wake-up source for the
system, however due to the absence of a suitable call to
device_set_wakeup_capable(), the device_may_wakeup() call used to decide
whether to enable the GPIO interrupt as a wake-up source would never
happen. Lookup the DT standard "wa... | ```diff
diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c
index fb037788ec10..27f55ea966c6 100644
--- a/drivers/media/rc/gpio-ir-recv.c
+++ b/drivers/media/rc/gpio-ir-recv.c
@@ -103,6 +103,8 @@ static int gpio_ir_recv_probe(struct platform_device *pdev)
rcdev->map_name = RC_MAP_EMPTY;
... |
8ee81ed581ff35882b006a5205100db0b57bf070 | Analyze and fix the following issue in the Linux kernel code: xfs: fix BUG_ON in xfs_getbmap() | Problem Details:
There's issue as follows:
XFS: Assertion failed: (bmv->bmv_iflags & BMV_IF_DELALLOC) != 0, file: fs/xfs/xfs_bmap_util.c, line: 329
------------[ cut here ]------------
kernel BUG at fs/xfs/xfs_message.c:102!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 14612 Comm: xfs_io Not tainted 6.3.0-rc... | ```diff
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index a09dd2606479..f032d3a4b727 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -314,15 +314,13 @@ xfs_getbmap_report_one(
if (isnullstartblock(got->br_startblock) ||
got->br_startblock == DELAYSTARTBLOCK) {
/*
- * De... |
22ed903eee23a5b174e240f1cdfa9acf393a5210 | Analyze and fix the following issue in the Linux kernel code: xfs: verify buffer contents when we skip log replay | Problem Details:
syzbot detected a crash during log recovery:
XFS (loop0): Mounting V5 Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791
XFS (loop0): Torn write (CRC failure) detected at log block 0x180. Truncating head block from 0x200.
XFS (loop0): Starting recovery (logdev: internal)
=================================... | ```diff
diff --git a/fs/xfs/xfs_buf_item_recover.c b/fs/xfs/xfs_buf_item_recover.c
index ffa94102094d..43167f543afc 100644
--- a/fs/xfs/xfs_buf_item_recover.c
+++ b/fs/xfs/xfs_buf_item_recover.c
@@ -943,6 +943,16 @@ xlog_recover_buf_commit_pass2(
if (lsn && lsn != -1 && XFS_LSN_CMP(lsn, current_lsn) >= 0) {
trace_... |
c95356ca884885db702670e24933ee7f2b9f1754 | Analyze and fix the following issue in the Linux kernel code: xfs: _{attr,data}_map_shared should take ILOCK_EXCL until iread_extents is completely done | Problem Details:
While fuzzing the data fork extent count on a btree-format directory
with xfs/375, I observed the following (excerpted) splat:
XFS: Assertion failed: xfs_isilocked(ip, XFS_ILOCK_EXCL), file: fs/xfs/libxfs/xfs_bmap.c, line: 1208
------------[ cut here ]------------
WARNING: CPU: 0 PID: 43192 at fs/xfs/... | ```diff
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index 34de6e6898c4..f11ef331e5a4 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -1171,6 +1171,12 @@ xfs_iread_extents(
goto out;
}
ASSERT(ir.loaded == xfs_iext_count(ifp));
+ /*
+ * Use release semantics so that we... |
4b827b3f305d1fcf837265f1e12acc22ee84327c | Analyze and fix the following issue in the Linux kernel code: xfs: remove WARN when dquot cache insertion fails | Problem Details:
It just creates unnecessary bot noise these days.
Reported-by: syzbot+6ae213503fb12e87934f@syzkaller.appspotmail.com
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Dave Chinner <david@fromorbit.com> | ```diff
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
index 8fb90da89787..7f071757f278 100644
--- a/fs/xfs/xfs_dquot.c
+++ b/fs/xfs/xfs_dquot.c
@@ -798,7 +798,6 @@ xfs_qm_dqget_cache_insert(
error = radix_tree_insert(tree, id, dqp);
if (unlikely(error)) {
/* Duplicate found! Caller must try again. */
- ... |
aa88019851a85df80cb77f143758b13aee09e3d9 | Analyze and fix the following issue in the Linux kernel code: xfs: don't consider future format versions valid | Problem Details:
In commit fe08cc504448 we reworked the valid superblock version
checks. If it is a V5 filesystem, it is always valid, then we
checked if the version was less than V4 (reject) and then checked
feature fields in the V4 flags to determine if it was valid.
What we missed was that if the version is not V4 ... | ```diff
diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c
index 99cc03a298e2..ba0f17bc1dc0 100644
--- a/fs/xfs/libxfs/xfs_sb.c
+++ b/fs/xfs/libxfs/xfs_sb.c
@@ -72,7 +72,8 @@ xfs_sb_validate_v5_features(
}
/*
- * We support all XFS versions newer than a v4 superblock with V2 directories.
+ * We current su... |
cee6484eddc1066f009cc82ad12a1739892172b8 | Analyze and fix the following issue in the Linux kernel code: net/mlx5: DR, Set counter ID on the last STE for STEv1 TX | Problem Details:
In STEv1 counter action can be set either by filling counter ID on STE, in
which case it is executed before other actions on this STE, or as a single
action, in which case it is executed in accordance with the actions order.
FW steering on STEv1 devices implements counter as counter ID on STE, and
this... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v1.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v1.c
index 084145f18084..27cc6931bbde 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v1.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v1.c
@... |
55f3e740f7f697a2287447678c09d93238a6635a | Analyze and fix the following issue in the Linux kernel code: net/mlx5: Bridge, add tracepoints for multicast | Problem Details:
Pass target struct net_device to mdb attach/detach handler in order to
expose the port name to the new tracepoints. Implemented following
tracepoints:
- Attach mdb to port.
- Detach mdb from port.
Usage example:
># cd /sys/kernel/debug/tracing
># echo mlx5:mlx5_esw_bridge_port_mdb_attach >> set_even... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c b/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c
index dd0dd3f028a3..fd191925ab4b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c
@@ -238,7 +238,7 @@ m... |
04839139213cf60d4c5fc792214a08830e294ff8 | Analyze and fix the following issue in the Linux kernel code: fsverity: reject FS_IOC_ENABLE_VERITY on mode 3 fds | Problem Details:
Commit 56124d6c87fd ("fsverity: support enabling with tree block size <
PAGE_SIZE") changed FS_IOC_ENABLE_VERITY to use __kernel_read() to read
the file's data, instead of direct pagecache accesses.
An unintended consequence of this is that the
'WARN_ON_ONCE(!(file->f_mode & FMODE_READ))' in __kernel_... | ```diff
diff --git a/fs/verity/enable.c b/fs/verity/enable.c
index bbec6f93172c..fc4c50e5219d 100644
--- a/fs/verity/enable.c
+++ b/fs/verity/enable.c
@@ -357,6 +357,13 @@ int fsverity_ioctl_enable(struct file *filp, const void __user *uarg)
err = file_permission(filp, MAY_WRITE);
if (err)
return err;
+ /*
+ * ... |
39049b69ec9fc125fa1f314165dcc86f72cb72ec | Analyze and fix the following issue in the Linux kernel code: fsverity: explicitly check for buffer overflow in build_merkle_tree() | Problem Details:
The new Merkle tree construction algorithm is a bit fragile in that it
may overflow the 'root_hash' array if the tree actually generated does
not match the calculated tree parameters.
This should never happen unless there is a filesystem bug that allows
the file size to change despite deny_write_acces... | ```diff
diff --git a/fs/verity/enable.c b/fs/verity/enable.c
index 541c2a277c5c..bbec6f93172c 100644
--- a/fs/verity/enable.c
+++ b/fs/verity/enable.c
@@ -13,6 +13,7 @@
struct block_buffer {
u32 filled;
+ bool is_root_hash;
u8 *data;
};
@@ -24,6 +25,14 @@ static int hash_one_block(struct inode *inode,
struc... |
a9248538facc3d9e769489e50a544509c2f9cebe | Analyze and fix the following issue in the Linux kernel code: xfs: stabilize the dirent name transformation function used for ascii-ci dir hash computation | Problem Details:
Back in the old days, the "ascii-ci" feature was created to implement
case-insensitive directory entry lookups for latin1-encoded names and
remove the large overhead of Samba's case-insensitive lookup code. UTF8
names were not allowed, but nobody explicitly wrote in the documentation
that this was onl... | ```diff
diff --git a/fs/xfs/libxfs/xfs_dir2.c b/fs/xfs/libxfs/xfs_dir2.c
index 92bac3373f1f..f5462fd582d5 100644
--- a/fs/xfs/libxfs/xfs_dir2.c
+++ b/fs/xfs/libxfs/xfs_dir2.c
@@ -64,7 +64,7 @@ xfs_ascii_ci_hashname(
int i;
for (i = 0, hash = 0; i < name->len; i++)
- hash = tolower(name->name[i]) ^ rol32(hash, ... |
38bb13108479f5cac955bb291ea6aa6d24268f4f | Analyze and fix the following issue in the Linux kernel code: xfs: retain the AGI when we can't iget an inode to scrub the core | Problem Details:
xchk_get_inode is not quite the right function to be calling from the
inode scrubber setup function. The common get_inode function either
gets an inode and installs it in the scrub context, or it returns an
error code explaining what happened. This is acceptable for most file
scrubbers because it is ... | ```diff
diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c
index 8dd9ab31ebc6..b3ba87c4bc79 100644
--- a/fs/xfs/scrub/common.c
+++ b/fs/xfs/scrub/common.c
@@ -817,7 +817,7 @@ again:
}
/* Install an inode that we opened by handle for scrubbing. */
-static int
+int
xchk_install_handle_inode(
struct xfs_scr... |
302436c27c3fc61c1dab83f4c995dec12eb43161 | Analyze and fix the following issue in the Linux kernel code: xfs: fix an inode lookup race in xchk_get_inode | Problem Details:
In commit d658e, we tried to improve the robustnes of xchk_get_inode in
the face of EINVAL returns from iget by calling xfs_imap to see if the
inobt itself thinks that the inode is allocated. Unfortunately, that
commit didn't consider the possibility that the inode gets allocated
after iget but before... | ```diff
diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c
index 9af653a1d351..3fd437430cad 100644
--- a/fs/xfs/scrub/common.c
+++ b/fs/xfs/scrub/common.c
@@ -643,6 +643,14 @@ xchk_ag_init(
/* Per-scrubber setup functions */
+void
+xchk_trans_cancel(
+ struct xfs_scrub *sc)
+{
+ xfs_trans_cancel(sc->tp);
+... |
0916056eba4fd816f8042a3960597c316ea10256 | Analyze and fix the following issue in the Linux kernel code: xfs: fix parent pointer scrub racing with subdirectory reparenting | Problem Details:
Jan Kara pointed out that rename() doesn't lock a subdirectory that is
being moved from one parent to another, even though the move requires an
update to the subdirectory's dotdot entry. This means that it's *not*
sufficient to hold a directory's IOLOCK to stabilize the dotdot entry.
We must hold the ... | ```diff
diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c
index dcfe66044d4a..813ded91661b 100644
--- a/fs/xfs/scrub/common.c
+++ b/fs/xfs/scrub/common.c
@@ -962,28 +962,6 @@ xchk_metadata_inode_forks(
return 0;
}
-/*
- * Try to lock an inode in violation of the usual locking order rules. For
- * example... |
6bb9209ceebb07fd07cec25af04eed1809c654de | Analyze and fix the following issue in the Linux kernel code: xfs: always check the existence of a dirent's child inode | Problem Details:
When we're scrubbing directory entries, we always need to iget the child
inode to make sure that the inode pointer points to a valid inode. The
original directory scrub code (commit a5c4) only set us up to do this
for ftype=1 filesystems, which is not sufficient; and then commit 4b80
made it worse by ... | ```diff
diff --git a/fs/xfs/scrub/dir.c b/fs/xfs/scrub/dir.c
index 41f10e1c580c..6404201d3d36 100644
--- a/fs/xfs/scrub/dir.c
+++ b/fs/xfs/scrub/dir.c
@@ -33,52 +33,23 @@ xchk_setup_directory(
/* Scrub a directory entry. */
/* Check that an inode's mode matches a given XFS_DIR3_FT_* type. */
-STATIC int
+STATIC voi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.