id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
ef23d44b7fcbd19773dcedcb50ca2f625107604f | Analyze and fix the following issue in the Linux kernel code: clk: imx: imx8: Add a message in case of devm_clk_hw_register_mux_parent_data_table() error | Problem Details:
If devm_clk_hw_register_mux_parent_data_table() fails, we branch to the
error handling path and imx_check_clk_hws() is never called.
Actually, imx_check_clk_hws() is a no-op because values in 'hws' are either
valid, either NULL.
Move the call to imx_check_clk_hws() in the error handling path, so that... | ```diff
diff --git a/drivers/clk/imx/clk-imx8-acm.c b/drivers/clk/imx/clk-imx8-acm.c
index 1c95ae905eec..c744fb78bb44 100644
--- a/drivers/clk/imx/clk-imx8-acm.c
+++ b/drivers/clk/imx/clk-imx8-acm.c
@@ -374,12 +374,11 @@ static int imx8_acm_clk_probe(struct platform_device *pdev)
0, NULL, NULL);
if (IS_ER... |
e9a164e367f039629fd5466a79b9f495646e1261 | Analyze and fix the following issue in the Linux kernel code: clk: imx: imx8: Fix an error handling path in imx8_acm_clk_probe() | Problem Details:
If an error occurs after a successful clk_imx_acm_attach_pm_domains() call,
it must be undone.
Add an explicit error handling path, re-order the code and add the missing
clk_imx_acm_detach_pm_domains() call.
Fixes: d3a0946d7ac9 ("clk: imx: imx8: add audio clock mux driver")
Reviewed-by: Peng Fan <pen... | ```diff
diff --git a/drivers/clk/imx/clk-imx8-acm.c b/drivers/clk/imx/clk-imx8-acm.c
index 73b3b5354951..1c95ae905eec 100644
--- a/drivers/clk/imx/clk-imx8-acm.c
+++ b/drivers/clk/imx/clk-imx8-acm.c
@@ -374,7 +374,6 @@ static int imx8_acm_clk_probe(struct platform_device *pdev)
0, NULL, NULL);
if (IS_ERR(... |
9a0108acdb1b6189dcc8f9318edfc6b7e0281df4 | Analyze and fix the following issue in the Linux kernel code: clk: imx: imx8: Fix an error handling path if devm_clk_hw_register_mux_parent_data_table() fails | Problem Details:
If a devm_clk_hw_register_mux_parent_data_table() call fails, it is likely
that the probe should fail with an error code.
Set 'ret' before leaving the function.
Fixes: d3a0946d7ac9 ("clk: imx: imx8: add audio clock mux driver")
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Christophe JAILLE... | ```diff
diff --git a/drivers/clk/imx/clk-imx8-acm.c b/drivers/clk/imx/clk-imx8-acm.c
index 87025a6772d0..73b3b5354951 100644
--- a/drivers/clk/imx/clk-imx8-acm.c
+++ b/drivers/clk/imx/clk-imx8-acm.c
@@ -373,6 +373,7 @@ static int imx8_acm_clk_probe(struct platform_device *pdev)
sels[i].shift, sels[i].width,
... |
156624e2cf815ce98fad5a24f04370f4459ae6f4 | Analyze and fix the following issue in the Linux kernel code: clk: imx: imx8: Fix an error handling path in clk_imx_acm_attach_pm_domains() | Problem Details:
If a dev_pm_domain_attach_by_id() call fails, previously allocated
resources need to be released.
Fixes: d3a0946d7ac9 ("clk: imx: imx8: add audio clock mux driver")
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Abel Vesa <abel... | ```diff
diff --git a/drivers/clk/imx/clk-imx8-acm.c b/drivers/clk/imx/clk-imx8-acm.c
index 1e82f72b75c6..87025a6772d0 100644
--- a/drivers/clk/imx/clk-imx8-acm.c
+++ b/drivers/clk/imx/clk-imx8-acm.c
@@ -279,8 +279,10 @@ static int clk_imx_acm_attach_pm_domains(struct device *dev,
for (i = 0; i < dev_pm->num_domains... |
317e69c49b4ceef8aebb47d771498ccb3571bdf9 | Analyze and fix the following issue in the Linux kernel code: clk: imx: Select MXC_CLK for CLK_IMX8QXP | Problem Details:
If the i.MX8QXP clock provider is built-in but the MXC_CLK is
built as module, build fails:
aarch64-linux-ld: drivers/clk/imx/clk-imx8-acm.o: in function `imx8_acm_clk_probe':
clk-imx8-acm.c:(.text+0x3d0): undefined reference to `imx_check_clk_hws'
Fix that by selecting MXC_CLK in case of CLK_IMX8QXP... | ```diff
diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig
index f6b82e0b9703..db3bca5f4ec9 100644
--- a/drivers/clk/imx/Kconfig
+++ b/drivers/clk/imx/Kconfig
@@ -96,6 +96,7 @@ config CLK_IMX8QXP
depends on (ARCH_MXC && ARM64) || COMPILE_TEST
depends on IMX_SCU && HAVE_ARM_SMCCC
select MXC_CLK_SCU
+ s... |
c0409dd3d151f661e7e57b901a81a02565df163c | Analyze and fix the following issue in the Linux kernel code: dmaengine: idxd: use spin_lock_irqsave before wait_event_lock_irq | Problem Details:
In idxd_cmd_exec(), wait_event_lock_irq() explicitly calls
spin_unlock_irq()/spin_lock_irq(). If the interrupt is on before entering
wait_event_lock_irq(), it will become off status after
wait_event_lock_irq() is called. Later, wait_for_completion() may go to
sleep but irq is disabled. The scenario is ... | ```diff
diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
index 22d6f4e455b7..8f754f922217 100644
--- a/drivers/dma/idxd/device.c
+++ b/drivers/dma/idxd/device.c
@@ -477,6 +477,7 @@ static void idxd_cmd_exec(struct idxd_device *idxd, int cmd_code, u32 operand,
union idxd_command_reg cmd;
DECLARE_CO... |
7aed44babc7f97e82b38e9a68515e699692cc100 | Analyze and fix the following issue in the Linux kernel code: vringh: don't use vringh_kiov_advance() in vringh_iov_xfer() | Problem Details:
In the while loop of vringh_iov_xfer(), `partlen` could be 0 if one of
the `iov` has 0 lenght.
In this case, we should skip the iov and go to the next one.
But calling vringh_kiov_advance() with 0 lenght does not cause the
advancement, since it returns immediately if asked to advance by 0 bytes.
Let's... | ```diff
diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c
index 955d938eb663..7b8fd977f71c 100644
--- a/drivers/vhost/vringh.c
+++ b/drivers/vhost/vringh.c
@@ -123,8 +123,18 @@ static inline ssize_t vringh_iov_xfer(struct vringh *vrh,
done += partlen;
len -= partlen;
ptr += partlen;
+ iov->consumed... |
2b055bf8ac8492111a62177764e54e0d2614c6b8 | Analyze and fix the following issue in the Linux kernel code: platform/chrome: cros_ec_typec: Use dev_err_probe() more | Problem Details:
There's some debug prints here that can be upgraded to dev_err_probe()
so that we don't have to fish out the error messages when a true error
happens. If they're simply probe defers then the kernel will keep silent
but if they're true errors we'll see the errors in the logs.
Cc: Prashant Malani <pmala... | ```diff
diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
index 82e7d08b52c7..67000e4a8082 100644
--- a/drivers/platform/chrome/cros_ec_typec.c
+++ b/drivers/platform/chrome/cros_ec_typec.c
@@ -80,28 +80,28 @@ static int cros_typec_get_switch_handles(struct cros_typec_port *... |
553e41d1bc95a09e32b6beb0a2b1c20dc4ea9b19 | Analyze and fix the following issue in the Linux kernel code: binfmt_elf_fdpic: clean up debug warnings | Problem Details:
The binfmt_elf_fdpic loader has some debug trace that can be enabled at
build time. The recent 64-bit additions cause some warnings if that
debug is enabled, such as:
fs/binfmt_elf_fdpic.c: In function ‘elf_fdpic_map_file’:
fs/binfmt_elf_fdpic.c:46:33: warning: format ‘%x’ expects argument of ... | ```diff
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index 43b2a2851ba3..97c3e8551aac 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -900,10 +900,12 @@ static int elf_fdpic_map_file(struct elf_fdpic_params *params,
kdebug("- DYNAMIC[]: %lx", params->dynamic_addr);
seg = loadmap->seg... |
6a3ecfd4a04d800e291e1652ce1f22eff613e8ec | Analyze and fix the following issue in the Linux kernel code: drm/i915/guc: Suppress 'ignoring reset notification' message | Problem Details:
If an active context has been banned (e.g. Ctrl+C killed) then it is
likely to be reset as part of evicting it from the hardware. That
results in a 'ignoring context reset notification: banned = 1'
message at info level. This confuses/concerns people and makes them
think something has gone wrong when i... | ```diff
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index ae3495a9c814..2cce5ec1ff00 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -4802,19 +4802,19 @@ static void guc_conte... |
07a1141ff170ff5d4f9c4fbb0453727ab48096e5 | Analyze and fix the following issue in the Linux kernel code: nbd: don't call blk_mark_disk_dead nbd_clear_sock_ioctl | Problem Details:
blk_mark_disk_dead is the proper interface to shut down a block
device, but it also makes the disk unusable forever.
nbd_clear_sock_ioctl on the other hand wants to shut down the file
system, but allow the block device to be used again when when connected
to another socket. Switch nbd to use disk_for... | ```diff
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index df1cd0f718b8..800f131222fc 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -1436,8 +1436,9 @@ static int nbd_start_device_ioctl(struct nbd_device *nbd)
static void nbd_clear_sock_ioctl(struct nbd_device *nbd)
{
- blk_mark_disk_dead(n... |
64933ab7b04881c6c18b21ff206c12278341c72e | Analyze and fix the following issue in the Linux kernel code: fs/jfs: Add validity check for db_maxag and db_agpref | Problem Details:
Both db_maxag and db_agpref are used as the index of the
db_agfree array, but there is currently no validity check for
db_maxag and db_agpref, which can lead to errors.
The following is related bug reported by Syzbot:
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dmap.c:639:20
index 7936 is out of r... | ```diff
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
index 3a1842348112..4d59373f9e6c 100644
--- a/fs/jfs/jfs_dmap.c
+++ b/fs/jfs/jfs_dmap.c
@@ -195,6 +195,12 @@ int dbMount(struct inode *ipbmap)
bmp->db_maxlevel = le32_to_cpu(dbmp_le->dn_maxlevel);
bmp->db_maxag = le32_to_cpu(dbmp_le->dn_maxag);
bmp->db_ag... |
525b861a008143048535011f3816d407940f4bfa | Analyze and fix the following issue in the Linux kernel code: fs/jfs: Add check for negative db_l2nbperpage | Problem Details:
l2nbperpage is log2(number of blks per page), and the minimum legal
value should be 0, not negative.
In the case of l2nbperpage being negative, an error will occur
when subsequently used as shift exponent.
Syzbot reported this bug:
UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:799:12
shift exponen... | ```diff
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
index 88afd108c2dd..3a1842348112 100644
--- a/fs/jfs/jfs_dmap.c
+++ b/fs/jfs/jfs_dmap.c
@@ -180,7 +180,8 @@ int dbMount(struct inode *ipbmap)
bmp->db_nfree = le64_to_cpu(dbmp_le->dn_nfree);
bmp->db_l2nbperpage = le32_to_cpu(dbmp_le->dn_l2nbperpage);
- if ... |
e36f94914021e58ee88a8856c7fdf35adf9c7ee1 | Analyze and fix the following issue in the Linux kernel code: btrfs: error out when reallocating block for defrag using a stale transaction | Problem Details:
At btrfs_realloc_node() we have these checks to verify we are not using a
stale transaction (a past transaction with an unblocked state or higher),
and the only thing we do is to trigger two WARN_ON(). This however is a
critical problem, highly unexpected and if it happens it's most likely due
to a bug... | ```diff
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index db1f3bc7f328..da519c1b6ad0 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -817,8 +817,22 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans,
int progress_passed = 0;
struct btrfs_disk_key disk_key;
- WARN_ON(trans->transaction != fs_i... |
a2caab29884397e583d09be6546259a83ebfbdb1 | Analyze and fix the following issue in the Linux kernel code: btrfs: error when COWing block from a root that is being deleted | Problem Details:
At btrfs_cow_block() we check if the block being COWed belongs to a root
that is being deleted and if so we log an error message. However this is
an unexpected case and it indicates a bug somewhere, so we should return
an error and abort the transaction. So change this in the following ways:
1) Abort ... | ```diff
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 7afd0a6495f3..db1f3bc7f328 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -682,9 +682,13 @@ noinline int btrfs_cow_block(struct btrfs_trans_handle *trans,
u64 search_start;
int ret;
- if (test_bit(BTRFS_ROOT_DELETING, &root->state))
- btrfs_... |
48774f3bf8b4dd3b1a0e155825c9ce48483db14c | Analyze and fix the following issue in the Linux kernel code: btrfs: error out when COWing block using a stale transaction | Problem Details:
At btrfs_cow_block() we have these checks to verify we are not using a
stale transaction (a past transaction with an unblocked state or higher),
and the only thing we do is to trigger a WARN with a message and a stack
trace. This however is a critical problem, highly unexpected and if it
happens it's m... | ```diff
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index a4cb4b642987..7afd0a6495f3 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -686,14 +686,22 @@ noinline int btrfs_cow_block(struct btrfs_trans_handle *trans,
btrfs_err(fs_info,
"COW'ing blocks on a fs root that's being dropped");
- if (trans... |
f8d1b011ca8c9d64ce32da431a8420635a96958a | Analyze and fix the following issue in the Linux kernel code: btrfs: always print transaction aborted messages with an error level | Problem Details:
Commit b7af0635c87f ("btrfs: print transaction aborted messages with an
error level") changed the log level of transaction aborted messages from
a debug level to an error level, so that such messages are always visible
even on production systems where the log level is normally above the debug
level (an... | ```diff
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h
index 6b309f8a99a8..93869cda6af9 100644
--- a/fs/btrfs/transaction.h
+++ b/fs/btrfs/transaction.h
@@ -219,8 +219,8 @@ do { \
(errno))) { \
/* Stack trace printed. */ \
} else { \
- btrfs_debug((trans)->fs_info, \
- ... |
5f521494cc73520ffac18ede0758883b9aedd018 | Analyze and fix the following issue in the Linux kernel code: btrfs: reject unknown mount options early | Problem Details:
[BUG]
The following script would allow invalid mount options to be specified
(although such invalid options would just be ignored):
# mkfs.btrfs -f $dev
# mount $dev $mnt1 <<< Successful mount expected
# mount $dev $mnt2 -o junk <<< Failed mount expected
# echo $?
0
[CAUSE]
For the 2nd mou... | ```diff
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 1a093ec0f7e3..f49e597e197f 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -954,6 +954,10 @@ static int btrfs_parse_subvol_options(const char *options, char **subvol_name,
*subvol_objectid = subvolid;
break;
+ case Opt_err:
+ btrfs_err(... |
9147b9ded499d9853bdf0e9804b7eaa99c4429ed | Analyze and fix the following issue in the Linux kernel code: btrfs: fix some -Wmaybe-uninitialized warnings in ioctl.c | Problem Details:
Jens reported the following warnings from -Wmaybe-uninitialized recent
Linus' branch.
In file included from ./include/asm-generic/rwonce.h:26,
from ./arch/arm64/include/asm/rwonce.h:71,
from ./include/linux/compiler.h:246,
from ./include/linux/export.h:5,
from ./include/linux/lin... | ```diff
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index d27b0d86b8e2..bf35b6fce8f0 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2978,7 +2978,7 @@ static void get_block_group_info(struct list_head *groups_list,
static long btrfs_ioctl_space_info(struct btrfs_fs_info *fs_info,
void __user *arg... |
a1f157c7a3bb342b972c2830a0ad53f627000a04 | Analyze and fix the following issue in the Linux kernel code: tracing: Expand all ring buffers individually | Problem Details:
The ring buffer of global_trace is set to the minimum size in
order to save memory on boot up and then it will be expand when
some trace feature enabled.
However currently operations under an instance can also cause
global_trace ring buffer being expanded, and the expanded memory
would be wasted if gl... | ```diff
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index abaaf516fcae..dd6395692ff9 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -54,12 +54,6 @@
#include "trace.h"
#include "trace_output.h"
-/*
- * On boot up, the ring buffer is set to the minimum size, so that
- * we do not waste m... |
a0c55bba0d0d0b5591083f65f830940d8ae63f31 | Analyze and fix the following issue in the Linux kernel code: rswitch: Fix PHY station management clock setting | Problem Details:
Fix the MPIC.PSMCS value following the programming example in the
section 6.4.2 Management Data Clock (MDC) Setting, Ethernet MAC IP,
S4 Hardware User Manual Rev.1.00.
The value is calculated by
MPIC.PSMCS = clk[MHz] / (MDC frequency[MHz] * 2) - 1
with the input clock frequency from clk_get_rate()... | ```diff
diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c
index ea9186178091..fc01ad3f340d 100644
--- a/drivers/net/ethernet/renesas/rswitch.c
+++ b/drivers/net/ethernet/renesas/rswitch.c
@@ -4,6 +4,7 @@
* Copyright (C) 2022 Renesas Electronics Corporation
*/
+#include <... |
e78a40b851712b422d7d4ae345f25511d47a9a38 | Analyze and fix the following issue in the Linux kernel code: xfs: abort fstrim if kernel is suspending | Problem Details:
A recent ext4 patch posting from Jan Kara reminded me of a
discussion a year ago about fstrim in progress preventing kernels
from suspending. The fix is simple, we should do the same for XFS.
This removes the -ERESTARTSYS error return from this code, replacing
it with either the last error seen or the... | ```diff
diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c
index f16b254b5eaa..d5787991bb5b 100644
--- a/fs/xfs/xfs_discard.c
+++ b/fs/xfs/xfs_discard.c
@@ -283,6 +283,12 @@ out_del_cursor:
return error;
}
+static bool
+xfs_trim_should_stop(void)
+{
+ return fatal_signal_pending(current) || freezing(current)... |
89cfa899608fc28d018bdf9551a6ff508ea6207e | Analyze and fix the following issue in the Linux kernel code: xfs: reduce AGF hold times during fstrim operations | Problem Details:
fstrim will hold the AGF lock for as long as it takes to walk and
discard all the free space in the AG that meets the userspace trim
criteria. For AGs with lots of free space extents (e.g. millions)
or the underlying device is really slow at processing discard
requests (e.g. Ceph RBD), this means the A... | ```diff
diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c
index 3f45c7bb94f2..f16b254b5eaa 100644
--- a/fs/xfs/xfs_discard.c
+++ b/fs/xfs/xfs_discard.c
@@ -19,6 +19,56 @@
#include "xfs_log.h"
#include "xfs_ag.h"
+/*
+ * Notes on an efficient, low latency fstrim algorithm
+ *
+ * We need to walk the filesyste... |
4a7ce8334965bf175344f49bb933e45fa4db02f5 | Analyze and fix the following issue in the Linux kernel code: PCI/P2PDMA: Fix undefined behavior bug in struct pci_p2pdma_pagemap | Problem Details:
Struct dev_pagemap is a flexible structure, which means that it contains a
flexible-array member. If dev_pagemap.nr_range > 1, the memory following
the dev_pagemap could be overwritten.
This is currently not an issue because pci_p2pdma_pagemap is not exposed
outside p2pdma.c, and p2pdma.c only sets d... | ```diff
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
index fa7370f9561a..ab34d3d36a64 100644
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -28,9 +28,9 @@ struct pci_p2pdma {
};
struct pci_p2pdma_pagemap {
- struct dev_pagemap pgmap;
struct pci_dev *provider;
u64 bus_offset;
+ struct dev_p... |
92425d08a60814b4a2e91626f1e24e4fd5fd5c7e | Analyze and fix the following issue in the Linux kernel code: Documentation: dpll: Fix code blocks | Problem Details:
kernel test robot and Stephen Rothwell report htmldocs warnings:
Documentation/driver-api/dpll.rst:427: WARNING: Error in "code-block" directive:
maximum 1 argument(s) allowed, 18 supplied.
.. code-block:: c
<snipped>...
Documentation/driver-api/dpll.rst:444: WARNING: Error in "code-block" directive... | ```diff
diff --git a/Documentation/driver-api/dpll.rst b/Documentation/driver-api/dpll.rst
index bb52f1b8c0be..01eb4de86703 100644
--- a/Documentation/driver-api/dpll.rst
+++ b/Documentation/driver-api/dpll.rst
@@ -425,6 +425,7 @@ The simplest implementation is in the OCP TimeCard driver. The ops
structures are define... |
8ae292c66dcb160b3e1e16b66c3076d5a2c63873 | Analyze and fix the following issue in the Linux kernel code: x86/lib: Address kernel-doc warnings | Problem Details:
Fix all kernel-doc warnings in csum-wrappers_64.c:
arch/x86/lib/csum-wrappers_64.c:25: warning: Excess function parameter 'isum' description in 'csum_and_copy_from_user'
arch/x86/lib/csum-wrappers_64.c:25: warning: Excess function parameter 'errp' description in 'csum_and_copy_from_user'
arch/x8... | ```diff
diff --git a/arch/x86/lib/csum-wrappers_64.c b/arch/x86/lib/csum-wrappers_64.c
index 145f9a0bde29..f4df4d241526 100644
--- a/arch/x86/lib/csum-wrappers_64.c
+++ b/arch/x86/lib/csum-wrappers_64.c
@@ -14,8 +14,6 @@
* @src: source address (user space)
* @dst: destination address
* @len: number of bytes to be... |
90879f5dfcf6cf1d56f4d1b696a25c44e1f5ba14 | Analyze and fix the following issue in the Linux kernel code: x86/fpu/xstate: Address kernel-doc warning | Problem Details:
Fix kernel-doc warning:
arch/x86/kernel/fpu/xstate.c:1753: warning: Excess function parameter 'tsk' description in 'fpu_xstate_prctl'
Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org | ```diff
diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c
index cadf68737e6b..50d7bde5e202 100644
--- a/arch/x86/kernel/fpu/xstate.c
+++ b/arch/x86/kernel/fpu/xstate.c
@@ -1736,7 +1736,6 @@ EXPORT_SYMBOL_GPL(xstate_get_guest_group_perm);
/**
* fpu_xstate_prctl - xstate permission operations
... |
c4c8955b8acb4d88d2ca02a7dc6010e5f0c5288d | Analyze and fix the following issue in the Linux kernel code: drm/amd: Fix detection of _PR3 on the PCIe root port | Problem Details:
On some systems with Navi3x dGPU will attempt to use BACO for runtime
PM but fails to resume properly. This is because on these systems
the root port goes into D3cold which is incompatible with BACO.
This happens because in this case dGPU is connected to a bridge between
root port which causes BOCO d... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index e4627d92e1d0..bad2b5577e96 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2238,7 +2238,7 @@ static int amdgpu_device_ip_early_init(struct amdgp... |
ade134ddaee5baa1fa35cc66a12d2489213a26e0 | Analyze and fix the following issue in the Linux kernel code: drm/amd: Fix logic error in sienna_cichlid_update_pcie_parameters() | Problem Details:
While aligning SMU11 with SMU13 implementation an assumption was made that
`dpm_context->dpm_tables.pcie_table` was populated in dpm table initialization
like in SMU13 but it isn't.
So restore some of the original logic and instead just check for
amdgpu_device_pcie_dynamic_switching_supported() to dec... | ```diff
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
index 164c2264027d..1f05bfb7d473 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
@@ -2089,36 +2089,41 ... |
5b89d2ccc8466e0445a4994cb288fc009b565de5 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix writeback_info is not removed | Problem Details:
[WHY]
Counter j was not updated to present the num of writeback_info when
writeback pipes are removed.
[HOW]
update j (num of writeback info) under the correct condition.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <ale... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
index 76ed7a6fd92d..2bfe8d98507e 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -565,11 +565,12 @@ bool dc_stream_remove_writeback... |
8a307777c36e15f38c9f23778babcd368144c7d8 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix writeback_info never got updated | Problem Details:
[WHY]
wb_enabled field is set to false before it is used, and the following
code will never be executed.
[HOW]
Setting wb_enable to false after all removal work is completed.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher ... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
index 8b7f138bce0f..76ed7a6fd92d 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -558,18 +558,13 @@ bool dc_stream_remove_writeback... |
b44fe93281edaf7dab14cd8b09f3c6f5585b1fbf | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Address 'srf_updates' not described in 'could_mpcc_tree_change_for_active_pipes' | Problem Details:
Fixes the following:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3928: warning: Function parameter or member 'srf_updates' not described in 'could_mpcc_tree_change_for_active_pipes'
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Aurabindo Pillai... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index cb3cb2db90ee..72dffb7a49f9 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -3906,6 +3906,7 @@ static void commit_planes_for_stream(struct dc *dc,
*
*... |
618e77d77494bfd6273256d43eafe4368445c745 | Analyze and fix the following issue in the Linux kernel code: perf/x86/rapl: Fix "Using plain integer as NULL pointer" Sparse warning | Problem Details:
Change 0 to NULL when initializing the test field of perf_msr structs to
avoid the following sparse warnings:
make C=2 arch/x86/events/rapl.o
CHECK arch/x86/events/rapl.c
...
arch/x86/events/rapl.c:540:59: warning: Using plain integer as NULL pointer
arch/x86/events/rapl.c:542:59: warning... | ```diff
diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c
index 6d3e73848643..c2c37fb0a228 100644
--- a/arch/x86/events/rapl.c
+++ b/arch/x86/events/rapl.c
@@ -533,11 +533,11 @@ static struct perf_msr intel_rapl_spr_msrs[] = {
* - want to use same event codes across both architectures
*/
static struct p... |
26dd68d293fd1c5ac966fb5dd5f6d89de322a541 | Analyze and fix the following issue in the Linux kernel code: overflow: add DEFINE_FLEX() for on-stack allocs | Problem Details:
Add DEFINE_FLEX() macro for on-stack allocations of structs with
flexible array member.
Expose __struct_size() macro outside of fortify-string.h, as it could be
used to read size of structs allocated by DEFINE_FLEX().
Move __member_size() alongside it.
-Kees
Using underlying array for on-stack storag... | ```diff
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index c523c6683789..6f1ca49306d2 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -2,6 +2,15 @@
#ifndef __LINUX_COMPILER_TYPES_H
#define __LINUX_COMPILER_TYPES_H
+/*
+ * __has_builtin is supported... |
a83c68a3bf7c418c9a46693c63c638852b0c1f4e | Analyze and fix the following issue in the Linux kernel code: ACPI: FPDT: properly handle invalid FPDT subtables | Problem Details:
Buggy BIOSes may have invalid FPDT subtables, e.g. on my hardware:
S3PT subtable:
7F20FE30: 53 33 50 54 24 00 00 00-00 00 00 00 00 00 18 01 *S3PT$...........*
7F20FE40: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
7F20FE50: 00 00 00 00
Here the first record has zero length.
... | ```diff
diff --git a/drivers/acpi/acpi_fpdt.c b/drivers/acpi/acpi_fpdt.c
index a2056c4c8cb7..271092f2700a 100644
--- a/drivers/acpi/acpi_fpdt.c
+++ b/drivers/acpi/acpi_fpdt.c
@@ -194,12 +194,19 @@ static int fpdt_process_subtable(u64 address, u32 subtable_type)
record_header = (void *)subtable_header + offset;
of... |
6c766f7aacc0fa5b461ca3d8067c9065a6a53ef4 | Analyze and fix the following issue in the Linux kernel code: ACPI: utils: Fix up white space in a few places | Problem Details:
Fix up the following formatting issues flagged by checkpatch:
* Remove indentation before goto label
* Remove whitespace ahead of a comma in parameter list
Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki... | ```diff
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index c6f83c21bb2a..0fcb3cf89ad2 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -400,7 +400,7 @@ acpi_evaluate_reference(acpi_handle handle,
acpi_handle_debug(list->handles[i], "Found in reference list\n");
}
- end:
+end:
if... |
1dd72ce0c125110033e65051c9f8b2676e425cfd | Analyze and fix the following issue in the Linux kernel code: ACPI: thermal: Fix up function header formatting in two places | Problem Details:
Fix up the following formatting issues:
* braces following function declarations should be on a new line
* empty line should be present between function declarations
Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael... | ```diff
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 17bcf4185fef..c01ba4ad8009 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -1021,7 +1021,8 @@ static struct acpi_driver acpi_thermal_driver = {
.drv.pm = &acpi_thermal_pm,
};
-static int thermal_act(const struct dmi_syst... |
35a341c9b25da6a479bd8013bcb11a680a7233e3 | Analyze and fix the following issue in the Linux kernel code: ACPI: video: Add acpi_backlight=vendor quirk for Toshiba Portégé R100 | Problem Details:
Toshiba Portégé R100 has both acpi_video and toshiba_acpi vendor
backlight driver working. But none of them gets activated as it has
a VGA with no kernel driver (Trident CyberBlade XP4m32).
The DMI strings are very generic ("Portable PC") so add a custom
callback function to check for Trident CyberBla... | ```diff
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 67aa160c6b76..9fdcc620c652 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -130,6 +130,16 @@ static int video_detect_force_native(const struct dmi_system_id *d)
return 0;
}
+static int video_detect_po... |
a1da3b78c08357f67adecf3b2e2be7d13aaccca7 | Analyze and fix the following issue in the Linux kernel code: ACPI: OSL: Add empty lines after local variable declarations | Problem Details:
Fix up four places where there is no empty line after declarations of
local variables in a function (as per the kernel coding style).
Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ```diff
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 838677010ceb..e154ad0be263 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1067,6 +1067,7 @@ acpi_status acpi_os_execute(acpi_execute_type type,
struct acpi_os_dpc *dpc;
struct workqueue_struct *queue;
int ret;
+
ACPI_DEBUG_PRINT((A... |
9d4e27dd88275a8e2a14521b63792f33edca5758 | Analyze and fix the following issue in the Linux kernel code: ACPI: OSL: Remove redundant parentheses in return statements | Problem Details:
Fix up three return statements including redundant perens around the
return value.
Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ```diff
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 1ccc9a8d258d..838677010ceb 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1578,7 +1578,7 @@ acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t **cache)
acpi_status acpi_os_purge_cache(acpi_cache_t *cache)
{
kmem_cache_s... |
92002fb39e8e4a199231c1c842b07dbbd806ba75 | Analyze and fix the following issue in the Linux kernel code: ACPI: OSL: Fix up white space in parameter lists | Problem Details:
Fix up declarations of pointer arguments where a space is present
before the argument name, which does not agree with the kernel coding
style.
Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ```diff
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 357f1325485d..1ccc9a8d258d 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -493,7 +493,7 @@ EXPORT_SYMBOL(acpi_os_unmap_generic_address);
#ifdef ACPI_FUTURE_USAGE
acpi_status
-acpi_os_get_physical_address(void *virt, acpi_physical_addres... |
f9af5ad0f5b599fadf6fc7c9c2153d7919c7691e | Analyze and fix the following issue in the Linux kernel code: vfio/cdx: Add parentheses between bitwise AND expression and logical NOT | Problem Details:
When building with clang, there is a warning (or error with
CONFIG_WERROR=y) due to a bitwise AND and logical NOT in
vfio_cdx_bm_ctrl():
drivers/vfio/cdx/main.c:77:6: error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses]
77 | ... | ```diff
diff --git a/drivers/vfio/cdx/main.c b/drivers/vfio/cdx/main.c
index a437630be354..a63744302b5e 100644
--- a/drivers/vfio/cdx/main.c
+++ b/drivers/vfio/cdx/main.c
@@ -74,7 +74,7 @@ static int vfio_cdx_bm_ctrl(struct vfio_device *core_vdev, u32 flags,
struct vfio_device_feature_bus_master ops;
int ret;
- i... |
f4384b3e54ea813868bb81a861bf5b2406e15d8f | Analyze and fix the following issue in the Linux kernel code: tee: amdtee: fix use-after-free vulnerability in amdtee_close_session | Problem Details:
There is a potential race condition in amdtee_close_session that may
cause use-after-free in amdtee_open_session. For instance, if a session
has refcount == 1, and one thread tries to free this session via:
kref_put(&sess->refcount, destroy_session);
the reference count will get decremented, and ... | ```diff
diff --git a/drivers/tee/amdtee/core.c b/drivers/tee/amdtee/core.c
index 372d64756ed6..3c15f6a9e91c 100644
--- a/drivers/tee/amdtee/core.c
+++ b/drivers/tee/amdtee/core.c
@@ -217,12 +217,12 @@ unlock:
return rc;
}
+/* mutex must be held by caller */
static void destroy_session(struct kref *ref)
{
struc... |
5827e17d0555b566c32044b0632b46f9f95054fa | Analyze and fix the following issue in the Linux kernel code: PCI: vmd: Correct PCI Header Type Register's multi-function check | Problem Details:
vmd_domain_reset() attempts to find whether the device may contain multiple
functions by checking 0x80 (Multi-Function Device), however, the hdr_type
variable has already been masked with PCI_HEADER_TYPE_MASK so the check can
never true.
To fix the issue, don't mask the read with PCI_HEADER_TYPE_MASK.... | ```diff
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index ad56df98b8e6..1c1c1aa940a5 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -525,8 +525,7 @@ static void vmd_domain_reset(struct vmd_dev *vmd)
base = vmd->cfgbar + PCIE_ECAM_OFFSET(bus,
PCI_D... |
6b8ace7a14e7926b7b914ccd96a8ac657c0d518c | Analyze and fix the following issue in the Linux kernel code: drm/i915: Invalidate the TLBs on each GT | Problem Details:
With multi-GT devices, the object may have been bound on each GT and so
we need to invalidate the TLBs across all GT before releasing the pages
back to the system.
Fixes: d6c531ab4820 ("drm/i915: Invalidate the TLBs on each GT")
Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Jon... | ```diff
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
index 6b6d22c19411..0ba955611dfb 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
@@ -198,7 +198,7 @@ static void flush_tlb_invalidate(struct drm_i915_gem_obje... |
223ef474316466e9f61f6e0064f3a6fe4923a2c5 | Analyze and fix the following issue in the Linux kernel code: io_uring: don't allow IORING_SETUP_NO_MMAP rings on highmem pages | Problem Details:
On at least arm32, but presumably any arch with highmem, if the
application passes in memory that resides in highmem for the rings,
then we should fail that ring creation. We fail it with -EINVAL, which
is what kernels that don't support IORING_SETUP_NO_MMAP will do as well.
Cc: stable@vger.kernel.org... | ```diff
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 783ed0fff71b..d839a80a6751 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -2686,7 +2686,7 @@ static void *__io_uaddr_map(struct page ***pages, unsigned short *npages,
{
struct page **page_array;
unsigned int nr_pages;
- int ret;
+ ... |
2fd7b0f6d5ad655b1d947d3acdd82f687c31465e | Analyze and fix the following issue in the Linux kernel code: md/raid5: release batch_last before waiting for another stripe_head | Problem Details:
When raid5_get_active_stripe is called with a ctx containing a stripe_head in
its batch_last pointer, it can cause a deadlock if the task sleeps waiting on
another stripe_head to become available. The stripe_head held by batch_last
can be blocking the advancement of other stripe_heads, leading to no
st... | ```diff
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 4cb9c608ee19..284cd71bcc68 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -854,6 +854,13 @@ struct stripe_head *raid5_get_active_stripe(struct r5conf *conf,
set_bit(R5_INACTIVE_BLOCKED, &conf->cache_state);
r5l_wake_reclaim(conf->lo... |
92224e806f7c8e133b2249408958ca988cf7413f | Analyze and fix the following issue in the Linux kernel code: docs: admin-guide: sysctl: fix details of struct dentry_stat_t | Problem Details:
Commit c8c0c239d5ab moved struct dentry_stat_t to fs/dcache.c but
did not update its location in Documentation, so update that now.
Also change each struct member from int to long as done in
commit 3942c07ccf98.
Fixes: c8c0c239d5ab ("fs: move dcache sysctls to its own file")
Fixes: 3942c07ccf98 ("fs: ... | ```diff
diff --git a/Documentation/admin-guide/sysctl/fs.rst b/Documentation/admin-guide/sysctl/fs.rst
index a321b84eccaa..47499a1742bd 100644
--- a/Documentation/admin-guide/sysctl/fs.rst
+++ b/Documentation/admin-guide/sysctl/fs.rst
@@ -42,16 +42,16 @@ pre-allocation or re-sizing of any kernel data structures.
dentr... |
0abd1557e21c617bd13fc18f7725fc6363c05913 | Analyze and fix the following issue in the Linux kernel code: gfs2: fix an oops in gfs2_permission | Problem Details:
In RCU mode, we might race with gfs2_evict_inode(), which zeroes
->i_gl. Freeing of the object it points to is RCU-delayed, so
if we manage to fetch the pointer before it's been replaced with
NULL, we are fine. Check if we'd fetched NULL and treat that
as "bail out and tell the caller to get out of R... | ```diff
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 2880d6ca19e1..697f95047033 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -1868,14 +1868,21 @@ int gfs2_permission(struct mnt_idmap *idmap, struct inode *inode,
{
struct gfs2_inode *ip;
struct gfs2_holder i_gh;
+ struct gfs2_glock *gl;
int error... |
dfc7f7a988dad34c3bf4c053124fb26aa6c5f916 | Analyze and fix the following issue in the Linux kernel code: net: nfc: llcp: Add lock when modifying device list | Problem Details:
The device list needs its associated lock held when modifying it, or the
list could become corrupted, as syzbot discovered.
Reported-and-tested-by: syzbot+c1d0a03d305972dbbe14@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=c1d0a03d305972dbbe14
Signed-off-by: Jeremy Cline <je... | ```diff
diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c
index f60e424e0607..6705bb895e23 100644
--- a/net/nfc/llcp_core.c
+++ b/net/nfc/llcp_core.c
@@ -1636,7 +1636,9 @@ int nfc_llcp_register_device(struct nfc_dev *ndev)
timer_setup(&local->sdreq_timer, nfc_llcp_sdreq_timer, 0);
INIT_WORK(&local->sdreq_timeo... |
8957261cd8149ed9d0738c01c0320bcbff989407 | Analyze and fix the following issue in the Linux kernel code: ethtool: plca: fix plca enable data type while parsing the value | Problem Details:
The ETHTOOL_A_PLCA_ENABLED data type is u8. But while parsing the
value from the attribute, nla_get_u32() is used in the plca_update_sint()
function instead of nla_get_u8(). So plca_cfg.enabled variable is updated
with some garbage value instead of 0 or 1 and always enables plca even
though plca is dis... | ```diff
diff --git a/net/ethtool/plca.c b/net/ethtool/plca.c
index b238a1afe9ae..b1e2e3b5027f 100644
--- a/net/ethtool/plca.c
+++ b/net/ethtool/plca.c
@@ -21,16 +21,6 @@ struct plca_reply_data {
#define PLCA_REPDATA(__reply_base) \
container_of(__reply_base, struct plca_reply_data, base)
-static void plca_update_s... |
788f63c4dc1780c84deb5fe820f6446c28364a0d | Analyze and fix the following issue in the Linux kernel code: net: microchip: sparx5: clean up error checking in vcap_show_admin() | Problem Details:
The vcap_decode_rule() never returns NULL. There is no need to check
for that. This code assumes that if it did return NULL we should
end abruptly and return success. It is confusing. Fix the check to
just be if (IS_ERR()) instead of if (IS_ERR_OR_NULL()).
Reported-by: kernel test robot <lkp@intel... | ```diff
diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c b/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c
index c2c3397c5898..59bfbda29bb3 100644
--- a/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c
+++ b/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c
@@ -300,7 +300,7 @@ stati... |
1658633c04653578429ff5dfc62fdc159203a8f2 | Analyze and fix the following issue in the Linux kernel code: io_uring: ensure io_lockdep_assert_cq_locked() handles disabled rings | Problem Details:
io_lockdep_assert_cq_locked() checks that locking is correctly done when
a CQE is posted. If the ring is setup in a disabled state with
IORING_SETUP_R_DISABLED, then ctx->submitter_task isn't assigned until
the ring is later enabled. We generally don't post CQEs in this state,
as no SQEs can be submitt... | ```diff
diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h
index 547c30582fb8..0bc145614a6e 100644
--- a/io_uring/io_uring.h
+++ b/io_uring/io_uring.h
@@ -86,20 +86,33 @@ bool __io_alloc_req_refill(struct io_ring_ctx *ctx);
bool io_match_task_safe(struct io_kiocb *head, struct task_struct *task,
bool cancel_al... |
f8024f1f36a30a082b0457d5779c8847cea57f57 | Analyze and fix the following issue in the Linux kernel code: io_uring/kbuf: don't allow registered buffer rings on highmem pages | Problem Details:
syzbot reports that registering a mapped buffer ring on arm32 can
trigger an OOPS. Registered buffer rings have two modes, one of them
is the application passing in the memory that the buffer ring should
reside in. Once those pages are mapped, we use page_address() to get
a virtual address. This will o... | ```diff
diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c
index 556f4df25b0f..9123138aa9f4 100644
--- a/io_uring/kbuf.c
+++ b/io_uring/kbuf.c
@@ -477,7 +477,7 @@ static int io_pin_pbuf_ring(struct io_uring_buf_reg *reg,
{
struct io_uring_buf_ring *br;
struct page **pages;
- int nr_pages;
+ int i, nr_pages;
pages ... |
046ece773cc77ef5d2a1431b188ac3d0840ed150 | Analyze and fix the following issue in the Linux kernel code: ACPI: property: Allow _DSD buffer data only for byte accessors | Problem Details:
In accordance with ACPI specificication and _DSD data buffer
representation the data there is an array of bytes. Hence,
accessing it with something longer will create a sparse data
which is against of how device property APIs work in general
and also not defined in the ACPI specification (see [1]).
Fix... | ```diff
diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
index 413e4fcadcaf..99b4e3355435 100644
--- a/drivers/acpi/property.c
+++ b/drivers/acpi/property.c
@@ -1102,25 +1102,26 @@ static int acpi_data_prop_read(const struct acpi_device_data *data,
switch (proptype) {
case DEV_PROP_STRING:
break;
-... |
560706eff7c8e5621b0d63afe0866e0e1906e87e | Analyze and fix the following issue in the Linux kernel code: serial: 8250_omap: Fix errors with no_console_suspend | Problem Details:
We now get errors on system suspend if no_console_suspend is set as
reported by Thomas. The errors started with commit 20a41a62618d ("serial:
8250_omap: Use force_suspend and resume for system suspend").
Let's fix the issue by checking for console_suspend_enabled in the system
suspend and resume path.... | ```diff
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 26dd089d8e82..ca972fd37725 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -1617,7 +1617,7 @@ static int omap8250_suspend(struct device *dev)
{
struct omap8250_priv *priv... |
8679328eb859d06a1984ab48d90ac35d11bbcaf1 | Analyze and fix the following issue in the Linux kernel code: serial: Reduce spinlocked portion of uart_rs485_config() | Problem Details:
Commit 44b27aec9d96 ("serial: core, 8250: set RS485 termination GPIO in
serial core") enabled support for RS485 termination GPIOs behind i2c
expanders by setting the GPIO outside of the critical section protected
by the port spinlock. Access to the i2c expander may sleep, which
caused a splat with the... | ```diff
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 7bdc21d5e13b..ca26a8aef2cb 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -1404,12 +1404,18 @@ static void uart_set_rs485_termination(struct uart_port *port,
static int uart_rs485_con... |
6905ab83b7b429bfe856536982ae00c1f594ba1f | Analyze and fix the following issue in the Linux kernel code: serial: amba-pl011: Do not complain when DMA is absent | Problem Details:
Many SoCs do not integrate DMA for the amba pl011 UART, causing
the following message on boot:
uart-pl011 80074000.serial: no DMA platform data
The UART still works in PIO, so better not to print such message that
may confuse people by causing them to think that there is something wrong
with the UART... | ```diff
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 41eabad4c94b..61cc24cd90e4 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -421,7 +421,7 @@ static void pl011_dma_probe(struct uart_amba_port *uap)
/* We need platform data */
if (!... |
bb5ab77e8543f5c3601635bc2fc40b794add7143 | Analyze and fix the following issue in the Linux kernel code: serial: imx: Put DMA enabled UART in separate lock subclass | Problem Details:
Lockdep complains about possible circular locking dependencies when the
i.MX SDMA driver issues console messages under its spinlock. While the
SDMA driver calls back into the UART when issuing a message, the i.MX
UART driver will never call back into the SDMA driver for this UART,
because DMA is explic... | ```diff
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index fce8e4b01460..708b9852a575 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1451,8 +1451,10 @@ static int imx_uart_startup(struct uart_port *port)
imx_uart_writel(sport, ucr4 & ~UCR4_DREN, UCR4);
/* Can we enabl... |
95e8e7eebab58ec8f6c978242a6d143ba238a69e | Analyze and fix the following issue in the Linux kernel code: vt: Replace strlcpy with strscpy | Problem Details:
strlcpy() reads the entire source buffer first and returns the size of
the source string, not the destination string, which can be accidentally
misused [1].
The copy_to_user() call uses @len returned from strlcpy() directly
without checking its value. This could potentially lead to read
overflow. Ther... | ```diff
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index 358f216c6cd6..6e8eeffbdae4 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -2079,12 +2079,15 @@ int vt_do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
return -ENOMEM;
spin_lock_irqsa... |
29bff582b74ed0bdb7e6986482ad9e6799ea4d2f | Analyze and fix the following issue in the Linux kernel code: serial: core: fix kernel-doc for uart_port_unlock_irqrestore() | Problem Details:
Fix the function name to avoid a kernel-doc warning:
include/linux/serial_core.h:666: warning: expecting prototype for uart_port_lock_irqrestore(). Prototype was for uart_port_unlock_irqrestore() instead
Fixes: b0af4bcb4946 ("serial: core: Provide port lock wrappers")
Signed-off-by: Randy Dunlap <rdu... | ```diff
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 3091c62ec37b..89f7b6c63598 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -658,7 +658,7 @@ static inline void uart_port_unlock_irq(struct uart_port *up)
}
/**
- * uart_port_lock_irqrestore - Unlock th... |
c5c8a6e93ef6effe00c7022587ddea6a5d8fc1eb | Analyze and fix the following issue in the Linux kernel code: dt-bindings: serial: mxs: Fix compatible list | Problem Details:
imx23 and imx28 are SoCs from the same family (mxs) and they share the
same AUART block, so the same programming model.
imx23 is the first member of this family. It had an AUART DMA erratum.
imx28 is the second member of this family and has this erratum fixed.
imx28.dtsi uses the following descriptio... | ```diff
diff --git a/Documentation/devicetree/bindings/serial/fsl-mxs-auart.yaml b/Documentation/devicetree/bindings/serial/fsl-mxs-auart.yaml
index 6a400a5e6fc7..da032effffe6 100644
--- a/Documentation/devicetree/bindings/serial/fsl-mxs-auart.yaml
+++ b/Documentation/devicetree/bindings/serial/fsl-mxs-auart.yaml
@@ -1... |
71067fb797e074c468221793fe93ba1b58350f1e | Analyze and fix the following issue in the Linux kernel code: tty: fix kernel-doc for functions in tty.h | Problem Details:
tty_kref_get() is already included in Documentation, but is not properly
formatted. Fix this.
tty_get_baud_rate() is neither properly formatted, nor is included. Fix
both.
Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230919085156.1578-10-jirislaby@kernel... | ```diff
diff --git a/Documentation/driver-api/tty/tty_ioctl.rst b/Documentation/driver-api/tty/tty_ioctl.rst
index 9b0be79fc15e..3ff1ac5e07f1 100644
--- a/Documentation/driver-api/tty/tty_ioctl.rst
+++ b/Documentation/driver-api/tty/tty_ioctl.rst
@@ -5,3 +5,6 @@ TTY IOCTL Helpers
=================
.. kernel-doc:: d... |
3b1a696bb96882d4f85c7cca07383d94cb7c2de3 | Analyze and fix the following issue in the Linux kernel code: tty: fix up and plug in tty_ioctl kernel-doc | Problem Details:
The ioctl helpers are well documented, except they are not plugged in
the Documentation. So fix up the minor issues in the kernel-doc and plug
it in.
The minor issues include:
* bad \t on every line (sphinx misinterprets the description otherwise)
* missing colon after Return
* superfluous \n after th... | ```diff
diff --git a/Documentation/driver-api/tty/index.rst b/Documentation/driver-api/tty/index.rst
index 2d32606a4278..b490da11f257 100644
--- a/Documentation/driver-api/tty/index.rst
+++ b/Documentation/driver-api/tty/index.rst
@@ -36,6 +36,7 @@ In-detail description of the named TTY structures is in separate docume... |
5b4f9cf3cc339565be1ecd64d608b6ffdfba7c1e | Analyze and fix the following issue in the Linux kernel code: tty: invert return values of tty_{,un}throttle_safe() | Problem Details:
If tty_{,un}throttle_safe() returned true on success (similar to
*_trylock()), it would make the conditions in callers more obvious. So
perform the switch to these inverted values (and fix the callers).
Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/202309190... | ```diff
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index b34e6612aef6..f252d0b5a434 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -253,7 +253,7 @@ static void n_tty_check_throttle(struct tty_struct *tty)
tty_set_flow_change(tty, TTY_THROTTLE_SAFE);
if (N_TTY_BUF_SIZE - read_cnt(ldata) ... |
3391ee7f9ea508c375d443cd712c2e699be235b4 | Analyze and fix the following issue in the Linux kernel code: wifi: rtlwifi: fix EDCA limit set by BT coexistence | Problem Details:
In 'rtl92c_dm_check_edca_turbo()', 'rtl88e_dm_check_edca_turbo()',
and 'rtl8723e_dm_check_edca_turbo()', the DL limit should be set
from the corresponding field of 'rtlpriv->btcoexist' rather than
UL. Compile tested only.
Fixes: 0529c6b81761 ("rtlwifi: rtl8723ae: Update driver to match 06/28/14 Realte... | ```diff
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c
index 6f61d6a10627..5a34894a533b 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c
@@ -799,7 +799,7 @@ static void rtl88... |
2ecfe6f07e8e6257cad3d3290c5aec2102120041 | Analyze and fix the following issue in the Linux kernel code: wifi: rt2x00: fix MT7620 low RSSI issue | Problem Details:
On Mediatek vendor driver[1], MT7620 (RT6352) uses different RSSI
base value '-2' compared to the other RT2x00 chips. This patch
introduces the SoC specific base value to fix the low RSSI value
reports on MT7620.
[1] Found on MT76x2E_MT7620_LinuxAP_V3.0.4.0_P3 ConvertToRssi().
Signed-off-by: Shiji Ya... | ```diff
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
index fe11fa4917ac..6d6ca0d7bdca 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -856,6 +856,7 @@ static int rt2800_agc_to_rssi(struct ... |
fc158f91360da3549b3772c686fe2d04a49ebb14 | Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: refine bandwidth 160MHz uplink OFDMA performance | Problem Details:
This improves 160MHz performance degradation with certain APs.
Some ICs transmit preamble that are hard to decode by others, continuous
retries then yield low throughput. Fix it with pre-calculated antenna
matrices.
Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@... | ```diff
diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index def5db880442..cca18d7ea1dd 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -1689,8 +1689,8 @@ static void rtw89_stats_trigger_frame(struct rtw89_dev ... |
650cad561cce04b62a8c8e0446b685ef171bc3bb | Analyze and fix the following issue in the Linux kernel code: sched/eevdf: Fix avg_vruntime() | Problem Details:
The expectation is that placing a task at avg_vruntime() makes it
eligible. Turns out there is a corner case where this is not the case.
Specifically, avg_vruntime() relies on the fact that integer division
is a flooring function (eg. it discards the remainder). By this
property the value returned is ... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 7d73652acbb2..ef7490c4b8b4 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -664,6 +664,10 @@ void avg_vruntime_update(struct cfs_rq *cfs_rq, s64 delta)
cfs_rq->avg_vruntime -= cfs_rq->avg_load * delta;
}
+/*
+ * Specifically: avg_ru... |
2f2fc17bab0011430ceb6f2dc1959e7d1f981444 | Analyze and fix the following issue in the Linux kernel code: sched/eevdf: Also update slice on placement | Problem Details:
Tasks that never consume their full slice would not update their slice value.
This means that tasks that are spawned before the sysctl scaling keep their
original (UP) slice length.
Fixes: 147f3efaa241 ("sched/fair: Implement an EEVDF-like scheduling policy")
Signed-off-by: Peter Zijlstra (Intel) <pet... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index cb225921bbca..7d73652acbb2 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4919,10 +4919,12 @@ static inline void update_misfit_status(struct task_struct *p, struct rq *rq) {}
static void
place_entity(struct cfs_rq *cfs_rq, struct sch... |
2a565258b3f4bbdc7a3c09cd02082cb286a7bffc | Analyze and fix the following issue in the Linux kernel code: x86/amd_nb: Use Family 19h Models 60h-7Fh Function 4 IDs | Problem Details:
Three PCI IDs for DF Function 4 were defined but not used.
Add them to the "link" list.
Fixes: f8faf3496633 ("x86/amd_nb: Add AMD PCI IDs for SMN communication")
Fixes: 23a5b8bb022c ("x86/amd_nb: Add PCI ID for family 19h model 78h")
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by:... | ```diff
diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c
index 10c2a3c9114e..43238ac2e845 100644
--- a/arch/x86/kernel/amd_nb.c
+++ b/arch/x86/kernel/amd_nb.c
@@ -116,6 +116,9 @@ static const struct pci_device_id amd_nb_link_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F4) }... |
eea03d18af9c44235865a4bc9bec4d780ef6cf21 | Analyze and fix the following issue in the Linux kernel code: qed/red_ll2: Fix undefined behavior bug in struct qed_ll2_info | Problem Details:
The flexible structure (a structure that contains a flexible-array member
at the end) `qed_ll2_tx_packet` is nested within the second layer of
`struct qed_ll2_info`:
struct qed_ll2_tx_packet {
...
/* Flexible Array of bds_set determined by max_bds_per_packet */
struct {
... | ```diff
diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.h b/drivers/net/ethernet/qlogic/qed/qed_ll2.h
index 0bfc375161ed..a174c6fc626a 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_ll2.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.h
@@ -110,9 +110,9 @@ struct qed_ll2_info {
enum core_tx_dest tx_dest;
u8 t... |
001470fed5959d01faecbd57fcf2f60294da0de1 | Analyze and fix the following issue in the Linux kernel code: x86/boot: Fix incorrect startup_gdt_descr.size | Problem Details:
Since the size value is added to the base address to yield the last valid
byte address of the GDT, the current size value of startup_gdt_descr is
incorrect (too large by one), fix it.
[ mingo: This probably never mattered, because startup_gdt[] is only used
in a very controlled fashion - but ... | ```diff
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 49f7629b17f7..bbc21798df10 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -80,7 +80,7 @@ static struct desc_struct startup_gdt[GDT_ENTRIES] = {
* while the kernel still uses a direct mapping.
*/
static struct de... |
e9c65989920f7c28775ec4e0c11b483910fb67b8 | Analyze and fix the following issue in the Linux kernel code: net: usb: smsc75xx: Fix uninit-value access in __smsc75xx_read_reg | Problem Details:
syzbot reported the following uninit-value access issue:
=====================================================
BUG: KMSAN: uninit-value in smsc75xx_wait_ready drivers/net/usb/smsc75xx.c:975 [inline]
BUG: KMSAN: uninit-value in smsc75xx_bind+0x5c9/0x11e0 drivers/net/usb/smsc75xx.c:1482
CPU: 0 PID: 8696... | ```diff
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c
index 5d6454fedb3f..78ad2da3ee29 100644
--- a/drivers/net/usb/smsc75xx.c
+++ b/drivers/net/usb/smsc75xx.c
@@ -90,7 +90,9 @@ static int __must_check __smsc75xx_read_reg(struct usbnet *dev, u32 index,
ret = fn(dev, USB_VENDOR_REQUEST_READ_REGI... |
8788c6c2feb3600ba1a2f84ac5d258af4a284cea | Analyze and fix the following issue in the Linux kernel code: locking/debug: Fix debugfs API return value checks to use IS_ERR() | Problem Details:
Update the checking of return values from debugfs_create_file()
and debugfs_create_dir() to use IS_ERR().
Signed-off-by: Atul Kumar Pant <atulpant.linux@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Waiman Long <longman@redhat.com>
Link: https://lore.kernel.org/r/20230807121834.74... | ```diff
diff --git a/kernel/locking/lock_events.c b/kernel/locking/lock_events.c
index fa2c2f951c6b..e68d82099558 100644
--- a/kernel/locking/lock_events.c
+++ b/kernel/locking/lock_events.c
@@ -146,7 +146,7 @@ static int __init init_lockevent_counts(void)
struct dentry *d_counts = debugfs_create_dir(LOCK_EVENTS_DIR,... |
6532e257aa73645e28dee5b2232cc3c88be62083 | Analyze and fix the following issue in the Linux kernel code: tcp_metrics: optimize tcp_metrics_flush_all() | Problem Details:
This is inspired by several syzbot reports where
tcp_metrics_flush_all() was seen in the traces.
We can avoid acquiring tcp_metrics_lock for empty buckets,
and we should add one cond_resched() to break potential long loops.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <d... | ```diff
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index 7aca12c59c18..c2a925538542 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -898,11 +898,13 @@ static void tcp_metrics_flush_all(struct net *net)
unsigned int row;
for (row = 0; row < max_rows; row++, hb++) {
- struct t... |
a135798e6e200ecb2f864cecca6d257ba278370c | Analyze and fix the following issue in the Linux kernel code: tcp_metrics: do not create an entry from tcp_init_metrics() | Problem Details:
tcp_init_metrics() only wants to get metrics if they were
previously stored in the cache. Creating an entry is adding
useless costs, especially when tcp_no_metrics_save is set.
Fixes: 51c5d0c4b169 ("tcp: Maintain dynamic metrics in local cache.")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Revie... | ```diff
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index 0c03f564878f..7aca12c59c18 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -478,7 +478,7 @@ void tcp_init_metrics(struct sock *sk)
goto reset;
rcu_read_lock();
- tm = tcp_get_metrics(sk, dst, true);
+ tm = tcp_get_metr... |
081480014a64a69d901f8ef1ffdd56d6085cf87e | Analyze and fix the following issue in the Linux kernel code: tcp_metrics: properly set tp->snd_ssthresh in tcp_init_metrics() | Problem Details:
We need to set tp->snd_ssthresh to TCP_INFINITE_SSTHRESH
in the case tcp_get_metrics() fails for some reason.
Fixes: 9ad7c049f0f7 ("tcp: RFC2988bis + taking RTT sample from 3WHS for the passive open side")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
... | ```diff
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index 4bfa2fb27de5..0c03f564878f 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -470,6 +470,10 @@ void tcp_init_metrics(struct sock *sk)
u32 val, crtt = 0; /* cached RTT scaled by 8 */
sk_dst_confirm(sk);
+ /* ssthresh may h... |
cbc3a153222805d65f821e10f4f78b6afce06f86 | Analyze and fix the following issue in the Linux kernel code: tcp_metrics: add missing barriers on delete | Problem Details:
When removing an item from RCU protected list, we must prevent
store-tearing, using rcu_assign_pointer() or WRITE_ONCE().
Fixes: 04f721c671656 ("tcp_metrics: Rewrite tcp_metrics_flush_all")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Acked-by: Neal C... | ```diff
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index c196759f1d3b..4bfa2fb27de5 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -908,7 +908,7 @@ static void tcp_metrics_flush_all(struct net *net)
match = net ? net_eq(tm_net(tm), net) :
!refcount_read(&tm_net(tm)->ns.co... |
9593c7cb6cf670ef724d17f7f9affd7a8d2ad0c5 | Analyze and fix the following issue in the Linux kernel code: ipv6: tcp: add a missing nf_reset_ct() in 3WHS handling | Problem Details:
Commit b0e214d21203 ("netfilter: keep conntrack reference until
IPsecv6 policy checks are done") is a direct copy of the old
commit b59c270104f0 ("[NETFILTER]: Keep conntrack reference until
IPsec policy checks are done") but for IPv6. However, it also
copies a bug that this old commit had. That is: ... | ```diff
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 3a88545a265d..44b6949d72b2 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1640,9 +1640,12 @@ process:
struct sock *nsk;
sk = req->rsk_listener;
- drop_reason = tcp_inbound_md5_hash(sk, skb,
- &hdr->saddr, &hdr->daddr,
... |
2b562f032fc2594fb3fac22b7a2eb3c1969a7ba3 | Analyze and fix the following issue in the Linux kernel code: drm/i915: Register engines early to avoid type confusion | Problem Details:
Commit 1ec23ed7126e ("drm/i915: Use uabi engines for the default engine
map") switched from using for_each_engine() to for_each_uabi_engine() to
iterate over the user engines. While this seems to be a sensible change,
it's only safe to do when the engines are actually chained using the
rb-tree structur... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 1f65bb33dd21..a8551ce322de 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1199,6 +1199,13 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
goto err_unlock;
}
+ /*
+ * Regi... |
3e32552652917f10c0aa8ac75cdc8f0b8d257dec | Analyze and fix the following issue in the Linux kernel code: x86/boot: Move x86_cache_alignment initialization to correct spot | Problem Details:
c->x86_cache_alignment is initialized from c->x86_clflush_size.
However, commit fbf6449f84bf moved c->x86_clflush_size initialization
to later in boot without moving the c->x86_cache_alignment assignment:
fbf6449f84bf ("x86/sev-es: Set x86_virt_bits to the correct value straight away, instead of a t... | ```diff
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 8d7063e4f63c..9c51ad5bbf31 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1141,6 +1141,7 @@ void get_cpu_address_sizes(struct cpuinfo_x86 *c)
}
}
c->x86_cache_bits = c->x86_phys_bits;
+ c->x86... |
4b2b606075e50cdae62ab2356b0a1e206947c354 | Analyze and fix the following issue in the Linux kernel code: ipv4/fib: send notify when delete source address routes | Problem Details:
After deleting an interface address in fib_del_ifaddr(), the function
scans the fib_info list for stray entries and calls fib_flush() and
fib_table_flush(). Then the stray entries will be deleted silently and no
RTM_DELROUTE notification will be sent.
This lack of notification can make routing daemons... | ```diff
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index f0c13864180e..15de07d36540 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -154,6 +154,7 @@ struct fib_info {
int fib_nhs;
bool fib_nh_is_v6;
bool nh_updated;
+ bool pfsrc_removed;
struct nexthop *nh;
struct rcu_he... |
c7242a45cb8cad5b6cd840fd4661315b45b1e841 | Analyze and fix the following issue in the Linux kernel code: ovl: fix NULL pointer defer when encoding non-decodable lower fid | Problem Details:
A wrong return value from ovl_check_encode_origin() would cause
ovl_dentry_to_fid() to try to encode fid from NULL upper dentry.
Reported-by: syzbot+2208f82282740c1c8915@syzkaller.appspotmail.com
Fixes: 16aac5ad1fa9 ("ovl: support encoding non-decodable file handles")
Signed-off-by: Amir Goldstein <am... | ```diff
diff --git a/fs/overlayfs/export.c b/fs/overlayfs/export.c
index c8c8588bd98c..26b782c53910 100644
--- a/fs/overlayfs/export.c
+++ b/fs/overlayfs/export.c
@@ -188,7 +188,7 @@ static int ovl_check_encode_origin(struct dentry *dentry)
/* Lower file handle for non-upper non-decodable */
if (!ovl_dentry_upper... |
affccb16c117d188eb09495cbdea149cecbf00b9 | Analyze and fix the following issue in the Linux kernel code: ata: ahci: print the lpm policy on boot | Problem Details:
The target LPM policy can be set using either a Kconfig or a kernel module
parameter.
However, if the board type is set to anything but board_ahci_low_power,
then the LPM policy will overridden and set to ATA_LPM_UNKNOWN.
Additionally, if the default suspend is suspend to idle, depending on the
hardw... | ```diff
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index f1263364fa97..1a63200ea437 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -2730,7 +2730,7 @@ static int ahci_host_activate_multi_irqs(struct ata_host *host,
if (rc)
return rc;
- ata_port_desc(host->ports[i], "irq %d", ... |
160f404495aa9282cac99b518d1b379e31ef1bdd | Analyze and fix the following issue in the Linux kernel code: handshake: Fix sign of key_serial_t fields | Problem Details:
key_serial_t fields are signed integers. Use nla_get/put_s32 for
those to avoid implicit signed conversion in the netlink protocol.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/169530167716.8905.645746457741372879.stgi... | ```diff
diff --git a/Documentation/netlink/specs/handshake.yaml b/Documentation/netlink/specs/handshake.yaml
index a49b46b80e16..b934cc513e3d 100644
--- a/Documentation/netlink/specs/handshake.yaml
+++ b/Documentation/netlink/specs/handshake.yaml
@@ -34,10 +34,10 @@ attribute-sets:
attributes:
-
na... |
a6b07a51b161ba1ad3d81919955fe77b697f9d48 | Analyze and fix the following issue in the Linux kernel code: handshake: Fix sign of socket file descriptor fields | Problem Details:
Socket file descriptors are signed integers. Use nla_get/put_s32 for
those to avoid implicit signed conversion in the netlink protocol.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/169530165057.8905.8650469415145814828... | ```diff
diff --git a/Documentation/netlink/specs/handshake.yaml b/Documentation/netlink/specs/handshake.yaml
index 6d89e30f5fd5..a49b46b80e16 100644
--- a/Documentation/netlink/specs/handshake.yaml
+++ b/Documentation/netlink/specs/handshake.yaml
@@ -43,7 +43,7 @@ attribute-sets:
attributes:
-
name... |
d844fe65f0957024c3e1b0bf2a0615246184d9bc | Analyze and fix the following issue in the Linux kernel code: sched/headers: Move 'struct sched_param' out of uapi, to work around glibc/musl breakage | Problem Details:
Both glibc and musl define 'struct sched_param' in sched.h, while kernel
has it in uapi/linux/sched/types.h, making it cumbersome to use
sched_getattr(2) or sched_setattr(2) from userspace.
For example, something like this:
#include <sched.h>
#include <linux/sched/types.h>
struct sched_attr sa;
... | ```diff
diff --git a/include/linux/sched.h b/include/linux/sched.h
index dc37ae787e33..e4235bbfad77 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -63,7 +63,6 @@ struct robust_list_head;
struct root_domain;
struct rq;
struct sched_attr;
-struct sched_param;
struct seq_file;
struct sighand_struct... |
0c3697b8980dd44df05ed77222c09bd8fe729626 | Analyze and fix the following issue in the Linux kernel code: regulator: mt6358: fix and drop type prefix in MT6366 regulator node names | Problem Details:
The new MT6366 binding does away with the type prefix ("buck_", "ldo_")
in the regulator node names. This better matches the PMIC pin names.
Remaining underscores in names are also replaced with hyphens.
Drop the type prefixes and replace remaining underscores to match the
MT6366 binding.
Signed-off-... | ```diff
diff --git a/drivers/regulator/mt6358-regulator.c b/drivers/regulator/mt6358-regulator.c
index 8e5ba39a68ba..f68c3dd63b70 100644
--- a/drivers/regulator/mt6358-regulator.c
+++ b/drivers/regulator/mt6358-regulator.c
@@ -525,68 +525,68 @@ static const struct mt6358_regulator_info mt6358_regulators[] = {
/* The... |
c631494a69c55301a03af9c028892c9098019652 | Analyze and fix the following issue in the Linux kernel code: regulator: dt-bindings: mt6358: Add MT6366 PMIC | Problem Details:
The MediaTek MT6366 PMIC is similar to the MT6358 PMIC. It is designed
to be paired with the MediaTek MT8186 SoC. It has 9 buck regulators and
29 LDO regulators, not counting ones that feed internally and basically
have no controls. The regulators are named after their intended usage
for the SoC and sy... | ```diff
diff --git a/Documentation/devicetree/bindings/regulator/mediatek,mt6358-regulator.yaml b/Documentation/devicetree/bindings/regulator/mediatek,mt6358-regulator.yaml
index f2219d8656c2..c50402fcba72 100644
--- a/Documentation/devicetree/bindings/regulator/mediatek,mt6358-regulator.yaml
+++ b/Documentation/device... |
5c80c4fced22ae719d37db754144e75688eb52c8 | Analyze and fix the following issue in the Linux kernel code: isdn: replace deprecated strncpy with strscpy | Problem Details:
`strncpy` is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces.
We expect `iclock->name` to be NUL-terminated based on its use within
printk:
| printk(KERN_DEBUG "%s: %s %d\n", __func__, iclock->name,
| icl... | ```diff
diff --git a/drivers/isdn/mISDN/clock.c b/drivers/isdn/mISDN/clock.c
index 01d878168ef2..f71eb61db131 100644
--- a/drivers/isdn/mISDN/clock.c
+++ b/drivers/isdn/mISDN/clock.c
@@ -96,7 +96,7 @@ struct mISDNclock
printk(KERN_ERR "%s: No memory for clock entry.\n", __func__);
return NULL;
}
- strncpy(icloc... |
d876188ab8074087b23b3d83a56c889ebb1904ae | Analyze and fix the following issue in the Linux kernel code: wifi: ath10k: indicate to mac80211 scan complete with aborted flag for ATH10K_SCAN_STARTING state | Problem Details:
Scan failure can not be recovered from when running a loop of the
following steps:
1. run scan: "iw wlan scan".
2. run command: echo soft > /sys/kernel/debug/ieee80211/phy0/ath10k/simulate_fw_crash
immediately after step 1.
result:
scan failed and can not recover even when wlan recovery succeeds:
c... | ```diff
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 03e7bc5b6c0b..b33f87b9ad0b 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4503,18 +4503,21 @@ void __ath10k_scan_finish(struct ath10k *ar)
break;
case ATH10K_... |
79bd60ee87e1136718a686d6617ced5de88ee350 | Analyze and fix the following issue in the Linux kernel code: wifi: ath: dfs_pattern_detector: Fix a memory initialization issue | Problem Details:
If an error occurs and channel_detector_exit() is called, it relies on
entries of the 'detectors' array to be NULL.
Otherwise, it may access to un-initialized memory.
Fix it and initialize the memory, as what was done before the commit in
Fixes.
Fixes: a063b650ce5d ("ath: dfs_pattern_detector: Avoid ... | ```diff
diff --git a/drivers/net/wireless/ath/dfs_pattern_detector.c b/drivers/net/wireless/ath/dfs_pattern_detector.c
index 27f4d74a41c8..2788a1b06c17 100644
--- a/drivers/net/wireless/ath/dfs_pattern_detector.c
+++ b/drivers/net/wireless/ath/dfs_pattern_detector.c
@@ -206,7 +206,7 @@ channel_detector_create(struct df... |
170c75d43a77dc937c58f07ecf847ba1b42ab74e | Analyze and fix the following issue in the Linux kernel code: wifi: ath10k: Don't touch the CE interrupt registers after power up | Problem Details:
As talked about in commit d66d24ac300c ("ath10k: Keep track of which
interrupts fired, don't poll them"), if we access the copy engine
register at a bad time then ath10k can go boom. However, it's not
necessarily easy to know when it's safe to access them.
The ChromeOS test labs saw a crash that looke... | ```diff
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index 26214c00cd0d..2c39bad7ebfb 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -828,12 +828,20 @@ static void ath10k_snoc_hif_get_default_pipe(struct ath10k *ar,
... |
972754bfeec489fc03eec3df512be11dff457a65 | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: add keep backward compatibility of PHY mode to avoid firmware crash | Problem Details:
In a special WCN7855 firmware release the EHT (IEEE 802.11be) support has
been disabled for size reduction. Currently ath12k always enables EHT PHY
mode during vdev start but with the special firmware that will cause a
firmware crash during vdev start in firmware initialisation. This is
because the fir... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index d4a2f82612b6..c092451f8580 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -4554,7 +4554,8 @@ static void ath12k_mac_copy_eht_ppe_thresh(struct ath12k_wmi_ppe_thresh... |
b7fa76e03b0d83a035b20e0ef1a3d65a4557f76c | Analyze and fix the following issue in the Linux kernel code: usb: atm: Use size_add() in call to struct_size() | Problem Details:
If, for any reason, the open-coded arithmetic causes a wraparound,
the protection that `struct_size()` adds against potential integer
overflows is defeated. Fix this by hardening call to `struct_size()`
with `size_add()`.
Fixes: b626871a7cda ("usb: atm: Use struct_size() helper")
Signed-off-by: "Gusta... | ```diff
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
index 1cdb8758ae01..2da6615fbb6f 100644
--- a/drivers/usb/atm/usbatm.c
+++ b/drivers/usb/atm/usbatm.c
@@ -1018,7 +1018,8 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,
size_t size;
/* instance init */
- s... |
5d007ffdf6025fe83e497c44ed7c8aa8f150c4d1 | Analyze and fix the following issue in the Linux kernel code: of: overlay: Reorder struct fragment fields kerneldoc | Problem Details:
The fields of the fragment structure were reordered, but the kerneldoc
was not updated.
Fixes: 81225ea682f45629 ("of: overlay: reorder fields in struct fragment")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/cfa36d2bb95e3c399c415dbf58057302c70ef375.169589... | ```diff
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index dfb6fb962fc7..a9a292d6d59b 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -45,8 +45,8 @@ struct target {
/**
* struct fragment - info about fragment nodes in overlay expanded device tree
- * @target: target of the overlay opera... |
587e80dc1cb5f1f3f41b38356d3e3563c01d9d8e | Analyze and fix the following issue in the Linux kernel code: drm/i915: Add missing GSCCS documentation | Problem Details:
Introduce the basic documentation about GSC CS.
This "GPU Basics" section is focused on explaining the hardware
rather than the driver/uapi, so let's make sure GSC is also
properly documented here.
v2: Fixes from Matt: typos and acronym.
Fixes: 5fd974d164b4 ("drm/i915/mtl: add initial definitions fo... | ```diff
diff --git a/Documentation/gpu/i915.rst b/Documentation/gpu/i915.rst
index 13de8bcaaa29..0ca1550fd9dc 100644
--- a/Documentation/gpu/i915.rst
+++ b/Documentation/gpu/i915.rst
@@ -279,6 +279,10 @@ An Intel GPU has multiple engines. There are several engine types:
Also sometimes called 'VEBOX' in hardware docu... |
d38d753da7f7c9c4739e3e9ca3c986fa2c1b8c98 | Analyze and fix the following issue in the Linux kernel code: drm/i915: Add missing CCS documentation | Problem Details:
Let's introduce the basic documentation about CCS.
While doing that, also removed the legacy execution flag name. That flag
simply doesn't exist for CCS and it is not needed on current context
submission. Those flag names are only needed on legacy context,
while on new ones we only need to pass the eng... | ```diff
diff --git a/Documentation/gpu/i915.rst b/Documentation/gpu/i915.rst
index 378e825754d5..13de8bcaaa29 100644
--- a/Documentation/gpu/i915.rst
+++ b/Documentation/gpu/i915.rst
@@ -267,19 +267,18 @@ i915 driver.
Intel GPU Basics
----------------
-An Intel GPU has multiple engines. There are several engine typ... |
47c27aa7ded4b8ead19b3487cc42a6185b762903 | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: mhi: fix potential memory leak in ath12k_mhi_register() | Problem Details:
mhi_alloc_controller() allocates a memory space for mhi_ctrl. When some
errors occur, mhi_ctrl should be freed by mhi_free_controller() and set
ab_pci->mhi_ctrl = NULL.
We can fix it by calling mhi_free_controller() when the failure happens
and set ab_pci->mhi_ctrl = NULL in all of the places where we... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/mhi.c b/drivers/net/wireless/ath/ath12k/mhi.c
index 42f1140baa4f..f83d3e09ae36 100644
--- a/drivers/net/wireless/ath/ath12k/mhi.c
+++ b/drivers/net/wireless/ath/ath12k/mhi.c
@@ -370,8 +370,7 @@ int ath12k_mhi_register(struct ath12k_pci *ab_pci)
ret = ath12k_mhi_get... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.