id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
31507fc2ad36e0071751a710449db19c85d82a7f | Analyze and fix the following issue in the Linux kernel code: nvmem: core: improve range check for nvmem_cell_write() | Problem Details:
When __nvmem_cell_entry_write() is called for an nvmem cell that does
not need bit shifting, it requires that the len parameter exactly
matches the nvmem cell size. However, when the nvmem cell has a nonzero
bit_offset, it was skipping this check.
Accepting values of len larger than the cell size resu... | ```diff
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index fd09f1a6917f..fff85bbf0ecd 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -1793,6 +1793,8 @@ static int __nvmem_cell_entry_write(struct nvmem_cell_entry *cell, void *buf, si
return -EINVAL;
if (cell->bit_offset || cell->nbits... |
e88f516ea417c71bb3702603ac6af9e95338cfa6 | Analyze and fix the following issue in the Linux kernel code: nvmem: qcom-spmi-sdam: Set size in struct nvmem_config | Problem Details:
Let the nvmem core know what size the SDAM is, most notably this fixes
the size of /sys/bus/nvmem/devices/spmi_sdam*/nvmem being '0' and makes
user space work with that file.
~ # hexdump -C -s 64 /sys/bus/nvmem/devices/spmi_sdam2/nvmem
00000040 02 01 00 00 04 00 00 00 00 00 00 00 00 00 00 00 |.... | ```diff
diff --git a/drivers/nvmem/qcom-spmi-sdam.c b/drivers/nvmem/qcom-spmi-sdam.c
index 9aa8f42faa4c..4f1cca6eab71 100644
--- a/drivers/nvmem/qcom-spmi-sdam.c
+++ b/drivers/nvmem/qcom-spmi-sdam.c
@@ -144,6 +144,7 @@ static int sdam_probe(struct platform_device *pdev)
sdam->sdam_config.owner = THIS_MODULE;
sdam->... |
1b2cb4d0b5b6a9d9fe78470704309ec75f8a1c3a | Analyze and fix the following issue in the Linux kernel code: nvmem: imx-ocotp-ele: set word length to 1 | Problem Details:
The ELE hardware internally has a word length of 4. However, among other
things we store MAC addresses in the ELE OCOTP. With a length of 6 bytes
these are naturally unaligned to the word length. Therefore we must
support unaligned reads in reg_read() and indeed it works properly when
reg_read() is cal... | ```diff
diff --git a/drivers/nvmem/imx-ocotp-ele.c b/drivers/nvmem/imx-ocotp-ele.c
index 422a6d53b10e..ca6dd71d8a2e 100644
--- a/drivers/nvmem/imx-ocotp-ele.c
+++ b/drivers/nvmem/imx-ocotp-ele.c
@@ -153,7 +153,7 @@ static int imx_ele_ocotp_probe(struct platform_device *pdev)
priv->config.owner = THIS_MODULE;
priv->... |
391b06ecb63e6eacd054582cb4eb738dfbf5eb77 | Analyze and fix the following issue in the Linux kernel code: nvmem: imx-ocotp-ele: fix MAC address byte order | Problem Details:
According to the i.MX93 Fusemap the two MAC addresses are stored in
words 315 to 317 like this:
315 MAC1_ADDR_31_0[31:0]
316 MAC1_ADDR_47_32[47:32]
MAC2_ADDR_15_0[15:0]
317 MAC2_ADDR_47_16[31:0]
This means the MAC addresses are stored in reverse byte order. We have
to swap the bytes before passing t... | ```diff
diff --git a/drivers/nvmem/imx-ocotp-ele.c b/drivers/nvmem/imx-ocotp-ele.c
index b2d21a5f77bc..422a6d53b10e 100644
--- a/drivers/nvmem/imx-ocotp-ele.c
+++ b/drivers/nvmem/imx-ocotp-ele.c
@@ -111,6 +111,26 @@ static int imx_ocotp_reg_read(void *context, unsigned int offset, void *val, siz
return 0;
};
+stat... |
3c9e2cb6cecf65f7501004038c5d1ed85fb7db84 | Analyze and fix the following issue in the Linux kernel code: nvmem: imx-ocotp-ele: fix reading from non zero offset | Problem Details:
In imx_ocotp_reg_read() the offset comes in as bytes and not as words.
This means we have to divide offset by 4 to get to the correct word
offset.
Also the incoming offset might not be word aligned. In order to read
from the OCOTP the driver aligns down the previous word boundary and
reads from there.... | ```diff
diff --git a/drivers/nvmem/imx-ocotp-ele.c b/drivers/nvmem/imx-ocotp-ele.c
index 2e186b7d3b04..b2d21a5f77bc 100644
--- a/drivers/nvmem/imx-ocotp-ele.c
+++ b/drivers/nvmem/imx-ocotp-ele.c
@@ -71,12 +71,14 @@ static int imx_ocotp_reg_read(void *context, unsigned int offset, void *val, siz
u32 *buf;
void *p;
... |
343aa1e289e8e3dba5e3d054c4eb27da7b4e1ecc | Analyze and fix the following issue in the Linux kernel code: nvmem: imx-ocotp-ele: simplify read beyond device check | Problem Details:
Do the read beyond device check on function entry in bytes instead of
32bit words which is easier to follow.
Fixes: 22e9e6fcfb50 ("nvmem: imx: support i.MX93 OCOTP")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: stable <stable@kernel.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-... | ```diff
diff --git a/drivers/nvmem/imx-ocotp-ele.c b/drivers/nvmem/imx-ocotp-ele.c
index 1ba494497698..2e186b7d3b04 100644
--- a/drivers/nvmem/imx-ocotp-ele.c
+++ b/drivers/nvmem/imx-ocotp-ele.c
@@ -72,13 +72,13 @@ static int imx_ocotp_reg_read(void *context, unsigned int offset, void *val, siz
void *p;
int i;
+ ... |
5bd97a54da956ecf88992ea459dc0cccacc72c6d | Analyze and fix the following issue in the Linux kernel code: pps: adjust references to actual name of uapi header file | Problem Details:
Commit 86b525bed275 ("drivers pps: add PPS generators support") adds a file
entry in MAINTAINERS and a reference in the ioctl-number documentation
referring to the file pps-gen.h, whereas the file added in this commit is
named pps_gen.h.
Adjust the two references to the actual name of the uapi header ... | ```diff
diff --git a/Documentation/userspace-api/ioctl/ioctl-number.rst b/Documentation/userspace-api/ioctl/ioctl-number.rst
index f7cb871cb714..bf5aff018c2f 100644
--- a/Documentation/userspace-api/ioctl/ioctl-number.rst
+++ b/Documentation/userspace-api/ioctl/ioctl-number.rst
@@ -283,7 +283,7 @@ Code Seq# Include... |
e364374369b365351ad8ad69a10b5f7861f24bcd | Analyze and fix the following issue in the Linux kernel code: VMCI: fix reference to ioctl-number.rst | Problem Details:
There has never been an ioctl-number.h — this must have been a typo
for ioctl-number.txt (which later become ioctl-number.rst).
At the time this comment was written, the note didn't actually end up
appearing anywhere, but I fixed the omission from ioctl-number.rst in
0a8e4dc1d353 ("Documentation: ioct... | ```diff
diff --git a/include/linux/vmw_vmci_defs.h b/include/linux/vmw_vmci_defs.h
index c2df94696593..60c9eacd2cf3 100644
--- a/include/linux/vmw_vmci_defs.h
+++ b/include/linux/vmw_vmci_defs.h
@@ -431,11 +431,11 @@ enum {
((((_p)[0] & 0xFF) << 24) | (((_p)[1] & 0xFF) << 16) | ((_p)[2]))
/*
- * The VMCI IOCTLs. ... |
d91f98be26510f5f81ec66425bb0306d1ccd571a | Analyze and fix the following issue in the Linux kernel code: serial: 8250: Adjust the timeout for FIFO mode | Problem Details:
After a console has written a record into UART_TX, it uses
wait_for_xmitr() to wait until the data has been sent out before
returning. However, wait_for_xmitr() will timeout after 10ms,
regardless if the data has been transmitted or not.
For single bytes, this timeout is sufficient even at very slow
b... | ```diff
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 1a65d3e5f3c0..3a946ebe9139 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -2078,7 +2078,8 @@ static void serial8250_break_ctl(struct uart_port *port, int break_state)
ser... |
6dd1de91e7a62bfd3878992c1db6e1d443022c76 | Analyze and fix the following issue in the Linux kernel code: tty: mips_ejtag_fdc: fix one more u8 warning | Problem Details:
The LKP robot complains about:
drivers/tty/mips_ejtag_fdc.c:1224:31: error: incompatible pointer types passing 'const char *[1]' to parameter of type 'const u8 **' (aka 'const unsigned char **')
Fix this by turning the missing pieces (fetch from kgdbfdc_wbuf) to u8
too. Note the filling part (kgdbf... | ```diff
diff --git a/drivers/tty/mips_ejtag_fdc.c b/drivers/tty/mips_ejtag_fdc.c
index afbf7738c7c4..58b28be63c79 100644
--- a/drivers/tty/mips_ejtag_fdc.c
+++ b/drivers/tty/mips_ejtag_fdc.c
@@ -1154,7 +1154,7 @@ static char kgdbfdc_rbuf[4];
/* write buffer to allow compaction */
static unsigned int kgdbfdc_wbuflen... |
52e7d1f7c2fdd1592ab2cc48edd7ca583cabe93e | Analyze and fix the following issue in the Linux kernel code: HID: lenovo: Fix undefined platform_profile_cycle in ThinkPad X12 keyboard patch | Problem Details:
The commit "HID: lenovo: Support for ThinkPad-X12-TAB-1/2 Kbd Fn keys"
introduced an issue where the CI failed with the following error:
ERROR: modpost: "platform_profile_cycle" [drivers/hid/hid-lenovo.ko] undefined!
This issue occurs because platform_profile_cycle is used without ensuring
the kernel ... | ```diff
diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index bfaadd54cba1..4d00bc4d656e 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -31,7 +31,10 @@
#include <linux/input.h>
#include <linux/leds.h>
#include <linux/workqueue.h>
+
+#if IS_ENABLED(CONFIG_ACPI_PLATFORM_PROFIL... |
235b630eda072d7e7b102ab346d6b8a2c028a772 | Analyze and fix the following issue in the Linux kernel code: drivers/card_reader/rtsx_usb: Restore interrupt based detection | Problem Details:
This commit reintroduces interrupt-based card detection previously
used in the rts5139 driver. This functionality was removed in commit
00d8521dcd23 ("staging: remove rts5139 driver code").
Reintroducing this mechanism fixes presence detection for certain card
readers, which with the current driver, w... | ```diff
diff --git a/drivers/misc/cardreader/rtsx_usb.c b/drivers/misc/cardreader/rtsx_usb.c
index 77b0490a1b38..e0174da5e9fc 100644
--- a/drivers/misc/cardreader/rtsx_usb.c
+++ b/drivers/misc/cardreader/rtsx_usb.c
@@ -286,6 +286,7 @@ static int rtsx_usb_get_status_with_bulk(struct rtsx_ucr *ucr, u16 *status)
int rtsx... |
3a693110afd7127400cc9f779c885f01cf16d0f2 | Analyze and fix the following issue in the Linux kernel code: loop: allow loop_set_status to re-enable direct I/O | Problem Details:
Unlike all other calls of (__)loop_update_dio, loop_set_status never
looks at the O_DIRECT flag of the backing file, and thus doesn't
re-enable direct I/O on an O_DIRECT backing file if e.g. the new block
size would allow it. Fix that and remove the need for the separate
__loop_update_dio flag.
Signe... | ```diff
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 6eb6d901151c..2e1f8aa045a9 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -196,8 +196,9 @@ static bool lo_can_use_dio(struct loop_device *lo)
return true;
}
-static void __loop_update_dio(struct loop_device *lo, bool dio)
+stat... |
b03732a9c0db91522914185739505d92d3b0d816 | Analyze and fix the following issue in the Linux kernel code: loop: fix queue freeze vs limits lock order | Problem Details:
Match the locking order used by the core block code by only freezing
the queue after taking the limits lock using the
queue_limits_commit_update_frozen helper and document the callers that
do not freeze the queue at all.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@red... | ```diff
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 560d6d5879d6..15e486baa223 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -311,6 +311,13 @@ static void loop_clear_limits(struct loop_device *lo, int mode)
lim.discard_granularity = 0;
}
+ /*
+ * XXX: this updates the queue ... |
1233751f7df722435bb93e928d64334db260b90d | Analyze and fix the following issue in the Linux kernel code: usb-storage: fix queue freeze vs limits lock order | Problem Details:
Match the locking order used by the core block code by only freezing
the queue after taking the limits lock using the
queue_limits_commit_update_frozen helper.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Rev... | ```diff
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index 8c8b5e6041cc..dc98ceecb724 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -592,12 +592,9 @@ static ssize_t max_sectors_store(struct device *dev, struct device_attribute *at
if (sscanf(buf, "... |
f3dec61d7544a90685f1dd9a87fd4afc751996d0 | Analyze and fix the following issue in the Linux kernel code: nbd: fix queue freeze vs limits lock order | Problem Details:
Match the locking order used by the core block code by only freezing
the queue after taking the limits lock using the
queue_limits_commit_update_frozen helper.
This also allows removes the need for the separate __nbd_set_size helper,
so remove it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewe... | ```diff
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 259bd57fc529..efa05c3c06bf 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -327,8 +327,7 @@ static void nbd_mark_nsock_dead(struct nbd_device *nbd, struct nbd_sock *nsock,
nsock->sent = 0;
}
-static int __nbd_set_size(struct nbd_dev... |
473106dd3aa964a62314d858f6602c95e40e6270 | Analyze and fix the following issue in the Linux kernel code: nvme: fix queue freeze vs limits lock order | Problem Details:
Match the locking order used by the core block code by only freezing
the queue after taking the limits lock.
Unlike most queue updates this does not use the
queue_limits_commit_update_frozen helper as the nvme driver want the
queue frozen for more than just the limits update.
Signed-off-by: Christoph... | ```diff
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index c2250ddef5a2..1ccf17f6ea7f 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2128,9 +2128,10 @@ static int nvme_update_ns_info_generic(struct nvme_ns *ns,
struct queue_limits lim;
int ret;
- blk_mq_freeze_queue(n... |
c99f66e4084a62a2cc401c4704a84328aeddc9ec | Analyze and fix the following issue in the Linux kernel code: block: fix queue freeze vs limits lock order in sysfs store methods | Problem Details:
queue_attr_store() always freezes a device queue before calling the
attribute store operation. For attributes that control queue limits, the
store operation will also lock the queue limits with a call to
queue_limits_start_update(). However, some drivers (e.g. SCSI sd) may
need to issue commands to a d... | ```diff
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index d2aa2177e4ba..e828be777206 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -694,22 +694,24 @@ queue_attr_store(struct kobject *kobj, struct attribute *attr,
if (entry->load_module)
entry->load_module(disk, page, length);
- mutex_lock(&q->... |
d432c817c21a48c3baaa0d28e4d3e74b6aa238a0 | Analyze and fix the following issue in the Linux kernel code: block: don't update BLK_FEAT_POLL in __blk_mq_update_nr_hw_queues | Problem Details:
When __blk_mq_update_nr_hw_queues changes the number of tag sets, it
might have to disable poll queues. Currently it does so by adjusting
the BLK_FEAT_POLL, which is a bit against the intent of features that
describe hardware / driver capabilities, but more importantly causes
nasty lock order problems... | ```diff
diff --git a/block/blk-core.c b/block/blk-core.c
index 6309b3f5a89d..32fb28a6372c 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -951,14 +951,13 @@ int bio_poll(struct bio *bio, struct io_comp_batch *iob, unsigned int flags)
*/
if (!percpu_ref_tryget(&q->q_usage_counter))
return 0;
- if (!(q->l... |
9c96821b44f893fb63f021a28625d3b32c68e8b3 | Analyze and fix the following issue in the Linux kernel code: block: fix docs for freezing of queue limits updates | Problem Details:
queue_limits_commit_update is the function that needs to operate on a
frozen queue, not queue_limits_start_update. Update the kerneldoc
comments to reflect that.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
... | ```diff
diff --git a/block/blk-settings.c b/block/blk-settings.c
index 8f09e33f41f6..89d8366fd43c 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -413,7 +413,8 @@ int blk_set_default_limits(struct queue_limits *lim)
* @lim: limits to apply
*
* Apply the limits in @lim that were obtained from queue... |
51796f5e2960130fe53e9a71d07152622d5e024c | Analyze and fix the following issue in the Linux kernel code: driver core: Move two simple APIs for finding child device to header | Problem Details:
The following two APIs are for finding child device, and both only have
one line code in function body.
device_find_child_by_name()
device_find_any_child()
Move them to header as static inline function.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Zijun Hu <quic_zijuhu@q... | ```diff
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 7d79a0549ac7..5a1f05198114 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -4100,38 +4100,6 @@ struct device *device_find_child(struct device *parent, const void *data,
}
EXPORT_SYMBOL_GPL(device_find_child);
-/**
- * device_find_chi... |
767b74e0d1fc7890a94d1770acf05a442474bd87 | Analyze and fix the following issue in the Linux kernel code: driver core: Introduce device_iter_t for device iterating APIs | Problem Details:
There are several for_each APIs which has parameter with type below:
int (*fn)(struct device *dev, void *data)
They iterate over various device lists and call @fn() for each device
with caller provided data @*data, and they usually need to modify @*data.
Give the type an dedicated typedef with advanta... | ```diff
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 73a56f376d3a..6b9e65a42cd2 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -354,7 +354,7 @@ static struct device *next_device(struct klist_iter *i)
* count in the supplied callback.
*/
int bus_for_each_dev(const struct bus_type *bus, st... |
523c6b3ed7702a638e0f8fd02708a7ed4f938269 | Analyze and fix the following issue in the Linux kernel code: driver core: Correct API device_for_each_child_reverse_from() prototype | Problem Details:
For API device_for_each_child_reverse_from(..., const void *data,
int (*fn)(struct device *dev, const void *data))
- Type of @data is const pointer, and means caller's data @*data is not
allowed to be modified, but that usually is not proper for such non
finding device iterating API.
- Types fo... | ```diff
diff --git a/drivers/base/core.c b/drivers/base/core.c
index d3800f0dc5bb..5ee53b3bca6a 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -4043,8 +4043,8 @@ EXPORT_SYMBOL_GPL(device_for_each_child_reverse);
* device_for_each_child_reverse_from();
*/
int device_for_each_child_reverse_from(struct... |
037116a6cca3e4dbc97905b6e254e8fe7475d502 | Analyze and fix the following issue in the Linux kernel code: driver core: Correct parameter check for API device_for_each_child_reverse_from() | Problem Details:
device_for_each_child_reverse_from() checks (!parent->p) for its
parameter @parent, and that is not consistent with other APIs of
its cluster as shown below:
device_for_each_child_reverse_from() // check (!parent->p)
device_for_each_child_reverse() // check (!parent || !parent->p)
device_for_each... | ```diff
diff --git a/drivers/base/core.c b/drivers/base/core.c
index a83a1350fb5b..d3800f0dc5bb 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -4050,7 +4050,7 @@ int device_for_each_child_reverse_from(struct device *parent,
struct device *child;
int error = 0;
- if (!parent->p)
+ if (!parent || !pa... |
ab017a15fdb2222002cdc6bdf86699fb21a0721a | Analyze and fix the following issue in the Linux kernel code: driver core: Rename declaration parameter name for API device_find_child() cluster | Problem Details:
For APIs:
device_find_child()
device_for_each_child()
device_for_each_child_reverse()
Their declaration has parameter name 'dev', but their defination
changes the name to 'parent'.
Rename declaration name to defination 'parent' to make both have
the same name.
Reviewed-by: Fan Ni <fan.ni@samsung.com... | ```diff
diff --git a/include/linux/device.h b/include/linux/device.h
index 0e0bc9bfe0d1..a9d928398895 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -1074,14 +1074,14 @@ void device_del(struct device *dev);
DEFINE_FREE(device_del, struct device *, if (_T) device_del(_T))
-int device_for_each_c... |
3f58ee540d190e9c52b91e055683d15c8ed81112 | Analyze and fix the following issue in the Linux kernel code: driver core: Move true expression out of if condition in 3 device finding APIs | Problem Details:
For bus_find_device(), driver_find_device(), and device_find_child(), all
of their function body have pattern below:
{
struct klist_iter i;
struct device *dev;
...
while ((dev = next_device(&i)))
if (match(dev, data) && get_device(dev))
break;
...
}
The expression 'get_device(dev)' in the ... | ```diff
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 657c93c38b0d..73a56f376d3a 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -402,9 +402,12 @@ struct device *bus_find_device(const struct bus_type *bus,
klist_iter_init_node(&sp->klist_devices, &i,
(start ? &start->p->knode_bus :... |
d1248436cbef1f924c04255367ff4845ccd9025e | Analyze and fix the following issue in the Linux kernel code: blk-cgroup: Fix class @block_class's subsystem refcount leakage | Problem Details:
blkcg_fill_root_iostats() iterates over @block_class's devices by
class_dev_iter_(init|next)(), but does not end iterating with
class_dev_iter_exit(), so causes the class's subsystem refcount leakage.
Fix by ending the iterating with class_dev_iter_exit().
Fixes: ef45fe470e1e ("blk-cgroup: show globa... | ```diff
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 45a395862fbc..f1cf7f2909f3 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1138,6 +1138,7 @@ static void blkcg_fill_root_iostats(void)
blkg_iostat_set(&blkg->iostat.cur, &tmp);
u64_stats_update_end_irqrestore(&blkg->iostat.sync, flags... |
e128f82f7006991c99a58114f70ef61e937b1ac1 | Analyze and fix the following issue in the Linux kernel code: driver core: class: Fix wild pointer dereferences in API class_dev_iter_next() | Problem Details:
There are a potential wild pointer dereferences issue regarding APIs
class_dev_iter_(init|next|exit)(), as explained by below typical usage:
// All members of @iter are wild pointers.
struct class_dev_iter iter;
// class_dev_iter_init(@iter, @class, ...) checks parameter @class for
// potential class... | ```diff
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 582b5a02a5c4..d57f277978dc 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -323,8 +323,12 @@ void class_dev_iter_init(struct class_dev_iter *iter, const struct class *class,
struct subsys_private *sp = class_to_subsys(class);
str... |
be2fa44b5180a1f021efb40c55fdf63c249c3209 | Analyze and fix the following issue in the Linux kernel code: genksyms: fix memory leak when the same symbol is read from *.symref file | Problem Details:
When a symbol that is already registered is read again from *.symref
file, __add_symbol() removes the previous one from the hash table without
freeing it.
[Test Case]
$ cat foo.c
#include <linux/export.h>
void foo(void);
void foo(void) {}
EXPORT_SYMBOL(foo);
$ cat foo.symref
foo void f... | ```diff
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c
index 8ca46f807b57..c5e8e0e0f949 100644
--- a/scripts/genksyms/genksyms.c
+++ b/scripts/genksyms/genksyms.c
@@ -272,11 +272,15 @@ static struct symbol *__add_symbol(const char *name, enum symbol_type type,
break;
}
}
+
+ free_li... |
45c9c4101d3d2fdfa00852274bbebba65fcc3cf2 | Analyze and fix the following issue in the Linux kernel code: genksyms: fix memory leak when the same symbol is added from source | Problem Details:
When a symbol that is already registered is added again, __add_symbol()
returns without freeing the symbol definition, making it unreachable.
The following test cases demonstrate different memory leak points.
[Test Case 1]
Forward declaration with exactly the same definition
$ cat foo.c
#includ... | ```diff
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c
index 07f9b8cfb233..8ca46f807b57 100644
--- a/scripts/genksyms/genksyms.c
+++ b/scripts/genksyms/genksyms.c
@@ -239,6 +239,7 @@ static struct symbol *__add_symbol(const char *name, enum symbol_type type,
"unchanged\n");
}
sy... |
41a00051283e301f7e0009626ddf591542e30161 | Analyze and fix the following issue in the Linux kernel code: kheaders: prevent `find` from seeing perl temp files | Problem Details:
Symptom:
The command
find ... | xargs ... perl -i
occasionally triggers error messages like the following, with the build
still succeeding:
Can't open <redacted>/kernel/.tmp_dir/include/dt-bindings/clock/XXNX4nW9: No such file or directory.
Analysis:
With strace, the root cause has been i... | ```diff
diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh
index 55f493d83b8f..c9e5dc068e85 100755
--- a/kernel/gen_kheaders.sh
+++ b/kernel/gen_kheaders.sh
@@ -79,8 +79,13 @@ done | tar -c -f - -T - | tar -xf - -C "${tmpdir}"
rm -f "${tmpdir}/include/generated/utsversion.h"
# Remove comments except SDPX ... |
74c033b6aa650ea7280221a9e57b7318a120978c | Analyze and fix the following issue in the Linux kernel code: perf MANIFEST: Add arch/*/include/uapi/asm/bpf_perf_event.h to the perf tarball | Problem Details:
Needed to build tools/lib/bpf/ on various arches other than x86_64,
notably arm64 when using the perf tarballs generated by:
$ make help | grep perf-
perf-tar-src-pkg - Build the perf source tarball with no compression
perf-targz-src-pkg - Build the perf source tarball with gzip compress... | ```diff
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST
index dc42de1785ce..908165fcec7d 100644
--- a/tools/perf/MANIFEST
+++ b/tools/perf/MANIFEST
@@ -1,5 +1,6 @@
arch/arm64/tools/gen-sysreg.awk
arch/arm64/tools/sysreg
+arch/*/include/uapi/asm/bpf_perf_event.h
tools/perf
tools/arch
tools/scripts
``` |
8c2eafbbfd782d6ad270ca2de21b529ac57de0f4 | Analyze and fix the following issue in the Linux kernel code: perf symbol: Prefer non-label symbols with same address | Problem Details:
When there are more than one symbols at the same address, it needs to
choose which one is better. In choose_best_symbol() it didn't check the
type of symbols. It's possible to have labels in other symbols and in
that case, it would be better to pick the actual symbol over the labels.
To minimize the ... | ```diff
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 0037f1163919..49b08adc6ee3 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -154,6 +154,13 @@ static int choose_best_symbol(struct symbol *syma, struct symbol *symb)
else if ((a == 0) && (b > 0))
return SYMBOL_B;
... |
4f90ed0ae36ac2c223d312a2cd767714196b1455 | Analyze and fix the following issue in the Linux kernel code: perf trace: Fix unaligned access for augmented args | Problem Details:
Some version of compilers reported unaligned accesses in perf trace when
undefined-behavior sanitizer is on. I found that it uses raw data in
the sample directly and assuming it's properly aligned.
Unlike other sample fields, the raw data is not 8-byte aligned because
there's a size field (u32) befor... | ```diff
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 6f5ae3ac0638..d7c7d29291fb 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2559,7 +2559,6 @@ static int trace__fprintf_sample(struct trace *trace, struct evsel *evsel,
static void *syscall__augmented_args(... |
0ba2022410fc1acf67f958474d666c0d35addcc7 | Analyze and fix the following issue in the Linux kernel code: perf test: Mark remaining probe tests as exclusive | Problem Details:
Probes are global and other probe tests are already exclusive. These
two tests can throw warnings when run at the same time so mark them as
exclusive too:
$ perf test -vvv 81 79
79: perftool-testsuite_probe:
--- start ---
test child forked, pid 46419
../common/init.sh: line 137: /sys/kernel... | ```diff
diff --git a/tools/perf/tests/shell/perftool-testsuite_probe.sh b/tools/perf/tests/shell/perftool-testsuite_probe.sh
index a0fec33a0358..7b1bfd0f888f 100755
--- a/tools/perf/tests/shell/perftool-testsuite_probe.sh
+++ b/tools/perf/tests/shell/perftool-testsuite_probe.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# perftool-... |
1f3dc29d2445c89c85e451c02e41a8e0cd22423c | Analyze and fix the following issue in the Linux kernel code: iommu/arm-smmu-v3: Add missing #include of linux/string_choices.h | Problem Details:
Commit f2c77f6e41e6 ("iommu/arm-smmu-v3: Use str_read_write helper w/
logs") introduced a call to str_read_write() in the SMMUv3 driver but
without an explicit #include of <linux/string_choices.h>. This breaks
the build for custom configurations where CONFIG_ACPI=n:
drivers/iommu/arm/arm-smmu-v3/arm-s... | ```diff
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
index 6679466911b3..44c32bb89dd3 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
@@ -26,6 +26,7 @@
#include <linux/pci.h>
#include <linux/pci-ats.h>... |
082d9e263af8de68f0c34f67b251818205160f6e | Analyze and fix the following issue in the Linux kernel code: wifi: brcmfmac: Check the return value of of_property_read_string_index() | Problem Details:
Somewhen between 6.10 and 6.11 the driver started to crash on my
MacBookPro14,3. The property doesn't exist and 'tmp' remains
uninitialized, so we pass a random pointer to devm_kstrdup().
The crash I am getting looks like this:
BUG: unable to handle page fault for address: 00007f033c669379
PF: superv... | ```diff
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
index c1f18e2fe540..1681ad00f82e 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
@@ -99,13 +99,13 @@ int brcmf... |
996c934c8c196144af386c4385f61fcd5349af28 | Analyze and fix the following issue in the Linux kernel code: wifi: wlcore: fix unbalanced pm_runtime calls | Problem Details:
If firmware boot failes, runtime pm is put too often:
[12092.708099] wlcore: ERROR firmware boot failed despite 3 retries
[12092.708099] wl18xx_driver wl18xx.1.auto: Runtime PM usage count underflow!
Fix that by redirecting all error gotos before runtime_get so that runtime is
not put.
Fixes: c40aad28... | ```diff
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 986b07bfa0ee..8fb58a5d911c 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -2612,24 +2612,24 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
if (tes... |
1be94490b6b8a06ff14cd23fda8714e6ec37cdfb | Analyze and fix the following issue in the Linux kernel code: wifi: wilc1000: unregister wiphy only if it has been registered | Problem Details:
There is a specific error path in probe functions in wilc drivers (both
sdio and spi) which can lead to kernel panic, as this one for example
when using SPI:
Unable to handle kernel paging request at virtual address 9f000000 when read
[9f000000] *pgd=00000000
Internal error: Oops: 5 [#1] ARM
Modules l... | ```diff
diff --git a/drivers/net/wireless/microchip/wilc1000/netdev.c b/drivers/net/wireless/microchip/wilc1000/netdev.c
index 7e84fc0fd911..af298021e050 100644
--- a/drivers/net/wireless/microchip/wilc1000/netdev.c
+++ b/drivers/net/wireless/microchip/wilc1000/netdev.c
@@ -925,8 +925,6 @@ void wilc_netdev_cleanup(stru... |
89aca45f26879dfbbf8374c425c4811f69cfc2df | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix invalid interface combinations | Problem Details:
Setting beacon_int_min_gcd and NL80211_IFTYPE_ADHOC in the same interface
combination is invalid, which will trigger the following warning trace
and get error returned from wiphy_register().
[ 10.080325] Call trace:
[ 10.082761] wiphy_register+0xc4/0x76c [cfg80211]
[ 10.087465] ieee80211_regis... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/init.c b/drivers/net/wireless/mediatek/mt76/mt7996/init.c
index 5e96973226bb..efa7b0697a40 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/init.c
@@ -16,9 +16,6 @@
static const struct ieee8021... |
bf2aa7df2687a24ebb52cec4a24443121ac3126d | Analyze and fix the following issue in the Linux kernel code: miscdevice: rust: use build_error! macro instead of function | Problem Details:
The function called build_error is an implementation detail of the macro
of the same name. Thus, update miscdevice to use the macro rather than
the function. See [1] for more information on this.
These use the macro with the kernel:: prefix as it has not yet been
added to the prelude.
Reported-by: St... | ```diff
diff --git a/rust/kernel/miscdevice.rs b/rust/kernel/miscdevice.rs
index ebc82e7dfc80..dfb363630c70 100644
--- a/rust/kernel/miscdevice.rs
+++ b/rust/kernel/miscdevice.rs
@@ -134,7 +134,7 @@ pub trait MiscDevice: Sized {
_cmd: u32,
_arg: usize,
) -> Result<isize> {
- kernel::build_... |
078bf9438a31567e2c0587159ccefde835fb1ced | Analyze and fix the following issue in the Linux kernel code: samples/landlock: Fix possible NULL dereference in parse_path() | Problem Details:
malloc() may return NULL, leading to NULL dereference. Add a NULL
check.
Fixes: ba84b0bf5a16 ("samples/landlock: Add a sandbox manager example")
Signed-off-by: Zichen Xie <zichenxie0106@gmail.com>
Link: https://lore.kernel.org/r/20241128032955.11711-1-zichenxie0106@gmail.com
[mic: Simplify fix]
Signe... | ```diff
diff --git a/samples/landlock/sandboxer.c b/samples/landlock/sandboxer.c
index 57565dfd74a2..07fab2ef534e 100644
--- a/samples/landlock/sandboxer.c
+++ b/samples/landlock/sandboxer.c
@@ -91,6 +91,9 @@ static int parse_path(char *env_path, const char ***const path_list)
}
}
*path_list = malloc(num_paths *... |
f79e6eb84d4d2bff99e3ca6c1f140b2af827e904 | Analyze and fix the following issue in the Linux kernel code: samples/vfs/mountinfo: Use __u64 instead of uint64_t | Problem Details:
On 32-bit (e.g. arm32, m68k):
samples/vfs/mountinfo.c: In function ‘dump_mountinfo’:
samples/vfs/mountinfo.c:145:29: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=]
145 | pri... | ```diff
diff --git a/samples/vfs/mountinfo.c b/samples/vfs/mountinfo.c
index 2b17d244d321..f47c035cc339 100644
--- a/samples/vfs/mountinfo.c
+++ b/samples/vfs/mountinfo.c
@@ -32,9 +32,9 @@ static bool ext_format;
* There are no bindings in glibc for listmount() and statmount() (yet),
* make our own here.
*/
-stat... |
cacd9ae4bf801ff4125d8961bb9a3ba955e51680 | Analyze and fix the following issue in the Linux kernel code: poll_wait: add mb() to fix theoretical race between waitqueue_active() and .poll() | Problem Details:
As the comment above waitqueue_active() explains, it can only be used
if both waker and waiter have mb()'s that pair with each other. However
__pollwait() is broken in this respect.
This is not pipe-specific, but let's look at pipe_poll() for example:
poll_wait(...); // -> __pollwait() -> add_wait_q... | ```diff
diff --git a/include/linux/poll.h b/include/linux/poll.h
index d1ea4f3714a8..fc641b50f129 100644
--- a/include/linux/poll.h
+++ b/include/linux/poll.h
@@ -41,8 +41,16 @@ typedef struct poll_table_struct {
static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p)
{
- i... |
7e0c2f136d1be33e5e950747f3a5f312977fff4b | Analyze and fix the following issue in the Linux kernel code: dt-bindings: can: st,stm32-bxcan: fix st,gcan property type | Problem Details:
The SRAM memory shared pointed to by the st,gcan property is unique, so
we don't need an array of phandles.
Fixes: e43250c0ac81 ("dt-bindings: net: can: add STM32 bxcan DT bindings")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlows... | ```diff
diff --git a/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml b/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml
index de1d4298893b..c7510b00954a 100644
--- a/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml
+++ b/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.ya... |
bb2e0fb1e6aa9f737d6e0cbcf6494c51180e6d6d | Analyze and fix the following issue in the Linux kernel code: m68k: libgcc: Fix lvalue abuse in umul_ppmm() | Problem Details:
lib/muldi3.c:53:28: warning: asm output is not an lvalue
lib/muldi3.c:53:28: warning: asm output is not an lvalue
lib/muldi3.c:53:28: error: not addressable
lib/muldi3.c:53:28: warning: generating address of non-lvalue (11)
lib/muldi3.c:53:28: warning: generating address of non-lvalue (... | ```diff
diff --git a/arch/m68k/include/asm/libgcc.h b/arch/m68k/include/asm/libgcc.h
index 1cce6d130d80..27e17195bd7b 100644
--- a/arch/m68k/include/asm/libgcc.h
+++ b/arch/m68k/include/asm/libgcc.h
@@ -10,11 +10,18 @@
* will fallback to using the C-coded version of umul_ppmm().
*/
#define umul_ppmm(w1, w0, u, v) ... |
6847b00c3c85fffff15f29e030a2fa489bdde88b | Analyze and fix the following issue in the Linux kernel code: misc: keba: Fix kernfs warning on module unload | Problem Details:
Unloading the cp500 module leads to the following warning:
kernfs: can not remove 'eeprom', no directory
WARNING: CPU: 1 PID: 1610 at fs/kernfs/dir.c:1683 kernfs_remove_by_name_ns+0xb1/0xc0
The parent I2C device of the nvmem devices is freed before the nvmem
devices. The reference to the nvmem device... | ```diff
diff --git a/drivers/misc/keba/cp500.c b/drivers/misc/keba/cp500.c
index 255d3022dae8..d0c6113dcff3 100644
--- a/drivers/misc/keba/cp500.c
+++ b/drivers/misc/keba/cp500.c
@@ -126,8 +126,9 @@ static struct cp500_devs cp520_devices = {
};
struct cp500_nvmem {
- struct nvmem_device *nvmem;
+ struct nvmem_devic... |
2a8d6abdf5cfdc7df934968f2e8292d050f20b20 | Analyze and fix the following issue in the Linux kernel code: devcoredump: cleanup some comments | Problem Details:
Correct a spello, remove an extra space between words, and fix
one kernel-doc warning:
drivers/base/devcoredump.c:292: warning: No description found for return value of 'devcd_read_from_sgtable'
Fixes: 522566376a3f ("devcoredump: add scatterlist support")
Fixes: 01daccf74832 ("devcoredump : Serialize... | ```diff
diff --git a/drivers/base/devcoredump.c b/drivers/base/devcoredump.c
index c795edad1b96..2a0e0b2fdb98 100644
--- a/drivers/base/devcoredump.c
+++ b/drivers/base/devcoredump.c
@@ -186,9 +186,9 @@ static ssize_t disabled_show(const struct class *class, const struct class_attri
* mutex_lock(&devcd->m... |
111d36d6278756128b7d7fab787fdcbf8221cd98 | Analyze and fix the following issue in the Linux kernel code: xfs: lock dquot buffer before detaching dquot from b_li_list | Problem Details:
We have to lock the buffer before we can delete the dquot log item from
the buffer's log item list.
Cc: stable@vger.kernel.org # v6.13-rc3
Fixes: acc8f8628c3737 ("xfs: attach dquot buffer to dquot log item buffer")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@... | ```diff
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
index f11d475898f2..201c26322ede 100644
--- a/fs/xfs/xfs_dquot.c
+++ b/fs/xfs/xfs_dquot.c
@@ -87,8 +87,9 @@ xfs_dquot_detach_buf(
}
spin_unlock(&qlip->qli_lock);
if (bp) {
+ xfs_buf_lock(bp);
list_del_init(&qlip->qli_item.li_bio_list);
- xfs_buf_re... |
6a04bb5a2046067681257d5dd69a724856c8fbcb | Analyze and fix the following issue in the Linux kernel code: drm/xe: remove unused xe_pciids.h harder, add missing PCI ID | Problem Details:
Commit 493454445c95 ("drm/xe: switch to common PCI ID macros") removed
xe_pciids.h via drm-intel-next. In the mean time, commit ae78ec0a52c4
("drm/xe/ptl: Add another PTL PCI ID") added to xe_pciids.h via
drm-xe-next.
The two commits were merged in commit 8f109f287fdc ("Merge drm/drm-next
into drm-xe-... | ```diff
diff --git a/include/drm/intel/pciids.h b/include/drm/intel/pciids.h
index 32480b5563db..7883384acd5e 100644
--- a/include/drm/intel/pciids.h
+++ b/include/drm/intel/pciids.h
@@ -829,6 +829,7 @@
MACRO__(0xB092, ## __VA_ARGS__), \
MACRO__(0xB0A0, ## __VA_ARGS__), \
MACRO__(0xB0A1, ## __VA_ARGS__), \
- MACR... |
a6e208736587648fc1eb8a4d832d90427586f367 | Analyze and fix the following issue in the Linux kernel code: uio: uio_dmem_genirq: check the return value of devm_kasprintf() | Problem Details:
devm_kasprintf() can fail so check its return value and bail-out on no
memory.
Fixes: 52e2dc2ce2d8 ("uio: Convert a few more users to using %pOFn instead of device_node.name")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20241202181703.28546-1-brg... | ```diff
diff --git a/drivers/uio/uio_dmem_genirq.c b/drivers/uio/uio_dmem_genirq.c
index c70dd81bfc61..31aa75110ba5 100644
--- a/drivers/uio/uio_dmem_genirq.c
+++ b/drivers/uio/uio_dmem_genirq.c
@@ -167,6 +167,8 @@ static int uio_dmem_genirq_probe(struct platform_device *pdev)
}
uioinfo->name = devm_kasprintf(&pd... |
efc7ae3f249a6aa2de8f6bec56a2314badfd340a | Analyze and fix the following issue in the Linux kernel code: uio: Fix return value of poll | Problem Details:
The return type of __poll_t can't be negative,
-EIO will be translate to __poll_t,and will return to caller.
Fixes: beafc54c4e2f ("UIO: Add the User IO core code")
Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com>
Link: https://lore.kernel.org/r/20241126124259.1367-1-angus.chen@jaguarmicro.com
Si... | ```diff
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
index 004a549c6c7d..d93ed4e86a17 100644
--- a/drivers/uio/uio.c
+++ b/drivers/uio/uio.c
@@ -565,7 +565,7 @@ static __poll_t uio_poll(struct file *filep, poll_table *wait)
mutex_lock(&idev->info_lock);
if (!idev->info || !idev->info->irq)
- ret = -EIO;
+ ... |
67510d7e2e5f5bdc020bf9d759aa575cce48c8e1 | Analyze and fix the following issue in the Linux kernel code: fs: debugfs: fix open proxy for unsafe files | Problem Details:
In the previous commit referenced below, I had to split
the short fops handling into different proxy fops. This
necessitated knowing out-of-band whether or not the ops
are short or full, when attempting to convert from fops
to allocated fsdata.
Unfortunately, I only converted full_proxy_open() which
i... | ```diff
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index bdb4f2ca0506..16e198a26339 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -280,7 +280,7 @@ static int open_proxy_open(struct inode *inode, struct file *filp)
const struct file_operations *real_fops = NULL;
int r;
- r = debugfs_file_get(de... |
b583ef82b671c9a752fbe3e95bd4c1c51eab764d | Analyze and fix the following issue in the Linux kernel code: uprobes: Fix race in uprobe_free_utask | Problem Details:
Max Makarov reported kernel panic [1] in perf user callchain code.
The reason for that is the race between uprobe_free_utask and bpf
profiler code doing the perf user stack unwind and is triggered
within uprobe_free_utask function:
- after current->utask is freed and
- before current->utask is set... | ```diff
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index fa04b14a7d72..5d71ef85420c 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1915,6 +1915,7 @@ void uprobe_free_utask(struct task_struct *t)
if (!utask)
return;
+ t->utask = NULL;
WARN_ON_ONCE(utask->active_uprobe... |
15734b5e6f8dfd44df08ecc1d846540476b7f7de | Analyze and fix the following issue in the Linux kernel code: bcachefs: Check for dirents to overwritten inodes | Problem Details:
This fixes various "dirent to missing inode" errors.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c
index 206fc046610a..3917d75f3c98 100644
--- a/fs/bcachefs/fsck.c
+++ b/fs/bcachefs/fsck.c
@@ -832,11 +832,13 @@ struct inode_walker {
struct bpos last_pos;
DARRAY(struct inode_walker_entry) inodes;
+ snapshot_id_list deletes;
};
static void inode... |
bd5b09727f3d13bb3c782b5f05041c69784e7fe9 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Don't set btree_path to updtodate if we don't fill | Problem Details:
This fixes various locking asserts, and a null ptr deref in
bch2_btree_iter_peek_path().
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c
index 7636a5e97409..3b62296c3100 100644
--- a/fs/bcachefs/btree_key_cache.c
+++ b/fs/bcachefs/btree_key_cache.c
@@ -291,10 +291,8 @@ static noinline int btree_key_cache_fill(struct btree_trans *trans,
struct btree_path *ck_path,
... |
f908eacc34c7e8092bd47b7fcf5741943d3b734c | Analyze and fix the following issue in the Linux kernel code: bcachefs: fix bch2_btree_key_cache_drop() | Problem Details:
When evicting, we shouldn't leave a pointer to the key cache entry lying
around - that screws up btree path asserts we're adding.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c
index 382f99b774b8..7636a5e97409 100644
--- a/fs/bcachefs/btree_key_cache.c
+++ b/fs/bcachefs/btree_key_cache.c
@@ -613,8 +613,18 @@ void bch2_btree_key_cache_drop(struct btree_trans *trans,
bkey_cached_free(bc, ck);
mark_btree_nod... |
4bd06f07bcb5c472b7d7a90e6ee890bd0900b3e1 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Fixes for snapshot_tree.master_subvol | Problem Details:
Ensure that snapshot_tree.master_subvol is cleared when we delete the
master subvolume in a tree of snapshots, and allow for snapshot trees
that don't have a master subvolume in fsck.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/snapshot.c b/fs/bcachefs/snapshot.c
index 1506445eaaf4..cf6b3256d188 100644
--- a/fs/bcachefs/snapshot.c
+++ b/fs/bcachefs/snapshot.c
@@ -495,6 +495,9 @@ static int check_snapshot_tree(struct btree_trans *trans,
goto err;
}
+ if (!st.v->master_subvol)
+ goto out;
+
ret = bch2_... |
fa3e5135e4e7bfb38598a58caf592c940eff4b03 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix assert for online fsck | Problem Details:
We can't check if we're racing with fsck ending until mark_lock is held.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/disk_accounting.h b/fs/bcachefs/disk_accounting.h
index fc1b673689c8..5360cbb3ec29 100644
--- a/fs/bcachefs/disk_accounting.h
+++ b/fs/bcachefs/disk_accounting.h
@@ -138,7 +138,8 @@ static inline int bch2_accounting_mem_mod_locked(struct btree_trans *trans,
bpos_to_disk_accounting_pos... |
861cd0f60624440b51e3ff14b04055b59c13d1e4 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Write lock btree node in key cache fills | Problem Details:
this addresses a key cache coherency bug
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c
index 4eba2871f289..382f99b774b8 100644
--- a/fs/bcachefs/btree_key_cache.c
+++ b/fs/bcachefs/btree_key_cache.c
@@ -197,7 +197,9 @@ out:
return ck;
}
-static int btree_key_cache_create(struct btree_trans *trans, struct btree_path *p... |
baf13d83441b8c25fcb09097ec629a8388d1c505 | Analyze and fix the following issue in the Linux kernel code: bcachefs: kill __bch2_btree_iter_flags() | Problem Details:
bch2_btree_iter_flags() now takes a level parameter; this fixes a bug
where using a node iterator on a leaf wouldn't set
BTREE_ITER_with_key_cache, leading to fun cache coherency bugs.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c
index a1c5fcced24e..291eb5eb0203 100644
--- a/fs/bcachefs/btree_iter.c
+++ b/fs/bcachefs/btree_iter.c
@@ -3032,7 +3032,7 @@ void bch2_trans_iter_init_outlined(struct btree_trans *trans,
unsigned flags)
{
bch2_trans_iter_init_common(trans,... |
d01ea14da718f7c30520c8498a7ba952b099ad83 | Analyze and fix the following issue in the Linux kernel code: bcachefs: add counter_flags for counters | Problem Details:
In bcachefs, io_read and io_write counter record the amount
of data which has been read and written. They increase in
unit of sector, so to display correctly, they need to be
shifted to the left by the size of a sector. Other counters
like io_move, move_extent_{read, write, finish} also have
this probl... | ```diff
diff --git a/fs/bcachefs/sb-counters_format.h b/fs/bcachefs/sb-counters_format.h
index 62ea478215d0..fdcf598f08b1 100644
--- a/fs/bcachefs/sb-counters_format.h
+++ b/fs/bcachefs/sb-counters_format.h
@@ -2,86 +2,91 @@
#ifndef _BCACHEFS_SB_COUNTERS_FORMAT_H
#define _BCACHEFS_SB_COUNTERS_FORMAT_H
-#define BCH_... |
daea6d23cd2f99a0c70e871a27d473f3ad48845b | Analyze and fix the following issue in the Linux kernel code: netconsole: selftest: verify userdata entry limit | Problem Details:
Add a new selftest for netconsole that tests the userdata entry limit
functionality. The test performs two key verifications:
1. Create MAX_USERDATA_ITEMS (16) userdata entries successfully
2. Confirm that attempting to create an additional userdata entry fails
The selftest script uses the netcons li... | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index 7a88872fada8..3f3e289b391c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -16171,7 +16171,7 @@ S: Maintained
F: Documentation/networking/netconsole.rst
F: drivers/net/netconsole.c
F: tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh
-F: tools/testing/selfte... |
7dcb65351b30500a759c857590b73b98c05ac7fd | Analyze and fix the following issue in the Linux kernel code: netconsole: selftest: Delete all userdata keys | Problem Details:
Modify the cleanup function to remove all userdata keys created during the
test, instead of just deleting a single predefined key. This ensures a
more thorough cleanup of temporary resources.
Move the KEY_PATH variable definition inside the set_user_data function
to reduce global variables and improve... | ```diff
diff --git a/tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh b/tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh
index fdd45a3468f1..3acaba41ac7b 100644
--- a/tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh
+++ b/tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh
@@ -23,7 +23,... |
61f51cc6defeb0faad1f60f1dbc41613e93f31da | Analyze and fix the following issue in the Linux kernel code: netconsole: selftest: Split the helpers from the selftest | Problem Details:
Split helper functions from the netconsole basic test into a separate
library file to enable reuse across different netconsole tests. This
change only moves the existing helper functions to lib/sh/lib_netcons.sh
while preserving the same test functionality.
The helpers provide common functions for:
- ... | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index 42ac78507213..7a88872fada8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -16170,6 +16170,7 @@ M: Breno Leitao <leitao@debian.org>
S: Maintained
F: Documentation/networking/netconsole.rst
F: drivers/net/netconsole.c
+F: tools/testing/selftests/drivers/net/lib/sh/li... |
e51c7478d23bb484d414fc036cd1ff57afe31b67 | Analyze and fix the following issue in the Linux kernel code: netconsole: Warn if MAX_USERDATA_ITEMS limit is exceeded | Problem Details:
netconsole configfs helpers doesn't allow the creation of more than
MAX_USERDATA_ITEMS items.
Add a warning when netconsole userdata update function attempts sees
more than MAX_USERDATA_ITEMS entries.
Replace silent ignore mechanism with WARN_ON_ONCE() to highlight
potential misuse during development... | ```diff
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index f422a2f666ef..86ab4a42769a 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -730,7 +730,7 @@ static void update_userdata(struct netconsole_target *nt)
struct userdatum *udm_item;
struct config_item *item;
- if... |
8c7a6efc017e59f2b773a8a4c0897309dfe1d742 | Analyze and fix the following issue in the Linux kernel code: ipv4: route: fix drop reason being overridden in ip_route_input_slow | Problem Details:
When jumping to 'martian_destination' a drop reason is always set but
that label falls-through the 'e_nobufs' one, overriding the value.
The behavior was introduced by the mentioned commit. The logic went
from,
goto martian_destination;
...
martian_destination:
...
e_inval:
err = -EINVAL;
go... | ```diff
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 0fbec3509618..e1564b95fab0 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2445,6 +2445,7 @@ martian_destination:
net_warn_ratelimited("martian destination %pI4 from %pI4, dev %s\n",
&daddr, &saddr, dev->name);
#endif
+ goto out;
e... |
03d120f27d050336f7e7d21879891542c4741f81 | Analyze and fix the following issue in the Linux kernel code: net: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field() | Problem Details:
CPSW ALE has 75-bit ALE entries stored across three 32-bit words.
The cpsw_ale_get_field() and cpsw_ale_set_field() functions support
ALE field entries spanning up to two words at the most.
The cpsw_ale_get_field() and cpsw_ale_set_field() functions work as
expected when ALE field spanned across word1... | ```diff
diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c
index 52e4e350b734..5cc72a91f220 100644
--- a/drivers/net/ethernet/ti/cpsw_ale.c
+++ b/drivers/net/ethernet/ti/cpsw_ale.c
@@ -127,15 +127,15 @@ struct cpsw_ale_dev_id {
static inline int cpsw_ale_get_field(u32 *ale_entry, u3... |
63ca02221cc5aa0731fe2b0cc28158aaa4b84982 | Analyze and fix the following issue in the Linux kernel code: scsi: iscsi: Fix redundant response for ISCSI_UEVENT_GET_HOST_STATS request | Problem Details:
The ISCSI_UEVENT_GET_HOST_STATS request is already handled in
iscsi_get_host_stats(). This fix ensures that redundant responses are
skipped in iscsi_if_rx().
- On success: send reply and stats from iscsi_get_host_stats()
within if_recv_msg().
- On error: fall through.
Signed-off-by: Xiang Zhang... | ```diff
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index fde7de3b1e55..9b47f91c5b97 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -4104,7 +4104,7 @@ iscsi_if_rx(struct sk_buff *skb)
}
do {
/*
- * special case for GE... |
8604f633f59375687fa115d6f691de95a42520e3 | Analyze and fix the following issue in the Linux kernel code: scsi: core: Fix command pass through retry regression | Problem Details:
scsi_check_passthrough() is always called, but it doesn't check for if a
command completed successfully. As a result, if a command was successful and
the caller used SCMD_FAILURE_RESULT_ANY to indicate what failures it wanted
to retry, we will end up retrying the command. This will cause delays during
... | ```diff
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index adee6f60c966..0cc6a0f77b09 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -210,6 +210,9 @@ static int scsi_check_passthrough(struct scsi_cmnd *scmd,
struct scsi_sense_hdr sshdr;
enum sam_status status;
+ if (!scmd-... |
07412e1f163de6567f5f4a2c8a44ae96a2a05422 | Analyze and fix the following issue in the Linux kernel code: hyperv: Do not overlap the hvcall IO areas in get_vtl() | Problem Details:
The Top-Level Functional Specification for Hyper-V, Section 3.6 [1, 2],
disallows overlapping of the input and output hypercall areas, and
get_vtl(void) does overlap them.
Use the output hypercall page of the current vCPU for the hypercall.
[1] https://learn.microsoft.com/en-us/virtualization/hyper-v... | ```diff
diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
index f82d1aefaa8a..173005e6a95d 100644
--- a/arch/x86/hyperv/hv_init.c
+++ b/arch/x86/hyperv/hv_init.c
@@ -422,7 +422,7 @@ static u8 __init get_vtl(void)
local_irq_save(flags);
input = *this_cpu_ptr(hyperv_pcpu_input_arg);
- output = (str... |
1da602ec36a3e208c070ec23895e84cbb621a12e | Analyze and fix the following issue in the Linux kernel code: hv_balloon: Fallback to generic_online_page() for non-HV hot added mem | Problem Details:
The Hyper-V balloon driver installs a custom callback for handling page
onlining operations performed by the memory hotplug subsystem. This
custom callback is global, and overrides the default callback
(generic_online_page) that Linux otherwise uses. The custom callback
properly handles memory that is ... | ```diff
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
index 871b73ca3a0f..fec2f18679e3 100644
--- a/drivers/hv/hv_balloon.c
+++ b/drivers/hv/hv_balloon.c
@@ -766,16 +766,18 @@ static void hv_online_page(struct page *pg, unsigned int order)
struct hv_hotadd_state *has;
unsigned long pfn = page_to_pf... |
5fa1da972fcf503df4fa188a673cd5d09b60b090 | Analyze and fix the following issue in the Linux kernel code: uio_hv_generic: Add a check for HV_NIC for send, receive buffers setup | Problem Details:
Receive and send buffer allocation was originally introduced to support
DPDK's networking use case. These buffer sizes were further increased to
meet DPDK performance requirements. However, these large buffers are
unnecessary for any other UIO use cases.
Restrict the allocation of receive and send buff... | ```diff
diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c
index 3976360d0096..1b19b5647495 100644
--- a/drivers/uio/uio_hv_generic.c
+++ b/drivers/uio/uio_hv_generic.c
@@ -296,51 +296,51 @@ hv_uio_probe(struct hv_device *dev,
pdata->info.mem[MON_PAGE_MAP].size = PAGE_SIZE;
pdata->info.mem[MON... |
30c8fd31c571db486a5331a92d03eb60a0fb277c | Analyze and fix the following issue in the Linux kernel code: tracing/kprobes: Fix to free objects when failed to copy a symbol | Problem Details:
In __trace_kprobe_create(), if something fails it must goto error block
to free objects. But when strdup() a symbol, it returns without that.
Fix it to goto the error block to free objects correctly.
Link: https://lore.kernel.org/all/173643297743.1514810.2408159540454241947.stgit@devnote2/
Fixes: 621... | ```diff
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 935a886af40c..0642ea174849 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -940,8 +940,10 @@ static int __trace_kprobe_create(int argc, const char *argv[])
}
/* a symbol specified */
symbol = kstr... |
1854df7087be70ad54e24b2e308d7558ebea9f27 | Analyze and fix the following issue in the Linux kernel code: drm/rockchip: Don't change hdmi reference clock rate | Problem Details:
The code that changes hdmi->ref_clk was accidentally copied from
downstream code that sets a different clock. We don't actually
want to set any clock here at all.
Setting this clock incorrectly leads to incorrect timings for
DDC, CEC, and HDCP signal generation.
No Fixes listed, as the theoretical ti... | ```diff
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
index 9916843a6ff3..f41151d49fca 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
@@ -89,7 +89,6 @@ struct rockchip_hdmi_qp {
struct regm... |
983833061d9599a534e44fd6d335080d1a0ba985 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: x1e80100-romulus: Update firmware nodes | Problem Details:
Other x1e machines use _dtbs.elf for these firmwares, which matches the
filenames shipped by Windows.
Fixes: 09d77be56093 ("arm64: dts: qcom: Add support for X1-based Surface Laptop 7 devices")
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Lin... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi b/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi
index e80c7f8f4026..5867953c7356 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi
@@ -1100,14 +1100... |
155c5bf26f983e9988333eeb0ef217138304d13b | Analyze and fix the following issue in the Linux kernel code: firewall: remove misplaced semicolon from stm32_firewall_get_firewall | Problem Details:
Remove misplaced colon in stm32_firewall_get_firewall()
which results in a syntax error when the code is compiled
without CONFIG_STM32_FIREWALL.
Fixes: 5c9668cfc6d7 ("firewall: introduce stm32_firewall framework")
Signed-off-by: guanjing <guanjing@cmss.chinamobile.com>
Reviewed-by: Gatien Chevallier <... | ```diff
diff --git a/include/linux/bus/stm32_firewall_device.h b/include/linux/bus/stm32_firewall_device.h
index 18e0a2fc3816..5178b72bc920 100644
--- a/include/linux/bus/stm32_firewall_device.h
+++ b/include/linux/bus/stm32_firewall_device.h
@@ -115,7 +115,7 @@ void stm32_firewall_release_access_by_id(struct stm32_fir... |
86bde64cb7957be393f84e5d35fb8dfc91e4ae7e | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix gpu recovery disable with per queue reset | Problem Details:
Per queue reset should be bypassed when gpu recovery is disabled
with module parameter.
Fixes: ee0a469cf917 ("drm/amdkfd: support per-queue reset on gfx9")
Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.de... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
index cc66ebb7bae1..441568163e20 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
@@ -1131,6 +1131,9 @@ uint64_t kgd_gfx_v9_hqd... |
edec9b0690906f37024b0dc74a0a924006a2ff07 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: wrong array index to get ip block for PSP | Problem Details:
The adev->ip_blocks array is not indexed by AMD_IP_BLOCK_TYPE_xxx,
instead we should call amdgpu_device_ip_get_ip_block() to get the
corresponding IP block oject.
Fix some checkpatch issues (Alex)
Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.co... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 3c1b08441a6f..e6025e11df37 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -3891,10 +3891,12 @@ static ssize_t psp_usbc_pd_fw_sysfs_read(struct device *dev,
... |
60a2c0c12b644450e420ffc42291d1eb248bacb7 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: tear down ttm range manager for doorbell in amdgpu_ttm_fini() | Problem Details:
Tear down ttm range manager for doorbell in function amdgpu_ttm_fini(),
to avoid memory leakage.
Fixes: 792b84fb9038 ("drm/amdgpu: initialize ttm for doorbells")
Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
Signed-off-by: Kent Russell <kent.russell@amd.com>
Reviewed-by: Alex Deucher <alexander.d... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 9ff6cfacfd34..e6fc89440210 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -2066,6 +2066,7 @@ void amdgpu_ttm_fini(struct amdgpu_device *adev)
ttm_range_ma... |
6b34d0328b51b7bc226290916c56242549062983 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix incorrect number of active RBs for gfx12 | Problem Details:
The RB bitmap should be global active RB bitmap &
active RB bitmap based on active SA.
Signed-off-by: Tim Huang <tim.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
index 814fbef78133..4b6e05750654 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
@@ -1623,6 +1623,7 @@ static u32 gfx_v12_0_get_rb_active_bitmap(struct amdgpu_device *ade... |
4a60c55b3b0f147acc95c350c11f2db4d4828d36 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix incorrect active RB bitmap in setup RBs | Problem Details:
The RB bitmap width per SA may be 0x1 for some ASICs.
Use the actual bitmap of SA instead of 0x3 to determine
the active RB bitmap.
Signed-off-by: Tim Huang <tim.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
index fe5d7cd814f7..56c06b72a70a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
@@ -1891,6 +1891,7 @@ static u32 gfx_v11_0_get_rb_active_bitmap(struct amdgpu_device *ade... |
6ec6cd9acbaa844391a1f75a824a3a9d18978fcb | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix shift type in amdgpu_debugfs_sdma_sched_mask_set() | Problem Details:
The "mask" and "val" variables are type u64. The problem is that the
BIT() macros are type unsigned long which is just 32 bits on 32bit
systems.
It's unlikely that people will be using this driver on 32bit kernels
and even if they did we only use the lower AMDGPU_MAX_SDMA_INSTANCES (16)
bits. So thi... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
index 632295bf3875..174badca27e7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
@@ -362,13 +362,13 @@ static int amdgpu_debugfs_sdma_sched_mask_set(void *data, u... |
e4479aecf6581af81bc0908575447878d2a07e01 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Increase sanitizer frame larger than limit when compile testing with clang | Problem Details:
Commit 24909d9ec7c3 ("drm/amd/display: Overwriting dualDPP UBF values
before usage") added a new warning in dml2/display_mode_core.c when
building allmodconfig with clang:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/display_mode_core.c:6268:13: error: stack frame size (3128) exceeds limit (3072) i... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/dml2/Makefile b/drivers/gpu/drm/amd/display/dc/dml2/Makefile
index d9c27ebe12ee..91c4f3b4bd5f 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dml2/Makefile
@@ -29,7 +29,11 @@ dml2_rcflags := $(CC_FLAGS_NO_FPU)
ifneq ($... |
02f1a5911550bd6b39526d18282b10d441e04ed1 | Analyze and fix the following issue in the Linux kernel code: hwmon: (acpi_power_meter) Fix update the power trip points on failure | Problem Details:
The power trip points maintained in local should not be updated when '_PTP'
method fails to evaluate.
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Link: https://lore.kernel.org/r/20250109081708.27366-3-lihuisong@huawei.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net> | ```diff
diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
index dcf86794485f..65de2cadfc60 100644
--- a/drivers/hwmon/acpi_power_meter.c
+++ b/drivers/hwmon/acpi_power_meter.c
@@ -293,8 +293,8 @@ static ssize_t set_trip(struct device *dev, struct device_attribute *devattr,
struct sensor... |
7532e68f5d8f05353765d7585a791a14985d68b7 | Analyze and fix the following issue in the Linux kernel code: hwmon: (acpi_power_meter) Fix uninitialized variables | Problem Details:
The 'power1_alarm' attribute uses the 'power' and 'cap' in the
acpi_power_meter_resource structure. Currently, these two fields are just
updated when user query 'power' and 'cap' attribute. If user directly query
the 'power1_alarm' attribute without queryng above two attributes, driver
will use uniniti... | ```diff
diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
index 2f1c9d97ad21..dcf86794485f 100644
--- a/drivers/hwmon/acpi_power_meter.c
+++ b/drivers/hwmon/acpi_power_meter.c
@@ -84,6 +84,7 @@ struct acpi_power_meter_resource {
u64 power;
u64 cap;
u64 avg_interval;
+ bool power... |
8e0644e5398be53f44e9c23c6d57ef367b1ad2a2 | Analyze and fix the following issue in the Linux kernel code: enic: Fix typo in comment in table indexed by link speed | Problem Details:
The RX adaptive interrupt moderation table is indexed by link speed
range, where the last row of the table is the catch-all for all link
speeds greater than 10Gbps. The comment said 10 - 40Gbps, but since
there are now adapters with link speeds than 40Gbps, the comment is now
wrong and should indicate ... | ```diff
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index 8109e9c484f6..49f6cab01ed5 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -109,7 +109,7 @@ static struct enic_intr_mod_table mod_table[ENIC_... |
0c2768bf818904db705ff18674f771c3c4d8bbca | Analyze and fix the following issue in the Linux kernel code: accel/amdxdna: Return error when setting clock failed for npu1 | Problem Details:
Due to miss returning error when setting clock, the smatch static
checker reports warning:
drivers/accel/amdxdna/aie2_smu.c:68 npu1_set_dpm()
error: uninitialized symbol 'freq'.
Fixes: f4d7b8a6bc8c ("accel/amdxdna: Enhance power management settings")
Reported-by: Dan Carpenter <dan.carpenter@linar... | ```diff
diff --git a/drivers/accel/amdxdna/aie2_smu.c b/drivers/accel/amdxdna/aie2_smu.c
index 73388443c676..d303701b0ded 100644
--- a/drivers/accel/amdxdna/aie2_smu.c
+++ b/drivers/accel/amdxdna/aie2_smu.c
@@ -64,6 +64,7 @@ int npu1_set_dpm(struct amdxdna_dev_hdl *ndev, u32 dpm_level)
if (ret) {
XDNA_ERR(ndev->xd... |
3008178ef3714c41dee1d49191cfc66726f680d9 | Analyze and fix the following issue in the Linux kernel code: doc: module: Fix documented type of namespace | Problem Details:
Since commit cdd30ebb1b9f ("module: Convert symbol namespace to string
literal") the namespace has to be a string. Fix accordingly.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/6fe15069c01b31aaa68c6224bec2df9f4a449858.1733305665.git.ukleinek@kernel.org... | ```diff
diff --git a/Documentation/core-api/symbol-namespaces.rst b/Documentation/core-api/symbol-namespaces.rst
index 27a9cccc792c..473d025657fd 100644
--- a/Documentation/core-api/symbol-namespaces.rst
+++ b/Documentation/core-api/symbol-namespaces.rst
@@ -41,9 +41,9 @@ entries.
In addition to the macros EXPORT_SYMB... |
769b83735d84022142b0d6c120f08c377fed9df5 | Analyze and fix the following issue in the Linux kernel code: Documentation/kernel-parameters: Fix a reference to vga-softcursor.rst | Problem Details:
A very minor oversight that dates all the way back to rst migration in
commit 9d85025b0418 ("docs-rst: create an user's manual book").
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.ker... | ```diff
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index dc663c0ca670..5d0092c335b7 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -7469,7 +7469,7 @@
vt.cur_default= [VT] Default ... |
24ed44aa06eaafd1323cbe9190b306bef142707d | Analyze and fix the following issue in the Linux kernel code: docs/zh_CN: Add landlock index Chinese translation | Problem Details:
Translate lwn/Documentation/security/landlock.rst into Chinese.
Update the translation through commit dad2f2071516
("landlock: Fix grammar issues in documentation")
Signed-off-by: Yuxian Mao <maoyuxian@cqsoftware.com.cn>
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Jonathan Corbet <c... | ```diff
diff --git a/Documentation/translations/zh_CN/security/index.rst b/Documentation/translations/zh_CN/security/index.rst
index ceb700fe4561..3f68e3145322 100644
--- a/Documentation/translations/zh_CN/security/index.rst
+++ b/Documentation/translations/zh_CN/security/index.rst
@@ -18,6 +18,7 @@
lsm
siphash... |
97395ce76edcce4d39419e90a65d84960fd48aee | Analyze and fix the following issue in the Linux kernel code: drm/nouveau: fix kernel-doc comments | Problem Details:
Fix some malformed kernel-doc comments that were added in a recent commit.
Also, kernel-doc does not support global variables, so change those
kernel-doc comments into regular comments.
Fixes: 214c9539cf2f ("drm/nouveau: expose GSP-RM logging buffers via debugfs")
Reported-by: kernel test robot <lkp@... | ```diff
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 21d2d9ca5e85..8c970f018c00 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -118,7 +118,7 @@ static struct drm_driver driver_platform;
#ifdef CONFIG_DEBUG_FS
struct... |
e0439977134288507fc9a0d6135f98e485969a3d | Analyze and fix the following issue in the Linux kernel code: Documentation: Fix typo localmodonfig -> localmodconfig | Problem Details:
It's noticed when I myself made the same spelling mistake while
searching for localmodconfig
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Reviewed-by: Thorsten Leemhuis <linux@leemhuis.info>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250103004358.1310121-1-l... | ```diff
diff --git a/Documentation/admin-guide/quickly-build-trimmed-linux.rst b/Documentation/admin-guide/quickly-build-trimmed-linux.rst
index f08149bc53f8..07cfd8863b46 100644
--- a/Documentation/admin-guide/quickly-build-trimmed-linux.rst
+++ b/Documentation/admin-guide/quickly-build-trimmed-linux.rst
@@ -733,7 +73... |
a883764111c07a3653973215f48651b9104fa162 | Analyze and fix the following issue in the Linux kernel code: overlayfs.rst: Fix and improve grammar | Problem Details:
- Correct "in a way the" to "in a way that",
- Add a comma to improve readability.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https:/... | ```diff
diff --git a/Documentation/filesystems/overlayfs.rst b/Documentation/filesystems/overlayfs.rst
index d2a277e3976e..6245b67ae9e0 100644
--- a/Documentation/filesystems/overlayfs.rst
+++ b/Documentation/filesystems/overlayfs.rst
@@ -266,7 +266,7 @@ Non-directories
Objects that are not directories (files, symlink... |
ee5a1321df90891d59d83b7c9d5b6c5b755d059d | Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Adding steering info support for GuC register lists | Problem Details:
The guc_mmio_reg interface supports steering, but it is currently not
implemented. This will allow the GuC to control steering of MMIO
registers after save-restore and avoid reading from fused off MCR
register instances.
Fixes: 9c57bc08652a ("drm/xe/lnl: Drop force_probe requirement")
Signed-off-by: J... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c
index 71485b96fc6f..a1676b787fdc 100644
--- a/drivers/gpu/drm/xe/xe_gt_mcr.c
+++ b/drivers/gpu/drm/xe/xe_gt_mcr.c
@@ -550,9 +550,9 @@ void xe_gt_mcr_set_implicit_defaults(struct xe_gt *gt)
* Returns true if the caller should steer to... |
908c1257e5dfb4280bb41f290e15205c3baddaf7 | Analyze and fix the following issue in the Linux kernel code: docs/zh_CN: Add siphash index Chinese translation | Problem Details:
Translate lwn/Documentation/security/siphash.rst into Chinese
Update the translation through commit 12fe434314c8
("Documentation: siphash: Fix typo in the name of offsetofend macro")
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: zhangwei <zhangwei@cqsoftware.com.cn>
Reviewed-by: Yante... | ```diff
diff --git a/Documentation/translations/zh_CN/security/index.rst b/Documentation/translations/zh_CN/security/index.rst
index c73cd289ac3e..ceb700fe4561 100644
--- a/Documentation/translations/zh_CN/security/index.rst
+++ b/Documentation/translations/zh_CN/security/index.rst
@@ -16,6 +16,7 @@
:maxdepth: 1
... |
d996d56d1254ad95642c4b0740e5ceaf56b65bb3 | Analyze and fix the following issue in the Linux kernel code: docs/zh_CN: Add security digsig Chinese translation | Problem Details:
Translate .../security/digsig.rst into Chinese.
Update the translation through commit d56b699d76d1
("Documentation: Fix typos")
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
Reviewed-by: Yanteng Si <siyanteng@linux.dev>
Signed-off-by: Jonathan Co... | ```diff
diff --git a/Documentation/translations/zh_CN/security/digsig.rst b/Documentation/translations/zh_CN/security/digsig.rst
new file mode 100644
index 000000000000..3e690b504ec5
--- /dev/null
+++ b/Documentation/translations/zh_CN/security/digsig.rst
@@ -0,0 +1,103 @@
+.. SPDX-License-Identifier: GPL-2.0
+.. inclu... |
2c206cdede567f53035c622e846678a996f39d69 | Analyze and fix the following issue in the Linux kernel code: drivers/perf: riscv: Return error for default case | Problem Details:
If the upper two bits has an invalid valid (0x1), the event mapping
is not reliable as it returns an uninitialized variable.
Return appropriate value for the default case.
Fixes: f0c9363db2dd ("perf/riscv-sbi: Add platform specific firmware event handling")
Signed-off-by: Atish Patra <atishp@rivosin... | ```diff
diff --git a/drivers/perf/riscv_pmu_sbi.c b/drivers/perf/riscv_pmu_sbi.c
index 3473ba02abf3..da3651d32906 100644
--- a/drivers/perf/riscv_pmu_sbi.c
+++ b/drivers/perf/riscv_pmu_sbi.c
@@ -507,7 +507,7 @@ static int pmu_sbi_event_map(struct perf_event *event, u64 *econfig)
{
u32 type = event->attr.type;
u64 ... |
fc58db9aeb15e89b69ff5e9abc69ecf9e5f888ed | Analyze and fix the following issue in the Linux kernel code: drivers/perf: riscv: Fix Platform firmware event data | Problem Details:
Platform firmware event data field is allowed to be 62 bits for
Linux as uppper most two bits are reserved to indicate SBI fw or
platform specific firmware events.
However, the event data field is masked as per the hardware raw
event mask which is not correct.
Fix the platform firmware event data fiel... | ```diff
diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h
index 6c82318065cf..3d250824178b 100644
--- a/arch/riscv/include/asm/sbi.h
+++ b/arch/riscv/include/asm/sbi.h
@@ -159,6 +159,7 @@ struct riscv_pmu_snapshot_data {
};
#define RISCV_PMU_RAW_EVENT_MASK GENMASK_ULL(47, 0)
+#define RISCV_PM... |
ebdc22c51acee963e26cacb2cb63f8fa2f483808 | Analyze and fix the following issue in the Linux kernel code: tools: selftests: riscv: Add test count for vstate_prctl | Problem Details:
Add the test count to drop the warning message.
"Planned tests != run tests (0 != 1)"
Fixes: 7cf6198ce22d ("selftests: Test RISC-V Vector prctl interface")
Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Andy Chiu <AndybnAC@gmai... | ```diff
diff --git a/tools/testing/selftests/riscv/vector/vstate_prctl.c b/tools/testing/selftests/riscv/vector/vstate_prctl.c
index 895177f6bf4c..40b3bffcbb40 100644
--- a/tools/testing/selftests/riscv/vector/vstate_prctl.c
+++ b/tools/testing/selftests/riscv/vector/vstate_prctl.c
@@ -76,6 +76,8 @@ int main(void)
lo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.