id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
62e5ee9db98ed67eb50205072135544055cba9c4 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sc7280: Fix the base addresses of LLCC banks | Problem Details:
The LLCC block has several banks each with a different base address
and holes in between. So it is not a correct approach to cover these
banks with a single offset/size. Instead, the individual bank's base
address needs to be specified in devicetree with the exact size.
While at it, let's also fix the... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index 46723418385b..5b0b10ee0a5c 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -3591,8 +3591,9 @@
system-cache-controller@9200000 {
compatible = "qcom,sc7280-llcc";... |
116a932bbc7bc740b068fbfe320a465811ca62f8 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sc7180: Fix the base addresses of LLCC banks | Problem Details:
The LLCC block has several banks each with a different base address
and holes in between. So it is not a correct approach to cover these
banks with a single offset/size. Instead, the individual bank's base
address needs to be specified in devicetree with the exact size.
On SC7180, there is only one LL... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 53f0076f20f6..fb84aa480d91 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -2768,7 +2768,7 @@
system-cache-controller@9200000 {
compatible = "qcom,sc7180-llcc";
... |
bfe088bde391824040c39cbf277d7fe782042936 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sdm845: Fix the base addresses of LLCC banks | Problem Details:
The LLCC block has several banks each with a different base address
and holes in between. So it is not a correct approach to cover these
banks with a single offset/size. Instead, the individual bank's base
address needs to be specified in devicetree with the exact size.
On SDM845, the size of the LLCC... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 1d5e6ade8ae7..79da7eb954f3 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -2200,8 +2200,11 @@
llcc: system-cache-controller@1100000 {
compatible = "qcom,sdm845... |
ee13b5008707948d3052c1b5aab485c6cd53658e | Analyze and fix the following issue in the Linux kernel code: qcom: llcc/edac: Fix the base address used for accessing LLCC banks | Problem Details:
The Qualcomm LLCC/EDAC drivers were using a fixed register stride for
accessing the (Control and Status Registers) CSRs of each LLCC bank.
This stride only works for some SoCs like SDM845 for which driver
support was initially added.
But the later SoCs use different register stride that vary between t... | ```diff
diff --git a/drivers/edac/qcom_edac.c b/drivers/edac/qcom_edac.c
index 3256254c3722..1d3cc1930a74 100644
--- a/drivers/edac/qcom_edac.c
+++ b/drivers/edac/qcom_edac.c
@@ -213,7 +213,7 @@ dump_syn_reg_values(struct llcc_drv_data *drv, u32 bank, int err_type)
for (i = 0; i < reg_data.reg_cnt; i++) {
synd_r... |
43aa006e074c4dcaf7493895fb2bd4af16d7c0ab | Analyze and fix the following issue in the Linux kernel code: dt-bindings: arm: msm: Fix register regions used for LLCC banks | Problem Details:
Register regions of the LLCC banks are located at different addresses.
Currently, the binding just lists the LLCC0 base address and tries to
cover all the banks using a single size. This is entirely wrong as there
are other register regions that happen to lie inside the size covered by
the binding such... | ```diff
diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml b/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml
index 6570b808fd0d..93b977428a14 100644
--- a/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml
+++ b/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml
@@ -33,14 +33,12 ... |
5a81c02d0cc5067170e49452d55a4dfd21333257 | Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Fix function naming for p1023_rdb platform | Problem Details:
p1023_rdb platform is a copy of mpc85xx_rdb platform and some of its
functions have kept mpc85xx_rdb names.
Rename the said functions.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/6cb9865d916231c38401ba34ad... | ```diff
diff --git a/arch/powerpc/platforms/85xx/p1023_rdb.c b/arch/powerpc/platforms/85xx/p1023_rdb.c
index 37e78f40d424..e199fc44fc2f 100644
--- a/arch/powerpc/platforms/85xx/p1023_rdb.c
+++ b/arch/powerpc/platforms/85xx/p1023_rdb.c
@@ -37,7 +37,7 @@
* Setup the architecture
*
*/
-static void __init mpc85xx_rdb... |
357f82395cd8a0279067805841e5968f4e6dc932 | Analyze and fix the following issue in the Linux kernel code: powerpc/47x: Split ppc47x machine in two | Problem Details:
This machine matches two compatibles and sets .pci_irq_fixup
on one of them.
Split it into two machines, then the probe function can be dropped.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
[mpe: Drop references to ppc47x_probe() to fix build]
Signed-off-by: Michael Ellerman <mpe@ell... | ```diff
diff --git a/arch/powerpc/platforms/44x/ppc476.c b/arch/powerpc/platforms/44x/ppc476.c
index 7c91ac5a5241..4641ae8c9b09 100644
--- a/arch/powerpc/platforms/44x/ppc476.c
+++ b/arch/powerpc/platforms/44x/ppc476.c
@@ -114,7 +114,8 @@ static int __init ppc47x_device_probe(void)
return 0;
}
-machine_device_init... |
fd0815f632c24878e325821943edccc7fde947a2 | Analyze and fix the following issue in the Linux kernel code: perf: Fix check before add_event_to_groups() in perf_group_detach() | Problem Details:
Events should only be added to a groups rb tree if they have not been
removed from their context by list_del_event(). Since remove_on_exec
made it possible to call list_del_event() on individual events before
they are detached from their group, perf_group_detach() should check each
sibling's attach_sta... | ```diff
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 52b4aa0b3bd1..fb3e436bcd4a 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -2163,7 +2163,7 @@ static void perf_group_detach(struct perf_event *event)
/* Inherit group flags from the previous leader */
sibling->group_caps = even... |
baf1b12a67f5b24f395baca03e442ce27cab0c18 | Analyze and fix the following issue in the Linux kernel code: perf: fix perf_event_context->time | Problem Details:
Time readers rely on perf_event_context->[time|timestamp|timeoffset] to get
accurate time_enabled and time_running for an event. The difference between
ctx->timestamp and ctx->time is the among of time when the context is not
enabled. __update_context_time(ctx, false) is used to increase timestamp,
but... | ```diff
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 296617edbda1..52b4aa0b3bd1 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -3872,7 +3872,7 @@ ctx_sched_in(struct perf_event_context *ctx, enum event_type_t event_type)
if (likely(!ctx->nr_events))
return;
- if (is_active ^ EV... |
eb81a2ed4f52be831c9fb879752d89645a312c13 | Analyze and fix the following issue in the Linux kernel code: perf/core: Fix perf_output_begin parameter is incorrectly invoked in perf_event_bpf_output | Problem Details:
syzkaller reportes a KASAN issue with stack-out-of-bounds.
The call trace is as follows:
dump_stack+0x9c/0xd3
print_address_description.constprop.0+0x19/0x170
__kasan_report.cold+0x6c/0x84
kasan_report+0x3a/0x50
__perf_event_header__init_id+0x34/0x290
perf_event_header__init_id+0x48/0x60
... | ```diff
diff --git a/kernel/events/core.c b/kernel/events/core.c
index f79fd8b87f75..296617edbda1 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9187,7 +9187,7 @@ static void perf_event_bpf_output(struct perf_event *event, void *data)
perf_event_header__init_id(&bpf_event->event_id.header,
... |
328839ff93709a517e89ba1de1132c5d138e5dcb | Analyze and fix the following issue in the Linux kernel code: drm/vmwgfx: Fix src/dst_pitch confusion | Problem Details:
The src/dst_pitch got mixed up during the rework of the function, make
sure the offset's refer to the correct one.
Spotted by clang:
Clang warns (or errors with CONFIG_WERROR):
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:509:29: error: variable 'dst_pitch' is uninitialized when used here [-Werror,-Wuninit... | ```diff
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
index d79a6eccfaa4..ba0c0e12cfe9 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
@@ -506,11 +506,11 @@ static void vmw_stdu_bo_cpu_commit(struct vmw_kms_dirty *dirty)
/* Assume... |
e15acc25880cf048dba9df94d76ed7e7e10040e6 | Analyze and fix the following issue in the Linux kernel code: btrfs: zoned: drop space_info->active_total_bytes | Problem Details:
The space_info->active_total_bytes is no longer necessary as we now
count the region of newly allocated block group as zone_unusable. Drop
its usage.
Fixes: 6a921de58992 ("btrfs: zoned: introduce space_info->active_total_bytes")
CC: stable@vger.kernel.org # 6.1+
Signed-off-by: Naohiro Aota <naohiro.ao... | ```diff
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index 1a31bcd554d0..5fc670c27f86 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -1175,14 +1175,8 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
< block_group->zone_unusable);
WARN_ON(block_group->space_in... |
fa2068d7e922b434eba5bfb0131e6d39febfdb48 | Analyze and fix the following issue in the Linux kernel code: btrfs: zoned: count fresh BG region as zone unusable | Problem Details:
The naming of space_info->active_total_bytes is misleading. It counts
not only active block groups but also full ones which are previously
active but now inactive. That confusion results in a bug not counting
the full BGs into active_total_bytes on mount time.
For a background, there are three kinds o... | ```diff
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 0d250d052487..d84cef89cdff 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -2693,8 +2693,13 @@ static int __btrfs_add_free_space_zoned(struct btrfs_block_group *block_group,
bg_reclaim_threshold = READ_... |
9e1cdf0c354e46e428c0e0cab008abbe81b6013d | Analyze and fix the following issue in the Linux kernel code: btrfs: zoned: fix btrfs_can_activate_zone() to support DUP profile | Problem Details:
btrfs_can_activate_zone() returns true if at least one device has one zone
available for activation. This is OK for the single profile, but not OK for
DUP profile. We need two zones to create a DUP block group. Fix it by
properly handling the case with the profile flags.
Fixes: 265f7237dd25 ("btrfs: z... | ```diff
diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
index f95b2c94d619..0a330d5410a0 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
@@ -2086,11 +2086,21 @@ bool btrfs_can_activate_zone(struct btrfs_fs_devices *fs_devices, u64 flags)
if (!device->bdev)
continue;
- if (!zinfo->max_active_zones ||
- ... |
10a8857a1beaa015efba7d56e06243d484549fb6 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix compiler warning on SPARC/PA-RISC handling fscrypt_setup_filename | Problem Details:
Commit 1ec49744ba83 ("btrfs: turn on -Wmaybe-uninitialized") exposed
that on SPARC and PA-RISC, gcc is unaware that fscrypt_setup_filename()
only returns negative error values or 0. This ultimately results in a
maybe-uninitialized warning in btrfs_lookup_dentry().
Change to only return negative error ... | ```diff
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 44e9acc77a74..e99432e4912e 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -5421,8 +5421,13 @@ static int btrfs_inode_by_name(struct btrfs_inode *dir, struct dentry *dentry,
return -ENOMEM;
ret = fscrypt_setup_filename(&dir->vfs_inode, &dentr... |
1c3ab6dfa0692c3626580a508cf84e794201b357 | Analyze and fix the following issue in the Linux kernel code: btrfs: handle missing chunk mapping more gracefully | Problem Details:
[BUG]
During my scrub rework, I did a stupid thing like this:
bio->bi_iter.bi_sector = stripe->logical;
btrfs_submit_bio(fs_info, bio, stripe->mirror_num);
Above bi_sector assignment is using logical address directly, which
lacks ">> SECTOR_SHIFT".
This results a read on a range whic... | ```diff
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 7823168c08a6..6d0124b6e79e 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6363,7 +6363,8 @@ int __btrfs_map_block(struct btrfs_fs_info *fs_info, enum btrfs_map_op op,
ASSERT(op != BTRFS_MAP_DISCARD);
em = btrfs_get_chunk_map(fs_info,... |
dd787ae4e8548a82350981b4b0046df6a92999f2 | Analyze and fix the following issue in the Linux kernel code: perf kvm: Use subtraction for comparison metrics | Problem Details:
Currently the metrics comparison uses greater operator (>), it returns
the boolean value (0 or 1).
This patch changes to use subtraction as comparison result, which can
be used by histograms sorting. Since the subtraction result is u64
type, we change key_cmp_fun's return type to int64_t to avoid ove... | ```diff
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index c11f5454f35c..fbdd46d38c13 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -64,10 +64,10 @@ static u64 get_event_ ##func(struct kvm_event *event, int vcpu) \
#define COMPARE_EVENT_KEY(func, field) \
GET_EVENT... |
6c0f5898836c05c6d850a750ed7940ba29e4e6c5 | Analyze and fix the following issue in the Linux kernel code: md: select BLOCK_LEGACY_AUTOLOAD | Problem Details:
When BLOCK_LEGACY_AUTOLOAD is not enable, mdadm is not able to
activate new arrays unless "CREATE names=yes" appears in
mdadm.conf
As this is a regression we need to always enable BLOCK_LEGACY_AUTOLOAD
for when MD is selected - at least until mdadm is updated and the
updates widely available.
Cc: sta... | ```diff
diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig
index 998a5cfdbc4e..662d219c39bf 100644
--- a/drivers/md/Kconfig
+++ b/drivers/md/Kconfig
@@ -16,6 +16,10 @@ if MD
config BLK_DEV_MD
tristate "RAID support"
select BLOCK_HOLDER_DEPRECATED if SYSFS
+ # BLOCK_LEGACY_AUTOLOAD requirement should be removed
+... |
5f27571382ca42daa3e3d40d1b252bf18c2b61d2 | Analyze and fix the following issue in the Linux kernel code: block: count 'ios' and 'sectors' when io is done for bio-based device | Problem Details:
While using iostat for raid, I observed very strange 'await'
occasionally, and turns out it's due to that 'ios' and 'sectors' is
counted in bdev_start_io_acct(), while 'nsecs' is counted in
bdev_end_io_acct(). I'm not sure why they are ccounted like that
but I think this behaviour is obviously wrong be... | ```diff
diff --git a/block/blk-core.c b/block/blk-core.c
index 9e5e0277a4d9..42926e6cb83c 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -959,16 +959,11 @@ again:
}
}
-unsigned long bdev_start_io_acct(struct block_device *bdev,
- unsigned int sectors, enum req_op op,
+unsigned long bdev_start_io_acct(... |
6030363199e3a6341afb467ddddbed56640cbf6a | Analyze and fix the following issue in the Linux kernel code: block: sunvdc: add check for mdesc_grab() returning NULL | Problem Details:
In vdc_port_probe(), we should check the return value of mdesc_grab() as
it may return NULL, which can cause potential NPD bug.
Fixes: 43fdf27470b2 ("[SPARC64]: Abstract out mdesc accesses for better MD update handling.")
Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/2023031... | ```diff
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
index fb855da971ee..9fa821fa76b0 100644
--- a/drivers/block/sunvdc.c
+++ b/drivers/block/sunvdc.c
@@ -972,6 +972,8 @@ static int vdc_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
print_version();
hp = mdesc_grab();
+ if (!hp)
... |
7c3940bf81e5664cdb50c3fedfec8f0a756a34fb | Analyze and fix the following issue in the Linux kernel code: swiotlb: fix the deadlock in swiotlb_do_find_slots | Problem Details:
In general, if swiotlb is sufficient, the logic of index =
wrap_area_index(mem, index + 1) is fine, it will quickly take a slot and
release the area->lock; But if swiotlb is insufficient and the device
has min_align_mask requirements, such as NVME, we may not be able to
satisfy index == wrap and exit t... | ```diff
diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index 03e3251cd9d2..91454b513db0 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -625,8 +625,8 @@ static int swiotlb_do_find_slots(struct device *dev, int area_index,
unsigned int iotlb_align_mask =
dma_get_min_align_mask(dev) & ~(IO_... |
e77da13b8e3626fc6d01287fba7c1eee4ebfe018 | Analyze and fix the following issue in the Linux kernel code: riscv: dts: microchip: fix the mpfs' mailbox regs | Problem Details:
The mailbox on PolarFire SoC should really have three reg properties,
not two. Without splitting into three sections, the system controller's
QSPI cannot be accessed as it sits inside the current first range. The
driver & binding have been adapted to account for both two & three
ranges, so fix the dts ... | ```diff
diff --git a/arch/riscv/boot/dts/microchip/mpfs.dtsi b/arch/riscv/boot/dts/microchip/mpfs.dtsi
index 23b7b05ee291..104504352e99 100644
--- a/arch/riscv/boot/dts/microchip/mpfs.dtsi
+++ b/arch/riscv/boot/dts/microchip/mpfs.dtsi
@@ -501,7 +501,8 @@
mbox: mailbox@37020000 {
compatible = "microchip,mpfs-ma... |
49f965b6fbca63904d7397ce96066fa992f401a3 | Analyze and fix the following issue in the Linux kernel code: soc: canaan: Make K210_SYSCTL depend on CLK_K210 | Problem Details:
CLK_K210 is no longer a dependency of SOC_CANAAN,
but K210_SYSCTL depends on CLK_K210. This patch makes K210_SYSCTL
depend on CLK_K210. Also fix whitespace errors.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/all/42446784-a88b-df09-41e9-5f685b4df6ee@infradead.org
Fix... | ```diff
diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig
index 2527cf5757ec..43ced2bf8444 100644
--- a/drivers/soc/canaan/Kconfig
+++ b/drivers/soc/canaan/Kconfig
@@ -3,8 +3,9 @@
config SOC_K210_SYSCTL
bool "Canaan Kendryte K210 SoC system controller"
depends on RISCV && SOC_CANAAN && OF
+ depe... |
ff612055fb79e24c75f682f5b0e30cfc370ee59d | Analyze and fix the following issue in the Linux kernel code: perf bpf filter: Add data_src sample data support | Problem Details:
The data_src has many entries to express memory behaviors. Add each
term separately so that users can combine them for their purpose.
I didn't add prefix for the constants for simplicity as they are mostly
distinguishable but I had to use l1_miss and l2_hit for mem_dtlb since
mem_lvl has different va... | ```diff
diff --git a/tools/perf/util/bpf-filter.l b/tools/perf/util/bpf-filter.l
index 419f923b35c0..3e66b7a0215e 100644
--- a/tools/perf/util/bpf-filter.l
+++ b/tools/perf/util/bpf-filter.l
@@ -42,6 +42,12 @@ static int value(int base)
return BFT_NUM;
}
+static int constant(int val)
+{
+ perf_bpf_filter_lval.num ... |
6173a77b7e9d3e202bdb9897b23f2a8afe7bf286 | Analyze and fix the following issue in the Linux kernel code: nvmet: avoid potential UAF in nvmet_req_complete() | Problem Details:
An nvme target ->queue_response() operation implementation may free the
request passed as argument. Such implementation potentially could result
in a use after free of the request pointer when percpu_ref_put() is
called in nvmet_req_complete().
Avoid such problem by using a local variable to save the ... | ```diff
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index f66ed13d7c11..3935165048e7 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -756,8 +756,10 @@ static void __nvmet_req_complete(struct nvmet_req *req, u16 status)
void nvmet_req_complete(struct nvmet_req *req... |
a3406352c54fbc476f4f6b98159c3ea1c7dbb6fc | Analyze and fix the following issue in the Linux kernel code: nvme-tcp: fix opcode reporting in the timeout handler | Problem Details:
For non in-capsule writes we reuse the request pdu space for a h2cdata
pdu in order to avoid over allocating space (either preallocate or
dynamically upon receving an r2t pdu). However if the request times out
the core expects to find the opcode in the start of the request, which
we override.
In order... | ```diff
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 7723a4989524..2e174fad57d7 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -208,6 +208,18 @@ static inline u8 nvme_tcp_ddgst_len(struct nvme_tcp_queue *queue)
return queue->data_digest ? NVME_TCP_DIGEST_LENGTH : 0;
}
... |
b65d44fa0fe072c91bf41cd8756baa2b4c77eff2 | Analyze and fix the following issue in the Linux kernel code: nvme-pci: add NVME_QUIRK_BOGUS_NID for Lexar NM620 | Problem Details:
Added a quirk to fix Lexar NM620 1TB SSD reporting duplicate NGUIDs.
Signed-off-by: Philipp Geulen <p.geulen@js-elektronik.de>
Reviewed-by: Chaitanya Kulkarni <kkch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de> | ```diff
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 8a536d5300a4..b615906263f3 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3438,6 +3438,8 @@ static const struct pci_device_id nvme_id_table[] = {
.driver_data = NVME_QUIRK_BOGUS_NID, },
{ PCI_DEVICE(0x1d97, 0x2263)... |
9630d80655bfe7e62e4aff2889dc4eae7ceeb887 | Analyze and fix the following issue in the Linux kernel code: nvme-pci: add NVME_QUIRK_BOGUS_NID for Netac NV3000 | Problem Details:
Added a quirk to fix the Netac NV3000 SSD reporting duplicate NGUIDs.
Cc: <stable@vger.kernel.org>
Signed-off-by: Elmer Miroslav Mosher Golovin <miroslav@mishamosher.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de> | ```diff
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index e77a8a873b1a..8a536d5300a4 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3416,6 +3416,8 @@ static const struct pci_device_id nvme_id_table[] = {
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
{ PCI_DEVICE(0x26... |
a61d265533b7fe0026a02a49916aa564ffe38e4c | Analyze and fix the following issue in the Linux kernel code: nvme-pci: fixing memory leak in probe teardown path | Problem Details:
In case the nvme_probe teardown path is triggered the ctrl ref count does
not reach 0 thus creating a memory leak upon failure of nvme_probe.
Signed-off-by: Irvin Cote <irvincoteg@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de> | ```diff
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 5b95c94ee40f..e77a8a873b1a 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3073,6 +3073,7 @@ out_dev_unmap:
nvme_dev_unmap(dev);
out_uninit_ctrl:
nvme_uninit_ctrl(&dev->ctrl);
+ nvme_put_ctrl(&dev->ctrl);
return r... |
37f0dc2ec78af0c3f35dd05578763de059f6fe77 | Analyze and fix the following issue in the Linux kernel code: nvme: fix handling single range discard request | Problem Details:
When investigating one customer report on warning in nvme_setup_discard,
we observed the controller(nvme/tcp) actually exposes
queue_max_discard_segments(req->q) == 1.
Obviously the current code can't handle this situation, since contiguity
merge like normal RW request is taken.
Fix the issue by buil... | ```diff
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index c2730b116dc6..d4be525f8100 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -781,16 +781,26 @@ static blk_status_t nvme_setup_discard(struct nvme_ns *ns, struct request *req,
range = page_address(ns->ctrl->discard_p... |
9402e25df18f806127437b9b2b3f54eee5e85182 | Analyze and fix the following issue in the Linux kernel code: soundwire: cadence: add helpers to access IP_MCP registers | Problem Details:
The latest Cadence IP splits some of the existing registers into two,
separated by a fixed offset. The bitfields themselves remain at the
same position, so we can use new helpers to dynamically add the fixed
offset.
For example, the existing MCP_CONFIG is now split in two with
MCP_CONFIG and IP_MCP_CO... | ```diff
diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
index 4f34fc72dbd5..4461a7fa4124 100644
--- a/drivers/soundwire/cadence_master.c
+++ b/drivers/soundwire/cadence_master.c
@@ -205,6 +205,16 @@ static inline void cdns_writel(struct sdw_cdns *cdns, int offset, u32 value)
write... |
54686b611eb054a5c84976e6f6e03788fa8e6a38 | Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: repair malformed T: entries in NVM EXPRESS DRIVERS | Problem Details:
The T: entries shall be composed of a SCM tree type (git, hg, quilt, stgit
or topgit) and location.
Add the SCM tree type to the T: entry, and reorder the file entries in
alphabetical order.
Fixes: b508fc354f6d ("nvme: update maintainers information")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail... | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index 8d5bc223f305..1296426b3879 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14872,12 +14872,12 @@ M: Sagi Grimberg <sagi@grimberg.me>
L: linux-nvme@lists.infradead.org
S: Supported
W: http://git.infradead.org/nvme.git
-T: git://git.infradead.org/nvme.git
+T: git git... |
56ec9457a4a20c5e07ad94bfb6e23077d54cb28e | Analyze and fix the following issue in the Linux kernel code: perf bpf filter: Implement event sample filtering | Problem Details:
The BPF program will be attached to a perf_event and be triggered when
it overflows. It'd iterate the filters map and compare the sample
value according to the expression. If any of them fails, the sample
would be dropped.
Also it needs to have the corresponding sample data for the expression
so it ... | ```diff
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index dc9dda09b076..ed6b6a070f79 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -1050,7 +1050,7 @@ SKELETONS := $(SKEL_OUT)/bpf_prog_profiler.skel.h
SKELETONS += $(SKEL_OUT)/bperf_leader.skel.h $(SKEL_OUT)/bperf_follower.... |
6e57f69f23d02b8c67d7428ee708b7d903ed22b2 | Analyze and fix the following issue in the Linux kernel code: perf top: Fix rare segfault in thread__comm_len() | Problem Details:
In thread__comm_len(),strlen() is called outside of the
thread->comm_lock critical section,which may cause a UAF
problems if comm__free() is called by the process_thread
concurrently.
backtrace of the core file is as follows:
(gdb) bt
#0 __strlen_evex () at ../sysdeps/x86_64/multiarch/strlen... | ```diff
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
index e3e5427e1c3c..a2490a20eb56 100644
--- a/tools/perf/util/thread.c
+++ b/tools/perf/util/thread.c
@@ -311,17 +311,30 @@ const char *thread__comm_str(struct thread *thread)
return str;
}
+static int __thread__comm_len(struct thread *thread... |
80c3a7d9f20401169283b5670dbb8d7ac07a1d55 | Analyze and fix the following issue in the Linux kernel code: perf script: Fix Python support when no libtraceevent | Problem Details:
Python scripting can be used without libtraceevent. In particular,
scripting for Intel PT does not use tracepoints, and so does not need
libtraceevent support.
Alter the build and employ conditional compilation to allow Python
scripting without libtraceevent.
Example:
Before:
$ ldd `which perf... | ```diff
diff --git a/tools/perf/Build b/tools/perf/Build
index 6dd67e502295..aa7623622834 100644
--- a/tools/perf/Build
+++ b/tools/perf/Build
@@ -56,6 +56,6 @@ CFLAGS_builtin-report.o += -DDOCDIR="BUILD_STR($(srcdir_SQ)/Documentation)"
perf-y += util/
perf-y += arch/
perf-y += ui/
-perf-$(CONFIG_LIBTRACEEVENT) +... |
a5fc1441af7719e93dc7a638a960befb694ade89 | Analyze and fix the following issue in the Linux kernel code: io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads | Problem Details:
Users may specify a CPU where the sqpoll thread would run. This may
conflict with cpuset operations because of strict PF_NO_SETAFFINITY
requirement. That flag is unnecessary for polling "kernel" threads, see
the reasoning in commit 01e68ce08a30 ("io_uring/io-wq: stop setting
PF_NO_SETAFFINITY on io-wq ... | ```diff
diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c
index 0119d3f1a556..9db4bc1f521a 100644
--- a/io_uring/sqpoll.c
+++ b/io_uring/sqpoll.c
@@ -233,7 +233,6 @@ static int io_sq_thread(void *data)
set_cpus_allowed_ptr(current, cpumask_of(sqd->sq_cpu));
else
set_cpus_allowed_ptr(current, cpu_online_mask);
... |
b6402014cab0481bdfd1ffff3e1dad714e8e1205 | Analyze and fix the following issue in the Linux kernel code: block: null_blk: cleanup null_queue_rq() | Problem Details:
Use a local struct request pointer variable to avoid having to
dereference struct blk_mq_queue_data multiple times. While at it, also
fix the function argument indentation and remove a useless "else" after
a return.
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Johannes... | ```diff
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index 7d95ad203c97..9e6b032c8ecc 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -1657,12 +1657,13 @@ static enum blk_eh_timer_return null_timeout_rq(struct request *rq)
}
static blk_status_t null_qu... |
63f886597085f346276e3b3c8974de0100d65f32 | Analyze and fix the following issue in the Linux kernel code: block: null_blk: Fix handling of fake timeout request | Problem Details:
When injecting a fake timeout into the null_blk driver using
fail_io_timeout, the request timeout handler does not execute
blk_mq_complete_request(), so the complete callback is never executed
for a timedout request.
The null_blk driver also has a driver-specific fake timeout mechanism
which does not ... | ```diff
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index 4c601ca9552a..7d95ad203c97 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -1413,8 +1413,7 @@ static inline void nullb_complete_cmd(struct nullb_cmd *cmd)
case NULL_IRQ_SOFTIRQ:
switch (cmd->n... |
007ae9b268ba7553e479608cf9735d3c4672a2ab | Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: Serialize ieee80211_handle_wake_tx_queue() | Problem Details:
ieee80211_handle_wake_tx_queue must not run concurrent multiple times.
It calls ieee80211_txq_schedule_start() and the drivers migrated to iTXQ
do not expect overlapping drv_tx() calls.
This fixes 'c850e31f79f0 ("wifi: mac80211: add internal handler for
wake_tx_queue")', which introduced ieee80211_han... | ```diff
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index ecc232eb1ee8..e082582e0aa2 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1284,6 +1284,9 @@ struct ieee80211_local {
struct list_head active_txqs[IEEE80211_NUM_ACS];
u16 schedule_round[IEEE80211_NUM_ACS]... |
8f55564c05123b790f25562fa02ca2e1dbf9c4f5 | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: fw: pnvm: fix uefi reduced TX power loading | Problem Details:
There are a number of issues here:
* if trans->reduce_power_loaded is already true, we call
iwl_trans_set_reduce_power() with an uninitialized len
value
* in this case we also clobber a previous load/setting
* if iwl_uefi_get_reduced_power() returns an ERR_PTR() we
try to kfree() it
Move t... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c
index b6d3ac6ed440..c6f2672fdc73 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Cla... |
e2e76bdcd3fd663bfbddbc09e167e7c1069659cd | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: fix typos in comment | Problem Details:
Spelling mistakes (triple letters) in comment.
Detected with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230314194113.fb2fc470e949.I1f3a347b533bcdb6bcd310f752ab3349800efb49@ch... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/img.h b/drivers/net/wireless/intel/iwlwifi/fw/img.h
index f878ac508801..f5c4d93d1033 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/img.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/img.h
@@ -182,10 +182,10 @@ struct iwl_dump_exclude {
* @enhance_sensitiv... |
af6d168f0ec613d55cdd9c4e0443108172577318 | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mvm: Refactor MAC_CONTEXT_CMD sending flow | Problem Details:
Refactor MAC_CONTEXT_CMD sending flow:
1. As the new MLD API is introduced, there are some common fields in
both the old and new APIs. The MAC_CONTEXT_CMD of the non-MLD API
has common fields with the link and mac commands of the new MLD API.
Put this common parts in functions so it can be used later ... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
index 422550e31bc6..a30385b85a60 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
@@ -396,15 +396,45 @@ static void iwl_mvm_ack... |
0936998393c7dffd68ba5d73eabdabf8dddbbc41 | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mvm: avoid sta lookup in queue alloc | Problem Details:
In FW restart scenarios, we allocate the queues from the
iwl_mvm_realloc_queues_after_restart() function, but that
is called before we insert the station ID into our map
(mvm->fw_id_to_mac_id).
However, in all cases where we're actually allocating a
queue for a "real" (not bcast, aux, ...) station we ... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index 69634fb82a9b..46af2b422849 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -766,7 +766,25 @@ static int iwl_mvm_find_free_queue(struct iw... |
2e8e9a895c4589f124a37fc84d123b5114406e94 | Analyze and fix the following issue in the Linux kernel code: accel/habanalabs: postpone mem_mgr IDR destruction to hpriv_release() | Problem Details:
The memory manager IDR is currently destroyed when user releases the
file descriptor.
However, at this point the user context might be still held, and memory
buffers might be still in use.
Later on, calls to release those buffers will fail due to not finding
their handles in the IDR, leading to a memor... | ```diff
diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c
index 8db00cb3b71d..713005998cbc 100644
--- a/drivers/accel/habanalabs/common/device.c
+++ b/drivers/accel/habanalabs/common/device.c
@@ -413,6 +413,9 @@ static void hpriv_release(struct kref *ref)
mutex_destroy(&... |
9732d5d0d4813eef76f6904a1da80372924081a7 | Analyze and fix the following issue in the Linux kernel code: accel/habanalabs: fix register address on PDMA/EDMA idle check | Problem Details:
The PDMA/EDMA is_idle routines didn't check the correct CORE register
in order to get the accurate idle state.
Moreover, it's better to make the is_idle routine more robust by adding
additional checks (IS_HALTED) before announcing that the core is idle.
Signed-off-by: Koby Elbaz <kelbaz@habana.ai>
Rev... | ```diff
diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers/accel/habanalabs/gaudi2/gaudi2.c
index 210c40486de8..9057cb0c718c 100644
--- a/drivers/accel/habanalabs/gaudi2/gaudi2.c
+++ b/drivers/accel/habanalabs/gaudi2/gaudi2.c
@@ -86,10 +86,11 @@
#define KDMA_TIMEOUT_USEC USEC_PER_SEC
-#define IS_DMA... |
25ebbc57ca56df3cf9149e9da6b1d3169c8487db | Analyze and fix the following issue in the Linux kernel code: accel/habanalabs: fix few misspelled words in the code | Problem Details:
Run spell checker on the code and fix accordingly.
Signed-off-by: farah kassabri <fkassabri@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org> | ```diff
diff --git a/drivers/accel/habanalabs/common/command_submission.c b/drivers/accel/habanalabs/common/command_submission.c
index 74ccafeb38dc..2cebc1c47248 100644
--- a/drivers/accel/habanalabs/common/command_submission.c
+++ b/drivers/accel/habanalabs/common/command_submission.c
@@ -657,7 +657,7 @@ static inline... |
39ab4da9c15b603e4706d9b9ef1aa8c3ef681312 | Analyze and fix the following issue in the Linux kernel code: accel/habanalabs: in hl_device_reset remove 'hard_instead_of_soft' | Problem Details:
Because this field is only used for debug print,
we can do more precise debug directly instead.
Signed-off-by: Dafna Hirschfeld <dhirschfeld@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.... | ```diff
diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c
index 0e405e4c4b32..47ed2fec68bc 100644
--- a/drivers/accel/habanalabs/common/device.c
+++ b/drivers/accel/habanalabs/common/device.c
@@ -1474,9 +1474,8 @@ static void handle_reset_trigger(struct hl_device *hdev, u3... |
b87b8b3e72f6739afb30219b79f06afb9d2329d6 | Analyze and fix the following issue in the Linux kernel code: accel/habanalabs: fix print in hl_irq_handler_eq() | Problem Details:
"eq_base[eq->ci].hdr.ctl" is used directly in a print without a
le32_to_cpu() conversion.
Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> | ```diff
diff --git a/drivers/accel/habanalabs/common/irq.c b/drivers/accel/habanalabs/common/irq.c
index bd0e3413721b..4b062e8520f1 100644
--- a/drivers/accel/habanalabs/common/irq.c
+++ b/drivers/accel/habanalabs/common/irq.c
@@ -439,11 +439,10 @@ irqreturn_t hl_irq_handler_eq(int irq, void *arg)
cur_eqe_index = ... |
57479adb41852b668c6f25a3c6aef4ad3fe35f97 | Analyze and fix the following issue in the Linux kernel code: accel/habanalabs: disable PCI when escalating compute to hard-reset | Problem Details:
In case a compute reset has failed or a request for a hard reset has
just arrived, then we escalate current reset procedure from compute
to hard-reset.
In such a case, the FW should be aware of the updated error cause,
and if LKD is the one who performs the reset (rather than the FW),
then we ask the F... | ```diff
diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c
index f91f3509336f..d140eaefc840 100644
--- a/drivers/accel/habanalabs/common/device.c
+++ b/drivers/accel/habanalabs/common/device.c
@@ -1452,7 +1452,7 @@ static void handle_reset_trigger(struct hl_device *hdev, u3... |
4b9c2d3633fa9a019bbba6eb14d5d21b81769c95 | Analyze and fix the following issue in the Linux kernel code: accel/habanalabs: capture RAZWI info only if HW indication detected | Problem Details:
RAZWI handling routine is called from most EQ events,
no matter if a RAZWI happens or not.
This fix is added to verify the handler is called only if
a real RAZWI indication in HW has been detected.
Signed-off-by: Koby Elbaz <kelbaz@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by... | ```diff
diff --git a/drivers/accel/habanalabs/gaudi/gaudi.c b/drivers/accel/habanalabs/gaudi/gaudi.c
index bb858b94e1e8..4ba5352cb7cb 100644
--- a/drivers/accel/habanalabs/gaudi/gaudi.c
+++ b/drivers/accel/habanalabs/gaudi/gaudi.c
@@ -7297,7 +7297,7 @@ static void gaudi_handle_qman_err(struct hl_device *hdev, u16 event... |
5a78ac33e3cb8822da64dd1af196e83664b332b0 | Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: fix deinitialization of firmware resources | Problem Details:
Currently, in ath11k_ahb_fw_resources_init(), iommu domain
mapping is done only for the chipsets having fixed firmware
memory. Also, for such chipsets, mapping is done only if it
does not have TrustZone support.
During deinitialization, only if TrustZone support is not there,
iommu is unmapped back. H... | ```diff
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index b549576d0b51..5cbba9a8b6ba 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -1078,6 +1078,12 @@ static int ath11k_ahb_fw_resource_deinit(struct ath11k_base *ab)
str... |
488d9a484f96eee4f0e8e108aed42a057a1c7295 | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Add missing unwind goto in ath12k_pci_probe() | Problem Details:
Smatch Warns:
drivers/net/wireless/ath/ath12k/pci.c:1198 ath12k_pci_probe()
warn: missing unwind goto?
Store the error value in ret and use correct label with a goto.
Only Compile tested, found with Smatch.
Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Reported-by: Dan ... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/pci.c b/drivers/net/wireless/ath/ath12k/pci.c
index d32637b0113d..00b0080dbac3 100644
--- a/drivers/net/wireless/ath/ath12k/pci.c
+++ b/drivers/net/wireless/ath/ath12k/pci.c
@@ -1223,7 +1223,8 @@ static int ath12k_pci_probe(struct pci_dev *pdev,
dev_err(&pdev->de... |
f2c7e3562b4c4f1699acc1538ebf3e75f5cced35 | Analyze and fix the following issue in the Linux kernel code: powerpc/mm: Fix false detection of read faults | Problem Details:
To support detection of read faults with Radix execute-only memory, the
vma_is_accessible() check in access_error() (which checks for PROT_NONE)
was replaced with a check to see if VM_READ was missing, and if so,
returns true to assert the fault was caused by a bad read.
This is incorrect, as it ignor... | ```diff
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index 2bef19cc1b98..af46aa88422b 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -271,11 +271,16 @@ static bool access_error(bool is_write, bool is_exec, struct vm_area_struct *vma
}
/*
- * Check for a read fault. This ... |
0c5ebb4c03308c0a544b5c1e0a33f0a63c40bc7e | Analyze and fix the following issue in the Linux kernel code: gpiolib: Get rid of devprop prefix in one function | Problem Details:
The devprop prefix in the devprop_gpiochip_set_names() adds confusion.
Get rid of it.
Note we have more than one function in the same module that handles
one or more device properties. This change will unify the naming schema
for all of them.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.in... | ```diff
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 7c75e0e5fe22..8b68a53704bc 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -373,7 +373,7 @@ static int gpiochip_set_desc_names(struct gpio_chip *gc)
}
/*
- * devprop_gpiochip_set_names - Set GPIO line names using device p... |
4028cbf867f70a3c599c9b0c9509334c56ed97d7 | Analyze and fix the following issue in the Linux kernel code: drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion again | Problem Details:
devm_regulator_get_enable_optional() returns -ENODEV if requested
optional regulator is not present. Adjust code for that, because in the
67d0a30128c9 I've incorrectly assumed that it also returns 0 when
regulator is not present.
Reported-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
Fixes: 67d0... | ```diff
diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
index 534621a13a34..3d046878ce6c 100644
--- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
+++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
@@ -718,7 +718,7 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
... |
0d3c9333d976af41d7dbc6bf4d9d2e95fbdf9c89 | Analyze and fix the following issue in the Linux kernel code: drm/bridge: Fix returned array size name for atomic_get_input_bus_fmts kdoc | Problem Details:
The returned array size for input formats is set through
atomic_get_input_bus_fmts()'s 'num_input_fmts' argument, so use
'num_input_fmts' to represent the array size in the function's kdoc,
not 'num_output_fmts'.
Fixes: 91ea83306bfa ("drm/bridge: Fix the bridge kernel doc")
Fixes: f32df58acc68 ("drm/b... | ```diff
diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
index 42f86327b40a..bf964cdfb330 100644
--- a/include/drm/drm_bridge.h
+++ b/include/drm/drm_bridge.h
@@ -423,11 +423,11 @@ struct drm_bridge_funcs {
*
* The returned array must be allocated with kmalloc() and will be
* freed by the calle... |
6e933a804c7db8be64f367f33e63cd7dcc302ebb | Analyze and fix the following issue in the Linux kernel code: net: ethernet: mtk_eth_soc: only write values if needed | Problem Details:
Only restart auto-negotiation and write link timer if actually
necessary. This prevents losing the link in case of minor
changes.
Fixes: 7e538372694b ("net: ethernet: mediatek: Re-add support SGMII")
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tested-by: Bjørn Mork <bjorn@mork.no>
... | ```diff
diff --git a/drivers/net/ethernet/mediatek/mtk_sgmii.c b/drivers/net/ethernet/mediatek/mtk_sgmii.c
index 612f65bb0345..83976dc86887 100644
--- a/drivers/net/ethernet/mediatek/mtk_sgmii.c
+++ b/drivers/net/ethernet/mediatek/mtk_sgmii.c
@@ -38,20 +38,16 @@ static int mtk_pcs_config(struct phylink_pcs *pcs, unsign... |
611e2dabb4b3243d176739fd6a5a34d007fa3f86 | Analyze and fix the following issue in the Linux kernel code: net: ethernet: mtk_eth_soc: reset PCS state | Problem Details:
Reset the internal PCS state machine when changing interface mode.
This prevents confusing the state machine when changing interface
modes, e.g. from SGMII to 2500Base-X or vice-versa.
Fixes: 7e538372694b ("net: ethernet: mediatek: Re-add support SGMII")
Reviewed-by: Russell King (Oracle) <rmk+kernel@... | ```diff
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
index b65de174c3d9..084a6badef6d 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -542,6 +542,10 @@
#define SGMII_SEND_AN_ERROR_EN BIT(11)
#defin... |
d8b228318935044dafe3a5bc07ee71a1f1424b8d | Analyze and fix the following issue in the Linux kernel code: net: usb: smsc75xx: Limit packet length to skb->len | Problem Details:
Packet length retrieved from skb data may be larger than
the actual socket buffer length (up to 9026 bytes). In such
case the cloned skb passed up the network stack will leak
kernel memory contents.
Fixes: d0cad871703b ("smsc75xx: SMSC LAN75xx USB gigabit ethernet adapter driver")
Signed-off-by: Szymo... | ```diff
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c
index 95de452ff4da..db34f8d1d605 100644
--- a/drivers/net/usb/smsc75xx.c
+++ b/drivers/net/usb/smsc75xx.c
@@ -2212,7 +2212,8 @@ static int smsc75xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
dev->net->stats.rx_frame_errors++;
} ... |
a02d83f9947d8f71904eda4de046630c3eb6802c | Analyze and fix the following issue in the Linux kernel code: scm: fix MSG_CTRUNC setting condition for SO_PASSSEC | Problem Details:
Currently, kernel would set MSG_CTRUNC flag if msg_control buffer
wasn't provided and SO_PASSCRED was set or if there was pending SCM_RIGHTS.
For some reason we have no corresponding check for SO_PASSSEC.
In the recvmsg(2) doc we have:
MSG_CTRUNC
indicates that some control data ... | ```diff
diff --git a/include/net/scm.h b/include/net/scm.h
index 1ce365f4c256..585adc1346bd 100644
--- a/include/net/scm.h
+++ b/include/net/scm.h
@@ -105,16 +105,27 @@ static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct sc
}
}
}
+
+static inline bool scm_has_secdata(struct socket *sock)... |
9d876d3ef27fa84355597ad269939772192356d8 | Analyze and fix the following issue in the Linux kernel code: net/smc: Fix device de-init sequence | Problem Details:
CLC message initialization was not properly reversed in error handling path.
Reported-and-suggested-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
Signed-off-by: Wenjia Zhang <wenjia@linux.ibm.com>
Reviewed-by: Tony Lu <tonylu@linux.alibaba.com>
Signed... | ```diff
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index ff6dd86bdc9f..c6b4a62276f6 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -3501,6 +3501,7 @@ out_pnet:
out_nl:
smc_nl_exit();
out_ism:
+ smc_clc_exit();
smc_ism_exit();
out_pernet_subsys_stat:
unregister_pernet_subsys(&smc_net_stat_ops);
`... |
13085e1b5cab8ad802904d72e6a6dae85ae0cd20 | Analyze and fix the following issue in the Linux kernel code: net/smc: fix deadlock triggered by cancel_delayed_work_syn() | Problem Details:
The following LOCKDEP was detected:
Workqueue: events smc_lgr_free_work [smc]
WARNING: possible circular locking dependency detected
6.1.0-20221027.rc2.git8.56bc5b569087.300.fc36.s390x+debug #1 Not tainted
------------------------------------------------------
kworker/3:0/176251 is trying to ... | ```diff
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c
index d52060b2680c..454356771cda 100644
--- a/net/smc/smc_core.c
+++ b/net/smc/smc_core.c
@@ -1464,7 +1464,7 @@ static void __smc_lgr_terminate(struct smc_link_group *lgr, bool soft)
if (lgr->terminating)
return; /* lgr already terminating */
/* cancel... |
35c356924fe3669dfbb1185607ce3b37f70bfa80 | Analyze and fix the following issue in the Linux kernel code: mlxsw: spectrum: Fix incorrect parsing depth after reload | Problem Details:
Spectrum ASICs have a configurable limit on how deep into the packet
they parse. By default, the limit is 96 bytes.
There are several cases where this parsing depth is not enough and there
is a need to increase it. For example, timestamping of PTP packets and a
FIB multipath hash policy that requires ... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index a8f94b7544ee..02a327744a61 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -2937,6 +2937,7 @@ static int mlxsw_sp_netdevice_event... |
5ce76fe1eead179c058d9151ee1f4088cfdc1c6b | Analyze and fix the following issue in the Linux kernel code: veth: rely on rtnl_dereference() instead of on rcu_dereference() in veth_set_xdp_features() | Problem Details:
Fix the following kernel warning in veth_set_xdp_features routine
relying on rtnl_dereference() instead of on rcu_dereference():
=============================
WARNING: suspicious RCU usage
6.3.0-rc1-00144-g064d70527aaa #149 Not tainted
-----------------------------
drivers/net/veth.c:1265 suspicious r... | ```diff
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 293dc3b2c84a..4da74ac27f9a 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -1262,7 +1262,7 @@ static void veth_set_xdp_features(struct net_device *dev)
struct veth_priv *priv = netdev_priv(dev);
struct net_device *peer;
- peer = rcu_de... |
5000fe6c27827a61d8250a7e4a1d26c3298ef4f6 | Analyze and fix the following issue in the Linux kernel code: nfc: st-nci: Fix use after free bug in ndlc_remove due to race condition | Problem Details:
This bug influences both st_nci_i2c_remove and st_nci_spi_remove.
Take st_nci_i2c_remove as an example.
In st_nci_i2c_probe, it called ndlc_probe and bound &ndlc->sm_work
with llt_ndlc_sm_work.
When it calls ndlc_recv or timeout handler, it will finally call
schedule_work to start the work.
When we ... | ```diff
diff --git a/drivers/nfc/st-nci/ndlc.c b/drivers/nfc/st-nci/ndlc.c
index 755460a73c0d..d2aa9f766738 100644
--- a/drivers/nfc/st-nci/ndlc.c
+++ b/drivers/nfc/st-nci/ndlc.c
@@ -282,13 +282,15 @@ EXPORT_SYMBOL(ndlc_probe);
void ndlc_remove(struct llt_ndlc *ndlc)
{
- st_nci_remove(ndlc->ndev);
-
/* cancel tim... |
d9ba9934285514f1f95d96326a82398a22dc77f2 | Analyze and fix the following issue in the Linux kernel code: tcp: Fix bind() conflict check for dual-stack wildcard address. | Problem Details:
Paul Holzinger reported [0] that commit 5456262d2baa ("net: Fix
incorrect address comparison when searching for a bind2 bucket")
introduced a bind() regression. Paul also gave a nice repro that
calls two types of bind() on the same port, both of which now
succeed, but the second call should fail:
b... | ```diff
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index e41fdc38ce19..6edae3886885 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -828,8 +828,14 @@ bool inet_bind2_bucket_match_addr_any(const struct inet_bind2_bucket *tb, const
#if IS_ENABLED(CONFIG_IPV6)
struc... |
c22c3bbf351e4ce905f082649cffa1ff893ea8c1 | Analyze and fix the following issue in the Linux kernel code: net: phy: smsc: bail out in lan87xx_read_status if genphy_read_status fails | Problem Details:
If genphy_read_status fails then further access to the PHY may result
in unpredictable behavior. To prevent this bail out immediately if
genphy_read_status fails.
Fixes: 4223dbffed9f ("net: phy: smsc: Re-enable EDPD mode for LAN87xx")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: ... | ```diff
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index 00d9eff91dcf..df2c5435c5c4 100644
--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
@@ -199,8 +199,11 @@ static int lan95xx_config_aneg_ext(struct phy_device *phydev)
static int lan87xx_read_status(struct phy_device *phydev)
{
struct... |
4b397c06cb987935b1b097336532aa6b4210e091 | Analyze and fix the following issue in the Linux kernel code: net: tunnels: annotate lockless accesses to dev->needed_headroom | Problem Details:
IP tunnels can apparently update dev->needed_headroom
in their xmit path.
This patch takes care of three tunnels xmit, and also the
core LL_RESERVED_SPACE() and LL_RESERVED_SPACE_EXTRA()
helpers.
More changes might be needed for completeness.
BUG: KCSAN: data-race in ip_tunnel_xmit / ip_tunnel_xmit
... | ```diff
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 6a14b7b11766..470085b121d3 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -297,9 +297,11 @@ struct hh_cache {
* relationship HH alignment <= LL alignment.
*/
#define LL_RESERVED_SPACE(dev) \
- ((((dev)->hard... |
248401cb2c4612d83eb0c352ee8103b78b8eb365 | Analyze and fix the following issue in the Linux kernel code: ice: avoid bonding causing auxiliary plug/unplug under RTNL lock | Problem Details:
RDMA is not supported in ice on a PF that has been added to a bonded
interface. To enforce this, when an interface enters a bond, we unplug
the auxiliary device that supports RDMA functionality. This unplug
currently happens in the context of handling the netdev bonding event.
This event is sent to th... | ```diff
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index b0e29e342401..e809249500e1 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -509,6 +509,7 @@ enum ice_pf_flags {
ICE_FLAG_VF_VLAN_PRUNING,
ICE_FLAG_LINK_LENIENT_MODE_... |
b611daae5efc64e817171a54021d3b334cc1bc41 | Analyze and fix the following issue in the Linux kernel code: kbuild: deb-pkg: split image and debug objects staging out into functions | Problem Details:
Prepare for the refactoring in the next commit.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | ```diff
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index ff5e7d8e380b..906889b304a4 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -51,6 +51,115 @@ create_package() {
dpkg-deb $dpkg_deb_opts ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" ..
}
+install_linux_image ... |
f50aa51c4498d7886cfd9dbf439a2332f234a755 | Analyze and fix the following issue in the Linux kernel code: kbuild: deb-pkg: set CROSS_COMPILE only when undefined | Problem Details:
Commit 3ab18a625ce4 ("kbuild: deb-pkg: improve the usability of source
package") set needless CROSS_COMPILE.
For example, 'make allnoconfig bindeb-pkg' on a x86_64 system will set
CROSS_COMPILE=i686-linux-gnu-, where the biarch compiler 'gcc' should
work for building the i386 kernel.
$ uname -m
x... | ```diff
diff --git a/scripts/package/deb-build-option b/scripts/package/deb-build-option
index bd53624318f2..7950eff01781 100755
--- a/scripts/package/deb-build-option
+++ b/scripts/package/deb-build-option
@@ -1,9 +1,8 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only
-# Set up CROSS_COMPILE if we are cross-com... |
7a531c21f83d7c62825d00bee3a76c1ccfb5de9f | Analyze and fix the following issue in the Linux kernel code: kbuild: deb-pkg: do not take KERNELRELEASE from the source version | Problem Details:
KERNELRELEASE does not need to match the package version in changelog.
Rather, it conventially matches what is called 'ABINAME', which is a
part of the binary package names.
Both are the same by default, but the former might be overridden by
KDEB_PKGVERSION. In this case, the resulting package would n... | ```diff
diff --git a/scripts/package/deb-build-option b/scripts/package/deb-build-option
index b079b0d121d4..bd53624318f2 100755
--- a/scripts/package/deb-build-option
+++ b/scripts/package/deb-build-option
@@ -8,9 +8,8 @@ if [ -z "${CROSS_COMPILE}${cross_compiling}" -a "${DEB_HOST_ARCH}" != "${DEB_BUI
fi
version=$... |
2fd6c4553c962ec7ea8a60c0a3632c7e984800f0 | Analyze and fix the following issue in the Linux kernel code: kbuild: deb-pkg: make debian source package working again | Problem Details:
Since commit c5bf2efb058d ("kbuild: deb-pkg: fix binary-arch and clean
in debian/rules"), the source package generated by 'make deb-pkg' fails
to build.
I terribly missed the fact that the intdeb-pkg target may regenerate
include/config/kernel.release due to the following in the top Makefile:
%pkg:... | ```diff
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index f74380036bb5..c6fbfb9f74ba 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -239,6 +239,7 @@ cat <<EOF > debian/rules
#!$(command -v $MAKE) -f
srctree ?= .
+KERNELRELEASE = ${KERNELRELEASE}
build-indep:
build-a... |
c753ccb2629f536b8c4feae5c223d5873c814d23 | Analyze and fix the following issue in the Linux kernel code: Makefile: Make kernelrelease target work with M= | Problem Details:
That commit required the use of filechk_kernel.release for the
kernelrelease Makefile target. It is currently only being set when
KBUILD_EXTMOD is not set. Make sure it is set in that case as well.
Fixes: 1cb86b6c3136 ("kbuild: save overridden KERNELRELEASE in include/config/kernel.release")
Signed-of... | ```diff
diff --git a/Makefile b/Makefile
index d7bd0eb9b346..d0a0ba8e5a2e 100644
--- a/Makefile
+++ b/Makefile
@@ -1886,6 +1886,8 @@ endif
else # KBUILD_EXTMOD
+filechk_kernel.release = echo $(KERNELRELEASE)
+
###
# External module support.
# When building external modules the kernel used as basis is considered... |
0b2f658f5370d9818244682c76fd8f6a91b2b1af | Analyze and fix the following issue in the Linux kernel code: RISC-V: alternatives: Support patching multiple insns in assembly | Problem Details:
As pointed out in commit d374a16539b1 ("RISC-V: fix compile error
from deduplicated __ALTERNATIVE_CFG_2"), we need quotes around
parameters passed to macros within macros to avoid spaces being
interpreted as separators. ALT_NEW_CONTENT was trying to handle
this by defining new_c has a vararg, but this ... | ```diff
diff --git a/arch/riscv/include/asm/alternative-macros.h b/arch/riscv/include/asm/alternative-macros.h
index 993a44a8fdac..b8c55fb3ab2c 100644
--- a/arch/riscv/include/asm/alternative-macros.h
+++ b/arch/riscv/include/asm/alternative-macros.h
@@ -14,7 +14,7 @@
.4byte \patch_id
.endm
-.macro ALT_NEW_CONTENT... |
6015b1aca1a233379625385feb01dd014aca60b5 | Analyze and fix the following issue in the Linux kernel code: sched_getaffinity: don't assume 'cpumask_size()' is fully initialized | Problem Details:
The getaffinity() system call uses 'cpumask_size()' to decide how big
the CPU mask is - so far so good. It is indeed the allocation size of a
cpumask.
But the code also assumes that the whole allocation is initialized
without actually doing so itself. That's wrong, because we might have
fixed-size a... | ```diff
diff --git a/kernel/compat.c b/kernel/compat.c
index 55551989d9da..fb50f29d9b36 100644
--- a/kernel/compat.c
+++ b/kernel/compat.c
@@ -152,7 +152,7 @@ COMPAT_SYSCALL_DEFINE3(sched_getaffinity, compat_pid_t, pid, unsigned int, len,
if (len & (sizeof(compat_ulong_t)-1))
return -EINVAL;
- if (!alloc_cpumas... |
aec576821e6fd233ae895f4aa57ff1b511a71e8e | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: apq8096-db820c: fix indentation | Problem Details:
Correct indentation.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230220094339.47370-2-krzysztof.kozlowski@linaro.org | ```diff
diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
index ce189dea2760..eb18811b2676 100644
--- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
+++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
@@ -1070,7 +1070,7 @@
platform {
sound-dai = <&q6routing>;
-... |
b5d08f08377218b1d2ab4026e427a7788b271c8e | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: msm8998: Fix stm-stimulus-base reg name | Problem Details:
The name stm-data-base comes from ancient (msm-3.10 or older)
downstream kernels. Upstream uses stm-stimulus-base instead. Fix it.
Fixes: 783abfa2249a ("arm64: dts: qcom: msm8998: Add Coresight support")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index 8bc1c59127e5..adf7258b3269 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -1524,7 +1524,7 @@
compatible = "arm,coresight-stm", "arm,primecell";
reg = <0x060... |
32734bbd1802efbd60ea4f0c3c1d5500bd0b20fe | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sm8550: Fix PCIe PHYs and controllers nodes | Problem Details:
First, move the pinctrl related propeties out from SoC dtsi and into the
board dts and add blank lines before status properties in the PHY nodes
to be consistent with the rest of the nodes. Then drop the pipe clock
from the controller nodes. Rename the aggre0 and aggre1 clocks to more
generic noc_aggr,... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
index 5db6e789e6b8..44eab9308ff2 100644
--- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
@@ -414,18 +414,27 @@
&pcie0 {
wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
perst-g... |
47dd902aaee9b9341808a3a994793199e7eddb88 | Analyze and fix the following issue in the Linux kernel code: RISC-V: mm: Support huge page in vmalloc_fault() | Problem Details:
Since RISC-V supports ioremap() with huge page (pud/pmd) mapping,
However, vmalloc_fault() assumes that the vmalloc range is limited
to pte mappings. To complete the vmalloc_fault() function by adding
huge page support.
Fixes: 310f541a027b ("riscv: Enable HAVE_ARCH_HUGE_VMAP for 64BIT")
Cc: stable@vge... | ```diff
diff --git a/arch/riscv/mm/fault.c b/arch/riscv/mm/fault.c
index 460f785f6e09..d5f3e501dffb 100644
--- a/arch/riscv/mm/fault.c
+++ b/arch/riscv/mm/fault.c
@@ -143,6 +143,8 @@ static inline void vmalloc_fault(struct pt_regs *regs, int code, unsigned long a
no_context(regs, addr);
return;
}
+ if (pud_leaf... |
396935de145589c8bfe552fa03a5e38604071829 | Analyze and fix the following issue in the Linux kernel code: cifs: fix use-after-free bug in refresh_cache_worker() | Problem Details:
The UAF bug occurred because we were putting DFS root sessions in
cifs_umount() while DFS cache refresher was being executed.
Make DFS root sessions have same lifetime as DFS tcons so we can avoid
the use-after-free bug is DFS cache refresher and other places that
require IPCs to get new DFS referrals... | ```diff
diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h
index 013a4bd65280..651759192280 100644
--- a/fs/cifs/cifs_fs_sb.h
+++ b/fs/cifs/cifs_fs_sb.h
@@ -61,8 +61,6 @@ struct cifs_sb_info {
/* only used when CIFS_MOUNT_USE_PREFIX_PATH is set */
char *prepath;
- /* randomly generated 128-bit number for in... |
dc472c7612297ffc9aea655bf6e9538bec5bfedf | Analyze and fix the following issue in the Linux kernel code: ata: pata_parport: fix parport release without claim | Problem Details:
When adapter is not found, pi->disconnect() is called without previous
pi->connect(). This results in error like this:
parport0: pata_parport tried to release parport when not owner
Add missing out_disconnect label and use it correctly.
Signed-off-by: Ondrej Zary <linux@zary.sk>
Reviewed-by: Sergey S... | ```diff
diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c
index 294a266a0dda..31c9677a45e3 100644
--- a/drivers/ata/pata_parport/pata_parport.c
+++ b/drivers/ata/pata_parport/pata_parport.c
@@ -487,12 +487,13 @@ static struct pi_adapter *pi_init_one(struct parport *parport,
... |
00e885efcfbb8712d3e1bfc1ae30639c15ca1d3b | Analyze and fix the following issue in the Linux kernel code: blk-mq: fix "bad unlock balance detected" on q->srcu in __blk_mq_run_dispatch_ops | Problem Details:
The 'q' parameter of the macro __blk_mq_run_dispatch_ops may not be one
local variable, such as, it is rq->q, then request queue pointed by
this variable could be changed to another queue in case of
BLK_MQ_F_TAG_QUEUE_SHARED after 'dispatch_ops' returns, then
'bad unlock balance' is triggered.
Fixes t... | ```diff
diff --git a/block/blk-mq.h b/block/blk-mq.h
index ef59fee62780..a7482d2cc82e 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -378,12 +378,13 @@ static inline bool hctx_may_queue(struct blk_mq_hw_ctx *hctx,
#define __blk_mq_run_dispatch_ops(q, check_sleep, dispatch_ops) \
do { \
if ((q)->tag_set-... |
9b0cb770f5d7b1ff40bea7ca385438ee94570eec | Analyze and fix the following issue in the Linux kernel code: loop: Fix use-after-free issues | Problem Details:
do_req_filebacked() calls blk_mq_complete_request() synchronously or
asynchronously when using asynchronous I/O unless memory allocation fails.
Hence, modify loop_handle_cmd() such that it does not dereference 'cmd' nor
'rq' after do_req_filebacked() finished unless we are sure that the request
has not... | ```diff
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 839373451c2b..28eb59fd71ca 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1859,35 +1859,44 @@ static blk_status_t loop_queue_rq(struct blk_mq_hw_ctx *hctx,
static void loop_handle_cmd(struct loop_cmd *cmd)
{
+ struct cgroup_sub... |
f1d97a37f975ac615e4d6875c27516150642d499 | Analyze and fix the following issue in the Linux kernel code: clk: mediatek: clk-pllfh: fix missing of_node_put() in fhctl_parse_dt() | Problem Details:
The device_node pointer returned by of_find_compatible_node() with
refcount incremented, when finish using it, the refcount need be
decreased.
Fixes: d7964de8a8ea ("clk: mediatek: Add new clock driver to handle FHCTL hardware")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lor... | ```diff
diff --git a/drivers/clk/mediatek/clk-pllfh.c b/drivers/clk/mediatek/clk-pllfh.c
index f48780bec507..f135b32c6dbe 100644
--- a/drivers/clk/mediatek/clk-pllfh.c
+++ b/drivers/clk/mediatek/clk-pllfh.c
@@ -75,13 +75,13 @@ void fhctl_parse_dt(const u8 *compatible_node, struct mtk_pllfh_data *pllfhs,
base = of_iom... |
b8a2e3f93d412114a1539ea97b59b3e6ed6e1f9a | Analyze and fix the following issue in the Linux kernel code: cgroup: Make current_cgns_cgroup_dfl() safe to call after exit_task_namespace() | Problem Details:
The commit 332ea1f697be ("bpf: Add bpf_cgroup_from_id() kfunc") added
bpf_cgroup_from_id() which calls current_cgns_cgroup_dfl() through
cgroup_get_from_id(). However, BPF programs may be attached to a point where
current->nsproxy has already been cleared to NULL by exit_task_namespace()
and calling bp... | ```diff
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 935e8121b21e..8a5294f4ce72 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -1465,8 +1465,18 @@ static struct cgroup *current_cgns_cgroup_dfl(void)
{
struct css_set *cset;
- cset = current->nsproxy->cgroup_ns->root_cset;
... |
f959325e6ac3f499450088b8d9c626d1177be160 | Analyze and fix the following issue in the Linux kernel code: fsverity: Remove WQ_UNBOUND from fsverity read workqueue | Problem Details:
WQ_UNBOUND causes significant scheduler latency on ARM64/Android. This
is problematic for latency sensitive workloads, like I/O
post-processing.
Removing WQ_UNBOUND gives a 96% reduction in fsverity workqueue related
scheduler latency and improves app cold startup times by ~30ms.
WQ_UNBOUND was also ... | ```diff
diff --git a/fs/verity/verify.c b/fs/verity/verify.c
index f50e3b5b52c9..e2508222750b 100644
--- a/fs/verity/verify.c
+++ b/fs/verity/verify.c
@@ -387,15 +387,15 @@ EXPORT_SYMBOL_GPL(fsverity_enqueue_verify_work);
int __init fsverity_init_workqueue(void)
{
/*
- * Use an unbound workqueue to allow bios to b... |
211baef0eabf4169ce4f73ebd917749d1a7edd74 | Analyze and fix the following issue in the Linux kernel code: cifs: Fix smb2_set_path_size() | Problem Details:
If cifs_get_writable_path() finds a writable file, smb2_compound_op()
must use that file's FID and not the COMPOUND_FID.
Cc: stable@vger.kernel.org
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com> | ```diff
diff --git a/fs/cifs/smb2inode.c b/fs/cifs/smb2inode.c
index 9b956294e864..8dd3791b5c53 100644
--- a/fs/cifs/smb2inode.c
+++ b/fs/cifs/smb2inode.c
@@ -234,15 +234,32 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
size[0] = 8; /* sizeof __le64 */
data[0] = ptr;
- rc = SMB... |
3c2611bac08a834697be918ac357eaff2e47d5b3 | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix trace_virtqueue_add_sgs test issue with LLVM 17. | Problem Details:
LLVM commit https://reviews.llvm.org/D143726 introduced hoistMinMax optimization
that transformed
(i < VIRTIO_MAX_SGS) && (i < out_sgs)
into
i < MIN(VIRTIO_MAX_SGS, out_sgs)
and caused the verifier to stop recognizing such loop as bounded.
Which resulted in the following test failure:
libbpf: pr... | ```diff
diff --git a/tools/testing/selftests/bpf/progs/loop6.c b/tools/testing/selftests/bpf/progs/loop6.c
index 38de0331e6b4..e4ff97fbcce1 100644
--- a/tools/testing/selftests/bpf/progs/loop6.c
+++ b/tools/testing/selftests/bpf/progs/loop6.c
@@ -5,6 +5,7 @@
#include <linux/bpf.h>
#include <bpf/bpf_helpers.h>
#inclu... |
c2679254b9c9980d9045f0f722cf093a2b1f7590 | Analyze and fix the following issue in the Linux kernel code: tracing: Make tracepoint lockdep check actually test something | Problem Details:
A while ago where the trace events had the following:
rcu_read_lock_sched_notrace();
rcu_dereference_sched(...);
rcu_read_unlock_sched_notrace();
If the tracepoint is enabled, it could trigger RCU issues if called in
the wrong place. And this warning was only triggered if lockdep was
enabled... | ```diff
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index fa1004fcf810..2083f2d2f05b 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -231,12 +231,11 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
* not add unwanted padding between the... |
e6d356b146b75f1f77621aab7950a1eb550859f9 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: bcmbca: bcm4908: add TP-Link C2300 USB LED triggers | Problem Details:
This device has 2 USB LEDs meant to be triggered by devices in relevant
USB ports.
While at it fix typo in USB LED name.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/all/20230228144520.21816-3-zajec5@gmail.com/
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> | ```diff
diff --git a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts
index 296393d4aaab..fcf092c81b59 100644
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm... |
f16a8294dd7a02c7ad042cd2e3acc5ea06698dc1 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: bcmbca: bcm4908: fix procmon nodename | Problem Details:
This fixes:
arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dtb: syscon@280000: $nodename:0: 'syscon@280000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$'
From schema: schemas/simple-bus.yaml
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel... | ```diff
diff --git a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
index 1240fc5fb08c..f4cf0f835db7 100644
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
@@ -260,7 +260,7 @@
};
};
- procmon: sy... |
23be9f68f933adee8163b8efc9c6bff71410cc7c | Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: bcmbca: bcm4908: fix LED nodenames | Problem Details:
This fixes:
arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dtb: leds@800: 'led-lan@19', 'led-power@11', 'led-wan-red@12', 'led-wan-white@15', 'led-wps@14' do not match any of the regexes: '^led@[a-f0-9]+$', 'pinctrl-[0-9]+'
From schema: Documentation/devicetree/bindings/leds/leds-bc... | ```diff
diff --git a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts
index 839ca33178b0..d94a53d68320 100644
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac53... |
5cca02449490e767289bda38db1577e2c375c084 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: bcmbca: bcm4908: fix NAND interrupt name | Problem Details:
This fixes:
arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dtb: nand-controller@1800: interrupt-names:0: 'nand_ctlrdy' was expected
From schema: Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dtb: nand-controller@1800: Unevaluated properties ... | ```diff
diff --git a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
index fc96ee7ab39d..1240fc5fb08c 100644
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
@@ -556,7 +556,7 @@
reg = <0x1800 0x600>, <0x... |
47600f84a8bfe4c57e3bd9ed928c14e957679c8a | Analyze and fix the following issue in the Linux kernel code: arm64: dts: broadcom: stringray: Fix GICv3 ITS node name | Problem Details:
The GICv3 ITS is an MSI controller, therefore its node name should be
'msi-controller'.
While we're here, fix the unit-address which shouldn't have a comma.
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230207234709.201229-1-robh@kernel.org
Signed-off-by: Florian Fain... | ```diff
diff --git a/arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi b/arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi
index a9186166c068..388424b3e1d3 100644
--- a/arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi
+++ b/arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi
@@ -178,7 +178,7 @@
<0x02e0... |
436b288687176bf4d2c1cd25b86173e5a1649a60 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-j784s4-*: Add 'ti,sci-dev-id' for NAVSS nodes | Problem Details:
TISCI device ID for main_navss and mcu_navss nodes are missing in
the device tree. Add them.
Fixes: 4664ebd8346a ("arm64: dts: ti: Add initial support for J784S4 SoC")
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Kamlesh Gurudasani <kamles... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
index 7edf324ac159..80a1b08c51a8 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
@@ -398,6 +398,7 @@
#address-cells = <2>;
#size-cells = <2>;
ran... |
4f4b30a777d3e61603119297965343a37be36435 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-j721e-main: Remove ti,strobe-sel property | Problem Details:
According to latest errata of J721e [1], (i2024) 'MMCSD: Peripherals
Do Not Support HS400' which applies to MMCSD0 subsystem. Speed modes
supported has been already updated but missed dropping 'ti,strobe-sel'
property which is only required by HS400 speed mode.
Thus, drop 'ti,strobe-sel' property from... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
index c935622f0102..bfa296dce3a3 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
@@ -1180,7 +1180,6 @@
ti,itap-del-sel-mmc-hs = <0xa>;
ti,itap-del-sel-d... |
a1bc0d6084dba8a31831c65318a8a8e46f00906f | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am62a7-sk: Fix DDR size to full 4GB | Problem Details:
All revisions of AM62A7-SK board have 4GB LPDDR4 Micron
MT53E2G32D4DE-046 AUT:B memory. Commit 38c4a08c820c ("arm64: dts: ti:
Add support for AM62A7-SK") enabled just 2GB due to a schematics error
in early revision of the board. Fix it by enabling full 4GB available on
the platform.
Design docs: https... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
index 5c9012141ee2..f6a67f072dca 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
@@ -27,8 +27,9 @@
memory@80000000 {
device_type = "memory";
- /* 2G RAM */
- ... |
28c8f2189d80c8b37068c367e9864b5aa530f208 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am62-main: Fix GPIO numbers in DT | Problem Details:
Fix number of gpio pins in main_gpio0 & main_gpio1
DT nodes according to AM62x SK datasheet. The Link
of datasheet is in the following line:
https://www.ti.com/lit/ds/symlink/am625.pdf?ts=1673852494660
Section: 6.3.10 GPIO (Page No. 63-67)
Fixes: f1d17330a5be ("arm64: dts: ti: Introduce base support ... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
index ea683fd77d6a..a143ea5e78a5 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
@@ -461,7 +461,7 @@
<193>, <194>, <195>;
interrupt-controller;
#in... |
0bc23d8b2237a104d7f8379d687aa4cb82e2968b | Analyze and fix the following issue in the Linux kernel code: ACPI: tools: pfrut: Check if the input of level and type is in the right numeric range | Problem Details:
The user provides arbitrary non-numeic value to level and type,
which could bring unexpected behavior. In this case the expected
behavior would be to throw an error.
pfrut -h
usage: pfrut [OPTIONS]
code injection:
-l, --load
-s, --stage
-a, --activate
-u, --update [stage and activate]
-q, --query
-d,... | ```diff
diff --git a/tools/power/acpi/tools/pfrut/pfrut.c b/tools/power/acpi/tools/pfrut/pfrut.c
index 52aa0351533c..388c9e3ad040 100644
--- a/tools/power/acpi/tools/pfrut/pfrut.c
+++ b/tools/power/acpi/tools/pfrut/pfrut.c
@@ -97,7 +97,7 @@ static struct option long_options[] = {
static void parse_options(int argc, ch... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.