id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
637fee3954d4bd509ea9d95ad1780fc174489860 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/soc21: fix xclk for APUs | Problem Details:
The reference clock is supposed to be 100Mhz, but it
appears to actually be slightly lower (99.81Mhz).
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14451
Reviewed-by: Jesse Zhang <Jesse.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c
index 2da733b45c21..d9cc649d81ad 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc21.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc21.c
@@ -256,7 +256,13 @@ static u32 soc21_get_config_memsize(struct amdgpu_device *adev)
static u32 soc21_... |
1197366cca89a4c44c541ddedb8ce8bf0757993d | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: Fix null pointer dereference issue | Problem Details:
If SMU is disabled, during RAS initialization,
there will be null pointer dereference issue here.
Signed-off-by: Jinzhou Su <jinzhou.su@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ```diff
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 6b6b05e8f736..3f70731105a2 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -619,6 +619,9 @@ int amdgpu_smu_ras_send_msg(struct amdgpu_device *adev, e... |
1081c1649da989ef9cbc01ffa99babc190df6077 | Analyze and fix the following issue in the Linux kernel code: PM: hibernate: Drop NULL pointer checks before acomp_request_free() | Problem Details:
Since acomp_request_free() checks its argument against NULL, the NULL
pointer checks before calling it added by commit ("7966cf0ebe32 PM:
hibernate: Fix crash when freeing invalid crypto compressor") are
redundant, so drop them.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafa... | ```diff
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 8050e5182835..7e462957c9bf 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -902,8 +902,8 @@ out_clean:
for (thr = 0; thr < nr_threads; thr++) {
if (data[thr].thr)
kthread_stop(data[thr].thr);
- if (data[thr].cr)
- acomp_... |
a1fe789a96fe47733c133134fd264cb7ca832395 | Analyze and fix the following issue in the Linux kernel code: thermal/of: Fix reference leak in thermal_of_cm_lookup() | Problem Details:
In thermal_of_cm_lookup(), tr_np is obtained via of_parse_phandle(), but
never released.
Use the __free(device_node) cleanup attribute to automatically release
the node and fix the leak.
Fixes: 423de5b5bc5b ("thermal/of: Fix cdev lookup in thermal_of_should_bind()")
Signed-off-by: Felix Gu <ustc.gu@g... | ```diff
diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c
index 1a51a4d240ff..b6d0c92f5522 100644
--- a/drivers/thermal/thermal_of.c
+++ b/drivers/thermal/thermal_of.c
@@ -280,10 +280,10 @@ static bool thermal_of_cm_lookup(struct device_node *cm_np,
struct cooling_spec *c)
{
for_each_chi... |
1e461784c30452ee8e2a00d42f6b3d73ada61521 | Analyze and fix the following issue in the Linux kernel code: thermal: core: thermal_core.h: fix all kernel-doc warnings | Problem Details:
Resolve all kernel-doc warnings in thermal_core.h:
Warning: drivers/thermal/thermal_core.h:99 bad line: trip point.
Warning: drivers/thermal/thermal_core.h:101 bad line: passive trip point.
Warning: drivers/thermal/thermal_core.h:152 struct member 'trips_attribute_group' not described in 'thermal_zone... | ```diff
diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
index bdadd141aa24..d3acff602f9c 100644
--- a/drivers/thermal/thermal_core.h
+++ b/drivers/thermal/thermal_core.h
@@ -77,6 +77,7 @@ struct thermal_governor {
* @device: &struct device for this thermal zone
* @removal: removal compl... |
229ecbaac6b31f89c554b77eb407377a5eade7d4 | Analyze and fix the following issue in the Linux kernel code: ACPI: x86: s2idle: Invoke Microsoft _DSM Function 9 (Turn On Display) | Problem Details:
Windows 11, version 22H2 introduced a new function index (Function 9) to
the Microsoft LPS0 _DSM, titled "Turn On Display Notification".
According to Microsoft documentation, this function signals to the system
firmware that the OS intends to turn on the display when exiting Modern
Standby. This allow... | ```diff
diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
index f97a4dff336e..b43d10f986a2 100644
--- a/drivers/acpi/x86/s2idle.c
+++ b/drivers/acpi/x86/s2idle.c
@@ -49,6 +49,7 @@ static const struct acpi_device_id lps0_device_ids[] = {
#define ACPI_LPS0_EXIT 6
#define ACPI_LPS0_MS_ENTRY 7
#de... |
f18c8cfa4f1af2cf7d68d86989a7d6109acfa1bb | Analyze and fix the following issue in the Linux kernel code: spi: cadence-qspi: Fix probe error path and remove | Problem Details:
The probe has been modified by many different users, it is hard to track
history, but for sure its current state is partially broken. One easy
rule to follow is to drop/free/release the resources in the opposite
order they have been queried.
Fix the labels, the order for freeing the resources, and add... | ```diff
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index 38518475858d..9c2b2b8649de 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -1889,7 +1889,7 @@ static int cqspi_probe(struct platform_device *pdev)
ret = clk_prepare_enable(cqspi->... |
ec2da8bb0bc518ca5458d36de9aeec493ed5a790 | Analyze and fix the following issue in the Linux kernel code: spi: cadence-qspi: Fix ORing style and alignments | Problem Details:
These definitions do not follow the standard patterns. Alignments are
incoherent and the logical OR symbols '|' are misplaced. Reorganize
these definitions.
There is no functional change.
Acked-by: Pratyush Yadav <pratyush@kernel.org>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-... | ```diff
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index 75010f35da41..c94f827afe2f 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -2129,26 +2129,23 @@ static const struct cqspi_driver_platdata intel_lgm_qspi = {
};
static const stru... |
aac733a9663682387013350b4470a81344960f5d | Analyze and fix the following issue in the Linux kernel code: spi: cadence-qspi: Fix style and improve readability | Problem Details:
It took me several seconds to correctly understand this block. I
understand the goal: showing that we are in the if, or in one of the two
other cases. Improve the organization of the code to both improve
readability and fix the style.
Suggested-by: Pratyush Yadav <pratyush@kernel.org>
Tested-by: Wolfr... | ```diff
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index e6eb3fa5d689..75010f35da41 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -374,17 +374,12 @@ static irqreturn_t cqspi_irq_handler(int this_irq, void *dev)
/* Clear interrupt */
... |
9dfc9c1c830717686908e2c16867d8dfae5cf5e7 | Analyze and fix the following issue in the Linux kernel code: spi: cadence-qspi: Align definitions | Problem Details:
Fix alignment on the #defines.
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Miquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com>
Tested-by: Santhosh Kumar K <s-k6@ti.com>
Link: https://patch.msgid.link/20260122-sc... | ```diff
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index 791015abafee..e6eb3fa5d689 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -40,7 +40,7 @@ static_assert(CQSPI_MAX_CHIPSELECT <= SPI_DEVICE_CS_CNT_MAX);
#define CQSPI_DISABLE_DAC_MO... |
a389d431053935366b88a8fbf271f1a564b9a44e | Analyze and fix the following issue in the Linux kernel code: crypto: virtio: Remove duplicated virtqueue_kick in virtio_crypto_skcipher_crypt_req | Problem Details:
With function virtio_crypto_skcipher_crypt_req(), there is already
virtqueue_kick() call with spinlock held in function
__virtio_crypto_skcipher_do_req(). Remove duplicated virtqueue_kick()
function call here.
Fixes: d79b5d0bbf2e ("crypto: virtio - support crypto engine framework")
Cc: stable@vger.ker... | ```diff
diff --git a/drivers/crypto/virtio/virtio_crypto_skcipher_algs.c b/drivers/crypto/virtio/virtio_crypto_skcipher_algs.c
index 1b3fb21a2a7d..11053d1786d4 100644
--- a/drivers/crypto/virtio/virtio_crypto_skcipher_algs.c
+++ b/drivers/crypto/virtio/virtio_crypto_skcipher_algs.c
@@ -541,8 +541,6 @@ int virtio_crypto... |
af9a17d29ce9060664f56264bcc64b976fddd2b5 | Analyze and fix the following issue in the Linux kernel code: crypto: virtio: Add spinlock protection with virtqueue notification | Problem Details:
When VM boots with one virtio-crypto PCI device and builtin backend,
run openssl benchmark command with multiple processes, such as
openssl speed -evp aes-128-cbc -engine afalg -seconds 10 -multi 32
openssl processes will hangup and there is error reported like this:
virtio_crypto virtio0: dataq.0... | ```diff
diff --git a/drivers/crypto/virtio/virtio_crypto_core.c b/drivers/crypto/virtio/virtio_crypto_core.c
index 3d241446099c..ccc6b5c1b24b 100644
--- a/drivers/crypto/virtio/virtio_crypto_core.c
+++ b/drivers/crypto/virtio/virtio_crypto_core.c
@@ -75,15 +75,20 @@ static void virtcrypto_done_task(unsigned long data)
... |
cd025c1e876b4e262e71398236a1550486a73ede | Analyze and fix the following issue in the Linux kernel code: vhost: move vdpa group bound check to vhost_vdpa | Problem Details:
Remove duplication by consolidating these here. This reduces the
posibility of a parent driver missing them.
While we're at it, fix a bug in vdpa_sim where a valid ASID can be
assigned to a group equal to ngroups, causing an out of bound write.
Cc: stable@vger.kernel.org
Fixes: bda324fd037a ("vdpasi... | ```diff
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index ddaa1366704b..44062e9d68f0 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -3640,9 +3640,6 @@ static int mlx5_set_group_asid(struct vdpa_device *vdev, u32 group,
struct mlx5_vdpa_... |
29615fe3fb5015a96a14cfa43bd168034719ddeb | Analyze and fix the following issue in the Linux kernel code: gpio: virtio: fix DMA alignment | Problem Details:
The res and ires buffers in struct virtio_gpio_line and struct
vgpio_irq_line respectively are used for DMA_FROM_DEVICE via
virtqueue_add_sgs(). However, within these structs, even though these
elements are tagged as ____cacheline_aligned, adjacent struct elements
can share DMA cachelines on platforms... | ```diff
diff --git a/drivers/gpio/gpio-virtio.c b/drivers/gpio/gpio-virtio.c
index 17e040991e46..b70294626770 100644
--- a/drivers/gpio/gpio-virtio.c
+++ b/drivers/gpio/gpio-virtio.c
@@ -10,6 +10,7 @@
*/
#include <linux/completion.h>
+#include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/gpio/dri... |
acecfee88564d8d6c11bc23c9b7fff89cd010314 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Clear HDMI HPD pending work only if it is enabled | Problem Details:
[Why&How]
On amdgpu_dm_connector_destroy(), the driver attempts to cancel pending
HDMI HPD work without checking if the HDMI HPD is enabled.
Added a check that it is enabled before clearing it.
Fixes: 6a681cd90345 ("drm/amd/display: Add an hdmi_hpd_debounce_delay_ms module")
Signed-off-by: Ivan Lipsk... | ```diff
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 1ea5a250440f..a8a59126b2d2 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -7754,10 +7754,12 @@ static void amdgpu_dm... |
4be42c92220128b3128854a2d6b0f0ad0bcedbdb | Analyze and fix the following issue in the Linux kernel code: ftrace,bpf: Remove FTRACE_OPS_FL_JMP ftrace_ops flag | Problem Details:
At the moment the we allow the jmp attach only for ftrace_ops that
has FTRACE_OPS_FL_JMP set. This conflicts with following changes
where we use single ftrace_ops object for all direct call sites,
so all could be be attached via just call or jmp.
We already limit the jmp attach support with config opt... | ```diff
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index a3a8989e3268..cc869c59c1a6 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -359,7 +359,6 @@ enum {
FTRACE_OPS_FL_DIRECT = BIT(17),
FTRACE_OPS_FL_SUBOP = BIT(18),
FTRACE_OPS_FL_GRAPH = BIT(19),
- FTRACE_OPS_FL_JMP ... |
a537c0da168a08b0b6a7f7bd9e75f4cc8d45ff57 | Analyze and fix the following issue in the Linux kernel code: tools: Fix bitfield dependency failure | Problem Details:
A perf build failure was reported by Thomas Voegtle on stable kernel
v6.6.120:
CC tests/sample-parsing.o
CC util/intel-pt-decoder/intel-pt-pkt-decoder.o
CC util/perf-regs-arch/perf_regs_csky.o
CC util/arm-spe-decoder/arm-spe-pkt-decoder.o
CC util/perf-regs-... | ```diff
diff --git a/tools/include/linux/bitfield.h b/tools/include/linux/bitfield.h
index 6093fa6db260..ddf81f24956b 100644
--- a/tools/include/linux/bitfield.h
+++ b/tools/include/linux/bitfield.h
@@ -8,6 +8,7 @@
#define _LINUX_BITFIELD_H
#include <linux/build_bug.h>
+#include <linux/kernel.h>
#include <asm/byte... |
34b0a58eef04a49376e4103efc5b09f1e33e594a | Analyze and fix the following issue in the Linux kernel code: perf sched stats: Fixes in man page | Problem Details:
Fix the incorrect description of the schedstats report. Also fix the
spelling errors in man page.
Fixes: 800af362d68945e5 ("perf sched stats: Add details in man page")
Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Reported-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Signed-off-by: Swapnil Sapka... | ```diff
diff --git a/tools/perf/Documentation/perf-sched.txt b/tools/perf/Documentation/perf-sched.txt
index 5bfb7bb6c633..4d9981609c04 100644
--- a/tools/perf/Documentation/perf-sched.txt
+++ b/tools/perf/Documentation/perf-sched.txt
@@ -86,7 +86,7 @@ There are several variants of 'perf sched':
exposed through the... |
b03b95b4d71edbb10bfb1588dc59cfea8d13796c | Analyze and fix the following issue in the Linux kernel code: perf sched stats: Add NULL check for cd_map | Problem Details:
In perf_sched__schedstat_live(), build_cpu_domain_map() returns the
pointer to cpu_domain_map which can also be NULL.
Add NULL check for the same to avoid NULL pointer dereference.
Fixes: 00093b3133984ffe ("perf sched stats: Add support for live mode")
Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.... | ```diff
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index b190e928117c..f5e449bd6823 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -4714,6 +4714,11 @@ static int perf_sched__schedstat_live(struct perf_sched *sched,
nr = cpu__max_present_cpu().cpu;
cd_map = bu... |
05134d15375ce9fc57a91453999729d861efe9f9 | Analyze and fix the following issue in the Linux kernel code: perf util: Fix NULL check in cpumask_to_cpulist() | Problem Details:
The function cpumask_to_cpulist() allocates memory with calloc() and
stores the result in 'bm', but then incorrectly checks 'cpumask' for
NULL instead of 'bm'.
This means that if the allocation fails, the function will dereference a
NULL pointer when trying to access 'bm'.
Fix the check to test the c... | ```diff
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 94f5a2ece245..8b893de35f77 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -279,7 +279,7 @@ void cpumask_to_cpulist(char *cpumask, char *cpulist)
return;
bm = calloc(bm_size, sizeof(unsigned long));
- if (!cpumask)
+ i... |
2a85bbaed06bec2b97dec15bb01cbdbf81dce3e3 | Analyze and fix the following issue in the Linux kernel code: perf header: Replace hardcoded max cpus by MAX_NR_CPUS | Problem Details:
cpumask and cpulist from cpu-domain header have hardcoded max_cpus value
of 1024.
Current systems have more cpus than this value. Replace it with
MAX_NR_CPUS.
Also define a macro to represent domain name length.
Fixes: d40c68a49f69c9bd ("perf header: Support CPU DOMAIN relation info")
Reported-by: S... | ```diff
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index eefd1cd73b6a..31c3bab1b10a 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -76,6 +76,7 @@ static const u64 __perf_magic2 = 0x32454c4946524550ULL;
static const u64 __perf_magic2_sw = 0x50455246494c4532ULL;
#defi... |
2724138b2f7f6299812b3404e23b124304834759 | Analyze and fix the following issue in the Linux kernel code: iommufd: Initialize batch->kind in batch_clear() | Problem Details:
KMSAN reported an uninitialized value when batch_add_pfn_num() reads
batch->kind. This occurs because batch_clear() does not initialize the
kind field.
When batch_add_pfn_num() checks "if (batch->kind != kind)", it reads this
uninitialized value, triggering KMSAN warnings. However the algorithm is
fin... | ```diff
diff --git a/drivers/iommu/iommufd/pages.c b/drivers/iommu/iommufd/pages.c
index dbe51ecb9a20..f606148920fa 100644
--- a/drivers/iommu/iommufd/pages.c
+++ b/drivers/iommu/iommufd/pages.c
@@ -289,6 +289,7 @@ static void batch_clear(struct pfn_batch *batch)
batch->end = 0;
batch->pfns[0] = 0;
batch->npfns[0... |
1f3b950492db411e6c30ee0076b61ef2694c100a | Analyze and fix the following issue in the Linux kernel code: arm64: poe: fix stale POR_EL0 values for ptrace | Problem Details:
If a process wrote to POR_EL0 and then crashed before a context switch
happened, the coredump would contain an incorrect value for POR_EL0.
The value read in poe_get() would be a stale value left in thread.por_el0. Fix
this by reading the value from the system register, if the target thread is the
cu... | ```diff
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
index b9bdd83fbbca..8a14b86cd066 100644
--- a/arch/arm64/kernel/ptrace.c
+++ b/arch/arm64/kernel/ptrace.c
@@ -1486,6 +1486,9 @@ static int poe_get(struct task_struct *target,
if (!system_supports_poe())
return -EINVAL;
+ if (target == c... |
f2090ebdb59d0546cbd7b55d9dd63a77133efc03 | Analyze and fix the following issue in the Linux kernel code: soc: qcom: smem: fix qcom_smem_is_available and check if __smem is valid | Problem Details:
Commit 7a94d5f31b54 ("soc: qcom: smem: better track SMEM uninitialized
state") changed the usage of __smem and init now as an error pointer
instead of NULL.
qcom_smem_is_available() wasn't updated to reflect this change and also
.qcom_smem_remove doesn't reset it on module exit.
Update both entry to ... | ```diff
diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
index fef840b54574..c18a0c946f76 100644
--- a/drivers/soc/qcom/smem.c
+++ b/drivers/soc/qcom/smem.c
@@ -396,7 +396,7 @@ EXPORT_SYMBOL_GPL(qcom_smem_bust_hwspin_lock_by_host);
*/
bool qcom_smem_is_available(void)
{
- return !!__smem;
+ return !IS... |
a54afbc8a2138f8c2490510cf26cde188d480c43 | Analyze and fix the following issue in the Linux kernel code: nvme-pci: DMA unmap the correct regions in nvme_free_sgls | Problem Details:
The call to nvme_free_sgls() in nvme_unmap_data() has the sg_list and sge
parameters swapped. This wasn't noticed by the compiler because both share
the same type. On a Xen PV hardware domain, and possibly any other
architectures that takes that path, this leads to corruption of the NVMe
contents.
F... | ```diff
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 58f3097888a7..c2bee32332fe 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -806,8 +806,8 @@ static void nvme_unmap_data(struct request *req)
if (!blk_rq_dma_unmap(req, dma_dev, &iod->dma_state, iod->total_len,
... |
4550a71b179be9e2a17015c018b231a2daca2dd1 | Analyze and fix the following issue in the Linux kernel code: Revert "dm: fix a race condition in retrieve_deps" | Problem Details:
This reverts commit f6007dce0cd35d634d9be91ef3515a6385dcee16.
Commit f6007dce0cd3 ("dm: fix a race condition in retrieve_deps") was
added to fix a race between retrieving the list of dm table devices and
multipath_message() modifying the list of table devices. But Commit
a48f6b82c5c4 ("dm mpath: don't... | ```diff
diff --git a/drivers/md/dm-core.h b/drivers/md/dm-core.h
index 1cda8618d74d..a3b8ad6e1c42 100644
--- a/drivers/md/dm-core.h
+++ b/drivers/md/dm-core.h
@@ -215,7 +215,6 @@ struct dm_table {
/* a list of devices used by this table */
struct list_head devices;
- struct rw_semaphore devices_lock;
/* event... |
787bd63ee661b0148ce8e1fde92b7afddd85c446 | Analyze and fix the following issue in the Linux kernel code: dm mpath: Add missing dm_put_device when failing to get scsi dh name | Problem Details:
When commit fd81bc5cca8f ("scsi: device_handler: Return error pointer in
scsi_dh_attached_handler_name()") added code to fail parsing the path if
scsi_dh_attached_handler_name() failed with -ENOMEM, it didn't clean up
the reference to the path device that had just been taken. Fix this, and
steamline th... | ```diff
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index c748e7f952c4..6f9d86f4b912 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -960,27 +960,27 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps
attached_handler_name = NULL;
} else {
r = ... |
e64d1cb21a1c6ecd51bc1c94c83f6fc656f7c94d | Analyze and fix the following issue in the Linux kernel code: gpiolib: acpi: Fix potential out-of-boundary left shift | Problem Details:
GPIO Address Space handler gets a pointer to the in or out value.
This value is supposed to be at least 64-bit, but it's not limited
to be exactly 64-bit. When ACPI tables are being parsed, for
the bigger Connection():s ACPICA creates a Buffer instead of regular
Integer object. The Buffer exists as lon... | ```diff
diff --git a/drivers/gpio/gpiolib-acpi-core.c b/drivers/gpio/gpiolib-acpi-core.c
index d42f769eeb11..9627b3a9c7f3 100644
--- a/drivers/gpio/gpiolib-acpi-core.c
+++ b/drivers/gpio/gpiolib-acpi-core.c
@@ -1104,6 +1104,7 @@ acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address,
unsigned int pi... |
5815d9303c67cef5f47cd01e73b671e6b9c40ef3 | Analyze and fix the following issue in the Linux kernel code: iommupt: Only cache flush memory changed by unmap | Problem Details:
The cache flush was happening on every level across the whole range of
iteration, even if no leafs or tables were cleared. Instead flush only the
sub range that was actually written.
Overflushing isn't a correctness problem but it does impact the
performance of unmap.
After this series the performanc... | ```diff
diff --git a/drivers/iommu/generic_pt/iommu_pt.h b/drivers/iommu/generic_pt/iommu_pt.h
index 52ef028ed2db..d575f3ba9d34 100644
--- a/drivers/iommu/generic_pt/iommu_pt.h
+++ b/drivers/iommu/generic_pt/iommu_pt.h
@@ -931,6 +931,8 @@ static __maybe_unused int __unmap_range(struct pt_range *range, void *arg,
... |
5b0530bb16ec5af3cc96fc25891d6a860fd37a8c | Analyze and fix the following issue in the Linux kernel code: iommu/amd: Fix type of type parameter to amd_iommufd_hw_info() | Problem Details:
When building with -Wincompatible-function-pointer-types-strict, a
warning designed to catch kernel control flow integrity (kCFI) issues at
build time, there is an instance around amd_iommufd_hw_info():
drivers/iommu/amd/iommu.c:3141:13: error: incompatible function pointer types initializing 'void ... | ```diff
diff --git a/drivers/iommu/amd/iommufd.c b/drivers/iommu/amd/iommufd.c
index ad627fd5ccc7..96ec6a4a760d 100644
--- a/drivers/iommu/amd/iommufd.c
+++ b/drivers/iommu/amd/iommufd.c
@@ -11,7 +11,7 @@
static const struct iommufd_viommu_ops amd_viommu_ops;
-void *amd_iommufd_hw_info(struct device *dev, u32 *len... |
fe747d7112283f47169e9c16e751179a9b38611e | Analyze and fix the following issue in the Linux kernel code: platform/x86: classmate-laptop: Add missing NULL pointer checks | Problem Details:
In a few places in the Classmate laptop driver, code using the accel
object may run before that object's address is stored in the driver
data of the input device using it.
For example, cmpc_accel_sensitivity_store_v4() is the "show" method
of cmpc_accel_sensitivity_attr_v4 which is added in cmpc_accel... | ```diff
diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c
index 6b1b8e444e24..74d3eb83f56a 100644
--- a/drivers/platform/x86/classmate-laptop.c
+++ b/drivers/platform/x86/classmate-laptop.c
@@ -207,7 +207,12 @@ static ssize_t cmpc_accel_sensitivity_show_v4(struct device *dev... |
52f527d0916bcdd7621a0c9e7e599b133294d495 | Analyze and fix the following issue in the Linux kernel code: bus: fsl-mc: fix an error handling in fsl_mc_device_add() | Problem Details:
In fsl_mc_device_add(), device_initialize() is called first.
put_device() should be called to drop the reference if error
occurs. And other resources would be released via put_device
-> fsl_mc_device_release. So remove redundant kfree() in
error handling path.
Fixes: bbf9d17d9875 ("staging: fsl-mc: Fr... | ```diff
diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c
index 08b99b0b342f..007223549887 100644
--- a/drivers/bus/fsl-mc/fsl-mc-bus.c
+++ b/drivers/bus/fsl-mc/fsl-mc-bus.c
@@ -896,11 +896,7 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc,
return 0;
error_cleanup_dev:
- kfre... |
3373503df025ab6c9a8ad2ce6b7febd2eb3c99dc | Analyze and fix the following issue in the Linux kernel code: xfs: use bounce buffering direct I/O when the device requires stable pages | Problem Details:
Fix direct I/O on devices that require stable pages by asking iomap
to bounce buffer. To support this, ioends are used for direct reads
in this case to provide a user context for copying data back from the
bounce buffer.
This fixes qemu when used on devices using T10 protection information
and probab... | ```diff
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 56a544638491..c3c1e149fff4 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -103,7 +103,7 @@ xfs_ioend_put_open_zones(
* IO write completion.
*/
STATIC void
-xfs_end_ioend(
+xfs_end_ioend_write(
struct iomap_ioend *ioend)
{
struct xfs_i... |
4ad357e39b2ecd5da7bcc7e840ee24d179593cd5 | Analyze and fix the following issue in the Linux kernel code: iomap: fix submission side handling of completion side errors | Problem Details:
The "if (dio->error)" in iomap_dio_bio_iter exists to stop submitting
more bios when a completion already return an error. Commit cfe057f7db1f
("iomap_dio_actor(): fix iov_iter bugs") made it revert the iov by
"copied", which is very wrong given that we've already consumed that
range and submitted a b... | ```diff
diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index 4000c8596d9b..867c0ac6df8f 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -443,9 +443,13 @@ static int iomap_dio_bio_iter(struct iomap_iter *iter, struct iomap_dio *dio)
nr_pages = bio_iov_vecs_to_alloc(dio->submit.iter, BIO_MAX_V... |
12da89e8844ae16e86b75a32b34a4f0b0525f453 | Analyze and fix the following issue in the Linux kernel code: block: open code bio_add_page and fix handling of mismatching P2P ranges | Problem Details:
bio_add_page fails to add data to the bio when mixing P2P with non-P2P
ranges, or ranges that map to different P2P providers. In that case
it will trigger that WARN_ON and return an error up the chain instead of
simply starting a new bio as intended. Fix this by open coding
bio_add_page and handling ... | ```diff
diff --git a/block/bio.c b/block/bio.c
index d633e80d821f..4591f0ba90f5 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1216,7 +1216,7 @@ static unsigned int get_contig_folio_len(struct page **pages,
* For a multi-segment *iter, this function only adds pages from the next
* non-empty segment of the iov itera... |
0ba6286a71581aaf8413a55b9bd90ea3463fd23b | Analyze and fix the following issue in the Linux kernel code: ASoC: tegra: Add AHUB writeable_reg for RX holes | Problem Details:
Add writeable_reg callbacks for Tegra210/186 AHUB RX registers so the
flat cache only treats valid RX locations as writable, avoiding holes
in the register map.
Fixes: 16e1bcc2caf4 ("ASoC: tegra: Add Tegra210 based AHUB driver")
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-by: Jon Hunter <jona... | ```diff
diff --git a/sound/soc/tegra/tegra210_ahub.c b/sound/soc/tegra/tegra210_ahub.c
index e795907a3963..fc5892056f83 100644
--- a/sound/soc/tegra/tegra210_ahub.c
+++ b/sound/soc/tegra/tegra210_ahub.c
@@ -2049,6 +2049,61 @@ static const struct snd_soc_component_driver tegra264_ahub_component = {
.num_dapm_routes = ... |
e82ae34af29e910c96d33c8b3a90c60e27f1625e | Analyze and fix the following issue in the Linux kernel code: HID: asus: fortify keyboard handshake | Problem Details:
Handshaking with an Asus device involves sending it a feature report
with the string "ASUS Tech.Inc." and then reading it back to verify the
handshake was successful, under the feature ID the interaction will
take place.
Currently, the driver only does the first part. Add the readback to
verify the ha... | ```diff
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index 2ff2170dc30a..cbf5bab9113b 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -49,7 +49,7 @@ MODULE_DESCRIPTION("Asus HID Keyboard and TouchPad");
#define FEATURE_REPORT_ID 0x0d
#define INPUT_REPORT_ID 0x5d
#define FEATURE_KB... |
afcae7d7b8a278a6c29e064f99e5bafd4ac1fb37 | Analyze and fix the following issue in the Linux kernel code: RDMA/core: add rdma_rw_max_sge() helper for SQ sizing | Problem Details:
svc_rdma_accept() computes sc_sq_depth as the sum of rq_depth and the
number of rdma_rw contexts (ctxts). This value is used to allocate the
Send CQ and to initialize the sc_sq_avail credit pool.
However, when the device uses memory registration for RDMA operations,
rdma_rw_init_qp() inflates the QP's... | ```diff
diff --git a/drivers/infiniband/core/rw.c b/drivers/infiniband/core/rw.c
index 2c148457b589..518095d82d5d 100644
--- a/drivers/infiniband/core/rw.c
+++ b/drivers/infiniband/core/rw.c
@@ -1071,34 +1071,57 @@ unsigned int rdma_rw_mr_factor(struct ib_device *device, u32 port_num,
}
EXPORT_SYMBOL(rdma_rw_mr_facto... |
bea28ac14cab25d79ea759138def79aa82e0b428 | Analyze and fix the following issue in the Linux kernel code: RDMA/core: add MR support for bvec-based RDMA operations | Problem Details:
The bvec-based RDMA API currently returns -EOPNOTSUPP when Memory
Region registration is required. This prevents iWARP devices from
using the bvec path, since iWARP requires MR registration for RDMA
READ operations. The force_mr debug parameter is also unusable with
bvec input.
Add rdma_rw_init_mr_wrs... | ```diff
diff --git a/drivers/infiniband/core/rw.c b/drivers/infiniband/core/rw.c
index c2fc8cba972e..2c148457b589 100644
--- a/drivers/infiniband/core/rw.c
+++ b/drivers/infiniband/core/rw.c
@@ -122,6 +122,36 @@ static int rdma_rw_init_one_mr(struct ib_qp *qp, u32 port_num,
return count;
}
+static int rdma_rw_init... |
ac059ae422d7d05ed9d62970a30fa3b95870b967 | Analyze and fix the following issue in the Linux kernel code: x86/hyperv: Fix smp_ops build failure on UP kernels | Problem Details:
CI testing found this build failure:
arch/x86/hyperv/hv_crash.c:631:9: error: ‘smp_ops’ undeclared (first use in this function)
And I bisected it back to the initial commit that enabled this feature:
77c860d2dbb72d1f3c6a2e882a07d19eca399db5 is the first bad commit
commit 77c860d2dbb72d1f3c6a2e... | ```diff
diff --git a/arch/x86/hyperv/hv_crash.c b/arch/x86/hyperv/hv_crash.c
index c0e22921ace1..a78e4fed5720 100644
--- a/arch/x86/hyperv/hv_crash.c
+++ b/arch/x86/hyperv/hv_crash.c
@@ -628,7 +628,9 @@ void hv_root_crash_init(void)
if (rc)
goto err_out;
+#ifdef CONFIG_SMP
smp_ops.crash_stop_other_cpus = hv_cr... |
6d60354ea2f90352b22039ed8371c4f4321df90e | Analyze and fix the following issue in the Linux kernel code: kbuild: Fix permissions of modules.builtin.modinfo | Problem Details:
Currently, modules.builtin.modinfo is created with executable permissions
(0755). This is because after commit 39cfd5b12160 ("kbuild: extract
modules.builtin.modinfo from vmlinux.unstripped"), modules.builtin.modinfo
is extracted from vmlinux.unstripped using objcopy. When extracting
sections, objcopy ... | ```diff
diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux
index cd788cac9d91..276c3134a563 100644
--- a/scripts/Makefile.vmlinux
+++ b/scripts/Makefile.vmlinux
@@ -113,7 +113,8 @@ vmlinux: vmlinux.unstripped FORCE
# what kmod expects to parse.
quiet_cmd_modules_builtin_modinfo = GEN $@
cmd_m... |
62089b804895e845f82e132ea9d46a1fc53ed5a7 | Analyze and fix the following issue in the Linux kernel code: kbuild: rpm-pkg: Generate debuginfo package manually | Problem Details:
Commit a7c699d090a1 ("kbuild: rpm-pkg: build a debuginfo RPM") adjusted
the __spec_install_post macro to include __os_install_post, which runs
brp-strip. This ends up stripping module signatures, breaking loading
modules with lockdown enabled.
Undo most of the changes of the aforementioned debuginfo p... | ```diff
diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index 98f206cb7c60..0f1c8de1bd95 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -2,6 +2,8 @@
%{!?_arch: %define _arch dummy}
%{!?make: %define make make}
%define makeflags %{?_smp_mflags} ARCH=%{ARCH}
+%defi... |
1932db202c9326747c6046959284992ab4124bac | Analyze and fix the following issue in the Linux kernel code: rtc: amlogic-a4: Remove IRQF_ONESHOT | Problem Details:
Passing IRQF_ONESHOT ensures that the interrupt source is masked until
the secondary (threaded) handler is done. If only a primary handler is
used then the flag makes no sense because the interrupt can not fire
(again) while its handler is running.
The flag also disallows force-threading of the primary... | ```diff
diff --git a/drivers/rtc/rtc-amlogic-a4.c b/drivers/rtc/rtc-amlogic-a4.c
index 123fb372fc9f..50938c35af36 100644
--- a/drivers/rtc/rtc-amlogic-a4.c
+++ b/drivers/rtc/rtc-amlogic-a4.c
@@ -369,7 +369,7 @@ static int aml_rtc_probe(struct platform_device *pdev)
return PTR_ERR(rtc->rtc_dev);
ret = devm_reques... |
87bf646921430e303176edc4eb07c30160361b73 | Analyze and fix the following issue in the Linux kernel code: RDMA/rxe: Fix race condition in QP timer handlers | Problem Details:
I encontered the following warning:
WARNING: drivers/infiniband/sw/rxe/rxe_task.c:249 at rxe_sched_task+0x1c8/0x238 [rdma_rxe], CPU#0: swapper/0/0
...
libsha1 [last unloaded: ip6_udp_tunnel]
CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G C 6.19.0-rc5-64k-v8+ #37 PREEMPT
Tainted: ... | ```diff
diff --git a/drivers/infiniband/sw/rxe/rxe_comp.c b/drivers/infiniband/sw/rxe/rxe_comp.c
index a5b2b62f596b..1390e861bd1d 100644
--- a/drivers/infiniband/sw/rxe/rxe_comp.c
+++ b/drivers/infiniband/sw/rxe/rxe_comp.c
@@ -119,12 +119,15 @@ void retransmit_timer(struct timer_list *t)
rxe_dbg_qp(qp, "retransmit ... |
e535c23513c63f02f67e3e09e0787907029efeaf | Analyze and fix the following issue in the Linux kernel code: drm/imx/tve: fix probe device leak | Problem Details:
Make sure to drop the reference taken to the DDC device during probe on
probe failure (e.g. probe deferral) and on driver unbind.
Fixes: fcbc51e54d2a ("staging: drm/imx: Add support for Television Encoder (TVEv2)")
Cc: stable@vger.kernel.org # 3.10
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-b... | ```diff
diff --git a/drivers/gpu/drm/imx/ipuv3/imx-tve.c b/drivers/gpu/drm/imx/ipuv3/imx-tve.c
index c5c6e070cc06..e861b8b9d8fa 100644
--- a/drivers/gpu/drm/imx/ipuv3/imx-tve.c
+++ b/drivers/gpu/drm/imx/ipuv3/imx-tve.c
@@ -528,6 +528,13 @@ static const struct component_ops imx_tve_ops = {
.bind = imx_tve_bind,
};
... |
aa7e37fd770bafaaf856ab77735296955b93e377 | Analyze and fix the following issue in the Linux kernel code: gpio: spacemit-k1: Use PDR for pin direction, not SDR/CDR | Problem Details:
On the SpacemiT GPIO controller, the direction control register PDR is
readable and writable [1]. Therefore, implement direction control by
using PDR as dirout, and don't mark it as unreadable.
The original implementation, using SDR as dirout and CDR as dirin, is
not actually a supported configuration... | ```diff
diff --git a/drivers/gpio/gpio-spacemit-k1.c b/drivers/gpio/gpio-spacemit-k1.c
index 8f570a1a4894..dbd2e81094b9 100644
--- a/drivers/gpio/gpio-spacemit-k1.c
+++ b/drivers/gpio/gpio-spacemit-k1.c
@@ -199,7 +199,7 @@ static int spacemit_gpio_add_bank(struct spacemit_gpio *sg,
struct gpio_chip *gc = &gb->chip.gc... |
b2cf569ed81e7574d4287eaf3b2c38690a934d34 | Analyze and fix the following issue in the Linux kernel code: gpio: brcmstb: correct hwirq to bank map | Problem Details:
The brcmstb_gpio_hwirq_to_bank() function was designed to
accommodate the downward numbering of dynamic GPIOs by
traversing the bank list in the reverse order. However, the
dynamic numbering has changed to increment upward which can
produce an incorrect mapping.
The function is modified to no longer a... | ```diff
diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c
index af9287ff5dc4..2352d099709c 100644
--- a/drivers/gpio/gpio-brcmstb.c
+++ b/drivers/gpio/gpio-brcmstb.c
@@ -301,12 +301,10 @@ static struct brcmstb_gpio_bank *brcmstb_gpio_hwirq_to_bank(
struct brcmstb_gpio_priv *priv, irq_hw_number_t... |
f88a31308db6a856229150039b0f56d59696ed31 | Analyze and fix the following issue in the Linux kernel code: seqlock: fix scoped_seqlock_read kernel-doc | Problem Details:
Eliminate all kernel-doc warnings in seqlock.h:
- correct the macro to have "()" immediately following the macro name
- don't include the macro parameters in the short description (first line)
- make the parameter names in the comments match the actual macro
parameter names.
- use "::" for the Examp... | ```diff
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index 113320911a09..c00063dffba3 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -1339,15 +1339,14 @@ static __always_inline void __scoped_seqlock_cleanup_ctx(struct ss_tmp **s)
__scoped_seqlock_next(&_s, _seqlock, _targ... |
730e5ebff40c852e3ea57b71bf02a4b89c69435f | Analyze and fix the following issue in the Linux kernel code: gpio: omap: do not register driver in probe() | Problem Details:
Commit 11a78b794496 ("ARM: OMAP: MPUIO wake updates") registers the
omap_mpuio_driver from omap_mpuio_init(), which is called from
omap_gpio_probe().
However, it neither makes sense to register drivers from probe()
callbacks of other drivers, nor does the driver core allow registering
drivers with a d... | ```diff
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index e136e81794df..e39723b5901b 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -799,10 +799,13 @@ static struct platform_device omap_mpuio_device = {
static inline void omap_mpuio_init(struct gpio_bank *bank)
{
- plat... |
944e3f7562c55fa37ebcdd58e5f60f296c81a854 | Analyze and fix the following issue in the Linux kernel code: tools: Update context analysis macros in compiler_types.h | Problem Details:
In sync with the main kernel headers, include a stub version of
compiler-context-analysis.h in tools/include/linux/compiler_types.h and
remove the sparse context tracking definitions.
Since tools/ headers are generally self-contained, provide a standalone
tools/include/linux/compiler-context-analysis.... | ```diff
diff --git a/tools/include/linux/compiler-context-analysis.h b/tools/include/linux/compiler-context-analysis.h
new file mode 100644
index 000000000000..13a9115e9e58
--- /dev/null
+++ b/tools/include/linux/compiler-context-analysis.h
@@ -0,0 +1,42 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _TOOLS_LINUX_... |
c0b4a4feeb43305a754893d8d9c6b2b5a52d45ac | Analyze and fix the following issue in the Linux kernel code: pinctrl: equilibrium: Fix device node reference leak in pinbank_init() | Problem Details:
When calling of_parse_phandle_with_fixed_args(), the caller is
responsible to call of_node_put() to release the reference of device
node.
In pinbank_init(), the reference of the node obtained from the
"gpio-ranges" property is never released, resulting in a reference
count leak.
Add the missing of_no... | ```diff
diff --git a/drivers/pinctrl/pinctrl-equilibrium.c b/drivers/pinctrl/pinctrl-equilibrium.c
index 2d04829b29c9..48b55c5bf8d4 100644
--- a/drivers/pinctrl/pinctrl-equilibrium.c
+++ b/drivers/pinctrl/pinctrl-equilibrium.c
@@ -846,6 +846,7 @@ static int pinbank_init(struct device_node *np,
bank->pin_base = spec... |
7c746eb71fc3737340c32f44c31b111f74f5632c | Analyze and fix the following issue in the Linux kernel code: rnbd-clt: fix refcount underflow in device unmap path | Problem Details:
During device unmapping (triggered by module unload or explicit unmap),
a refcount underflow occurs causing a use-after-free warning:
[14747.574913] ------------[ cut here ]------------
[14747.574916] refcount_t: underflow; use-after-free.
[14747.574917] WARNING: lib/refcount.c:28 at refcount_wa... | ```diff
diff --git a/drivers/block/rnbd/rnbd-clt.c b/drivers/block/rnbd/rnbd-clt.c
index 094ecc174f41..757df2896aeb 100644
--- a/drivers/block/rnbd/rnbd-clt.c
+++ b/drivers/block/rnbd/rnbd-clt.c
@@ -1664,7 +1664,6 @@ static void rnbd_destroy_sysfs(struct rnbd_clt_dev *dev,
/* To avoid deadlock firstly remove itself... |
c87f15efeb2efc8049a4f021e7328f3a4737f749 | Analyze and fix the following issue in the Linux kernel code: Revert "rnbd-clt: fix refcount underflow in device unmap path" | Problem Details:
This reverts commit ec19ed2b3e2af8ec5380400cdee9cb6560144506.
This commit relies on changes queued for 7.0, and isn't safe in its
current form for the 6.19 release. Revert it for now for 6.19.
Link: https://lore.kernel.org/linux-block/aXhLQmRudk7cSAnT@shinmob/
Signed-off-by: Jens Axboe <axboe@kernel.... | ```diff
diff --git a/drivers/block/rnbd/rnbd-clt.c b/drivers/block/rnbd/rnbd-clt.c
index 8194a970f002..d1c354636315 100644
--- a/drivers/block/rnbd/rnbd-clt.c
+++ b/drivers/block/rnbd/rnbd-clt.c
@@ -1662,6 +1662,7 @@ static void destroy_sysfs(struct rnbd_clt_dev *dev,
/* To avoid deadlock firstly remove itself */
... |
806ae939c41e5da1d94a1e2b31f5702e96b6c3e3 | Analyze and fix the following issue in the Linux kernel code: io_uring/net: don't continue send bundle if poll was required for retry | Problem Details:
If a send bundle has picked a bunch of buffers, then it needs to send
all of those to be complete. This may require poll arming, if the send
buffer ends up being full. Once a send bundle has been poll armed, no
further bundles should be attempted.
This allows a current bundle to complete even though i... | ```diff
diff --git a/io_uring/net.c b/io_uring/net.c
index 519ea055b761..d9a4b83804a2 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -515,7 +515,11 @@ static inline bool io_send_finish(struct io_kiocb *req,
cflags = io_put_kbufs(req, sel->val, sel->buf_list, io_bundle_nbufs(kmsg, sel->val));
- if (bundle_fin... |
071588136007482d70fd2667b827036bc60b1f8f | Analyze and fix the following issue in the Linux kernel code: ipc: don't audit capability check in ipc_permissions() | Problem Details:
The IPC sysctls implement the ctl_table_root::permissions hook and
they override the file access mode based on the CAP_CHECKPOINT_RESTORE
capability, which is being checked regardless of whether any access is
actually denied or not, so if an LSM denies the capability, an audit
record may be logged even... | ```diff
diff --git a/include/linux/capability.h b/include/linux/capability.h
index 1fb08922552c..37db92b3d6f8 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -203,6 +203,12 @@ static inline bool checkpoint_restore_ns_capable(struct user_namespace *ns)
ns_capable(ns, CAP_SYS_ADMIN);
}
+... |
571f945fb91bb678827e76e6bd91595eb6fab841 | Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: rfk: add to print debug log of CIM3K | Problem Details:
Add calibration report of CIM3K, which does calibration in firmware and
send a C2H event as debug purpose.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260123013957.16418-5-pkshih@realtek.com | ```diff
diff --git a/drivers/net/wireless/realtek/rtw89/fw.h b/drivers/net/wireless/realtek/rtw89/fw.h
index 2f04138148b7..4fa982cbac49 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.h
+++ b/drivers/net/wireless/realtek/rtw89/fw.h
@@ -5102,6 +5102,33 @@ struct rtw89_c2h_rf_txiqk_rpt_log {
__le32 tx_xym[2][6][14];... |
9df3575ed2bb5474df2f9bb5735a9946c2d84579 | Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: rfk: add to print debug log of TX IQK | Problem Details:
Add report format for TX IQK, which do calibration in firmware and send
a C2H event as debug purpose.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260123013957.16418-3-pkshih@realtek.com | ```diff
diff --git a/drivers/net/wireless/realtek/rtw89/fw.h b/drivers/net/wireless/realtek/rtw89/fw.h
index 31402667e155..c3ad473a06f2 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.h
+++ b/drivers/net/wireless/realtek/rtw89/fw.h
@@ -5069,6 +5069,26 @@ struct rtw89_c2h_rf_txgapk_rpt_log {
u8 rsv1;
} __packed;
... |
ae23bc81ddf7c17b663c4ed1b21e35527b0a7131 | Analyze and fix the following issue in the Linux kernel code: bpf: Fix tcx/netkit detach permissions when prog fd isn't given | Problem Details:
This commit fixes a security issue where BPF_PROG_DETACH on tcx or
netkit devices could be executed by any user when no program fd was
provided, bypassing permission checks. The fix adds a capability
check for CAP_NET_ADMIN or CAP_SYS_ADMIN in this case.
Fixes: e420bed02507 ("bpf: Add fd-based tcx mul... | ```diff
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 4427c6e98331..9272a237cced 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -3362,6 +3362,11 @@ static inline void bpf_prog_report_arena_violation(bool write, unsigned long add
}
#endif /* CONFIG_BPF_SYSCALL */
+static inline bool bpf... |
a040afa3bca415019d96a586b96b5f17b1f55a90 | Analyze and fix the following issue in the Linux kernel code: gve: fix probe failure if clock read fails | Problem Details:
If timestamping is supported, GVE reads the clock during probe,
which can fail for various reasons. Previously, this failure would
abort the driver probe, rendering the device unusable. This behavior
has been observed on production GCP VMs, causing driver initialization
to fail completely.
This patch ... | ```diff
diff --git a/drivers/net/ethernet/google/gve/gve.h b/drivers/net/ethernet/google/gve/gve.h
index 970d5ca8cdde..cbdf3a842cfe 100644
--- a/drivers/net/ethernet/google/gve/gve.h
+++ b/drivers/net/ethernet/google/gve/gve.h
@@ -1206,6 +1206,11 @@ static inline bool gve_supports_xdp_xmit(struct gve_priv *priv)
}
}... |
476681f10cc1e0e56e26856684e75d4678b072b2 | Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Account for netdev stats in ndo_get_stats64 | Problem Details:
The driver's ndo_get_stats64 callback is only reporting mlx5 counters,
without accounting for the netdev stats, causing errors from the network
stack to be invisible in statistics.
Add netdev_stats_to_stats64() call to first populate the counters, then
add mlx5 counters on top, ensuring both are accou... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index f83359f7fdea..4b2963bbe7ff 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -4052,6 +4052,8 @@ mlx5e_get_stats(struct ... |
f67666938ae626cbda63fbf5176b3583c07e7124 | Analyze and fix the following issue in the Linux kernel code: net/mlx5e: TC, delete flows only for existing peers | Problem Details:
When deleting TC steering flows, iterate only over actual devcom
peers instead of assuming all possible ports exist. This avoids
touching non-existent peers and ensures cleanup is limited to
devices the driver is currently connected to.
BUG: kernel NULL pointer dereference, address: 0000000000000008
... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index a8773b2342c2..424786f489ec 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -2147,11 +2147,14 @@ static void mlx5e_tc_del_fdb_... |
2ae8c7edea87f54609bda30963a099cd3c64b0bb | Analyze and fix the following issue in the Linux kernel code: net/mlx5: Fix Unbinding uplink-netdev in switchdev mode | Problem Details:
It is possible to unbind the uplink ETH driver while the E-Switch is
in switchdev mode. This leads to netdevice reference counting issues[1],
as the driver removal path was not designed to clean up from this state.
During uplink ETH driver removal (_mlx5e_remove), the code now waits for
any concurrent... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/dev.c b/drivers/net/ethernet/mellanox/mlx5/core/dev.c
index 64c04f52990f..781e39b5aa1d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/dev.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/dev.c
@@ -575,3 +575,17 @@ bool mlx5_same_hw_devs(struct mlx5_core_... |
239f09e258b906deced5c2a7c1ac8aed301b558b | Analyze and fix the following issue in the Linux kernel code: selftests: ptp: treat unsupported PHC operations as skip | Problem Details:
Some PTP hardware clock (PHC) devices may return -EOPNOTSUPP for
operations like settime, adjtime, or adjfreq. This commonly occurs
with timestamp-only PHC implementations that don't support full clock
control.
For background, syzbot previously exposed a crash risk when PTP clock
drivers lacked requir... | ```diff
diff --git a/tools/testing/selftests/ptp/phc.sh b/tools/testing/selftests/ptp/phc.sh
index 51aad466d989..9f61c1579edf 100755
--- a/tools/testing/selftests/ptp/phc.sh
+++ b/tools/testing/selftests/ptp/phc.sh
@@ -52,6 +52,7 @@ phc_sanity
# Exit status to return at the end. Set in case one of the tests fails.
... |
15e9abc270551374193e16ef13d31fd643567fb7 | Analyze and fix the following issue in the Linux kernel code: net: usb: int51x1: use usbnet_cdc_update_filter | Problem Details:
The int51x1 driver uses the same requests as USB CDC to handle packet
filtering, but provides its own definitions and function to handle it.
The chip datasheet says the requests are CDC compliant. Replace this
unnecessary code with a reference to usbnet_cdc_update_filter.
Also fix the broken datasheet... | ```diff
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
index 856e648d804e..d050adfe860a 100644
--- a/drivers/net/usb/Kconfig
+++ b/drivers/net/usb/Kconfig
@@ -564,6 +564,7 @@ config USB_HSO
config USB_NET_INT51X1
tristate "Intellon PLC based usb adapter"
depends on USB_USBNET
+ select USB_NET_CDCET... |
d64f761dbfda3f4eb7e5c14c1336677de20d5d6f | Analyze and fix the following issue in the Linux kernel code: net: stmmac: don't pass ioaddr to fix_soc_reset() method | Problem Details:
As the stmmac_priv struct is passed to the fix_soc_reset() method which
has the ioaddr, there is no need to pass ioaddr separately. Pass just
the stmmac_priv struct. Fix up the glues that use it.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Maxime Chevallier <maxime.c... | ```diff
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
index c722ff2dc1fc..97de4726208e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
@@ -46,7 +46,7 @@ struct imx_dwmac_ops {
u32 flags;... |
297c9d96e3085116c5cde18170dba716a1f2591e | Analyze and fix the following issue in the Linux kernel code: perf jevents: Handle deleted JSONS in out of source builds | Problem Details:
Make the source folders a dependency for the generated folder root so
that whenever a file is deleted from the source it will force a new
fresh copy of all the JSON files and avoid stale deleted files.
JSON_DIRS_OUTPUT_ROOT needs to be a dependency of LEGACY_CACHE_JSON so
that the root folder doesn't ... | ```diff
diff --git a/tools/perf/pmu-events/Build b/tools/perf/pmu-events/Build
index a46ab7b612df..4f9ef624ba70 100644
--- a/tools/perf/pmu-events/Build
+++ b/tools/perf/pmu-events/Build
@@ -1,5 +1,6 @@
pmu-events-y += pmu-events.o
JSON = $(shell find pmu-events/arch -name '*.json' -o -name '*.csv')
+JSON_DIRS = $... |
612e4022c616eba66ed15e6b7a9924251e0298e8 | Analyze and fix the following issue in the Linux kernel code: perf strlist: Remove dont_dupstr logic, used only once | Problem Details:
Ian Rogers noticed that 678ed6b707e4b2db ("perf strlist: Don't write to
const memory") breaks the 'Remove thread map' 'perf test' entry, because
it keeps pointers to the temporary string introduced to avoid touching
the const memory.
This is because the thread_map__new_by_[pt]id_str() were the only
me... | ```diff
diff --git a/tools/perf/util/strlist.c b/tools/perf/util/strlist.c
index 98883672fcf4..50add72575e0 100644
--- a/tools/perf/util/strlist.c
+++ b/tools/perf/util/strlist.c
@@ -12,20 +12,16 @@
#include <linux/zalloc.h>
static
-struct rb_node *strlist__node_new(struct rblist *rblist, const void *entry)
+struct... |
ee8d07cd5730038e33bf5e551448190bbd480eb8 | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix race in power state check before mutex lock | Problem Details:
The power state check in amdgpu_dpm_set_powergating_by_smu() is done
before acquiring the pm mutex, leading to a race condition where:
1. Thread A checks state and thinks no change is needed
2. Thread B acquires mutex and modifies the state
3. Thread A returns without updating state, causing inconsiste... | ```diff
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c
index 79b174e5326d..302af1fb6901 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c
@@ -80,15 +80,15 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev,
enum ip_power... |
8b1ecc9377bc641533cd9e76dfa3aee3cd04a007 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix NULL pointer dereference in amdgpu_gmc_filter_faults_remove | Problem Details:
On APUs such as Raven and Renoir (GC 9.1.0, 9.2.2, 9.3.0), the ih1 and
ih2 interrupt ring buffers are not initialized. This is by design, as
these secondary IH rings are only available on discrete GPUs. See
vega10_ih_sw_init() which explicitly skips ih1/ih2 initialization when
AMD_IS_APU is set.
Howev... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index 7e623f91f2d7..d9c7ad297293 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -498,8 +498,13 @@ void amdgpu_gmc_filter_faults_remove(struct amdgpu_device *adev,... |
239d0ccf567c3b09aed58eb88cd3376af37aaf14 | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix smu v14 soft clock frequency setting issue | Problem Details:
v1:
resolve the issue where some freq frequencies cannot be set correctly
due to insufficient floating-point precision.
v2:
patch this convert on 'max' value only.
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alex... | ```diff
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h
index 29a4583db873..0b1e6f25e611 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h
@@ -57,6 +57,7 @@ extern const int decoded_link_width[8];
#def... |
c764b7af15289051718b4859a67f9a3bc69d3fb2 | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix smu v13 soft clock frequency setting issue | Problem Details:
v1:
resolve the issue where some freq frequencies cannot be set correctly
due to insufficient floating-point precision.
v2:
patch this convert on 'max' value only.
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alex... | ```diff
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
index 4263798d716b..8e592a477c33 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
@@ -56,6 +56,7 @@
#define SMUQ10_TO_UINT(x) ((x) >> 10)
#define... |
91544c45fa6a165abde6f2363bb7ded5843ef840 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix jpeg ring test order in vcn_v4_0_3 | Problem Details:
Fix the vcn reset sequence in vcn_v4_0_3_ring_reset() to restore
JPEG power state and unlock the JPEG powergating mutex before
running the JPEG ring post-reset helper.
Fixes: d25c67fd9d6f ("drm/amdgpu/vcn4.0.3: rework reset handling")
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Jesse Z... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
index dd247abce1ab..e78526a4e521 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
@@ -1742,11 +1742,11 @@ static int vcn_v4_0_3_ring_reset(struct amdgpu_ring *ring,
... |
7a3fbdfd19ec5992c0fc2d0bd83888644f5f2f38 | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix race in power state check before mutex lock | Problem Details:
The power state check in amdgpu_dpm_set_powergating_by_smu() is done
before acquiring the pm mutex, leading to a race condition where:
1. Thread A checks state and thinks no change is needed
2. Thread B acquires mutex and modifies the state
3. Thread A returns without updating state, causing inconsiste... | ```diff
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c
index 4214f7314963..feadf604b474 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c
@@ -80,15 +80,15 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev,
enum ip_power... |
37e6349e9328feb600568144411c18e3c35e3077 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Promote DC to 3.2.367 | Problem Details:
* Fw release 0.1.44.0
* Fixes for corruption on platforms older than DCN4x.
* Bug fixes related to USB4 link training
* Fixes related to FP guard
* Debug helpers and other stability fixes.
* Some refactors to improve code quality
Signed-off-by: Taimur Hassan <Syed.Hassan@amd.com>
Signed-off-by: Aurabi... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index 472d0eeca85e..ab19b6230945 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -63,7 +63,7 @@ struct dcn_dsc_reg_state;
struct dcn_optc_reg_state;
struct dcn_dccg_reg_state;
... |
0f2828150f7ab31a57fe3bce6c2d378103dab10a | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: [FW Promotion] Release 0.1.44.0 | Problem Details:
* Panel Replay related features/bugfixes
* BootCRC feature
Signed-off-by: Taimur Hassan <Syed.Hassan@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deu... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
index 6d82973ccc18..18e0bdfd6ff4 100644
--- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
+++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
@@ -139,6 +139,33 @@
*/
#define DMUB_CMD_PSR_CONTR... |
5b8cfb0cebf93bd0f8b316084ce0589df8fd57ac | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add debug flag to override min dispclk | Problem Details:
[WHY]
Enable dynamic ODM testing without needing a valid dispclk table
[HOW]
Create a debug flag to specify an override value for min dispclk
Reviewed-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Signed-off-by: Michael Strauss <michael.strauss@amd.com>
Signed-off-by: Aurabindo Pillai <aurabind... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index d377be76360c..472d0eeca85e 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -1210,6 +1210,7 @@ struct dc_debug_options {
bool disable_deferred_minimal_transitions;
unsign... |
bdad08670278829771626ea7b57c4db531e2544f | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix GFX12 family constant checks | Problem Details:
Using >=, <= for checking the family is not always correct.
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Matthew Stewart <Matthew.Stewart2@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ```diff
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index b4ba60e90c47..0b4fc654e76f 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -11867,7 +11867,7 @@ static int dm_check_c... |
6ce8d536c80aa1f059e82184f0d1994436b1d526 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix NULL pointer dereference in amdgpu_gmc_filter_faults_remove | Problem Details:
On APUs such as Raven and Renoir (GC 9.1.0, 9.2.2, 9.3.0), the ih1 and
ih2 interrupt ring buffers are not initialized. This is by design, as
these secondary IH rings are only available on discrete GPUs. See
vega10_ih_sw_init() which explicitly skips ih1/ih2 initialization when
AMD_IS_APU is set.
Howev... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index d9ff68a43178..b793ce17140c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -498,8 +498,13 @@ void amdgpu_gmc_filter_faults_remove(struct amdgpu_device *adev,... |
53868dd8774344051999c880115740da92f97feb | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix smu v14 soft clock frequency setting issue | Problem Details:
v1:
resolve the issue where some freq frequencies cannot be set correctly
due to insufficient floating-point precision.
v2:
patch this convert on 'max' value only.
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alex... | ```diff
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h
index 613d4d36f32f..b453e6efc7c9 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h
@@ -56,6 +56,7 @@ extern const int decoded_link_width[8];
#def... |
6194f60c707e3878e120adeb36997075664d8429 | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix smu v13 soft clock frequency setting issue | Problem Details:
v1:
resolve the issue where some freq frequencies cannot be set correctly
due to insufficient floating-point precision.
v2:
patch this convert on 'max' value only.
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alex... | ```diff
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
index efeaa3d57712..b0d6b7b0946d 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
@@ -55,6 +55,7 @@
#define SMUQ10_TO_UINT(x) ((x) >> 10)
#define... |
f7e06786512e730f750138b1221b6342bcf07859 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/mes: Remove idr leftovers v2 | Problem Details:
Commit
cb17fff3a254 ("drm/amdgpu/mes: remove unused functions")
removed most of the code using these IDRs but forgot to remove the struct
members and init/destroy paths.
There is also interrupt handling code in SDMA 5.0 and 5.2 which appears to
be using it, but is is unreachable since nothing ever all... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
index 6e19836c5ff6..0d4c77c1b4b5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
@@ -115,9 +115,6 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
adev->mes.ade... |
b398665a5b71665542296378c5f4e42bf22c3e9a | Analyze and fix the following issue in the Linux kernel code: PCI: Add 'pci' prefix to struct pci_dev_resource handling functions | Problem Details:
setup-bus.c has static functions for handling struct pci_dev_resource
related operation which have no prefixes. Add 'pci' prefixes to those
function names as add_to_list() will be needed in another file by an
upcoming change.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: ... | ```diff
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index bbc615d85c88..3cc26fede31a 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -49,7 +49,7 @@ struct pci_dev_resource {
unsigned long flags;
};
-static void free_list(struct list_head *head)
+static void pci_dev_res_free... |
f909e3ee3ed1a44202f09ac7e637a0f9ec372225 | Analyze and fix the following issue in the Linux kernel code: PCI: Remove old_size limit from bridge window sizing | Problem Details:
calculate_memsize() applies lower bound to the resource size before
aligning the resource size making it impossible to shrink bridge window
resources. I've not found any justification for this lower bound and
nothing indicated it was to work around some HW issue.
Prior to the commit 3baeae36039a ("PCI... | ```diff
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 612288716ba8..8660449f59bd 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1071,16 +1071,13 @@ static resource_size_t calculate_memsize(resource_size_t size,
resource_size_t min_size,
resource_size_t add_si... |
4326ab1806a52888d1cd076b9020677703e25545 | Analyze and fix the following issue in the Linux kernel code: resource: Increase MAX_IORES_LEVEL to 8 | Problem Details:
While debugging a PCI resource allocation issue, the resources for many
nested bridges and endpoints got flattened in /proc/iomem by
MAX_IORES_LEVEL that is set to 5. This made the iomem output hard to
read as the visual hierarchy cues were lost.
Increase MAX_IORES_LEVEL to 8 to avoid flattening PCI t... | ```diff
diff --git a/kernel/resource.c b/kernel/resource.c
index e4e9bac12e6e..c5f03ac78e44 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -82,7 +82,7 @@ static struct resource *next_resource(struct resource *p, bool skip_children,
#ifdef CONFIG_PROC_FS
-enum { MAX_IORES_LEVEL = 5 };
+enum { MAX_IORES_L... |
e540be7d56d740144b1bd6f220b61ffe2f3830d4 | Analyze and fix the following issue in the Linux kernel code: spi: SPI_AXIADO should depend on ARCH_AXIADO | Problem Details:
The Axiado DB-H SPI controller is only present on Axiado AX3000 SoCs.
Hence add a dependency on ARCH_AXIADO, to prevent asking the user about
this driver when configuring a kernel without Axiado SoC Family support.
Fixes: e75a6b00ad7962a7 ("spi: axiado: Add driver for Axiado SPI DB controller")
Signed... | ```diff
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 55de59e0db85..a5ffae9f5668 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -216,6 +216,7 @@ config SPI_AXI_SPI_ENGINE
config SPI_AXIADO
tristate "Axiado DB-H SPI controller"
depends on SPI_MEM
+ depends on ARCH_AXIADO || COMPILE_TES... |
bc75c8e5071120e919beb39e69f0979cccfdf219 | Analyze and fix the following issue in the Linux kernel code: PCI: Rewrite bridge window head alignment function | Problem Details:
The calculation of bridge window head alignment is done by
calculate_mem_align() [*]. With the default bridge window alignment, it
is used for both head and tail alignment.
The selected head alignment does not always result in tight-fitting
resources (gap at d4f00000-d4ffffff):
d4800000-dbffffff : ... | ```diff
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 4b918ff4d2d8..80e5a8fc62e7 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1228,6 +1228,45 @@ static inline resource_size_t calculate_mem_align(resource_size_t *aligns,
return min_align;
}
+/*
+ * Calculate bridge w... |
05faf2c0a76581d0a7fdbb8ec46477ba183df95b | Analyze and fix the following issue in the Linux kernel code: ice: stop counting UDP csum mismatch as rx_errors | Problem Details:
Since the beginning, the Intel ice driver has counted receive checksum
offload mismatches into the rx_errors member of the rtnl_link_stats64
struct. In ethtool -S these show up as rx_csum_bad.nic.
I believe counting these in rx_errors is fundamentally wrong, as it's
pretty clear from the comments in i... | ```diff
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index de488185cd4a..71c6d53b461e 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -6982,7 +6982,6 @@ void ice_update_vsi_stats(struct ice_vsi *vsi)
cur_n... |
9bb30be4d89ff9a8d7ab1aa0eb2edaca83431f85 | Analyze and fix the following issue in the Linux kernel code: ice: Fix NULL pointer dereference in ice_vsi_set_napi_queues | Problem Details:
Add NULL pointer checks in ice_vsi_set_napi_queues() to prevent crashes
during resume from suspend when rings[q_idx]->q_vector is NULL.
Tested adaptor:
60:00.0 Ethernet controller [0200]: Intel Corporation Ethernet Controller E810-XXV for SFP [8086:159b] (rev 02)
Subsystem: Intel Corporation E... | ```diff
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 98010354db15..d47af94f31a9 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -2783,12 +2783,14 @@ void ice_vsi_set_napi_queues(struct ice_vsi *vsi)
ASS... |
100cf7b4ca6ed770ec4287f3789b1da2e340a05a | Analyze and fix the following issue in the Linux kernel code: ixgbe: don't initialize aci lock in ixgbe_recovery_probe() | Problem Details:
hw->aci.lock is already initialized in ixgbe_sw_init(), so
ixgbe_recovery_probe() doesn't need to initialize the lock. This
function is also not responsible for destroying the lock on failures.
Additionally, change the name of label in accordance with this change.
Fixes: 29cb3b8d95c7 ("ixgbe: add E61... | ```diff
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index a69b5a8a91cb..c58051e4350b 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -11476,10 +11476,9 @@ static int ixgbe_recovery_probe(stru... |
638344712aefeba97b6e0d90f560815fd88abd0f | Analyze and fix the following issue in the Linux kernel code: ixgbe: fix memory leaks in the ixgbe_recovery_probe() path | Problem Details:
When ixgbe_recovery_probe() is invoked and this function fails,
allocated resources in advance are not completely freed, because
ixgbe_probe() returns ixgbe_recovery_probe() directly and
ixgbe_recovery_probe() only frees partial resources, resulting in memory
leaks including:
- adapter->io_addr
- adapt... | ```diff
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 034618e79169..a69b5a8a91cb 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -11468,14 +11468,12 @@ static void ixgbe_set_fw_version(st... |
785632d82648569b1ce8f11854d0775b219e2706 | Analyze and fix the following issue in the Linux kernel code: ACPI: sysfs: Replace sprintf() with sysfs_emit() | Problem Details:
Replace all sprintf() calls with sysfs_emit() in sysfs show functions.
sysfs_emit() is preferred to sprintf() for formatting sysfs output
as it provides better bounds checking and prevents potential buffer
overflows.
Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com>
[ rjw: Subject and changelog... | ```diff
diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
index 8cc9507b3c6d..c5434b998604 100644
--- a/drivers/acpi/device_sysfs.c
+++ b/drivers/acpi/device_sysfs.c
@@ -27,7 +27,7 @@ static ssize_t acpi_object_path(acpi_handle handle, char *buf)
if (result)
return result;
- result = sprintf... |
91e0c2fec10c975a0e2a4b91e137825d1447f50f | Analyze and fix the following issue in the Linux kernel code: drm/xe: Move _THIS_IP_ usage from xe_vm_create() to dedicated function | Problem Details:
After commit a3866ce7b122 ("drm/xe: Add vm to exec queues association"),
building for an architecture other than x86 (which defines its own
_THIS_IP_) with clang fails with:
drivers/gpu/drm/xe/xe_vm.c:1586:3: error: cannot jump from this indirect goto statement to one of its possible targets
1586... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index f7bb21ac1987..293b92ed2fdd 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -1474,6 +1474,20 @@ static void xe_vm_pt_destroy(struct xe_vm *vm)
}
}
+static void xe_vm_init_prove_locking(struct xe_device *xe... |
53ad4a948a4586359b841d607c08fb16c5503230 | Analyze and fix the following issue in the Linux kernel code: gpio: virtuser: fix UAF in configfs release path | Problem Details:
The gpio-virtuser configfs release path uses guard(mutex) to protect
the device structure. However, the device is freed before the guard
cleanup runs, causing mutex_unlock() to operate on freed memory.
Specifically, gpio_virtuser_device_config_group_release() destroys
the mutex and frees the device wh... | ```diff
diff --git a/drivers/gpio/gpio-virtuser.c b/drivers/gpio/gpio-virtuser.c
index 37f2ce20f1ae..098e67d70ffa 100644
--- a/drivers/gpio/gpio-virtuser.c
+++ b/drivers/gpio/gpio-virtuser.c
@@ -1682,10 +1682,10 @@ static void gpio_virtuser_device_config_group_release(struct config_item *item)
{
struct gpio_virtuser... |
c0ae43d303e45764918fa8c1dc13d6a5db59c479 | Analyze and fix the following issue in the Linux kernel code: gpiolib: acpi: use BIT_ULL() for u64 mask in address space handler | Problem Details:
The BIT() macro uses unsigned long, which is 32 bits on 32-bit
architectures. When iterating over GPIO pins with index >= 32,
the expression (*value & BIT(i)) causes undefined behavior due
to shifting by a value >= type width.
Since 'value' is a pointer to u64, use BIT_ULL() to ensure correct
64-bit m... | ```diff
diff --git a/drivers/gpio/gpiolib-acpi-core.c b/drivers/gpio/gpiolib-acpi-core.c
index 83dd227dbbec..d42f769eeb11 100644
--- a/drivers/gpio/gpiolib-acpi-core.c
+++ b/drivers/gpio/gpiolib-acpi-core.c
@@ -1159,7 +1159,7 @@ acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address,
mutex_unlock(&a... |
96313fcc1f062ba239f4832c9eff685da6c51c99 | Analyze and fix the following issue in the Linux kernel code: gpio: sprd: Change sprd_gpio lock to raw_spin_lock | Problem Details:
There was a lockdep warning in sprd_gpio:
[ 6.258269][T329@C6] [ BUG: Invalid wait context ]
[ 6.258270][T329@C6] 6.18.0-android17-0-g30527ad7aaae-ab00009-4k #1 Tainted: G W OE
[ 6.258272][T329@C6] -----------------------------
[ 6.258273][T329@C6] modprobe/329 is trying to lock:
[... | ```diff
diff --git a/drivers/gpio/gpio-sprd.c b/drivers/gpio/gpio-sprd.c
index 413bcd0a4240..2cc8abe705cd 100644
--- a/drivers/gpio/gpio-sprd.c
+++ b/drivers/gpio/gpio-sprd.c
@@ -35,7 +35,7 @@
struct sprd_gpio {
struct gpio_chip chip;
void __iomem *base;
- spinlock_t lock;
+ raw_spinlock_t lock;
int irq;
};
@... |
b2bc7c44ed1779fc9eaab9a186db0f0d01439622 | Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: Fix slab-out-of-bounds read in DeleteIndexEntryRoot | Problem Details:
In the 'DeleteIndexEntryRoot' case of the 'do_action' function, the
entry size ('esize') is retrieved from the log record without adequate
bounds checking.
Specifically, the code calculates the end of the entry ('e2') using:
e2 = Add2Ptr(e1, esize);
It then calculates the size for memmove using '... | ```diff
diff --git a/fs/ntfs3/fslog.c b/fs/ntfs3/fslog.c
index 4ea94d53a819..10863c83c315 100644
--- a/fs/ntfs3/fslog.c
+++ b/fs/ntfs3/fslog.c
@@ -3431,6 +3431,9 @@ move_data:
e1 = Add2Ptr(attr, le16_to_cpu(lrh->attr_off));
esize = le16_to_cpu(e1->size);
+ if (PtrOffset(e1, Add2Ptr(hdr, used)) < esize)
+ got... |
e7c30675a7fb79d94400987865a3bd620458ca1a | Analyze and fix the following issue in the Linux kernel code: io_uring/bpf_filter: cache lookup table in ctx->bpf_filters | Problem Details:
Currently a few pointer dereferences need to be made to both check if
BPF filters are installed, and then also to retrieve the actual filter
for the opcode. Cache the table in ctx->bpf_filters to avoid that.
Add a bit of debug info on ring exit to show if we ever got this wrong.
Small risk of that giv... | ```diff
diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h
index 74bf98362876..7617df247238 100644
--- a/include/linux/io_uring_types.h
+++ b/include/linux/io_uring_types.h
@@ -287,6 +287,8 @@ struct io_ring_ctx {
struct task_struct *submitter_task;
struct io_rings *rings;
+ /* cache... |
17e2ce02bf5669dfa659976e93d409228cba98f9 | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Add tests for FIONREAD and copied_seq | Problem Details:
This commit adds two new test functions: one to reproduce the bug reported
by syzkaller [1], and another to cover the calculation of copied_seq.
The tests primarily involve installing and uninstalling sockmap on
sockets, then reading data to verify proper functionality.
Additionally, extend the do_t... | ```diff
diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c b/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c
index 1e3e4392dcca..256707e7d20d 100644
--- a/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c
+++ b/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c
@@ -1,7 +1,8 @@
// SPDX-... |
929e30f9312514902133c45e51c79088421ab084 | Analyze and fix the following issue in the Linux kernel code: bpf, sockmap: Fix FIONREAD for sockmap | Problem Details:
A socket using sockmap has its own independent receive queue: ingress_msg.
This queue may contain data from its own protocol stack or from other
sockets.
Therefore, for sockmap, relying solely on copied_seq and rcv_nxt to
calculate FIONREAD is not enough.
This patch adds a new msg_tot_len field in th... | ```diff
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h
index dfdc158ab88c..829b281d6c9c 100644
--- a/include/linux/skmsg.h
+++ b/include/linux/skmsg.h
@@ -97,6 +97,8 @@ struct sk_psock {
struct sk_buff_head ingress_skb;
struct list_head ingress_msg;
spinlock_t ingress_lock;
+ /** @msg_tot_len: Tot... |
b40cc5adaa80e1471095a62d78233b611d7a558c | Analyze and fix the following issue in the Linux kernel code: bpf, sockmap: Fix incorrect copied_seq calculation | Problem Details:
A socket using sockmap has its own independent receive queue: ingress_msg.
This queue may contain data from its own protocol stack or from other
sockets.
The issue is that when reading from ingress_msg, we update tp->copied_seq
by default. However, if the data is not from its own protocol stack,
tcp->... | ```diff
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h
index 49847888c287..dfdc158ab88c 100644
--- a/include/linux/skmsg.h
+++ b/include/linux/skmsg.h
@@ -141,6 +141,8 @@ int sk_msg_memcopy_from_iter(struct sock *sk, struct iov_iter *from,
struct sk_msg *msg, u32 bytes);
int sk_msg_recvmsg(struct ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.