id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
0b3d412798a4763aaf39213a279e453e1fddc81d | Analyze and fix the following issue in the Linux kernel code: elf: correct note name comment | Problem Details:
NT_PRFPREG note is named "CORE". Correct the comment accordingly.
Fixes: 00e19ceec80b ("ELF: Add ELF program property parsing support")
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/455b22b986de4d3bc6d9bfd522378e442943d... | ```diff
diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h
index ac3da855fb19..4d1c8d46e7f0 100644
--- a/include/uapi/linux/elf.h
+++ b/include/uapi/linux/elf.h
@@ -372,7 +372,8 @@ typedef struct elf64_shdr {
* Notes used in ET_CORE. Architectures export some of the arch register sets
* using the corr... |
b5a99602b74bbfa655be509c615181dd95b0719e | Analyze and fix the following issue in the Linux kernel code: md/raid1-10: fix casting from randomized structure in raid1_submit_write() | Problem Details:
Following build error triggered while build with clang version 17.0.0
with W=1(this can't be reporduced with gcc 13.1.0):
drivers/md/raid1-10.c:117:25: error: casting from randomized structure
pointer type 'struct block_device *' to 'struct md_rdev *'
117 | struct md_rdev *rdev = (struct ... | ```diff
diff --git a/drivers/md/raid1-10.c b/drivers/md/raid1-10.c
index 169ebe296f2d..3f22edec70e7 100644
--- a/drivers/md/raid1-10.c
+++ b/drivers/md/raid1-10.c
@@ -116,7 +116,7 @@ static void md_bio_reset_resync_pages(struct bio *bio, struct resync_pages *rp,
static inline void raid1_submit_write(struct bio *bio)... |
125bfc7cd750e68c99f1d446e2c22abea08c237f | Analyze and fix the following issue in the Linux kernel code: md/raid10: fix the condition to call bio_end_io_acct() | Problem Details:
/sys/block/[device]/queue/iostats is used to control whether to count io
stat. Write 0 to it will clear queue_flags QUEUE_FLAG_IO_STAT which means
iostats is disabled. If we disable iostats and later endable it, the io
issued during this period will be counted incorrectly, inflight will be
decreased to... | ```diff
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index d0de8c9fb3cf..79067769e44b 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -325,7 +325,7 @@ static void raid_end_bio_io(struct r10bio *r10_bio)
if (!test_bit(R10BIO_Uptodate, &r10_bio->state))
bio->bi_status = BLK_STS_IOERR;
- if ... |
ed959833db7bdb4e57fa8f4076babf3810296f5b | Analyze and fix the following issue in the Linux kernel code: ASoC: tas2781: Fix error code in tas2781_load_calibration() | Problem Details:
Return -EINVAL instead of success on this error path.
Fixes: 915f5eadebd2 ("ASoC: tas2781: firmware lib")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/Message-Id: <729bb6b3-bc1d-4b3d-8b65-077a492c753c@moroto.mountain>
Signed-off-by: Mark Brown <broonie@kernel... | ```diff
diff --git a/sound/soc/codecs/tas2781-fmwlib.c b/sound/soc/codecs/tas2781-fmwlib.c
index cbf0aef2c001..eb55abae0d7b 100644
--- a/sound/soc/codecs/tas2781-fmwlib.c
+++ b/sound/soc/codecs/tas2781-fmwlib.c
@@ -1924,6 +1924,7 @@ int tas2781_load_calibration(void *context, char *file_name,
if (!fw_entry->size) {
... |
0c3855ba8dad41c4113e73f77eb926e44577e4af | Analyze and fix the following issue in the Linux kernel code: drm/ttm: fix warning that we shouldn't mix && and || | Problem Details:
Trivial warning fix.
Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: 4481913607e5 ("drm/ttm: fix bulk_move corruption when adding a entry")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230623070935.65102-1-christian.koenig... | ```diff
diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
index e51dbc7a2d53..46ff9c75bb12 100644
--- a/drivers/gpu/drm/ttm/ttm_resource.c
+++ b/drivers/gpu/drm/ttm/ttm_resource.c
@@ -114,7 +114,7 @@ static void ttm_lru_bulk_move_del(struct ttm_lru_bulk_move *bulk,
struct ttm_lru_bu... |
26195af5779857ccec3d285a9cacd4a65f126761 | Analyze and fix the following issue in the Linux kernel code: drm/bridge: ps8640: Drop the ability of ps8640 to fetch the EDID | Problem Details:
In order to read the EDID from an eDP panel, you not only need to
power on the bridge chip itself but also the panel. In the ps8640
driver, this was made to work by having the bridge chip manually power
the panel on by calling pre_enable() on everything connectorward on
the bridge chain. This worked OK... | ```diff
diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c
index 8801cdd033b5..8161b1a1a4b1 100644
--- a/drivers/gpu/drm/bridge/parade-ps8640.c
+++ b/drivers/gpu/drm/bridge/parade-ps8640.c
@@ -105,7 +105,6 @@ struct ps8640 {
struct gpio_desc *gpio_reset;
struct gpio_desc *g... |
b54c4b02abd1578132712eae5b294a9c77e7422b | Analyze and fix the following issue in the Linux kernel code: hwmon: (corsair-psu) various cleanups | Problem Details:
Fix some typos, adjust documentation and comments to current state of
knowledge and update coding style to be more uniform.
Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
Link: https://lore.kernel.org/r/ZJWf3H972hGgLK-8@monster.localdomain
Signed-off-by: Guenter Roeck <linux@roeck-us.net> | ```diff
diff --git a/Documentation/hwmon/corsair-psu.rst b/Documentation/hwmon/corsair-psu.rst
index fc798c3df1d0..47f8ff632267 100644
--- a/Documentation/hwmon/corsair-psu.rst
+++ b/Documentation/hwmon/corsair-psu.rst
@@ -15,11 +15,11 @@ Supported devices:
Corsair HX850i
- Corsair HX1000i (revision 1 and 2)
+ ... |
fc30ace06f250f79381a8e3f6ed92dd68e25a9f5 | Analyze and fix the following issue in the Linux kernel code: tracing: Fix warnings when building htmldocs for function graph retval | Problem Details:
When building htmldocs, the following warnings appear:
Documentation/trace/ftrace.rst:2797: WARNING: Literal block expected; none found.
Documentation/trace/ftrace.rst:2816: WARNING: Literal block expected; none found.
So fix it.
Link: https://lore.kernel.org/all/20230623143517.19ffc6c0@canb.auug.or... | ```diff
diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst
index b7308ab10c0e..f606c5bd1c0d 100644
--- a/Documentation/trace/ftrace.rst
+++ b/Documentation/trace/ftrace.rst
@@ -2792,7 +2792,7 @@ option, and these limitations will be eliminated in the future:
especially when larger types are... |
76afcf5bce4a3d0c2b9c74f9c8a3c82c05317801 | Analyze and fix the following issue in the Linux kernel code: drm/kms: log when querying an object not included in lease | Problem Details:
User-space may query an existing object not included in a lease.
Make it easier to debug such situations by logging a debug message.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20230623143514.387... | ```diff
diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c
index ba1608effc0f..ac0d2ce3f870 100644
--- a/drivers/gpu/drm/drm_mode_object.c
+++ b/drivers/gpu/drm/drm_mode_object.c
@@ -147,8 +147,10 @@ struct drm_mode_object *__drm_mode_object_find(struct drm_device *dev,
obj = NULL;
... |
81ca2dbefaabe1a2ca1c7cfc84dfd45c072c82a6 | Analyze and fix the following issue in the Linux kernel code: dm ioctl: Refuse to create device named "." or ".." | Problem Details:
Using either of these is going to greatly confuse userspace, as they are
not valid symlink names and so creating the usual /dev/mapper/NAME
symlink will not be possible. As creating a device with either of these
names is almost certainly a userspace bug, just error out.
Signed-off-by: Demi Marie Oben... | ```diff
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index e172a91e88dc..16244a7b193c 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -771,8 +771,10 @@ static int check_name(const char *name)
return -EINVAL;
}
- if (strcmp(name, DM_CONTROL_NODE) == 0) {
- DMERR("device name canno... |
a85f1a9de91a59cd9b12d60f631cbda9c56a1c3c | Analyze and fix the following issue in the Linux kernel code: dm ioctl: Refuse to create device named "control" | Problem Details:
Typical userspace setups create a symlink under /dev/mapper with the
name of the device, but /dev/mapper/control is reserved for DM's control
device. Therefore, trying to create such a device is almost certain to
be a userspace bug.
Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
Sign... | ```diff
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index bfaebc02833a..e172a91e88dc 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -767,7 +767,12 @@ static int get_target_version(struct file *filp, struct dm_ioctl *param, size_t
static int check_name(const char *name)
{
if (strchr... |
249bed821b4db6d95a99160f7d6d236ea5fe6362 | Analyze and fix the following issue in the Linux kernel code: dm ioctl: Avoid double-fetch of version | Problem Details:
The version is fetched once in check_version(), which then does some
validation and then overwrites the version in userspace with the API
version supported by the kernel. copy_params() then fetches the version
from userspace *again*, and this time no validation is done. The result
is that the kernel'... | ```diff
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index a92abbe90981..bfaebc02833a 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1872,30 +1872,36 @@ static ioctl_fn lookup_ioctl(unsigned int cmd, int *ioctl_flags)
* As well as checking the version compatibility this always
* co... |
13f4a697f8b4feb705569f9336127e9e2f9ac596 | Analyze and fix the following issue in the Linux kernel code: dm ioctl: Avoid pointer arithmetic overflow | Problem Details:
Especially on 32-bit systems, it is possible for the pointer
arithmetic to overflow and cause a userspace pointer to be
dereferenced in the kernel.
Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@ke... | ```diff
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index 3a6989b7817d..e322fd490634 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1397,6 +1397,22 @@ static int next_target(struct dm_target_spec *last, uint32_t next, void *end,
static_assert(__alignof__(struct dm_target_spec) <= 8,... |
fcaa174a9c995cf0af3967e55644a1543ea07e36 | Analyze and fix the following issue in the Linux kernel code: scsi/sg: don't grab scsi host module reference | Problem Details:
In order to prevent request_queue to be freed before cleaning up
blktrace debugfs entries, commit db59133e9279 ("scsi: sg: fix blktrace
debugfs entries leakage") use scsi_device_get(), however,
scsi_device_get() will also grab scsi module reference and scsi module
can't be removed.
It's reported that ... | ```diff
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 2433eeef042a..dcb73787c29d 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1497,7 +1497,7 @@ sg_add_device(struct device *cl_dev)
int error;
unsigned long iflags;
- error = scsi_device_get(scsidp);
+ error = blk_get_queue(scsidp->request_... |
55b6a69fed5df6f88ef0b2ace562b422162beb61 | Analyze and fix the following issue in the Linux kernel code: io_uring: fix acquire/release annotations | Problem Details:
We do conditional locking, so __io_cq_lock() and friends not always
actually grab/release the lock, so kill misleading annotations.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/2a098f9144c24cab622f8bf90b39f44da5d0401e.1687518903.git.asml.silence@gmail.com
Sign... | ```diff
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 2f55abb676c0..8cb0f60d2885 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -626,7 +626,6 @@ void __io_commit_cqring_flush(struct io_ring_ctx *ctx)
}
static inline void __io_cq_lock(struct io_ring_ctx *ctx)
- __acquires(ctx->completio... |
f432b76bcc93f36edb3d371f7b8d7881261dd6e7 | Analyze and fix the following issue in the Linux kernel code: io_uring: kill io_cq_unlock() | Problem Details:
We're abusing ->completion_lock helpers. io_cq_unlock() neither
locking conditionally nor doing CQE flushing, which means that callers
must have some side reason of taking the lock and should do it directly.
Open code io_cq_unlock() into io_cqring_overflow_kill() and clean it up.
Signed-off-by: Pavel... | ```diff
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 776d1aa73d26..2f55abb676c0 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -644,12 +644,6 @@ static inline void io_cq_lock(struct io_ring_ctx *ctx)
spin_lock(&ctx->completion_lock);
}
-static inline void io_cq_unlock(struct io_ring_... |
a42fb5a75ccc37dfd69aa9bde5ba2866e802ff3c | Analyze and fix the following issue in the Linux kernel code: ext4: Fix warning in blkdev_put() | Problem Details:
ext4_blkdev_remove() passes a wrong holder pointer to blkdev_put() which
triggers a warning there. Fix it.
Fixes: 2736e8eeb0cc ("block: use the holder as indication for exclusive opens")
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/... | ```diff
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 94a7b56ed876..64342adcd679 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1133,7 +1133,7 @@ static void ext4_blkdev_remove(struct ext4_sb_info *sbi)
struct block_device *bdev;
bdev = sbi->s_journal_bdev;
if (bdev) {
- blkdev_put(bdev, sbi->s_es... |
95e2b352c03b0a86c5717ba1d24ea20969abcacc | Analyze and fix the following issue in the Linux kernel code: FS: JFS: Check for read-only mounted filesystem in txBegin | Problem Details:
This patch adds a check for read-only mounted filesystem
in txBegin before starting a transaction potentially saving
from NULL pointer deref.
Signed-off-by: Immad Mir <mirimmad17@gmail.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com> | ```diff
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c
index ffd4feece078..ce4b4760fcb1 100644
--- a/fs/jfs/jfs_txnmgr.c
+++ b/fs/jfs/jfs_txnmgr.c
@@ -354,6 +354,11 @@ tid_t txBegin(struct super_block *sb, int flag)
jfs_info("txBegin: flag = 0x%x", flag);
log = JFS_SBI(sb)->log;
+ if (!log) {
+ jfs_error... |
47cfdc338d674d38f4b2f22b7612cc6a2763ba27 | Analyze and fix the following issue in the Linux kernel code: FS: JFS: Fix null-ptr-deref Read in txBegin | Problem Details:
Syzkaller reported an issue where txBegin may be called
on a superblock in a read-only mounted filesystem which leads
to NULL pointer deref. This could be solved by checking if
the filesystem is read-only before calling txBegin, and returning
with appropiate error code.
Reported-By: syzbot+f1faa20... | ```diff
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
index b29d68b5eec5..f370c7605120 100644
--- a/fs/jfs/namei.c
+++ b/fs/jfs/namei.c
@@ -799,6 +799,11 @@ static int jfs_link(struct dentry *old_dentry,
if (rc)
goto out;
+ if (isReadOnly(ip)) {
+ jfs_error(ip->i_sb, "read-only filesystem\n");
+ return -EROFS;
... |
3fe630c7715aaa1cbb6da8b8b5562882971241e9 | Analyze and fix the following issue in the Linux kernel code: drm: fix code style for embedded structs in hdr_metadata_infoframe | Problem Details:
Only the stuff inside the brackets should be indented.
Signed-off-by: Simon Ser <contact@emersion.fr>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sebastian Wick <sebastian.wick@redhat.com>
Cc: Joshua Ashton <joshua@froggi.es>
Cc: Pekka Paalanen <pekka.paalanen@c... | ```diff
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index 43691058d28f..92d96a2b6763 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -883,7 +883,7 @@ struct hdr_metadata_infoframe {
*/
struct {
__u16 x, y;
- } display_primaries[3];
+ } display_primaries[... |
bc13d60e4e1e945b34769a4a4c2b172e8552abe5 | Analyze and fix the following issue in the Linux kernel code: pwm: mtk_disp: Fix the disable flow of disp_pwm | Problem Details:
There is a flow error in the original mtk_disp_pwm_apply() function.
If this function is called when the clock is disabled, there will be a
chance to operate the disp_pwm register, resulting in disp_pwm exception.
Fix this accordingly.
Fixes: 888a623db5d0 ("pwm: mtk-disp: Implement atomic API .apply()... | ```diff
diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm-mtk-disp.c
index 79e321e96f56..2401b6733241 100644
--- a/drivers/pwm/pwm-mtk-disp.c
+++ b/drivers/pwm/pwm-mtk-disp.c
@@ -79,14 +79,11 @@ static int mtk_disp_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
if (state->polarity != PWM_POLARITY_NO... |
05b743db9d8cc4e51b3eb77889d24ab9aa2bf169 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: pwm: restrict node name suffixes | Problem Details:
Make the pattern matching node names a bit stricter to improve DTS
consistency. The pattern is restricted to:
1. Only one unit address or one -N suffix,
2. -N suffixes to decimal numbers.
Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
A... | ```diff
diff --git a/Documentation/devicetree/bindings/pwm/pwm.yaml b/Documentation/devicetree/bindings/pwm/pwm.yaml
index 3c01f85029e5..abd9fa873354 100644
--- a/Documentation/devicetree/bindings/pwm/pwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/pwm.yaml
@@ -13,7 +13,7 @@ select: false
properties:
$nodena... |
cdcffafc4d845cc0c6392cba168c7a942734cce7 | Analyze and fix the following issue in the Linux kernel code: pwm: ab8500: Fix error code in probe() | Problem Details:
This code accidentally return positive EINVAL instead of negative
-EINVAL.
Fixes: eb41f334589d ("pwm: ab8500: Fix register offset calculation to not depend on probe order")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-b... | ```diff
diff --git a/drivers/pwm/pwm-ab8500.c b/drivers/pwm/pwm-ab8500.c
index 507ff0d5f7bd..583a7d69c741 100644
--- a/drivers/pwm/pwm-ab8500.c
+++ b/drivers/pwm/pwm-ab8500.c
@@ -190,7 +190,7 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
int err;
if (pdev->id < 1 || pdev->id > 31)
- return dev_err... |
38ba83598633373f47951384cfc389181c8d1bed | Analyze and fix the following issue in the Linux kernel code: pwm: sysfs: Do not apply state to already disabled PWMs | Problem Details:
If the PWM is exported but not enabled, do not call pwm_class_apply_state().
First of all, in this case, period may still be unconfigured and this would
make pwm_class_apply_state() return -EINVAL, and then suspend would fail.
Second, it makes little sense to apply state onto PWM that is not enabled
be... | ```diff
diff --git a/drivers/pwm/sysfs.c b/drivers/pwm/sysfs.c
index 1a106ec32939..8d1254761e4d 100644
--- a/drivers/pwm/sysfs.c
+++ b/drivers/pwm/sysfs.c
@@ -424,6 +424,13 @@ static int pwm_class_resume_npwm(struct device *parent, unsigned int npwm)
if (!export)
continue;
+ /* If pwmchip was not enabled befo... |
661dfb7f46298e53f6c3deaa772fa527aae86193 | Analyze and fix the following issue in the Linux kernel code: pwm: imx-tpm: force 'real_period' to be zero in suspend | Problem Details:
During suspend, all the tpm registers will lose values.
So the 'real_period' value of struct 'imx_tpm_pwm_chip'
should be forced to be zero to force the period update
code can be executed after system resume back.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Signed-off-by: Clark Wang <xiaoning.wang@n... | ```diff
diff --git a/drivers/pwm/pwm-imx-tpm.c b/drivers/pwm/pwm-imx-tpm.c
index 5e2b452ee5f2..98ab65c89685 100644
--- a/drivers/pwm/pwm-imx-tpm.c
+++ b/drivers/pwm/pwm-imx-tpm.c
@@ -397,6 +397,13 @@ static int __maybe_unused pwm_imx_tpm_suspend(struct device *dev)
if (tpm->enable_count > 0)
return -EBUSY;
+ /*
... |
87a2cbf02d7701255f9fcca7e5bd864a7bb397cf | Analyze and fix the following issue in the Linux kernel code: pwm: meson: fix handling of period/duty if greater than UINT_MAX | Problem Details:
state->period/duty are of type u64, and if their value is greater than
UINT_MAX, then the cast to uint will cause problems. Fix this by
changing the type of the respective local variables to u64.
Fixes: b79c3670e120 ("pwm: meson: Don't duplicate the polarity internally")
Cc: stable@vger.kernel.org
Sug... | ```diff
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index 3865538dd2d6..33107204a951 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -156,8 +156,9 @@ static int meson_pwm_calc(struct meson_pwm *meson, struct pwm_device *pwm,
const struct pwm_state *state)
{
struct meson... |
6b9352f3f8a1a35faf0efc1ad1807ee303467796 | Analyze and fix the following issue in the Linux kernel code: pwm: meson: modify and simplify calculation in meson_pwm_get_state | Problem Details:
I don't see a reason why we should treat the case lo < hi differently
and return 0 as period and duty_cycle. The current logic was added with
c375bcbaabdb ("pwm: meson: Read the full hardware state in
meson_pwm_get_state()"), Martin as original author doesn't remember why
it was implemented this way ba... | ```diff
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index 5732300eb004..3865538dd2d6 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -351,18 +351,8 @@ static int meson_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
channel->lo = FIELD_GET(PWM_LOW_MASK, value);
... |
944520f85d5b1fb2f9ea243be41f9c9af3d4cef3 | Analyze and fix the following issue in the Linux kernel code: MIPS: DTS: CI20: Raise VDDCORE voltage to 1.125 volts | Problem Details:
Commit 08384e80a70f ("MIPS: DTS: CI20: Fix ACT8600 regulator node
names") caused the VDDCORE power supply (regulated by the ACT8600's
DCDC1 output) to drop from a voltage of 1.2V configured by the
bootloader, to the 1.1V set in the Device Tree.
According to the documentation, the VDDCORE supply should... | ```diff
diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts
index cec0caa2350c..a141a699b790 100644
--- a/arch/mips/boot/dts/ingenic/ci20.dts
+++ b/arch/mips/boot/dts/ingenic/ci20.dts
@@ -298,8 +298,8 @@
regulators {
vddcore: DCDC1 {
- regulator-min-microvolt = <1100000>;
... |
6e68dae946e3a0333fbde5487ce163142ca10ae0 | Analyze and fix the following issue in the Linux kernel code: clk: ralink: mtmips: Fix uninitialized use of ret in mtmips_register_{fixed,factor}_clocks() | Problem Details:
Clang warns:
drivers/clk/ralink/clk-mtmips.c:309:9: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
309 | return ret;
| ^~~
drivers/clk/ralink/clk-mtmips.c:285:9: note: initialize the variable 'ret' to silence this warning
285 ... | ```diff
diff --git a/drivers/clk/ralink/clk-mtmips.c b/drivers/clk/ralink/clk-mtmips.c
index 9322c6210a33..1e7991439527 100644
--- a/drivers/clk/ralink/clk-mtmips.c
+++ b/drivers/clk/ralink/clk-mtmips.c
@@ -292,6 +292,7 @@ static int mtmips_register_fixed_clocks(struct clk_hw_onecell_data *clk_data,
sclk->... |
e69b9bc170c6d93ee375a5cbfd15f74c0fb59bdd | Analyze and fix the following issue in the Linux kernel code: i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle | Problem Details:
Claim clkhi and clklo as integer type to avoid possible calculation
errors caused by data overflow.
Fixes: a55fa9d0e42e ("i2c: imx-lpi2c: add low power i2c bus driver")
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Signed-off-by: Carlos Song <carlos.song@nxp.com>
Reviewed-by: Andi Shyti <andi.shyt... | ```diff
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c
index 1af0a637d7f1..4d24ceb57ee7 100644
--- a/drivers/i2c/busses/i2c-imx-lpi2c.c
+++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
@@ -201,8 +201,8 @@ static void lpi2c_imx_stop(struct lpi2c_imx_struct *lpi2c_imx)
/* CLKLO = I2C_CLK_RA... |
cd9489623c29aa2f8cc07088168afb6e0d5ef06d | Analyze and fix the following issue in the Linux kernel code: i2c: qup: Add missing unwind goto in qup_i2c_probe() | Problem Details:
Smatch Warns:
drivers/i2c/busses/i2c-qup.c:1784 qup_i2c_probe()
warn: missing unwind goto?
The goto label "fail_runtime" and "fail" will disable qup->pclk,
but here qup->pclk failed to obtain, in order to be consistent,
change the direct return to goto label "fail_dma".
Fixes: 9cedf3b2f099 ("i2c: q... | ```diff
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index 2e153f2f71b6..78682388e02e 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -1752,16 +1752,21 @@ nodma:
if (!clk_freq || clk_freq > I2C_MAX_FAST_MODE_PLUS_FREQ) {
dev_err(qup->dev, "clock frequency... |
bd5c7104d41b62a2ae5d7f11d07e7c5f232eee42 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: i2c: opencores: Add missing type for "regstep" | Problem Details:
"regstep" may be deprecated, but it still needs a type.
Fixes: 8ad69f490516 ("dt-bindings: i2c: convert ocores binding to yaml")
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Conor Dooley <conor.do... | ```diff
diff --git a/Documentation/devicetree/bindings/i2c/opencores,i2c-ocores.yaml b/Documentation/devicetree/bindings/i2c/opencores,i2c-ocores.yaml
index 85d9efb743ee..d9ef86729011 100644
--- a/Documentation/devicetree/bindings/i2c/opencores,i2c-ocores.yaml
+++ b/Documentation/devicetree/bindings/i2c/opencores,i2c-o... |
faaa5fd30344f9a7b3816ae7a6b58ccd5a34998f | Analyze and fix the following issue in the Linux kernel code: dt-bindings: net: altr,tse: Fix error in "compatible" conditional schema | Problem Details:
The conditional if/then schema has an error as the "enum" values have
"const" in them. Drop the "const".
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230621231012.3816139-1-robh@kernel.org
Signed-off-by: Paolo Abe... | ```diff
diff --git a/Documentation/devicetree/bindings/net/altr,tse.yaml b/Documentation/devicetree/bindings/net/altr,tse.yaml
index 9d02af468906..f5d3b70af07a 100644
--- a/Documentation/devicetree/bindings/net/altr,tse.yaml
+++ b/Documentation/devicetree/bindings/net/altr,tse.yaml
@@ -72,8 +72,8 @@ allOf:
com... |
0ff9f5e57c5bb45b6b807a4d466228de39d8cd2f | Analyze and fix the following issue in the Linux kernel code: of: unittest: drop assertions for GPIO hog messages | Problem Details:
These have now been demoted to debug and are normally hidden. Drop the
assertions entirely.
Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.o... | ```diff
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 0060334a98a7..5386efeaf710 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -1844,26 +1844,10 @@ static void __init of_unittest_overlay_gpio(void)
unittest(overlay_data_apply("overlay_gpio_02b", NULL),
"Adding overlay 'overl... |
877e91191ccf0782ae18c5dfa7522fb1e5bfba8c | Analyze and fix the following issue in the Linux kernel code: leds: leds-mt6323: Adjust return/parameter types in wled get/set callbacks | Problem Details:
Clang's kernel Control Flow Integrity (kCFI) is a compiler-based
security mitigation that ensures the target of an indirect function call
matches the expected type of the call and trapping if they do not match
exactly. The warning -Wincompatible-function-pointer-types-strict aims
to catch these issues ... | ```diff
diff --git a/drivers/leds/leds-mt6323.c b/drivers/leds/leds-mt6323.c
index e8fecfc2e90a..24f35bdb55fb 100644
--- a/drivers/leds/leds-mt6323.c
+++ b/drivers/leds/leds-mt6323.c
@@ -76,7 +76,7 @@ struct mt6323_led {
int id;
struct mt6323_leds *parent;
struct led_classdev cdev;
- unsigned int current_brigh... |
1cf3d5567f273a8746d1bade00633a93204f80f0 | Analyze and fix the following issue in the Linux kernel code: net: hns3: fix strncpy() not using dest-buf length as length issue | Problem Details:
Now, strncpy() in hns3_dbg_fill_content() use src-length as copy-length,
it may result in dest-buf overflow.
This patch is to fix intel compile warning for csky-linux-gcc (GCC) 12.1.0
compiler.
The warning reports as below:
hclge_debugfs.c:92:25: warning: 'strncpy' specified bound depends on
the len... | ```diff
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
index d385ffc21876..32bb14303473 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
@@ -438,19 +438,36 @@ static void hns3_db... |
53431798f4bb60d214ae1ec4a79eefdd414f577b | Analyze and fix the following issue in the Linux kernel code: tracing/probes: Fix tracepoint event with $arg* to fetch correct argument | Problem Details:
To hide the first dummy 'data' argument on the tracepoint probe events,
the BTF argument array was modified (skip the first argument for tracepoint),
but the '$arg*' meta argument parser missed that.
Fix to increment the argument index if it is tracepoint probe. And decrement
the index when searching ... | ```diff
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
index 473e1c43bc57..643aa3a51d5a 100644
--- a/kernel/trace/trace_probe.c
+++ b/kernel/trace/trace_probe.c
@@ -456,7 +456,10 @@ static int parse_btf_arg(const char *varname, struct fetch_insn *code,
if (name && !strcmp(name, varname)) {
... |
a2bd0c08a459b4cb8da57cc9c754de5e45d7a61e | Analyze and fix the following issue in the Linux kernel code: Documentation: Fix typo of reference file name | Problem Details:
Fix a typo of Documentation/trace/fprobe.rst.
Link: https://lore.kernel.org/all/168584575125.2056209.5771945721143181243.stgit@mhiramat.roam.corp.google.com/
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306040144.aD72UzkF-lkp@intel.com/
Reviewed-by: ... | ```diff
diff --git a/Documentation/trace/fprobetrace.rst b/Documentation/trace/fprobetrace.rst
index e949bc0cff05..7297f9478459 100644
--- a/Documentation/trace/fprobetrace.rst
+++ b/Documentation/trace/fprobetrace.rst
@@ -38,7 +38,7 @@ Synopsis of fprobe-events
with a digit character, "_TRACEPOINT" ... |
ed5f297802fca41d88fbfa6f9c13b218e7c6f5cb | Analyze and fix the following issue in the Linux kernel code: tracing/probes: Fix to return NULL and keep using current argc | Problem Details:
Fix to return NULL and keep using current argc when there is
$argN and the BTF is not available.
Link: https://lore.kernel.org/all/168584574094.2056209.2694238431743782342.stgit@mhiramat.roam.corp.google.com/
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all... | ```diff
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
index ba1c6e059b51..473e1c43bc57 100644
--- a/kernel/trace/trace_probe.c
+++ b/kernel/trace/trace_probe.c
@@ -1273,7 +1273,8 @@ const char **traceprobe_expand_meta_args(int argc, const char *argv[],
trace_probe_log_err(0, NOSUP_BTFARG);
... |
9e1a1ee93f6b08aad5ee645073f7c7b115f71e15 | Analyze and fix the following issue in the Linux kernel code: i2c: ocores: use devm_ managed clks | Problem Details:
Smatch complains that:
drivers/i2c/busses/i2c-ocores.c:704 ocores_i2c_probe()
warn: missing unwind goto?
If any wrong occurs in ocores_i2c_of_probe, the i2c->clk needs to be
released. But the function returns directly without freeing the clock.
Fix this by updating the code to use devm_clk_get_option... | ```diff
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index 0742b84a11eb..4ac77e57bbbf 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -552,28 +552,20 @@ static int ocores_i2c_of_probe(struct platform_device *pdev,
&clock_frequency);
i2c->... |
501e197a02d4aef157f53ba3a0b9049c3e52fedc | Analyze and fix the following issue in the Linux kernel code: hwrng: st - keep clock enabled while hwrng is registered | Problem Details:
The st-rng driver uses devres to register itself with the hwrng core,
the driver will be unregistered from hwrng when its device goes out of
scope. This happens after the driver's remove function is called.
However, st-rng's clock is disabled in the remove function. There's a
short timeframe where st-... | ```diff
diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c
index 15ba1e6fae4d..6e9dfac9fc9f 100644
--- a/drivers/char/hw_random/st-rng.c
+++ b/drivers/char/hw_random/st-rng.c
@@ -42,7 +42,6 @@
struct st_rng_data {
void __iomem *base;
- struct clk *clk;
struct hwrng ops;
};
@@ -85,2... |
d744ae7477190967a3ddc289e2cd4ae59e8b1237 | Analyze and fix the following issue in the Linux kernel code: hwrng: imx-rngc - fix the timeout for init and self check | Problem Details:
Fix the timeout that is used for the initialisation and for the self
test. wait_for_completion_timeout expects a timeout in jiffies, but
RNGC_TIMEOUT is in milliseconds. Call msecs_to_jiffies to do the
conversion.
Cc: stable@vger.kernel.org
Fixes: 1d5449445bd0 ("hwrng: mx-rngc - add a driver for Frees... | ```diff
diff --git a/drivers/char/hw_random/imx-rngc.c b/drivers/char/hw_random/imx-rngc.c
index 1a6a5dd0a5a1..e5a9dee615c8 100644
--- a/drivers/char/hw_random/imx-rngc.c
+++ b/drivers/char/hw_random/imx-rngc.c
@@ -110,7 +110,7 @@ static int imx_rngc_self_test(struct imx_rngc *rngc)
cmd = readl(rngc->base + RNGC_COMM... |
fa3b3565f3ac5a468e3efebca00e10db5db3d6bb | Analyze and fix the following issue in the Linux kernel code: crypto: api - Add __crypto_alloc_tfmgfp | Problem Details:
Use it straight away in crypto_clone_cipher(), as that is not meant to
sleep.
Fixes: 51d8d6d0f4be ("crypto: cipher - Add crypto_clone_cipher")
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> | ```diff
diff --git a/crypto/api.c b/crypto/api.c
index a94bd0695719..b9cc0c906efe 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -386,15 +386,15 @@ void crypto_shoot_alg(struct crypto_alg *alg)
}
EXPORT_SYMBOL_GPL(crypto_shoot_alg);
-struct crypto_tfm *__crypto_alloc_tfm(struct crypto_alg *alg, u32 type,
- ... |
256a02e2caa3c606b84a40e8035e240beb93e67b | Analyze and fix the following issue in the Linux kernel code: usb: typec: nb7vpq904m: fix CONFIG_DRM dependency | Problem Details:
With the following config set:
CONFIG_DRM=m
CONFIG_DRM_PANEL=y
CONFIG_DRM_BRIDGE=y
CONFIG_DRM_PANEL_BRIDGE=y
CONFIG_TYPEC_MUX_NB7VPQ904M=y
vmlinux fails on the following symbols:
ld.lld: error: undefined symbol: devm_drm_bridge_add
ld.lld: error: undefined symbol: devm_drm_of_get_bridge
Add depen... | ```diff
diff --git a/drivers/usb/typec/mux/Kconfig b/drivers/usb/typec/mux/Kconfig
index 8c4d6b8fb75c..784b9d8107e9 100644
--- a/drivers/usb/typec/mux/Kconfig
+++ b/drivers/usb/typec/mux/Kconfig
@@ -38,6 +38,8 @@ config TYPEC_MUX_INTEL_PMC
config TYPEC_MUX_NB7VPQ904M
tristate "On Semiconductor NB7VPQ904M Type-C redr... |
61d52f64ac58f917e47175cbc5bb54ee9a672209 | Analyze and fix the following issue in the Linux kernel code: usbip: usbip_host: Replace strlcpy with strscpy | Problem Details:
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
Direct r... | ```diff
diff --git a/drivers/usb/usbip/stub_main.c b/drivers/usb/usbip/stub_main.c
index e8c3131a8543..0a6624d37929 100644
--- a/drivers/usb/usbip/stub_main.c
+++ b/drivers/usb/usbip/stub_main.c
@@ -167,15 +167,13 @@ static ssize_t match_busid_show(struct device_driver *drv, char *buf)
static ssize_t match_busid_store... |
c0aabed9cabe057309779a9e26fe86a113d24dad | Analyze and fix the following issue in the Linux kernel code: usb: dwc3: gadget: Propagate core init errors to UDC during pullup | Problem Details:
In scenarios where pullup relies on resume (get sync) to initialize
the controller and set the run stop bit, then core_init is followed by
gadget_resume which will eventually set run stop bit.
But in cases where the core_init fails, the return value is not sent
back to udc appropriately. So according ... | ```diff
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 578804dc29ca..27cb671e18e3 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2747,7 +2747,9 @@ static int dwc3_gadget_pullup(struct usb_gadget *g, int is_on)
ret = pm_runtime_get_sync(dwc->dev);
if (!ret || ret... |
8b5bf64c89c7100c921bd807ba39b2eb003061ab | Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe | Problem Details:
Smatch reports:
drivers/clocksource/timer-cadence-ttc.c:529 ttc_timer_probe()
warn: 'timer_baseaddr' from of_iomap() not released on lines: 498,508,516.
timer_baseaddr may have the problem of not being released after use,
I replaced it with the devm_of_iomap() function and added the clk_put()
function... | ```diff
diff --git a/drivers/clocksource/timer-cadence-ttc.c b/drivers/clocksource/timer-cadence-ttc.c
index 4efd0cf3b602..0d52e28fea4d 100644
--- a/drivers/clocksource/timer-cadence-ttc.c
+++ b/drivers/clocksource/timer-cadence-ttc.c
@@ -486,10 +486,10 @@ static int __init ttc_timer_probe(struct platform_device *pdev)... |
46e66dab8565f742374e9cc4ff7d35f344d774e2 | Analyze and fix the following issue in the Linux kernel code: dax/kmem: Pass valid argument to memory_group_register_static | Problem Details:
memory_group_register_static takes maximum number of pages as the argument
while dev_dax_kmem_probe passes total_len (in bytes) as the argument.
IIUC, I don't see any crash/panic impact as such. As,
memory_group_register_static just set the max_pages limit which is used in
auto_movable_zone_for_pfn to... | ```diff
diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c
index 7b36db6f1cbd..898ca9505754 100644
--- a/drivers/dax/kmem.c
+++ b/drivers/dax/kmem.c
@@ -99,7 +99,7 @@ static int dev_dax_kmem_probe(struct dev_dax *dev_dax)
if (!data->res_name)
goto err_res_name;
- rc = memory_group_register_static(numa_node, to... |
70aab281e18c68a1284bc387de127c2fc0bed3f8 | Analyze and fix the following issue in the Linux kernel code: dax: Introduce alloc_dev_dax_id() | Problem Details:
The reference counting of dax_region objects is needlessly complicated,
has lead to confusion [1], and has hidden a bug [2]. Towards cleaning up
that mess introduce alloc_dev_dax_id() to minimize the holding of a
dax_region reference to only what dev_dax_release() needs, the
dax_region->ida.
Part of t... | ```diff
diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
index c99ea08aafc3..a4cc3eca774f 100644
--- a/drivers/dax/bus.c
+++ b/drivers/dax/bus.c
@@ -446,18 +446,34 @@ static void unregister_dev_dax(void *dev)
put_device(dev);
}
+static void dax_region_free(struct kref *kref)
+{
+ struct dax_region *dax_region;
+... |
6d24b170a9db0456f577b1ab01226a2254c016a8 | Analyze and fix the following issue in the Linux kernel code: dax: Fix dax_mapping_release() use after free | Problem Details:
A CONFIG_DEBUG_KOBJECT_RELEASE test of removing a device-dax region
provider (like modprobe -r dax_hmem) yields:
kobject: 'mapping0' (ffff93eb460e8800): kobject_release, parent 0000000000000000 (delayed 2000)
[..]
DEBUG_LOCKS_WARN_ON(1)
WARNING: CPU: 23 PID: 282 at kernel/locking/lockdep.c:232 __l... | ```diff
diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
index 227800053309..aee695f86b44 100644
--- a/drivers/dax/bus.c
+++ b/drivers/dax/bus.c
@@ -635,10 +635,12 @@ EXPORT_SYMBOL_GPL(alloc_dax_region);
static void dax_mapping_release(struct device *dev)
{
struct dax_mapping *mapping = to_dax_mapping(dev);
- str... |
33941dbd14da4eac40a26ac5fd5f84e1842ffc3a | Analyze and fix the following issue in the Linux kernel code: perf unwind: Fix map reference counts | Problem Details:
The result of thread__find_map is the map in the passed in
addr_location. Calling addr_location__exit puts that map and so copies
need to do a map__get. Add in the corresponding map__puts.
v2. Add missing map__put when dso is missing.
Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung ... | ```diff
diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c
index 36bf5100bad2..ebfde537b99b 100644
--- a/tools/perf/util/unwind-libunwind-local.c
+++ b/tools/perf/util/unwind-libunwind-local.c
@@ -419,7 +419,8 @@ static struct map *find_map(unw_word_t ip, struct unwind_info... |
e4ef3ef1bc0a3d2535427da78b8095ef657eb474 | Analyze and fix the following issue in the Linux kernel code: perf test: Set PERF_EXEC_PATH for script execution | Problem Details:
The task-analyzer.py script (actually every other scripts too) requires
PERF_EXEC_PATH env to find dependent libraries and scripts. For scripts
test to run correctly, it needs to set PERF_EXEC_PATH to the perf tool
source directory.
Instead of blindly update the env, let's check the directory structur... | ```diff
diff --git a/tools/perf/tests/shell/test_task_analyzer.sh b/tools/perf/tests/shell/test_task_analyzer.sh
index 59785dfc11f8..0095abbe20ca 100755
--- a/tools/perf/tests/shell/test_task_analyzer.sh
+++ b/tools/perf/tests/shell/test_task_analyzer.sh
@@ -5,6 +5,12 @@
tmpdir=$(mktemp -d /tmp/perf-script-task-analyz... |
2d7f5540b8696b855adf4121ce4a9bf77938848f | Analyze and fix the following issue in the Linux kernel code: perf script: Initialize buffer for regs_map() | Problem Details:
The buffer is used to save register mapping in a sample. Normally
perf samples don't have any register so the string should be empty.
But it missed to initialize the buffer when the size is 0. And it's
passed to PyUnicode_FromString() with a garbage data.
So it returns NULL due to invalid input (ins... | ```diff
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index 25fcd6630a4d..94312741443a 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -737,11 +737,11 @@ sta... |
33fe7c08446af6dda0ff08ff4fa9c921e574477f | Analyze and fix the following issue in the Linux kernel code: perf tests: Fix test_arm_callgraph_fp variable expansion | Problem Details:
$TEST_PROGRAM is a command with spaces so it's supposed to be word
split. The referenced fix to fix the shellcheck warnings incorrectly
quoted this string so unquote it to fix the test.
At the same time silence the shellcheck warning for that line and fix
two more shellcheck errors at the end of the s... | ```diff
diff --git a/tools/perf/tests/shell/test_arm_callgraph_fp.sh b/tools/perf/tests/shell/test_arm_callgraph_fp.sh
index 1380e0d12dce..66dfdfdad553 100755
--- a/tools/perf/tests/shell/test_arm_callgraph_fp.sh
+++ b/tools/perf/tests/shell/test_arm_callgraph_fp.sh
@@ -15,7 +15,8 @@ cleanup_files()
trap cleanup_files... |
0ec92a8f56ff07237dbe8af7c7a72aba7f957baf | Analyze and fix the following issue in the Linux kernel code: net: fix net device address assign type | Problem Details:
Commit ad72c4a06acc introduced optimization to return from function
quickly if the MAC address is not changing at all. It was reported
that such change causes dev->addr_assign_type to not change
to NET_ADDR_SET from _PERM or _RANDOM.
Restore the old behavior and skip only call to ndo_set_mac_address.
... | ```diff
diff --git a/net/core/dev.c b/net/core/dev.c
index e4ff0adf5523..69a3e544676c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -8781,14 +8781,14 @@ int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa,
return -EINVAL;
if (!netif_device_present(dev))
return -ENODEV;
- if (!memcmp(dev->d... |
004d25060c78fc31f66da0fa439c544dda1ac9d5 | Analyze and fix the following issue in the Linux kernel code: igb: Fix igb_down hung on surprise removal | Problem Details:
In a setup where a Thunderbolt hub connects to Ethernet and a display
through USB Type-C, users may experience a hung task timeout when they
remove the cable between the PC and the Thunderbolt hub.
This is because the igb_down function is called multiple times when
the Thunderbolt hub is unplugged. For... | ```diff
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 9fcac96022d7..9a2561409b06 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -9587,6 +9587,11 @@ static pci_ers_result_t igb_io_error_detected(struct p... |
5c844d57aa7894154e49cf2fc648bfe2f1aefc1c | Analyze and fix the following issue in the Linux kernel code: net: dsa: microchip: fix writes to phy registers >= 0x10 | Problem Details:
According to the errata sheets for ksz9477 and ksz9567, writes to the
PHY registers 0x10-0x1f (i.e. those located at addresses 0xN120 to
0xN13f) must be done as a 32 bit write to the 4-byte aligned address
containing the register, hence requires a RMW in order not to change
the adjacent PHY register.
... | ```diff
diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
index fc5157a10af5..83b7f2d5c1ea 100644
--- a/drivers/net/dsa/microchip/ksz9477.c
+++ b/drivers/net/dsa/microchip/ksz9477.c
@@ -329,11 +329,27 @@ int ksz9477_r_phy(struct ksz_device *dev, u16 addr, u16 reg, u16 *data)
int ... |
fc0649395dca81f2b3b02d9b248acb38cbcee55c | Analyze and fix the following issue in the Linux kernel code: net: phy: dp83td510: fix kernel stall during netboot in DP83TD510E PHY driver | Problem Details:
Fix an issue where the kernel would stall during netboot, showing the
"sched: RT throttling activated" message. This stall was triggered by
the behavior of the mii_interrupt bit (Bit 7 - DP83TD510E_STS_MII_INT)
in the DP83TD510E's PHY_STS Register (Address = 0x10). The DP83TD510E
datasheet (2020) state... | ```diff
diff --git a/drivers/net/phy/dp83td510.c b/drivers/net/phy/dp83td510.c
index 3cd9a77f9532..d7616b13c594 100644
--- a/drivers/net/phy/dp83td510.c
+++ b/drivers/net/phy/dp83td510.c
@@ -12,6 +12,11 @@
/* MDIO_MMD_VEND2 registers */
#define DP83TD510E_PHY_STS 0x10
+/* Bit 7 - mii_interrupt, active high. Clear... |
a0e128ef88e4a033a52963ec4ad94d96a17f8179 | Analyze and fix the following issue in the Linux kernel code: net/tls: fix comment typo | Problem Details:
Spell "retransmit" properly.
Found by searching for keyword "tranm".
Signed-off-by: Yueh-Shun Li <shamrocklee@posteo.net>
Link: https://lore.kernel.org/r/20230622012627.15050-7-shamrocklee@posteo.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org> | ```diff
diff --git a/net/tls/tls_device_fallback.c b/net/tls/tls_device_fallback.c
index 7fbb1d0b69b3..b28c5e296dfd 100644
--- a/net/tls/tls_device_fallback.c
+++ b/net/tls/tls_device_fallback.c
@@ -271,7 +271,7 @@ static int fill_sg_in(struct scatterlist *sg_in,
* There is a corner case where the packet contains
... |
304b1875ba02022f2504952a32e5e90482bbdb39 | Analyze and fix the following issue in the Linux kernel code: tcp: fix comment typo | Problem Details:
Spell "transmissions" properly.
Found by searching for keyword "tranm".
Signed-off-by: Yueh-Shun Li <shamrocklee@posteo.net>
Link: https://lore.kernel.org/r/20230622012627.15050-6-shamrocklee@posteo.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org> | ```diff
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index bf8b22218dd4..6f072095211e 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2867,7 +2867,7 @@ static void tcp_process_loss(struct sock *sk, int flag, int num_dupack,
}
if (tcp_is_reno(tp)) {
/* A Reno DUPACK means new data in ... |
b028813ac97370e61351b1190c1860a1bd24fe56 | Analyze and fix the following issue in the Linux kernel code: i40e, xsk: fix comment typo | Problem Details:
Spell "transmission" properly.
Found by searching for keyword "tranm".
Signed-off-by: Yueh-Shun Li <shamrocklee@posteo.net>
Link: https://lore.kernel.org/r/20230622012627.15050-3-shamrocklee@posteo.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org> | ```diff
diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
index cd7b52fb6b46..05ec1181471e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
@@ -582,7 +582,7 @@ static void i40e_clean_xdp_tx_buffer(struct i40e_ring... |
aa5406950726e336c5c9585b09799a734b6e77bf | Analyze and fix the following issue in the Linux kernel code: netlink: do not hard code device address lenth in fdb dumps | Problem Details:
syzbot reports that some netdev devices do not have a six bytes
address [1]
Replace ETH_ALEN by dev->addr_len.
[1] (Case of a device where dev->addr_len = 4)
BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:114 [inline]
BUG: KMSAN: kernel-infoleak in copyout+0xb8/0... | ```diff
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 41de3a2f29e1..7776611a14ae 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -4090,7 +4090,7 @@ static int nlmsg_populate_fdb_fill(struct sk_buff *skb,
ndm->ndm_ifindex = dev->ifindex;
ndm->ndm_state = ndm_state;
- if (nla_put(... |
8d61f926d42045961e6b65191c09e3678d86a9cf | Analyze and fix the following issue in the Linux kernel code: netlink: fix potential deadlock in netlink_set_err() | Problem Details:
syzbot reported a possible deadlock in netlink_set_err() [1]
A similar issue was fixed in commit 1d482e666b8e ("netlink: disable IRQs
for netlink_lock_table()") in netlink_lock_table()
This patch adds IRQ safety to netlink_set_err() and __netlink_diag_dump()
which were not covered by cited commit.
[... | ```diff
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 3a1e0fd5bf14..5968b6450d82 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1600,6 +1600,7 @@ out:
int netlink_set_err(struct sock *ssk, u32 portid, u32 group, int code)
{
struct netlink_set_err_data info;
+ unsig... |
c4fc88ad2a765224a648db8ab35f125e120fe41b | Analyze and fix the following issue in the Linux kernel code: net: stmmac: fix double serdes powerdown | Problem Details:
Commit 49725ffc15fc ("net: stmmac: power up/down serdes in
stmmac_open/release") correctly added a call to the serdes_powerdown()
callback to stmmac_release() but did not remove the one from
stmmac_remove() which leads to a doubled call to serdes_powerdown().
This can lead to all kinds of problems: in... | ```diff
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 87510951f4e8..b74946bbee3c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -7457,12 +7457,6 @@ void stmmac_dvr_remove... |
b9ec61be2d91cc09b5e7302e65442e6d71f0ed93 | Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: update email addresses of octeon_ep driver maintainers | Problem Details:
Update email addresses of Marvell octeon_ep driver maintainers.
Also remove a former maintainer.
As a maintainer below are the responsibilities:
- Pushing the bug fixes and new features to upstream.
- Responsible for reviewing the external changes
submitted for the octeon_ep driver.
- Reply to maint... | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index 4b53a958e3a7..1ddfde285a06 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12552,7 +12552,7 @@ F: drivers/mtd/nand/raw/marvell_nand.c
MARVELL OCTEON ENDPOINT DRIVER
M: Veerasenareddy Burru <vburru@marvell.com>
-M: Abhijit Ayarekar <aayarekar@marvell.com>
+M: Sathe... |
c3ba5aa6f789097364398ad38fe541841bade17d | Analyze and fix the following issue in the Linux kernel code: Documentation: dm-integrity: Fix minor grammatical error. | Problem Details:
"where dm-integrity uses bitmap" becomes "where dm-integrity uses a
bitmap"
Signed-off-by: Russell Harmon <eatnumber1@gmail.com>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org> | ```diff
diff --git a/Documentation/admin-guide/device-mapper/dm-integrity.rst b/Documentation/admin-guide/device-mapper/dm-integrity.rst
index 8db172efa272..b2a698e955a3 100644
--- a/Documentation/admin-guide/device-mapper/dm-integrity.rst
+++ b/Documentation/admin-guide/device-mapper/dm-integrity.rst
@@ -25,7 +25,7 @@... |
fcb66ee8d16aa0f88efcc9cb41083c0412e9db8a | Analyze and fix the following issue in the Linux kernel code: ASoC: tas2781: fix Kconfig dependencies | Problem Details:
The new driver has two modules that both get enabled for build testing
when all codecs are selected. The comlib part has an i2c dependency,
so this remains disabled on builds without i2c, but then the other
one fails to link:
ERROR: modpost: "tasdevice_dev_bulk_write" [sound/soc/codecs/snd-soc-tas2781... | ```diff
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 7895969bcc39..0cd107fa112f 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1741,6 +1741,7 @@ config SND_SOC_TAS2781_COMLIB
tristate
config SND_SOC_TAS2781_FMWLIB
+ depends on SND_SOC_TAS2781_COMLIB
tristate
... |
ad60672394bd1f95c58d3d9336902f47e05126fc | Analyze and fix the following issue in the Linux kernel code: ASoC: amd: acp: clear pdm dma interrupt mask | Problem Details:
Clear pdm dma interrupt mask in acp_dmic_shutdown().
'Fixes: c32bd332ce5c9 ("ASoC: amd: acp: Add generic support for
PDM controller on ACP")'
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/Message-Id: <20230622152406.3709231-1-Syed.SabaKareem@amd.com>
Signed... | ```diff
diff --git a/sound/soc/amd/acp/acp-pdm.c b/sound/soc/amd/acp/acp-pdm.c
index 66ec6b6a5972..f8030b79ac17 100644
--- a/sound/soc/amd/acp/acp-pdm.c
+++ b/sound/soc/amd/acp/acp-pdm.c
@@ -176,7 +176,7 @@ static void acp_dmic_dai_shutdown(struct snd_pcm_substream *substream,
/* Disable DMIC interrupts */
ext_in... |
d7c2d34d72bfeffca4983c4dcba55d1dd31012be | Analyze and fix the following issue in the Linux kernel code: perf test: Remove x permission from lib/stat_output.sh | Problem Details:
The commit fc51fc87b1b8 factored out the helper functions to a library
but the new file had execute permission. Due to the way it detects
the shell test scripts, it showed up in the perf test list unexpectedly.
$ ./perf test list 2>&1 | grep 86
76: x86 bp modify
77: x86 Sample parsing
78: ... | ```diff
diff --git a/tools/perf/tests/shell/lib/stat_output.sh b/tools/perf/tests/shell/lib/stat_output.sh
old mode 100755
new mode 100644
``` |
411a1215a07904cafbea683f4b2908f1310946a1 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: mtd: qcom: Fix a property position | Problem Details:
qcom,boot-partitions is a NAND chip property, not a NAND controller
property. Move the description of the property into the NAND chip
section and just enable the property in the if/else block.
Fixes: 5278cc93a97f ("dt-bindings: mtd: qcom_nandc: document qcom,boot-partitions binding")
Cc: Manivannan Sa... | ```diff
diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
index 00c991ffa6c4..3d77922dfaef 100644
--- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
+++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
@@ -45,6 +45,22 @@ patternPro... |
efd2ed9351efefe40cbcca36a527adf38ffe1b4d | Analyze and fix the following issue in the Linux kernel code: mtd: sm_ftl: Fix typos in comments | Problem Details:
Fix typo in the description of the 'succesfull'.
Signed-off-by: Bo Liu <liubo03@inspur.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230621020331.1508-1-wangdeming@inspur.com | ```diff
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
index 4cfec3b7b446..b5b3c4c44a94 100644
--- a/drivers/mtd/sm_ftl.c
+++ b/drivers/mtd/sm_ftl.c
@@ -981,7 +981,7 @@ restart:
/* Update the FTL table */
zone->lba_to_phys_table[ftl->cache_block] = write_sector;
- /* Write succesfull, so erase and free ... |
839cad5fa54bd6e4aad137f695ec6f90acb78728 | Analyze and fix the following issue in the Linux kernel code: cpumask: fix function description kernel-doc notation | Problem Details:
Use kernel-doc notation for the function description to prevent
a warning:
lib/cpumask.c:160: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Returns an arbitrary cpu within srcp1 & srcp2.
Signed-off-by: Randy Dunlap <rdunlap@in... | ```diff
diff --git a/lib/cpumask.c b/lib/cpumask.c
index e7258836b60b..de356f16773a 100644
--- a/lib/cpumask.c
+++ b/lib/cpumask.c
@@ -157,7 +157,7 @@ EXPORT_SYMBOL(cpumask_local_spread);
static DEFINE_PER_CPU(int, distribute_cpu_mask_prev);
/**
- * Returns an arbitrary cpu within srcp1 & srcp2.
+ * cpumask_any_and... |
cdd2d06fbc0a58297f782c8eb7e2f3c0b1dc367e | Analyze and fix the following issue in the Linux kernel code: nodemask: Drop duplicate check in for_each_node_mask() | Problem Details:
The return value type is changed from 'int' to 'unsigned int' since
commit 0dfe54071d7c8 ("nodemask: Fix return values to be unsigned").
Besides, the conversion between 'int' and 'unsigned int' on the
parameter @node is guaranteed to be safe due to the limited range of
MAX_NUMNODES and CONFIG_NODES_SHI... | ```diff
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
index bb0ee80526b2..8d07116caaf1 100644
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@ -385,7 +385,7 @@ static inline void __nodes_fold(nodemask_t *dstp, const nodemask_t *origp,
#if MAX_NUMNODES > 1
#define for_each_node_mask(... |
c1d2ba10f594046831d14b03f194e8d05e78abad | Analyze and fix the following issue in the Linux kernel code: lib/bitmap: drop optimization of bitmap_{from,to}_arr64 | Problem Details:
bitmap_{from,to}_arr64() optimization is overly optimistic on 32-bit LE
architectures when it's wired to bitmap_copy_clear_tail().
bitmap_copy_clear_tail() takes care of unused bits in the bitmap up to
the next word boundary. But on 32-bit machines when copying bits from
bitmap to array of 64-bit word... | ```diff
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index 7d6d73b78147..03644237e1ef 100644
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@ -302,12 +302,10 @@ void bitmap_to_arr32(u32 *buf, const unsigned long *bitmap,
#endif
/*
- * On 64-bit systems bitmaps are represented as u64 arra... |
7b59e8ae92fe089fed8ff1b23e53442ae5b204c9 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sc7280: Mark SCM as dma-coherent for chrome devices | Problem Details:
Just like for sc7180 devices using the Chrome bootflow (AKA trogdor
and IDP), sc7280 devices using the Chrome bootflow also need their
firmware marked dma-coherent. On sc7280 this wasn't causing WiFi to
fail to startup, since WiFi works differently there. However, on
sc7280 devices we were still gettin... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi b/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi
index f562e4d2b655..2e1cd219fc18 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi
@@ -79,6 +79,11 @@
firmware-name = "ath... |
a54b7fa6b9ab6b4ecb7d9aba6b1a0ce1bcc961e3 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for trogdor | Problem Details:
Trogdor devices use firmware backed by TF-A instead of Qualcomm's
normal TZ. On TF-A we end up mapping memory as cacheable.
Specifically, you can see in Trogdor's TF-A code [1] in
qti_sip_mem_assign() that we call qti_mmap_add_dynamic_region() with
MT_RO_DATA. This translates down to MT_MEMORY instead ... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
index ca6920de7ea8..1472e7f10831 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
@@ -892,6 +892,11 @@ hp_i2c: &i2c9 {
qcom,spare-regs = <&tcsr_r... |
9a5f0b11e49e27f0a01a73c31d05df4a95bea3fa | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for IDP | Problem Details:
sc7180-idp is, for most intents and purposes, a trogdor device.
Specifically, sc7180-idp is designed to run the same style of firmware
as trogdor devices. This can be seen from the fact that IDP has the
same "Reserved memory changes" in its device tree that trogdor has.
Recently it was realized that w... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/sc7180-idp.dts b/arch/arm64/boot/dts/qcom/sc7180-idp.dts
index 9f052270e090..299ef5dc225a 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-idp.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-idp.dts
@@ -393,6 +393,11 @@
qcom,spare-regs = <&tcsr_regs_2 0xb3e4>;
};
+&scm {
+ /* TF... |
2230f9e1171a2e9731422a14d1bbc313c0b719d1 | Analyze and fix the following issue in the Linux kernel code: KVM: Avoid illegal stage2 mapping on invalid memory slot | Problem Details:
We run into guest hang in edk2 firmware when KSM is kept as running on
the host. The edk2 firmware is waiting for status 0x80 from QEMU's pflash
device (TYPE_PFLASH_CFI01) during the operation of sector erasing or
buffered write. The status is returned by reading the memory region of
the pflash device ... | ```diff
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 479802a892d4..65f94f592ff8 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -686,6 +686,24 @@ static __always_inline int kvm_handle_hva_range_no_flush(struct mmu_notifier *mn
return __kvm_handle_hva_range(kvm, &range);
}
+
+static bo... |
81621430c81bb7965c3d5807039bc2b5b3ec87ca | Analyze and fix the following issue in the Linux kernel code: Revert "cgroup: Avoid -Wstringop-overflow warnings" | Problem Details:
This reverts commit 36de5f303ca1bd6fce74815ef17ef3d8ff8737b5.
The commit caused boot failures on some configurations due to cgroup
hierarchies not being created at all.
Signed-off-by: Tejun Heo <tj@kernel.org> | ```diff
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 1404e8e8abf7..065bebb4af9b 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -1198,9 +1198,6 @@ static struct css_set *find_css_set(struct css_set *old_cset,
unsigned long key;
int ssid;
- if (!CGROUP_HAS_SUBSYS_CONFIG)
-... |
31b5a547622b3782388eb676081da1eefe5b98d2 | Analyze and fix the following issue in the Linux kernel code: wifi: ieee80211: fix erroneous NSTR bitmap size checks | Problem Details:
The complete profile bit together with the NSTR link pair
present bit indicate whether or not the NSTR bitmap is,
the NSTR bitmap size just indicates how big it is.
Fixes: 7b6f08771bf6 ("wifi: ieee80211: Support validating ML station profile length")
Fixes: 5c1f97537bfb ("wifi: mac80211: store BSS par... | ```diff
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 6f1747a9c106..4b998090898e 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -4920,7 +4920,7 @@ static inline bool ieee80211_mle_basic_sta_prof_size_ok(const u8 *data,
if (control & IEEE80211_MLE_STA_CONTROL_DTIM_... |
fbc5669de62a452fb3a26a4560668637d5c9e7b5 | Analyze and fix the following issue in the Linux kernel code: bpf, docs: Document existing macros instead of deprecated | Problem Details:
The BTF_TYPE_SAFE_NESTED macro was replaced by the BTF_TYPE_SAFE_TRUSTED,
BTF_TYPE_SAFE_RCU, and BTF_TYPE_SAFE_RCU_OR_NULL macros. Fix the docs
correspondingly.
Fixes: 6fcd486b3a0a ("bpf: Refactor RCU enforcement in the verifier.")
Signed-off-by: Anton Protopopov <aspsk@isovalent.com>
Signed-off-by: D... | ```diff
diff --git a/Documentation/bpf/kfuncs.rst b/Documentation/bpf/kfuncs.rst
index 7a3d9de5f315..0d2647fb358d 100644
--- a/Documentation/bpf/kfuncs.rst
+++ b/Documentation/bpf/kfuncs.rst
@@ -227,23 +227,49 @@ absolutely no ABI stability guarantees.
As mentioned above, a nested pointer obtained from walking a tru... |
2404dd01b53430e4ab78fc9ca069e9e93fd22059 | Analyze and fix the following issue in the Linux kernel code: bpf, docs: BPF Iterator Document | Problem Details:
Fix the description of the seq_info field of the bpf_iter_reg structure which
was wrong due to an accidental copy/paste of the previous field's description.
Fixes: 8972e18a439d ("bpf, docs: BPF Iterator Document")
Signed-off-by: Anton Protopopov <aspsk@isovalent.com>
Signed-off-by: Daniel Borkmann <da... | ```diff
diff --git a/Documentation/bpf/bpf_iterators.rst b/Documentation/bpf/bpf_iterators.rst
index 6d7770793fab..07433915aa41 100644
--- a/Documentation/bpf/bpf_iterators.rst
+++ b/Documentation/bpf/bpf_iterators.rst
@@ -238,11 +238,8 @@ The following is the breakdown for each field in struct ``bpf_iter_reg``.
... |
163e76cc6ef43b7a5e9b6e245a6d6667c9d9b4a7 | Analyze and fix the following issue in the Linux kernel code: riscv: stack: Support HAVE_IRQ_EXIT_ON_IRQ_STACK | Problem Details:
Add independent irq stacks for percpu to prevent kernel stack overflows.
It is also compatible with VMAP_STACK by arch_alloc_vmap_stack.
Tested-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Cc: Clément Léger <cleger@... | ```diff
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index a3d54cd14fca..a8368fe7be14 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -590,6 +590,13 @@ config FPU
If you don't know what to do here, say Y.
+config IRQ_STACKS
+ bool "Independent irq stacks" if EXPERT
+ default y
+ select HAVE_... |
7947540d1d1e76297869921ed601e2f47fa6f27d | Analyze and fix the following issue in the Linux kernel code: fbdev: sh7760fb: Fix -Wimplicit-fallthrough warnings | Problem Details:
Fix the following fallthrough warnings seen after building sh
architecture with sh7763rdp_defconfig configuration:
drivers/video/fbdev/sh7760fb.c: In function 'sh7760fb_get_color_info':
drivers/video/fbdev/sh7760fb.c:138:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
138 | ... | ```diff
diff --git a/drivers/video/fbdev/sh7760fb.c b/drivers/video/fbdev/sh7760fb.c
index 768011bdb430..98c5227098a8 100644
--- a/drivers/video/fbdev/sh7760fb.c
+++ b/drivers/video/fbdev/sh7760fb.c
@@ -136,11 +136,13 @@ static int sh7760fb_get_color_info(struct device *dev,
break;
case LDDFR_4BPP_MONO:
lgray =... |
47fa0fac9bb5e525c5fa67bf06f3f663cf999841 | Analyze and fix the following issue in the Linux kernel code: fbdev: sh_mobile_lcdcfb: Fix ARGB32 overlay format typo | Problem Details:
When configurating a CHn Source Image Format Register (LDBBSIFR), one
should use the corresponding LDBBSIFR_RPKF_* definition for overlay
planes, not the DDFR_PKF_* definition for the primary plane.
Fortunately both definitions resolve to the same value, so this bug did
not cause any harm.
Signed-off... | ```diff
diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c
index 093f035d1246..0adb2ba965e7 100644
--- a/drivers/video/fbdev/sh_mobile_lcdcfb.c
+++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c
@@ -824,7 +824,7 @@ static void sh_mobile_lcdc_overlay_setup(struct sh_mobile_lcdc_overla... |
192df2aa0113ddddee2a93e453ff46610807b425 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Fix misuse of KVM_ARM_VCPU_POWER_OFF bit index | Problem Details:
KVM_ARM_VCPU_POWER_OFF is as bit index, _not_ a literal bitmask.
Nonetheless, commit e3c1c0cae31e ("KVM: arm64: Relax invariance
of KVM_ARM_VCPU_POWER_OFF") started using it that way, meaning that
powering off a vCPU with the KVM_ARM_VCPU_INIT ioctl is completely
broken.
Fix it by using a shifted bit ... | ```diff
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index 2e1f5561141c..c2c14059f6a8 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -1280,8 +1280,8 @@ static int kvm_arch_vcpu_ioctl_vcpu_init(struct kvm_vcpu *vcpu,
* reflecting it in the finalized feature set, thus limiting its scope
... |
012fa2622e30675f61413485785e708ba02be78b | Analyze and fix the following issue in the Linux kernel code: ASoC: loongson: fix address space confusion | Problem Details:
The i2s driver uses the mapped __iomem address of the FIFO as the DMA
address for the device. This apparently works on loongarch because of
the way it handles __iomem pointers as aliases of physical addresses,
but this is not portable to other architectures and causes a compiler
warning when dma addres... | ```diff
diff --git a/sound/soc/loongson/loongson_i2s_pci.c b/sound/soc/loongson/loongson_i2s_pci.c
index 6dcfb17d3276..fa90361865c6 100644
--- a/sound/soc/loongson/loongson_i2s_pci.c
+++ b/sound/soc/loongson/loongson_i2s_pci.c
@@ -107,10 +107,10 @@ static int loongson_i2s_pci_probe(struct pci_dev *pdev,
tx_data = &i2... |
61f723e6f3d20f3276c678cd346de5ea86b8e5d3 | Analyze and fix the following issue in the Linux kernel code: iavf: fix err handling for MAC replace | Problem Details:
Defer removal of current primary MAC until a replacement is successfully
added. Previous implementation would left filter list with no primary MAC.
This was found while reading the code.
The patch takes advantage of the fact that there can only be a single primary
MAC filter at any time ([1] by Piotr)... | ```diff
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 4a66873882d1..f8e6f3cd7b38 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -1007,40 +1007,36 @@ int iavf_replace_primary_mac(struct iavf_adap... |
4e302336d5ca1767a06beee7596a72d3bdc8d983 | Analyze and fix the following issue in the Linux kernel code: fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev | Problem Details:
Syzkaller reported the following issue:
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dmap.c:1965:6
index -84 is out of range for type 's8[341]' (aka 'signed char[341]')
CPU: 1 PID: 4995 Comm: syz-executor146 Not tainted 6.4.0-rc6-syzkaller-00037-gb6dad5178cea #0
Hardware name: Google Google Compute ... | ```diff
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
index d4d094168a2f..a14a0f18a4c4 100644
--- a/fs/jfs/jfs_dmap.c
+++ b/fs/jfs/jfs_dmap.c
@@ -1959,6 +1959,9 @@ dbAllocDmapLev(struct bmap * bmp,
if (dbFindLeaf((dmtree_t *) & dp->tree, l2nb, &leafidx))
return -ENOSPC;
+ if (leafidx < 0)
+ return -EIO;
+
... |
c1d57ee6eb99699f5ccd92fc6e8c5a79103dcaae | Analyze and fix the following issue in the Linux kernel code: ARM: omap2: Fix copy/paste bug | Problem Details:
I mistyped one of the SD/MMC GPIO lines on the Nokia n810 which
was supposed to be "vio" as "vsd".
Fix it up.
Reported-by: Peter Vasil <petervasil@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/202306140... | ```diff
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 564bf80a2621..8e3b5068d4ab 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -158,7 +158,7 @@ static struct gpiod_lookup_table nokia810_mmc_gpio_table = {
"vsd", 1, GPIO_ACTIVE_HIGH)... |
c789ad7cbebcac5d5f417296c140a1252c689524 | Analyze and fix the following issue in the Linux kernel code: igc: Work around HW bug causing missing timestamps | Problem Details:
There's an hardware issue that can cause missing timestamps. The bug
is that the interrupt is only cleared if the IGC_TXSTMPH_0 register is
read.
The bug can cause a race condition if a timestamp is captured at the
wrong time, and we will miss that timestamp. To reduce the time window
that the problem... | ```diff
diff --git a/drivers/net/ethernet/intel/igc/igc_ptp.c b/drivers/net/ethernet/intel/igc/igc_ptp.c
index cf963a12a92f..32ef112f8291 100644
--- a/drivers/net/ethernet/intel/igc/igc_ptp.c
+++ b/drivers/net/ethernet/intel/igc/igc_ptp.c
@@ -685,14 +685,49 @@ static void igc_ptp_tx_hwtstamp(struct igc_adapter *adapter... |
ce58c7cc8b9910f2bc1d038d7ba60c3f011b2cb2 | Analyze and fix the following issue in the Linux kernel code: igc: Check if hardware TX timestamping is enabled earlier | Problem Details:
Before requesting a packet transmission to be hardware timestamped,
check if the user has TX timestamping enabled. Fixes an issue that if
a packet was internally forwarded to the NIC, and it had the
SKBTX_HW_TSTAMP flag set, the driver would mark that timestamp as
skipped.
In reality, that timestamp w... | ```diff
diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h
index 7da0657ea48f..66fb67c17e4f 100644
--- a/drivers/net/ethernet/intel/igc/igc.h
+++ b/drivers/net/ethernet/intel/igc/igc.h
@@ -581,6 +581,7 @@ enum igc_ring_flags_t {
IGC_RING_FLAG_TX_CTX_IDX,
IGC_RING_FLAG_TX_DETECT... |
9c50e2b150c8ee0eee5f8154e2ad168cdd748877 | Analyze and fix the following issue in the Linux kernel code: igc: Fix race condition in PTP tx code | Problem Details:
Currently, the igc driver supports timestamping only one tx packet at a
time. During the transmission flow, the skb that requires hardware
timestamping is saved in adapter->ptp_tx_skb. Once hardware has the
timestamp, an interrupt is delivered, and adapter->ptp_tx_work is
scheduled. In igc_ptp_tx_work(... | ```diff
diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h
index 34aebf00a512..7da0657ea48f 100644
--- a/drivers/net/ethernet/intel/igc/igc.h
+++ b/drivers/net/ethernet/intel/igc/igc.h
@@ -229,6 +229,10 @@ struct igc_adapter {
struct ptp_clock *ptp_clock;
struct ptp_clock_info ... |
648fa60fa7de3ca6f6303e1721591ad73def9cf0 | Analyze and fix the following issue in the Linux kernel code: block: don't return -EINVAL for not found names in devt_from_devname | Problem Details:
When we didn't find a device and didn't guess it might be a partition,
it might still show up later, so don't disable rootwait for it by
returning -EINVAL.
Fixes: 079caa35f786 ("init: clear root_wait on all invalid root= strings")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Christop... | ```diff
diff --git a/block/early-lookup.c b/block/early-lookup.c
index 91002b19d09c..3effbd0d35e9 100644
--- a/block/early-lookup.c
+++ b/block/early-lookup.c
@@ -175,7 +175,7 @@ static int __init devt_from_devname(const char *name, dev_t *devt)
while (p > s && isdigit(p[-1]))
p--;
if (p == s || !*p || *p == '0'... |
cb091225a538005965b7c59c7c33ebe5358a5815 | Analyze and fix the following issue in the Linux kernel code: btrfs: fix remaining u32 overflows when left shifting stripe_nr | Problem Details:
There was regression caused by a97699d1d610 ("btrfs: replace
map_lookup->stripe_len by BTRFS_STRIPE_LEN") and supposedly fixed by
a7299a18a179 ("btrfs: fix u32 overflows when left shifting stripe_nr").
To avoid code churn the fix was open coding the type casts but
unfortunately missed one which was sti... | ```diff
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index 590b03560265..e97af2e510c3 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -1973,7 +1973,7 @@ int btrfs_rmap_block(struct btrfs_fs_info *fs_info, u64 chunk_start,
/* For RAID5/6 adjust to a full IO stripe length */
if (... |
4481913607e58196c48a4fef5e6f45350684ec3c | Analyze and fix the following issue in the Linux kernel code: drm/ttm: fix bulk_move corruption when adding a entry | Problem Details:
When the resource is the first in the bulk_move range, adding it again
(thus moving it to the tail) will corrupt the list since the first
pointer is not moved. This eventually lead to null pointer deref in
ttm_lru_bulk_move_del()
Fixes: fee2ede15542 ("drm/ttm: rework bulk move handling v5")
Signed-off... | ```diff
diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
index 7333f7a87a2f..e51dbc7a2d53 100644
--- a/drivers/gpu/drm/ttm/ttm_resource.c
+++ b/drivers/gpu/drm/ttm/ttm_resource.c
@@ -86,6 +86,8 @@ static void ttm_lru_bulk_move_pos_tail(struct ttm_lru_bulk_move_pos *pos,
s... |
38638ffa6059049334b4d87bd4d85cf3418b5e27 | Analyze and fix the following issue in the Linux kernel code: tracing/boot: Replace strlcpy with strscpy | Problem Details:
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
Direct r... | ```diff
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c
index 778200dd8ede..5fe525f1b8cc 100644
--- a/kernel/trace/trace_boot.c
+++ b/kernel/trace/trace_boot.c
@@ -31,7 +31,7 @@ trace_boot_set_instance_options(struct trace_array *tr, struct xbc_node *node)
/* Common ftrace options */
xbc_node_f... |
1527b076ae2cb6a9c590a02725ed39399fcad1cf | Analyze and fix the following issue in the Linux kernel code: spi: zynqmp-gqspi: fix clock imbalance on probe failure | Problem Details:
Make sure that the device is not runtime suspended before explicitly
disabling the clocks on probe failure and on driver unbind to avoid a
clock enable-count imbalance.
Fixes: 9e3a000362ae ("spi: zynqmp: Add pm runtime support")
Cc: stable@vger.kernel.org # 4.19
Cc: Naga Sureshkumar Relli <naga.suresh... | ```diff
diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
index fb2ca9b90eab..c309dedfd602 100644
--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -1342,9 +1342,9 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
return 0;
clk_dis_all:
- pm_runtime... |
8270cb10c0681d52fce508f827dfa1688d3acc3a | Analyze and fix the following issue in the Linux kernel code: cdrom: Fix spectre-v1 gadget | Problem Details:
This patch fixes a spectre-v1 gadget in cdrom.
The gadget could be triggered by speculatively
bypassing the cdi->capacity check.
Signed-off-by: Jordy Zomer <jordyzomer@google.com>
Link: https://lore.kernel.org/all/20230612110040.849318-2-jordyzomer@google.com
Reviewed-by: Phillip Potter <phil@philpott... | ```diff
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index bd8cd59c758a..cc2839805983 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -264,6 +264,7 @@
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/mm.h>
+#include <linux/nospec.h>
#include <linux/slab.h>
#includ... |
9c39b7a905d84b7da5f59d80f2e455853fea7217 | Analyze and fix the following issue in the Linux kernel code: block: make sure local irq is disabled when calling __blkcg_rstat_flush | Problem Details:
When __blkcg_rstat_flush() is called from cgroup_rstat_flush*() code
path, interrupt is always disabled.
When we start to flush blkcg per-cpu stats list in __blkg_release()
for avoiding to leak blkcg_gq's reference in commit 20cb1c2fb756
("blk-cgroup: Flush stats before releasing blkcg_gq"), local irq... | ```diff
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index f0b5c9c41cde..dce1548a7a0c 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -970,6 +970,7 @@ static void __blkcg_rstat_flush(struct blkcg *blkcg, int cpu)
struct llist_head *lhead = per_cpu_ptr(blkcg->lhead, cpu);
struct llist_node *lnode... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.