id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
3e2a036827ccb33e93bc6faa66ca40991963593c
Analyze and fix the following issue in the Linux kernel code: Documentation: Fix sysfs path for the NFSv4 client identifier
Problem Details: The sysfs path for the NFS4 client identfier should start with the path component of 'nfs' for the kset, and then the 'net' path component for the netns object, followed by the 'nfs_client' path component for the NFS client kobject, and ending with 'identifier' for the netns_client_id kobj_attribute. ...
```diff diff --git a/Documentation/filesystems/nfs/client-identifier.rst b/Documentation/filesystems/nfs/client-identifier.rst index 5147e15815a1..a94c7a9748d7 100644 --- a/Documentation/filesystems/nfs/client-identifier.rst +++ b/Documentation/filesystems/nfs/client-identifier.rst @@ -152,7 +152,7 @@ string: vi...
fb80ef67e8ff6a00d3faad4cb348dafdb8eccfd8
Analyze and fix the following issue in the Linux kernel code: rpmsg: glink: Release driver_override
Problem Details: Upon termination of the rpmsg_device, driver_override needs to be freed to avoid leaking the potentially assigned string. Fixes: 42cd402b8fd4 ("rpmsg: Fix kfree() of static memory on setting driver_override") Fixes: 39e47767ec9b ("rpmsg: Add driver_override device attribute for rpmsg_device") Reviewed...
```diff diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index b6c60bf86009..01d2805fe30f 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -1455,6 +1455,7 @@ static void qcom_glink_rpdev_release(struct device *dev) { struct rpmsg_device *rpde...
8038510b1fe443ffbc0e356db5f47cbb8678a594
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix system suspend without fbdev being initialized
Problem Details: If fbdev is not initialized for some reason - in practice on platforms without display - suspending fbdev should be skipped during system suspend, fix this up. While at it add an assert that suspending fbdev only happens with the display present. This fixes the following: [ 91.227923] PM: suspend e...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c index ed197db5861d..4d761c8d42ab 100644 --- a/drivers/gpu/drm/i915/display/intel_fbdev.c +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c @@ -620,7 +620,13 @@ void intel_fbdev_set_suspend(struct drm_device *dev,...
6a8b2e4984f73f8d00c8c16b87a8b115d34088e4
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix GEN8_MISCCPCTL
Problem Details: Register 0x9424 is not replicated on any platform, so it shouldn't be declared with REG_MCR(). Declaring it with _MMIO() is basically duplicate of the GEN7 version, so just remove the GEN8 and change all the callers to use the right functions. Old versions of the gen8 bspec page used to contain a tabl...
```diff diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h b/drivers/gpu/drm/i915/gt/intel_gt_regs.h index 928698c621e5..be0f6e305c88 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h +++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h @@ -686,10 +686,7 @@ #define GEN6_RSTCTL _MMIO(0x9420) #define GEN7_MISCCPCTL ...
effc0905d741b4138806747407baf8de98390c72
Analyze and fix the following issue in the Linux kernel code: drm/i915/pvc: Annotate two more workaround/tuning registers as MCR
Problem Details: XEHPC_LNCFMISCCFGREG0 and XEHPC_L3SCRUB are both in MCR register ranges on PVC (with HALFBSLICE and L3BANK replication respectively), so they should be explicitly declared as MCR registers and use MCR-aware workaround handlers. The workarounds/tuning settings should still be applied properly on PVC ev...
```diff diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h b/drivers/gpu/drm/i915/gt/intel_gt_regs.h index 7fa18a3b3957..928698c621e5 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h +++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h @@ -979,7 +979,7 @@ #define GEN7_WA_FOR_GEN7_L3_CONTROL 0x3C47FF8C #define GEN...
eb66553d356b44c08db56fd5ecea162cfe4bf8fd
Analyze and fix the following issue in the Linux kernel code: drm/i915/bios: set default backlight controller index
Problem Details: With backlight controller set to -1 in intel_panel_init_alloc() to distinguish uninitialized values, and controller later being set only if it's present in VBT, we can end up with -1 for the controller: [drm:intel_bios_init_panel [i915]] VBT backlight PWM modulation frequency 200 Hz, active hi...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c index 1cd8af88ce50..04b846440de6 100644 --- a/drivers/gpu/drm/i915/display/intel_bios.c +++ b/drivers/gpu/drm/i915/display/intel_bios.c @@ -1033,6 +1033,7 @@ parse_lfp_backlight(struct drm_i915_private *i915, } ...
8f9f5fb94dbea843621740e6b25b3b430a83cf29
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix VBT DSI DVO port handling
Problem Details: Turns out modern (icl+) VBTs still declare their DSI ports as MIPI-A and MIPI-C despite the PHYs now being A and B. Remap appropriately to allow the panels declared as MIPI-C to work. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8016 Signed-off-by: Ville Syrjälä...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c index e6ca51232dcf..06a2d98d2277 100644 --- a/drivers/gpu/drm/i915/display/intel_bios.c +++ b/drivers/gpu/drm/i915/display/intel_bios.c @@ -2467,6 +2467,22 @@ static enum port dvo_port_to_port(struct drm_i915_priv...
679caae16175d17467ee1ad1f05dd72d8d4b0973
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix memory leaks in scatterlist
Problem Details: This patch fixes memory leaks on error escapes in i915_scatterlist.c Fixes: c3bfba9a2225 ("drm/i915: Check for integer truncation on scatterlist creation") Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com> Reviewed-by: Harish Chegondi <harish.chegondi@...
```diff diff --git a/drivers/gpu/drm/i915/i915_scatterlist.c b/drivers/gpu/drm/i915/i915_scatterlist.c index 756289e43dff..7c7a86921b1c 100644 --- a/drivers/gpu/drm/i915/i915_scatterlist.c +++ b/drivers/gpu/drm/i915/i915_scatterlist.c @@ -98,8 +98,10 @@ struct i915_refct_sgt *i915_rsgt_from_mm_node(const struct drm_mm_...
fe7f56a7adfbb17bba2454fd97fd97caf9dbddd5
Analyze and fix the following issue in the Linux kernel code: drm/i915/doc: Escape wildcard in method names
Problem Details: Stephen Rothwell reported htmldocs warnings: Documentation/gpu/i915:64: drivers/gpu/drm/i915/gt/intel_workarounds.c:32: WARNING: Inline emphasis start-string without end-string. Documentation/gpu/i915:64: drivers/gpu/drm/i915/gt/intel_workarounds.c:57: WARNING: Inline emphasis start-string without end...
```diff diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index 3111df350f57..a00ec692d980 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -30,7 +30,7 @@ * creation to have a "primed golden context", i...
5bab56fff53ce161ed859d9559a10361d4f79578
Analyze and fix the following issue in the Linux kernel code: NFS: fix disabling of swap
Problem Details: When swap is activated to a file on an NFSv4 mount we arrange that the state manager thread is always present as starting a new thread requires memory allocations that might block waiting for swap. Unfortunately the code for allowing the state manager thread to exit when swap is disabled was not teste...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 40d749f29ed3..4214286e0145 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -10604,7 +10604,9 @@ static void nfs4_disable_swap(struct inode *inode) /* The state manager thread will now exit once it is * woken. */ - wake_up_var(&NFS_SERVER...
a69982c37cd0586e6832268155349301b87f2e35
Analyze and fix the following issue in the Linux kernel code: gpiolib: acpi: Add a ignore wakeup quirk for Clevo NH5xAx
Problem Details: The commit 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable") changed the policy such that I2C touchpads may be able to wake up the system by default if the system is configured as such. However for some devices there is a bug, that is causing the touchpad to instantly wake up the device...
```diff diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index 17c53f484280..34ff048e70d0 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -1637,6 +1637,18 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = { .ignore_wake = "ELAN0415:00@9", ...
73dd3206811af32695e46ca71e2b0da5dac81ad9
Analyze and fix the following issue in the Linux kernel code: Documentation: amd-pstate: disambiguate user space sections
Problem Details: kernel test robot reported htmldocs warning: Documentation/admin-guide/pm/amd-pstate.rst:343: WARNING: duplicate label admin-guide/pm/amd-pstate:user space interface in ``sysfs``, other instance in Documentation/admin-guide/pm/amd-pstate.rst The documentation contains two sections with the same "User...
```diff diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst index 5304adf2fc2f..d143e72cf93e 100644 --- a/Documentation/admin-guide/pm/amd-pstate.rst +++ b/Documentation/admin-guide/pm/amd-pstate.rst @@ -230,8 +230,8 @@ with :c:macro:`MSR_AMD_CPPC_ENABLE` or ``cppc_set...
6e9d12125fcac048c78f497044370c1da85b552a
Analyze and fix the following issue in the Linux kernel code: cpufreq: amd-pstate: Fix invalid write to MSR_AMD_CPPC_REQ
Problem Details: `amd_pstate_set_epp` function uses `cppc_req_cached` and `epp` variable to update the MSR_AMD_CPPC_REQ register for AMD MSR systems. The recent commit 7cca9a9851a5 ("cpufreq: amd-pstate: avoid uninitialized variable use") changed the sequence of updating cppc_req_cached and writing the MSR_AMD_CPPC_REQ...
```diff diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index b8862afef4e4..45c88894fd8e 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -1057,27 +1057,28 @@ static void amd_pstate_epp_init(unsigned int cpu) cpudata->epp_policy = cpudata->policy; - if (cpud...
0c2baf6509af1d11310ae4c1c839481a6e9a4bc4
Analyze and fix the following issue in the Linux kernel code: printf: fix errname.c list
Problem Details: On most architectures, gcc -Wextra warns about the list of error numbers containing both EDEADLK and EDEADLOCK: lib/errname.c:15:67: warning: initialized field overwritten [-Woverride-init] 15 | #define E(err) [err + BUILD_BUG_ON_ZERO(err <= 0 || err > 300)] = "-" #err | ...
```diff diff --git a/lib/errname.c b/lib/errname.c index 05cbf731545f..67739b174a8c 100644 --- a/lib/errname.c +++ b/lib/errname.c @@ -21,6 +21,7 @@ static const char *names_0[] = { E(EADDRNOTAVAIL), E(EADV), E(EAFNOSUPPORT), + E(EAGAIN), /* EWOULDBLOCK */ E(EALREADY), E(EBADE), E(EBADF), @@ -31,15 +32,17 @...
c2dbe32d5db5c4ead121cf86dabd5ab691fb47fe
Analyze and fix the following issue in the Linux kernel code: sched/psi: Fix use-after-free in ep_remove_wait_queue()
Problem Details: If a non-root cgroup gets removed when there is a thread that registered trigger and is polling on a pressure file within the cgroup, the polling waitqueue gets freed in the following path: do_rmdir cgroup_rmdir kernfs_drain_open_files cgroup_file_release cgroup_pressure_relea...
```diff diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c index 8ac8b81bfee6..02e011cabe91 100644 --- a/kernel/sched/psi.c +++ b/kernel/sched/psi.c @@ -1343,10 +1343,11 @@ void psi_trigger_destroy(struct psi_trigger *t) group = t->group; /* - * Wakeup waiters to stop polling. Can happen if cgroup is deleted -...
574fbb95cd9d88bdc9c9c4c64223a38a61d7de9a
Analyze and fix the following issue in the Linux kernel code: spi: intel: Check number of chip selects after reading the descriptor
Problem Details: The flash decriptor contains the number of flash components that we use to figure out how many flash chips there are connected. Therefore we need to read it first before deciding how many chip selects the controller has. Reported-by: Marcin Witkowski <marcin.witkowski@intel.com> Fixes: 3f03c618bebb ("...
```diff diff --git a/drivers/spi/spi-intel.c b/drivers/spi/spi-intel.c index f619212b0d5c..627287925fed 100644 --- a/drivers/spi/spi-intel.c +++ b/drivers/spi/spi-intel.c @@ -1368,14 +1368,14 @@ static int intel_spi_populate_chip(struct intel_spi *ispi) if (!spi_new_device(ispi->master, &chip)) return -ENODEV; -...
91621be65d6812cd74b2ea09573ff9ee0cbf5666
Analyze and fix the following issue in the Linux kernel code: perf record: Fix segfault with --overwrite and --max-size
Problem Details: When --overwrite and --max-size options of perf record are used together, a segmentation fault occurs. The following is an example: # perf record -e sched:sched* --overwrite --max-size 1K -a -- sleep 1 [ perf record: Woken up 1 times to write data ] perf: Segmentation fault Obtained 12 stack f...
```diff diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 29dcd454b8e2..8374117e66f6 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -154,6 +154,7 @@ struct record { struct perf_tool tool; struct record_opts opts; u64 bytes_written; + u64 thread_bytes_w...
971cecb9591a7b8ceae658252bf15240d7078a45
Analyze and fix the following issue in the Linux kernel code: Documentation/hw-vuln: Fix rST warning
Problem Details: The following warning: Documentation/admin-guide/hw-vuln/cross-thread-rsb.rst:92: ERROR: Unexpected indentation. was introduced by commit 493a2c2d23ca. Fix it by placing everything in the same paragraph and also use a monospace font. Fixes: 493a2c2d23ca ("Documentation/hw-vuln: Add documentation...
```diff diff --git a/Documentation/admin-guide/hw-vuln/cross-thread-rsb.rst b/Documentation/admin-guide/hw-vuln/cross-thread-rsb.rst index ec6e9f5bcf9e..875616d675fe 100644 --- a/Documentation/admin-guide/hw-vuln/cross-thread-rsb.rst +++ b/Documentation/admin-guide/hw-vuln/cross-thread-rsb.rst @@ -88,5 +88,4 @@ capabil...
95bfec41bd3d39b7659cba65b72080420bf5691e
Analyze and fix the following issue in the Linux kernel code: virtio-blk: add support for zoned block devices
Problem Details: This patch adds support for Zoned Block Devices (ZBDs) to the kernel virtio-blk driver. The patch accompanies the virtio-blk ZBD support draft that is now being proposed for standardization. The latest version of the draft is linked at https://github.com/oasis-tcs/virtio-spec/issues/143 . The QEMU z...
```diff diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 6a77fa917428..71e1e4bd8439 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -15,6 +15,7 @@ #include <linux/blk-mq.h> #include <linux/blk-mq-virtio.h> #include <linux/numa.h> +#include <linux/vmalloc.h> #inc...
d16c0cd27331179daa86a3a489f50ce409121c80
Analyze and fix the following issue in the Linux kernel code: docs: driver-api: virtio: virtio on Linux
Problem Details: Basic doc about Virtio on Linux and a short tutorial on Virtio drivers. includes the following fixup: virtio: fix virtio_config_ops kerneldocs Fixes two warning messages when building htmldocs: warning: duplicate section name 'Note' warning: expecting prototype for virtio_config_ops(). ...
```diff diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/index.rst index d3a58f77328e..30a3de452b1d 100644 --- a/Documentation/driver-api/index.rst +++ b/Documentation/driver-api/index.rst @@ -106,6 +106,7 @@ available subsections can be seen below. vfio-mediated-device vfio vfio-p...
9efcdaac36e1643a1b7f5337e6143ce142d381b1
Analyze and fix the following issue in the Linux kernel code: powerpc/eeh: Set channel state after notifying the drivers
Problem Details: When a PCI error is encountered 6th time in an hour we set the channel state to perm_failure and notify the driver about the permanent failure. However, after upstream commit 38ddc011478e ("powerpc/eeh: Make permanently failed devices non-actionable"), EEH handler stops calling any routine once the de...
```diff diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c index f279295179bd..438568a472d0 100644 --- a/arch/powerpc/kernel/eeh_driver.c +++ b/arch/powerpc/kernel/eeh_driver.c @@ -1065,10 +1065,10 @@ recover_failed: eeh_slot_error_detail(pe, EEH_LOG_PERM); /* Notify all devices that...
4f11410bf6da87defe8fd59b0413f0d9f71744da
Analyze and fix the following issue in the Linux kernel code: selftests/powerpc: Fix incorrect kernel headers search path
Problem Details: Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Cc: stable@vger.kernel.org # v5.18+ Signed-off-by: Mathieu Desnoyers <mathieu.desno...
```diff diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile index 2f02cb54224d..cbeeaeae8837 100644 --- a/tools/testing/selftests/powerpc/ptrace/Makefile +++ b/tools/testing/selftests/powerpc/ptrace/Makefile @@ -33,7 +33,7 @@ TESTS_64 := $(patsubst %,$(OUTPUT)/...
4ca446b127c568b59cb8d9748b6f70499624bb18
Analyze and fix the following issue in the Linux kernel code: iw_cxgb4: Fix potential NULL dereference in c4iw_fill_res_cm_id_entry()
Problem Details: This condition needs to match the previous "if (epcp->state == LISTEN) {" exactly to avoid a NULL dereference of either "listen_ep" or "ep". The problem is that "epcp" has been re-assigned so just testing "if (epcp->state == LISTEN) {" a second time is not sufficient. Fixes: 116aeb887371 ("iw_cxgb4: p...
```diff diff --git a/drivers/infiniband/hw/cxgb4/restrack.c b/drivers/infiniband/hw/cxgb4/restrack.c index ff645b955a08..fd22c85d35f4 100644 --- a/drivers/infiniband/hw/cxgb4/restrack.c +++ b/drivers/infiniband/hw/cxgb4/restrack.c @@ -238,7 +238,7 @@ int c4iw_fill_res_cm_id_entry(struct sk_buff *msg, if (rdma_nl_put_...
50a542a8accc12afd802488f95317155496692f1
Analyze and fix the following issue in the Linux kernel code: RDMA/mlx5: Use rdma_umem_for_each_dma_block()
Problem Details: Replace an open coding of rdma_umem_for_each_dma_block() with the proper function. Fixes: b3d47ebd4908 ("RDMA/mlx5: Use mlx5_umr_post_send_wait() to update MR pas") Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/0-v1-c13a5b88359b+556d0-mlx5_umem_block_jgg@nvidia.com Re...
```diff diff --git a/drivers/infiniband/hw/mlx5/umr.c b/drivers/infiniband/hw/mlx5/umr.c index 029e9536ec28..55f4e048d947 100644 --- a/drivers/infiniband/hw/mlx5/umr.c +++ b/drivers/infiniband/hw/mlx5/umr.c @@ -636,9 +636,7 @@ int mlx5r_umr_update_mr_pas(struct mlx5_ib_mr *mr, unsigned int flags) mlx5r_umr_set_update...
fda6c89fe3d9aca073495a664e1d5aea28cd4377
Analyze and fix the following issue in the Linux kernel code: net: mpls: fix stale pointer if allocation fails during device rename
Problem Details: lianhui reports that when MPLS fails to register the sysctl table under new location (during device rename) the old pointers won't get overwritten and may be freed again (double free). Handle this gracefully. The best option would be unregistering the MPLS from the device completely on failure, but un...
```diff diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c index 35b5f806fdda..dc5165d3eec4 100644 --- a/net/mpls/af_mpls.c +++ b/net/mpls/af_mpls.c @@ -1428,6 +1428,7 @@ static int mpls_dev_sysctl_register(struct net_device *dev, free: kfree(table); out: + mdev->sysctl = NULL; return -ENOBUFS; } @@ -1437,6 ...
fe33311c3e371855c4f4c0ab8a5fce5b9a9fdafd
Analyze and fix the following issue in the Linux kernel code: net: no longer support SOCK_REFCNT_DEBUG feature
Problem Details: Commit e48c414ee61f ("[INET]: Generalise the TCP sock ID lookup routines") commented out the definition of SOCK_REFCNT_DEBUG in 2005 and later another commit 463c84b97f24 ("[NET]: Introduce inet_connection_sock") removed it. Since we could track all of them through bpf and kprobe related tools and the ...
```diff diff --git a/include/net/sock.h b/include/net/sock.h index 937e842dc930..2cb258fde072 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1349,9 +1349,6 @@ struct proto { char name[32]; struct list_head node; -#ifdef SOCK_REFCNT_DEBUG - atomic_t socks; -#endif int (*diag_destroy)(struct so...
42018a322bd453e38b3ffee294982243e50a484f
Analyze and fix the following issue in the Linux kernel code: net/sched: tcindex: search key must be 16 bits
Problem Details: Syzkaller found an issue where a handle greater than 16 bits would trigger a null-ptr-deref in the imperfect hash area update. general protection fault, probably for non-canonical address 0xdffffc0000000015: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x00000000000000a8-0x0000000000000...
```diff diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c index ba7f22a49397..6640e75eaa02 100644 --- a/net/sched/cls_tcindex.c +++ b/net/sched/cls_tcindex.c @@ -503,7 +503,7 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, /* lookup the filter, guaranteed to exist */ f...
d9c2cf67b9cfd643ba85d51bc865a89a92e4f979
Analyze and fix the following issue in the Linux kernel code: s390/kfence: fix page fault reporting
Problem Details: Baoquan He reported lots of KFENCE reports when /proc/kcore is read, e.g. with crash or even simpler with dd: BUG: KFENCE: invalid read in copy_from_kernel_nofault+0x5e/0x120 Invalid read at 0x00000000f4f5149f: copy_from_kernel_nofault+0x5e/0x120 read_kcore+0x6b2/0x870 proc_reg_read+0x9a/0xf0 ...
```diff diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 65930c1928f8..a2632fd97d00 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -100,6 +100,20 @@ static enum fault_type get_fault_type(struct pt_regs *regs) return KERNEL_FAULT; } +static unsigned long get_fault_address(struct pt_re...
273e1daa1c025d8a8649d5622ab8b7f344960e9b
Analyze and fix the following issue in the Linux kernel code: drm/i915/dgfx, mtl+: Disable display functionality if the display is not present
Problem Details: DG1/DG2 and MTL+ has added a new display-present HW flag. Check this flag and if cleared, disable the driver's display functionality. So far the missing check resulted in running the display initialization sequence, and the WARNs below, due to the display register accesses timing out: [ 3.902843] ...
```diff diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 943db8ec63f8..c459166d4deb 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -116,6 +116,9 @@ * #define GEN8_BAR _MMIO(0xb888) */ +#define GU_CNTL_PROTECTED _MMIO(0...
9542d708409a41449e99c9a464deb5e062c4bee2
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix system suspend without fbdev being initialized
Problem Details: If fbdev is not initialized for some reason - in practice on platforms without display - suspending fbdev should be skipped during system suspend, fix this up. While at it add an assert that suspending fbdev only happens with the display present. This fixes the following: [ 91.227923] PM: suspend e...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c index 10b9bc6da3ad..b66ee2767796 100644 --- a/drivers/gpu/drm/i915/display/intel_fbdev.c +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c @@ -631,7 +631,13 @@ void intel_fbdev_set_suspend(struct drm_device *dev,...
ce1ba4d782d94fc8ed9116c774e2e5885626836b
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: move H2C of del_pkt_offload before polling FW status ready
Problem Details: The H2C of del_pkt_offload must be called before polling FW status ready, otherwise the following downloading normal FW will fail. Fixes: 5c12bb66b79d ("wifi: rtw89: refine packet offload flow") Signed-off-by: Chin-Yen Lee <timlee@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-of...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/wow.c b/drivers/net/wireless/realtek/rtw89/wow.c index 92fa366ccfcf..c78ee2ab732c 100644 --- a/drivers/net/wireless/realtek/rtw89/wow.c +++ b/drivers/net/wireless/realtek/rtw89/wow.c @@ -710,6 +710,8 @@ static int rtw89_wow_fw_stop(struct rtw89_dev *rtwdev) got...
07ce9fa6ab0e5e4cb5516a1f7c754ab2758fe5cd
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: usb: send Zero length packets if necessary
Problem Details: Zero length packets are necessary when sending URBs with size multiple of bulkout_size, otherwise the hardware just stalls. Fixes: a82dfd33d1237 ("wifi: rtw88: Add common USB chip support") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-b...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c index d9e995544e40..1a09c9288198 100644 --- a/drivers/net/wireless/realtek/rtw88/usb.c +++ b/drivers/net/wireless/realtek/rtw88/usb.c @@ -271,6 +271,7 @@ static int rtw_usb_write_port(struct rtw_dev *rtwdev, u8 qsel...
7869b834fb07c79933229840c98b02bbb7bd0d75
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: usb: Set qsel correctly
Problem Details: We have to extract qsel from the skb before doing skb_push() on it, otherwise qsel will always be 0. Fixes: a82dfd33d1237 ("wifi: rtw88: Add common USB chip support") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@ke...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c index 4ef38279b64c..d9e995544e40 100644 --- a/drivers/net/wireless/realtek/rtw88/usb.c +++ b/drivers/net/wireless/realtek/rtw88/usb.c @@ -471,9 +471,9 @@ static int rtw_usb_tx_write(struct rtw_dev *rtwdev, u8 *pkt...
fb533473d1595fe79ecb528fda1de33552b07178
Analyze and fix the following issue in the Linux kernel code: ksmbd: do not allow the actual frame length to be smaller than the rfc1002 length
Problem Details: ksmbd allowed the actual frame length to be smaller than the rfc1002 length. If allowed, it is possible to allocates a large amount of memory that can be limited by credit management and can eventually cause memory exhaustion problem. This patch do not allow it except SMB2 Negotiate request which will ...
```diff diff --git a/fs/ksmbd/smb2misc.c b/fs/ksmbd/smb2misc.c index a717aa9b4af8..fbdde426dd01 100644 --- a/fs/ksmbd/smb2misc.c +++ b/fs/ksmbd/smb2misc.c @@ -408,20 +408,19 @@ int ksmbd_smb2_check_message(struct ksmbd_work *work) goto validate_credit; /* - * windows client also pad up to 8 bytes when compou...
8f8c43b125882ac14372f8dca0c8e50a59e78d79
Analyze and fix the following issue in the Linux kernel code: ksmbd: fix wrong data area length for smb2 lock request
Problem Details: When turning debug mode on, The following error message from ksmbd_smb2_check_message() is coming. ksmbd: cli req padded more than expected. Length 112 not 88 for cmd:10 mid:14 data area length calculation for smb2 lock request in smb2_get_data_area_len() is incorrect. Fixes: e2f34481b24d ("cifsd: a...
```diff diff --git a/fs/ksmbd/smb2misc.c b/fs/ksmbd/smb2misc.c index 6e25ace36568..a717aa9b4af8 100644 --- a/fs/ksmbd/smb2misc.c +++ b/fs/ksmbd/smb2misc.c @@ -149,15 +149,11 @@ static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, break; case SMB2_LOCK: { - int lock_count; + unsigned short lo...
63f09a9986eb58578ed6ad0e27a6e2c54e49f797
Analyze and fix the following issue in the Linux kernel code: ksmbd: Fix parameter name and comment mismatch
Problem Details: fs/ksmbd/vfs.c:965: warning: Function parameter or member 'attr_value' not described in 'ksmbd_vfs_setxattr'. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3946 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Acked-by: Namjae Jeo...
```diff diff --git a/fs/ksmbd/vfs.c b/fs/ksmbd/vfs.c index ff0e7a4fcd4d..0f0d6158c88e 100644 --- a/fs/ksmbd/vfs.c +++ b/fs/ksmbd/vfs.c @@ -951,9 +951,9 @@ ssize_t ksmbd_vfs_getxattr(struct user_namespace *user_ns, * ksmbd_vfs_setxattr() - vfs helper for smb set extended attributes value * @user_ns: user namespace ...
75c53905f8738fecf691a78de401250e298900f9
Analyze and fix the following issue in the Linux kernel code: RISC-V: remove toolchain version checks for Zicbom
Problem Details: Commit b8c86872d1dc ("riscv: fix detection of toolchain Zicbom support") fixed building on systems where Zicbom was supported by the compiler/assembler but not by the linker in an easily backportable manner. Now that the we have insn-defs for the 3 instructions, toolchain support is no longer required ...
```diff diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index e2b656043abf..33bbdc33cef8 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -416,16 +416,8 @@ config RISCV_ISA_SVPBMT If you don't know what to do here, say Y. -config TOOLCHAIN_HAS_ZICBOM - bool - default y - depends on !64BIT || $(...
11a4d6f67cf55883dc78e31c247d1903ed7feccc
Analyze and fix the following issue in the Linux kernel code: tipc: fix kernel warning when sending SYN message
Problem Details: When sending a SYN message, this kernel stack trace is observed: ... [ 13.396352] RIP: 0010:_copy_from_iter+0xb4/0x550 ... [ 13.398494] Call Trace: [ 13.398630] <TASK> [ 13.398630] ? __alloc_skb+0xed/0x1a0 [ 13.398630] tipc_msg_build+0x12c/0x670 [tipc] [ 13.398630] ? shmem_add_to_page_...
```diff diff --git a/net/tipc/socket.c b/net/tipc/socket.c index b35c8701876a..a38733f2197a 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -2614,6 +2614,7 @@ static int tipc_connect(struct socket *sock, struct sockaddr *dest, /* Send a 'SYN-' to destination */ m.msg_name = dest; m.msg_namelen = dest...
207ce626add80ddd941f62fc2fe5d77586e0801b
Analyze and fix the following issue in the Linux kernel code: igb: Fix PPS input and output using 3rd and 4th SDP
Problem Details: Fix handling of the tsync interrupt to compare the pin number with IGB_N_SDP instead of IGB_N_EXTTS/IGB_N_PEROUT and fix the indexing to the perout array. Fixes: cf99c1dd7b77 ("igb: move PEROUT and EXTTS isr logic to separate functions") Reported-by: Matt Corallo <ntp-lists@mattcorallo.com> Signed-off...
```diff diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 3c0c35ecea10..d8e3048b93dd 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -6794,7 +6794,7 @@ static void igb_perout(struct igb_adapter *adapter, int...
f50ca7cef7c7ceff2b66b610ac5ab17aac36df6a
Analyze and fix the following issue in the Linux kernel code: net: ipa: define GSI CH_C_QOS register fields
Problem Details: Define the fields within the CH_C_QOS GSI register using an array of field masks in that register's reg structure. Use the reg functions for encoding values in those fields. One field in the register is present for IPA v4.0-4.2 only, two others are present starting at IPA v4.5, and one more is there ...
```diff diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index bdc1f8e8e428..cbf4b2d843ac 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -889,14 +889,14 @@ static void gsi_channel_program(struct gsi_channel *channel, bool doorbell) /* Command channel gets low weighted round-robin priori...
2558b8039d059342197610498c8749ad294adee5
Analyze and fix the following issue in the Linux kernel code: net: use a bounce buffer for copying skb->mark
Problem Details: syzbot found arm64 builds would crash in sock_recv_mark() when CONFIG_HARDENED_USERCOPY=y x86 and powerpc are not detecting the issue because they define user_access_begin. This will be handled in a different patch, because a check_object_size() is missing. Only data from skb->cb[] can be copied dire...
```diff diff --git a/net/socket.c b/net/socket.c index 888cd618a968..c12af3c84d3a 100644 --- a/net/socket.c +++ b/net/socket.c @@ -971,9 +971,12 @@ static inline void sock_recv_drops(struct msghdr *msg, struct sock *sk, static void sock_recv_mark(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) { - if...
3e74ec2f39362bffbd42854acbb67c7f4cb808f9
Analyze and fix the following issue in the Linux kernel code: rpmsg: glink: Avoid infinite loop on intent for missing channel
Problem Details: In the event that an intent advertisement arrives on an unknown channel the fifo is not advanced, resulting in the same message being handled over and over. Fixes: dacbb35e930f ("rpmsg: glink: Receive and store the remote intent buffers") Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> Revi...
```diff diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 89c3381f06c3..b6c60bf86009 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -966,6 +966,7 @@ static void qcom_glink_handle_intent(struct qcom_glink *glink, spin_unlock_irqrestore(&...
4e816d0318fdfe8932da80dbf04ba318b13e4b3a
Analyze and fix the following issue in the Linux kernel code: rpmsg: glink: Fix GLINK command prefix
Problem Details: The upstream GLINK driver was first introduced to communicate with the RPM on MSM8996, presumably as an artifact from that era the command defines was prefixed RPM_CMD, while they actually are GLINK_CMDs. Let's rename these, to keep things tidy. No functional change. Signed-off-by: Bjorn Andersson <q...
```diff diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 7a3cac62ecfa..89c3381f06c3 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -183,20 +183,20 @@ struct glink_channel { static const struct rpmsg_endpoint_ops glink_endpoint_ops; ...
a8f500c68673d385b437da678aaf9ebba0ab9db0
Analyze and fix the following issue in the Linux kernel code: rpmsg: glink: Fix spelling of peek
Problem Details: The code is peeking into the buffers, not peaking. Fix this throughout the glink drivers. Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> Reviewed-by: Chris Lew <quic_clew@quicinc.com> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230214224746.19961...
```diff diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 324c75d59a6f..7a3cac62ecfa 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -274,10 +274,10 @@ static size_t qcom_glink_rx_avail(struct qcom_glink *glink) return glink->rx_pipe->av...
a950b989ea29ab3b38ea7f6e3d2540700a3c54e8
Analyze and fix the following issue in the Linux kernel code: drm/vmwgfx: Do not drop the reference to the handle too soon
Problem Details: v3: Fix vmw_user_bo_lookup which was also dropping the gem reference before the kernel was done with buffer depending on userspace doing the right thing. Same bug, different spot. It is possible for userspace to predict the next buffer handle and to destroy the buffer while it's still used by the kern...
```diff diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c index 53da183e2bfe..4dcf2eb7aa80 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c @@ -598,6 +598,7 @@ static int vmw_user_bo_synccpu_release(struct drm_file *filp, ttm_bo_put(&vmw_bo->...
1a6897921f52ceb2c8665ef826e405bd96385159
Analyze and fix the following issue in the Linux kernel code: drm/vmwgfx: Stop accessing buffer objects which failed init
Problem Details: ttm_bo_init_reserved on failure puts the buffer object back which causes it to be deleted, but kfree was still being called on the same buffer in vmw_bo_create leading to a double free. After the double free the vmw_gem_object_create_with_handle was setting the gem function objects before checking the...
```diff diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c index aa1cd5126a32..53da183e2bfe 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c @@ -462,6 +462,9 @@ int vmw_bo_create(struct vmw_private *vmw, return -ENOMEM; } + /* + * vmw_bo_...
9ef8d83e8e25d5f1811b3a38eb1484f85f64296c
Analyze and fix the following issue in the Linux kernel code: drm/vmwgfx: Do not drop the reference to the handle too soon
Problem Details: v3: Fix vmw_user_bo_lookup which was also dropping the gem reference before the kernel was done with buffer depending on userspace doing the right thing. Same bug, different spot. It is possible for userspace to predict the next buffer handle and to destroy the buffer while it's still used by the kern...
```diff diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c index 7a00314882a3..82094c137855 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c @@ -500,6 +500,7 @@ static int vmw_user_bo_synccpu_release(struct drm_file *filp, ttm_bo_put(&vmw_bo->...
36d421e632e9a0e8375eaed0143551a34d81a7e3
Analyze and fix the following issue in the Linux kernel code: drm/vmwgfx: Stop accessing buffer objects which failed init
Problem Details: ttm_bo_init_reserved on failure puts the buffer object back which causes it to be deleted, but kfree was still being called on the same buffer in vmw_bo_create leading to a double free. After the double free the vmw_gem_object_create_with_handle was setting the gem function objects before checking the...
```diff diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c index ee8f87dcdf21..7a00314882a3 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c @@ -416,13 +416,15 @@ int vmw_bo_create(struct vmw_private *vmw, return -ENOMEM; } + /* + * vmw_b...
60b730a40c43fbcc034970d3e77eb0f25b8cc1cf
Analyze and fix the following issue in the Linux kernel code: xfs: fix uninitialized variable access
Problem Details: If the end position of a GETFSMAP query overlaps an allocated space and we're using the free space info to generate fsmap info, the akeys information gets fed into the fsmap formatter with bad results. Zero-init the space. Reported-by: syzbot+090ae72d552e6bd93cfe@syzkaller.appspotmail.com Signed-off-b...
```diff diff --git a/fs/xfs/xfs_fsmap.c b/fs/xfs/xfs_fsmap.c index 120d284a03fe..59e7d1a14b67 100644 --- a/fs/xfs/xfs_fsmap.c +++ b/fs/xfs/xfs_fsmap.c @@ -761,6 +761,7 @@ xfs_getfsmap_datadev_bnobt( { struct xfs_alloc_rec_incore akeys[2]; + memset(akeys, 0, sizeof(akeys)); info->missing_owner = XFS_FMR_OWN_UNKNO...
7032809a44d752b9e2275833787e0aa88a7540af
Analyze and fix the following issue in the Linux kernel code: erofs: relinquish volume with mutex held
Problem Details: Relinquish fscache volume with mutex held. Otherwise if a new domain is registered when the old domain with the same name gets removed from the list but not relinquished yet, fscache may complain the collision. Fixes: 8b7adf1dff3d ("erofs: introduce fscache-based domain") Signed-off-by: Jingbo Xu <je...
```diff diff --git a/fs/erofs/fscache.c b/fs/erofs/fscache.c index 0ee08e51c4a6..9383afe09bd0 100644 --- a/fs/erofs/fscache.c +++ b/fs/erofs/fscache.c @@ -326,8 +326,8 @@ static void erofs_fscache_domain_put(struct erofs_domain *domain) kern_unmount(erofs_pseudo_mnt); erofs_pseudo_mnt = NULL; } - mutex_unlo...
d5a7fab7859dc88657372a448b78babcf134114e
Analyze and fix the following issue in the Linux kernel code: riscv: Fix Zbb alternative IDs
Problem Details: Commit 4bf8860760d9 ("riscv: cpufeature: extend riscv_cpufeature_patch_func to all ISA extensions") switched ISA extension alternatives to use the RISCV_ISA_EXT_* macros instead of CPUFEATURE_*. This was mismerged when applied on top of the Zbb series, so the Zbb alternatives referenced the wrong errat...
```diff diff --git a/arch/riscv/include/asm/errata_list.h b/arch/riscv/include/asm/errata_list.h index e158439029ce..274c6f889602 100644 --- a/arch/riscv/include/asm/errata_list.h +++ b/arch/riscv/include/asm/errata_list.h @@ -23,11 +23,6 @@ #define ERRATA_THEAD_NUMBER 3 #endif -#define CPUFEATURE_SVPBMT 0 -#define...
bfd6fc5d80145e12d0ffa144c4bad89b8f9ddc5a
Analyze and fix the following issue in the Linux kernel code: riscv: Fix early alternative patching
Problem Details: Now that the text to patch is located using a relative offset from the alternative entry, the text address should be computed without applying the kernel mapping offset, both before and after VM setup. Fixes: 8d23e94a4433 ("riscv: switch to relative alternative entries") Signed-off-by: Samuel Holland ...
```diff diff --git a/arch/riscv/errata/thead/errata.c b/arch/riscv/errata/thead/errata.c index c0bea5c94128..1dd90a5f86f0 100644 --- a/arch/riscv/errata/thead/errata.c +++ b/arch/riscv/errata/thead/errata.c @@ -102,9 +102,7 @@ void __init_or_module thead_errata_patch_func(struct alt_entry *begin, struct al /* On ...
2a5303b499b18de7179ee1b4ab759880fb02ec9c
Analyze and fix the following issue in the Linux kernel code: Documentation: riscv: fix insufficient list item indent
Problem Details: When adding the ISA string ordering rules, I didn't sufficiently indent one of the list items. Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/linux-doc/202301300743.bp7Dpazv-lkp@intel.com/ Fixes: f07b2b3f9d47 ("Documentation: riscv: add a section about ISA string ordering...
```diff diff --git a/Documentation/riscv/uabi.rst b/Documentation/riscv/uabi.rst index 2ebec4c52230..8960fac42c40 100644 --- a/Documentation/riscv/uabi.rst +++ b/Documentation/riscv/uabi.rst @@ -21,10 +21,10 @@ so for our purposes the following rules apply: single-letter extensions and before any higher-privileged ...
de411a8226df165a8cab9a426ceaaaafa9304ab9
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Create auxdev devlink instance in the same ns as parent devlink
Problem Details: Commit cited in "fixes" tag moved the devlink port under separate devlink entity created for auxiliary device. Respect the network namespace of parent devlink entity and allocate the devlink there. Fixes: ee75f1fc44dd ("net/mlx5e: Create separate devlink instance for ethernet auxiliary device") Signed...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/devlink.c b/drivers/net/ethernet/mellanox/mlx5/core/en/devlink.c index 724de9e06c54..c6b6e290fd79 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/devlink.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/devlink.c @@ -7,12 +7,14 @@ static const s...
d5a1224aa68c8b124a4c5c390186e571815ed390
Analyze and fix the following issue in the Linux kernel code: drm/i915/gen11: Wa_1408615072/Wa_1407596294 should be on GT list
Problem Details: The UNSLICE_UNIT_LEVEL_CLKGATE register programmed by this workaround has 'BUS' style reset, indicating that it does not lose its value on engine resets. Furthermore, this register is part of the GT forcewake domain rather than the RENDER domain, so it should not be impacted by RCS engine resets. As ...
```diff diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index 949c19339015..a0740308555d 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -1355,6 +1355,13 @@ icl_gt_workarounds_init(struct intel_gt *gt, s...
fcc2cef37fed567564f5b94a9c0aba733bb159ab
Analyze and fix the following issue in the Linux kernel code: ice/ptp: fix the PTP worker retrying indefinitely if the link went down
Problem Details: When the link goes down the ice_ptp_tx_tstamp() may loop re-trying to process the packets till the 2 seconds timeout finally drops them. In such a case it makes sense to just drop them right away. Signed-off-by: Daniel Vacek <neelx@redhat.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Teste...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c index 651dc385ff5d..ac6f06f9a2ed 100644 --- a/drivers/net/ethernet/intel/ice/ice_ptp.c +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c @@ -680,6 +680,7 @@ static bool ice_ptp_tx_tstamp(struct ice_ptp_tx *tx) struct...
6cfb6df2d645c00513ecf17832928e08979fa953
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix FreeSync active bit issue
Problem Details: [Why] The FreeSync active bit unconditionally set in HDMI VSIF. [How] Set this bit to true when FAMS is enable on desktop. Reviewed-by: Felipe Clark <felipe.clark@amd.com> Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com> Signed-off-by: Leo (Hanghong) Ma <hanghong.ma@amd.com> Tested-by: Daniel Wheeler ...
```diff diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c index 315da61ee897..2be45b314922 100644 --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c @@ -955,20 +955,26 @@...
48e99fe4d3ba83d6b7bf288e90b360f83e1c6924
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Remove the unused variable pre_connection_type
Problem Details: Variable pre_connection_type is not effectively used, so delete it. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4031 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c b/drivers/gpu/drm/amd/display/dc/link/link_detection.c index 001a4ac9bfcf..29cdb61d66c8 100644 --- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c +++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c @@ -859,7 +859,6 @@ static bool d...
ee3916b45add7ba9fa59b0e9832a5d24d34047d7
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Remove the unused variable ds_port
Problem Details: Variable ds_port is not effectively used, so delete it. drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c:280:35: warning: variable ‘ds_port’ set but not used. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4030 Signe...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c index cb38afde3fc8..4874d1bf1dcb 100644 --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +++ b/drivers/gpu/drm/amd/display/dc/link/protocol...
d6ed6d0d2aa8f238ca20ed03f24355336ff77dff
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix video glitch while drag window in PSR-SU
Problem Details: [Why] Dmub will cache the video position data during PSR-SU enable. The dmub will use an outdated MPO video position if user try to drag the video window and it will cause video glitch. [How] Disable the PSR-SU temporarily while user drag the video window. The PSR-SU will be re-enabled after the video...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index e532ef2a16ad..c13efba9e51c 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -5044,6 +5044,7 @@ out: * @new_plane_sta...
e54b214946136ba773fbce9a3b8b4d1ab9d0ad77
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: clean up some inconsistent indentings
Problem Details: drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c:145 get_ddc_line() warn: inconsistent indenting drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c:201 dc_link_construct_phy() warn: inconsistent indenting Reported-by: Abaci Robot <abaci@linux.alibaba.com> Link: https://bugzilla.o...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/link/link_factory.c b/drivers/gpu/drm/amd/display/dc/link/link_factory.c index f5926467bce5..aeb26a4d539e 100644 --- a/drivers/gpu/drm/amd/display/dc/link/link_factory.c +++ b/drivers/gpu/drm/amd/display/dc/link/link_factory.c @@ -142,7 +142,7 @@ static enum channel_i...
d2c40a2d750e53f871a732d1cc11b92239cd3405
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Simplify bool conversion
Problem Details: ./drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c:1610:68-73: WARNING: conversion to bool not needed here Reported-by: Abaci Robot <abaci@linux.alibaba.com> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4025 Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: A...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c index 24d356ebd7a9..cb38afde3fc8 100644 --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +++ b/drivers/gpu/drm/amd/display/dc/link/protocol...
f0584be558719e0a7efc78613baa0eafcae05fbe
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: add NULL pointer check
Problem Details: [Why] In virtual link use case, link->ddc could be NULL. [How] Add null pointer check to avoid undefined behavior. Reviewed-by: Martin Leung <Martin.Leung@amd.com> Reviewed-by: Hansen Dsouza <hansen.dsouza@amd.com> Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com> Signed-off-by: Charlene Liu <Charlene....
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c index acc7e40e4383..a1a29c508394 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c @@ -3223,12 +...
ed6941b632100169aea453f60461ab79111af48c
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: on dp link lost event toggle dpms for master pipe only
Problem Details: [why] We mistakenly toggle dpms state for non master pipe when handling link lost. A non master pipe doesn't connect to a backend. So it is toggling dpms for non master is undefined and caused NULL pointer dereference. [how] Add helper functions to find an array of active master pipes for current link...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c b/drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c index 769b782a9b84..ee290ec247de 100644 --- a/drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c +++ b/drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts...
3a61570415690e9d5e7f10a288d25d49163f819d
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix prefetch vratio check
Problem Details: [Why & How] - For prefetch max vratio check, use the calculated prefetch bandwidth from dml32_CalculatePrefetchSchedule instead of max prefetch bandwidth - Also multiply prefetch bandwidth by VRatio since scaling is not considered one calculating require prefetch bw Reviewed-by: Jun Lei <Jun.Lei...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c index 55567b9fcfc8..7a99a6656676 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vb...
3b214bb7185d8284d7d4c53e15127f69a375abf6
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: fix k1 k2 divider programming for phantom streams
Problem Details: [Why & How] When k1 and k2 divider programming logic is executed for a phantom stream, the corresponding master stream should be used for the calculation. Fix the if condition to use the master stream for checking signal type instead of the phantom stream. Reviewed-by: Alvin Lee <Alvin.Lee2@amd.com> A...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c index 8a472118ff70..16f892125b6f 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c @@ -1098,13 +1098,13 @@ unsigned int dcn3...
b3551ead616318ea155558cdbe7e91495b8d9b33
Analyze and fix the following issue in the Linux kernel code: iommufd: Make sure to zero vfio_iommu_type1_info before copying to user
Problem Details: Missed a zero initialization here. Most of the struct is filled with a copy_from_user(), however minsz for that copy is smaller than the actual struct by 8 bytes, thus we don't fill the padding. Cc: stable@vger.kernel.org # 6.1+ Fixes: d624d6652a65 ("iommufd: vfio container FD ioctl compatibility") Li...
```diff diff --git a/drivers/iommu/iommufd/vfio_compat.c b/drivers/iommu/iommufd/vfio_compat.c index 8e38bb02d5e1..514494a0025b 100644 --- a/drivers/iommu/iommufd/vfio_compat.c +++ b/drivers/iommu/iommufd/vfio_compat.c @@ -448,7 +448,7 @@ static int iommufd_vfio_iommu_get_info(struct iommufd_ctx *ictx, }; size_t mi...
be9f1daad7b4064474a6e5dd03c55b882c9cf928
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix the warning info when unload or remove amdgpu
Problem Details: Checking INVOKE_CMD to fix the below warning info when unload or remove amdgpu driver [ 319.489809] Call Trace: [ 319.489810] <TASK> [ 319.489812] psp_ta_unload+0x9a/0xd0 [amdgpu] [ 319.489926] ? smu_smc_hw_cleanup+0x2f6/0x360 [amdgpu] [ 319.490072] psp_hw_fini+0xea/0x170 [amdgpu] [ 319.490...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 40929f34447c..15e601f09648 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -620,7 +620,8 @@ psp_cmd_submit_buf(struct psp_context *psp, */ if (!dev_ente...
b46d80bd2d6e7e063c625a20de54248afe8d4889
Analyze and fix the following issue in the Linux kernel code: nfs4trace: fix state manager flag printing
Problem Details: __print_flags wants a mask, not the enum value. Add two more flags. Fixes: 511ba52e4c01 ("NFS4: Trace state recovery operation") Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
```diff diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h index 214bc56f92d2..d27919d7241d 100644 --- a/fs/nfs/nfs4trace.h +++ b/fs/nfs/nfs4trace.h @@ -292,32 +292,34 @@ TRACE_DEFINE_ENUM(NFS4CLNT_MOVED); TRACE_DEFINE_ENUM(NFS4CLNT_LEASE_MOVED); TRACE_DEFINE_ENUM(NFS4CLNT_DELEGATION_EXPIRED); TRACE_DEFINE_ENUM(NF...
0b22ff5360f5c4e11050b89206370fdf7dc0a226
Analyze and fix the following issue in the Linux kernel code: dm: remove flush_scheduled_work() during local_exit()
Problem Details: Commit acfe0ad74d2e1 ("dm: allocate a special workqueue for deferred device removal") switched from using system workqueue to a single workqueue local to DM. But it didn't eliminate the call to flush_scheduled_work() that was introduced purely for the benefit of deferred device removal with commit 2c1...
```diff diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 50dc1f4e4615..90b64bfc63b0 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -233,7 +233,6 @@ out_uevent_exit: static void local_exit(void) { - flush_scheduled_work(); destroy_workqueue(deferred_remove_workqueue); unregister_blkdev(_major, _name...
23fda2effbb1f2f1d2fb0640a4729e6d08ad6e6e
Analyze and fix the following issue in the Linux kernel code: dm: fix suspect indent whitespace
Problem Details: Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
```diff diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c index 8de5e4df0661..6ee3599f9400 100644 --- a/drivers/md/dm-cache-target.c +++ b/drivers/md/dm-cache-target.c @@ -189,7 +189,7 @@ static void issue_after_commit(struct batcher *b, struct bio *bio) spin_unlock_irq(&b->lock); if (commi...
8d1058fb2ac29644d8a427eb3d3eeff2fd88f0a7
Analyze and fix the following issue in the Linux kernel code: dm: fix use of sizeof() macro
Problem Details: Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
```diff diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index 64b972f7d60e..cf077f9b30c3 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c @@ -1815,7 +1815,7 @@ struct dm_bufio_client *dm_bufio_client_create(struct block_device *bdev, unsign (block_size < PAGE_SIZE || !is_power_of_2(block_...
b30f1607146c736684c069fe92dc39607d77d15f
Analyze and fix the following issue in the Linux kernel code: dm: add missing blank line after declarations/fix those
Problem Details: Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
```diff diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index de646eca6de0..e777d7f4669d 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -33,7 +33,7 @@ static bool devices_handle_discard_safely; /* - * The following flags are used by dm-raid.c to set up the array state. + * The following fl...
03b18887703c5fa342896e52e873812ea33d964b
Analyze and fix the following issue in the Linux kernel code: dm: fix trailing statements
Problem Details: Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
```diff diff --git a/drivers/md/dm-flakey.c b/drivers/md/dm-flakey.c index 1f469161998e..51116e9008e5 100644 --- a/drivers/md/dm-flakey.c +++ b/drivers/md/dm-flakey.c @@ -357,8 +357,7 @@ static int flakey_map(struct dm_target *ti, struct bio *bio) if (test_bit(DROP_WRITES, &fc->flags)) { bio_endio(bio); retu...
43be9c743c2553519c2093d1798b542f28095a51
Analyze and fix the following issue in the Linux kernel code: dm: fix undue/missing spaces
Problem Details: Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
```diff diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index f6e880a0e00c..5cb85c353275 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -1579,7 +1579,7 @@ static void retrieve_deps(struct dm_table *table, /* * Count the devices. */ - list_for_each (tmp, dm_table_get_devices(table))...
96780ca55e3cbf4f150fd5a833a61492c9947b5b
Analyze and fix the following issue in the Linux kernel code: NFS: fix up nfs_release_folio() to try to release the page
Problem Details: If the gfp context allows it, and we're not kswapd, then try to write out the folio that has private data. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
```diff diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 563c5e0c55e8..3bed75c5250b 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -432,8 +432,13 @@ static bool nfs_release_folio(struct folio *folio, gfp_t gfp) dfprintk(PAGECACHE, "NFS: release_folio(%p)\n", folio); /* If the private flag is set, then the foli...
4fa7a717b432c3311192aa85a34fedf5f8de4689
Analyze and fix the following issue in the Linux kernel code: NFS: Fix up nfs_vm_page_mkwrite() for folios
Problem Details: Mechanical conversion of struct page and functions into the folio equivalents. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
```diff diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 39ee7fb3f79f..563c5e0c55e8 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -556,23 +556,22 @@ const struct address_space_operations nfs_file_aops = { */ static vm_fault_t nfs_vm_page_mkwrite(struct vm_fault *vmf) { - struct page *page = vmf->page; struct ...
8e0bdc7021f713fdf3b985cda3ce715e41b06698
Analyze and fix the following issue in the Linux kernel code: NFS: Fix nfs_coalesce_size() to work with folios
Problem Details: Use the helper folio_size() where appropriate. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
```diff diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 174462722266..16c146ca7ffc 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -1084,6 +1084,24 @@ static bool nfs_match_lock_context(const struct nfs_lock_context *l1, return l1->lockowner == l2->lockowner; } +static bool nfs_page_is_contiguou...
785207aa3d61ec1cb86e4441bff0a37c412ebd10
Analyze and fix the following issue in the Linux kernel code: NFS: Fix for xfstests generic/208
Problem Details: If the same page and data is being used for multiple requests, then ignore that when the request indicates we're reading from the start of the page. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
```diff diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 16be6dae524f..369e4553399a 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -920,6 +920,9 @@ int nfs_generic_pgio(struct nfs_pageio_descriptor *desc, req = nfs_list_entry(head->next); nfs_list_move_request(req, &hdr->pages); + if (req->w...
7533afa1d27ba1234146d31d2402c195cf195962
Analyze and fix the following issue in the Linux kernel code: dm: send just one event on resize, not two
Problem Details: Device mapper sends an uevent when the device is suspended, using the function set_capacity_and_notify. However, this causes a race condition with udev. Udev skips scanning dm devices that are suspended. If we send an uevent while we are suspended, udev will be racing with device mapper resume code. I...
```diff diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 9160159ef881..a3b86716f606 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -482,7 +482,7 @@ static struct mapped_device *dm_hash_rename(struct dm_ioctl *param, dm_table_event(table); dm_put_live_table(hc->md, srcu_idx); - ...
cf08e29db760b144bde51e2444f3430c75763e26
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: fix off-by-one link setting
Problem Details: The convention for find_first_bit() is 0-based, while ffs() is 1-based, so this is now off-by-one. I cannot reproduce the gcc-9 problem, but since the -1 is now removed, I'm hoping it will still avoid the original issue. Reported-by: Alexander Lobakin <alexandr.lobakin@intel.com> Fixes: 1d8d4af43474 (...
```diff diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 118648af979c..7699fb410670 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -4434,7 +4434,7 @@ static void ieee80211_mlo_multicast_tx(struct net_device *dev, u32 ctrl_flags = IEEE80211_TX_CTRL_MCAST_MLO_FIRST_TX; if (hweight16(links) == 1) ...
a46bebd502fe1a3bd1d22f64cedd93e7e7702693
Analyze and fix the following issue in the Linux kernel code: f2fs: synchronize atomic write aborts
Problem Details: To fix a race condition between atomic write aborts, I use the inode lock and make COW inode to be re-usable thoroughout the whole atomic file inode lifetime. Reported-by: syzbot+823000d23b3400619f7c@syzkaller.appspotmail.com Fixes: 3db1de0e582c ("f2fs: change the current atomic write way") Signed-off...
```diff diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 300eae8b5415..6436c52e7913 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1863,7 +1863,10 @@ static int f2fs_release_file(struct inode *inode, struct file *filp) atomic_read(&inode->i_writecount) != 1) return 0; + inode_lock(inode); f2fs_abort_...
7e986855fe13de2c8290c1102292d8e5f29dd769
Analyze and fix the following issue in the Linux kernel code: f2fs: fix wrong segment count
Problem Details: MAIN_SEGS is for data area, while TOTAL_SEGS includes data and metadata. Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
```diff diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 92c8be00d396..efdb7fc3b797 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -719,9 +719,10 @@ static inline unsigned char curseg_alloc_type(struct f2fs_sb_info *sbi, return curseg->alloc_type; } -static inline void check_seg_range(struct f2f...
0967bf837784a11c65d66060623a74e65211af0b
Analyze and fix the following issue in the Linux kernel code: ixgbe: add double of VLAN header when computing the max MTU
Problem Details: Include the second VLAN HLEN into account when computing the maximum MTU size as other drivers do. Fixes: fabf1bce103a ("ixgbe: Prevent unsupported configurations with XDP") Signed-off-by: Jason Xing <kernelxing@tencent.com> Reviewed-by: Alexander Duyck <alexanderduyck@fb.com> Tested-by: Chandan Kumar...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h index bc68b8f2176d..8736ca4b2628 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h @@ -73,6 +73,8 @@ #define IXGBE_RXBUFFER_4K 4096 #define IXGBE_MAX_RXBUFFER ...
ce45ffb815e8e238f05de1630be3969b6bb15e4e
Analyze and fix the following issue in the Linux kernel code: i40e: add double of VLAN header when computing the max MTU
Problem Details: Include the second VLAN HLEN into account when computing the maximum MTU size as other drivers do. Fixes: 0c8493d90b6b ("i40e: add XDP support for pass and drop actions") Signed-off-by: Jason Xing <kernelxing@tencent.com> Reviewed-by: Alexander Duyck <alexanderduyck@fb.com> Tested-by: Chandan Kumar Ro...
```diff diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 4626d2a1af91..52eec0a50492 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -2921,7 +2921,7 @@ static int i40e_change_mtu(struct net_device *n...
f9cd6a4418bac6a046ee78382423b1ae7565fb24
Analyze and fix the following issue in the Linux kernel code: ixgbe: allow to increase MTU to 3K with XDP enabled
Problem Details: Recently I encountered one case where I cannot increase the MTU size directly from 1500 to a much bigger value with XDP enabled if the server is equipped with IXGBE card, which happened on thousands of servers in production environment. After applying the current patch, we can set the maximum MTU size ...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index ab8370c413f3..25ca329f7d3c 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -6777,6 +6777,18 @@ static void ixgbe_free_all_rx_resource...
997e010de9134474dbfde52be03efd7d1bce902d
Analyze and fix the following issue in the Linux kernel code: PCI: qcom: Fix host-init error handling
Problem Details: Implement the new host_deinit() callback so that the PHY is powered off and regulators and clocks are disabled also on late host-init errors. Link: https://lore.kernel.org/r/20221017114705.8277-2-johan+linaro@kernel.org Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver") Signed-off-...
```diff diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index b9350d93b4ba..0034cccf5038 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -1534,8 +1534,19 @@ err_deinit: return ret; } +static void qcom_pcie_host_deinit(...
b6b17a8b3ecd878d98d5472a9023ede9e669ca72
Analyze and fix the following issue in the Linux kernel code: alpha: fix R_ALPHA_LITERAL reloc for large modules
Problem Details: Previously, R_ALPHA_LITERAL relocations would overflow for large kernel modules. This was because the Alpha's apply_relocate_add was relying on the kernel's module loader to have sorted the GOT towards the very end of the module as it was mapped into memory in order to correctly assign the global poin...
```diff diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c index 5b60c248de9e..cbefa5a77384 100644 --- a/arch/alpha/kernel/module.c +++ b/arch/alpha/kernel/module.c @@ -146,10 +146,8 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, base = (void *)sechdrs[sechdrs[relsec].sh_info].sh_add...
19fa21d74704a7ee1158337ccccf19f8f6d82719
Analyze and fix the following issue in the Linux kernel code: alpha: Remove redundant local asm header redirections
Problem Details: Remove a number of asm headers locally redirected to the respective generic or generated versions. For asm-offsets.h all that is needed is a Kbuild entry for the generic version, and for div64.h, irq_regs.h and kdebug.h nothing is needed as in their absence they will be redirected automatically accord...
```diff diff --git a/arch/alpha/include/asm/Kbuild b/arch/alpha/include/asm/Kbuild index 42911c8340c7..a8e769049fb4 100644 --- a/arch/alpha/include/asm/Kbuild +++ b/arch/alpha/include/asm/Kbuild @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 generated-y += syscall_table.h +generic-y += asm-offsets.h generic-y ...
25d10262ed8aae71cd2f0b3c0a90d06a6b79fba2
Analyze and fix the following issue in the Linux kernel code: dt-bindings: hwlock: sun6i: Add missing #hwlock-cells
Problem Details: The allwinner,sun6i-a31-hwspinlock.yaml binding needs #hwlock-cells which is required by the hwlock type. Fixes: f9e784dcb63f ("dt-bindings: hwlock: add sun6i_hwspinlock") Signed-off-by: Bastian Germann <bage@debian.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Andre...
```diff diff --git a/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml b/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml index 10e5a53e447b..01b1bbb3061f 100644 --- a/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml +++ b/Documentation/...
6f998eb2fd02a7a7a529abb4c7d8bbf44fc3ff13
Analyze and fix the following issue in the Linux kernel code: dt-bindings: remoteproc: qcom,sm8550-pas: correct power domains
Problem Details: Correct CDSP and MPSS power domains to match what is used in DTS and the Linux driver: sm8550-mtp.dtb: remoteproc@32300000: power-domain-names: ['cx', 'mxc', 'nsp'] is too long Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Rob Herring <robh@kernel.org> Acked-by: Neil...
```diff diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml index ae612809e260..fe216aa531ed 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qc...
a8086bd9723ac8f1f795ab64f1de7dd0b9be889a
Analyze and fix the following issue in the Linux kernel code: remoteproc: qcom_q6v5_pas: enable sm8550 adsp & cdsp autoboot
Problem Details: Set the SM8550 adsp & cdsp auto_boot to true to match the behavior of the previous platforms. Fixes: 7eddedc97563 ("remoteproc: qcom_q6v5_pas: add sm8550 adsp, cdsp & mpss compatible & data") Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org...
```diff diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 3b735ff6713b..6cc4e13c5d36 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -1126,7 +1126,7 @@ static const struct adsp_data sm8550_adsp_resource = { .pas_id = 1, .dtb_pas_id...
28980db94742f9f2fb0f68ea35f2171b38007bae
Analyze and fix the following issue in the Linux kernel code: EDAC/amd64: Shut up an -Werror,-Wsometimes-uninitialized clang false positive
Problem Details: Reportedly, clang cannot do interprocedural analysis: https://lore.kernel.org/r/20230213-amd64_edac-wsometimes-uninitialized-v1-1-5bde32b89e02@kernel.org and see that those arguments won't be used uninitialized. So, yeah, the code's fine even without this. Normally, such a "fix" won't be applied b...
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 1c4bef1cdf28..5b42533f306a 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -3928,7 +3928,7 @@ static const struct attribute_group *amd64_edac_attr_groups[] = { static int hw_info_get(struct amd64_pvt *pvt) { -...
2554dd0ac362738f588ba073d8333eb9b14f9587
Analyze and fix the following issue in the Linux kernel code: remoteproc: qcom: fix sparse warnings
Problem Details: This patch try to address below sparse warnings. drivers/remoteproc/qcom_common.c:126:27: warning: restricted __le32 degrades to integer drivers/remoteproc/qcom_common.c:133:32: warning: cast to restricted __le32 drivers/remoteproc/qcom_common.c:133:32: warning: cast from restricted __le64 Signed-off...
```diff diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c index 7810f91d3080..abf66c6876df 100644 --- a/drivers/remoteproc/qcom_common.c +++ b/drivers/remoteproc/qcom_common.c @@ -123,14 +123,14 @@ static int qcom_add_minidump_segments(struct rproc *rproc, struct minidump_subsy for (i...
8a3d95ea42921a8021b2459e22f91b4f49495e57
Analyze and fix the following issue in the Linux kernel code: dax/hmem: build hmem device support as module if possible
Problem Details: When device_hmem.o is enabled but dax itself is a loadable module, the dax_hmem support fails to link because Kbuild never compiles built-in code under drivers/dax: ERROR: modpost: "walk_hmem_resources" [drivers/dax/hmem/dax_hmem.ko] undefined! Make sure that drivers/dax is entered for compiling buil...
```diff diff --git a/drivers/Makefile b/drivers/Makefile index bdf1c66141c9..9beeee520073 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -71,7 +71,7 @@ obj-$(CONFIG_FB_INTEL) += video/fbdev/intelfb/ obj-$(CONFIG_PARPORT) += parport/ obj-y += base/ block/ misc/ mfd/ nfc/ obj-$(CONFIG_LIBNVDIMM) ...
0c16c83ed57fc66b033306ba426a5b324966a33e
Analyze and fix the following issue in the Linux kernel code: dax: cxl: add CXL_REGION dependency
Problem Details: There is already a dependency on CXL_REGION, which depends on CXL_BUS, but since CXL_REGION is a 'bool' symbol, it's possible to configure DAX as built-in even though CXL itself is a loadable module: x86_64-linux-ld: drivers/dax/cxl.o: in function `cxl_dax_region_probe': cxl.c:(.text+0xb): undefined r...
```diff diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig index bd06e16c7ac8..7e1008d756b8 100644 --- a/drivers/dax/Kconfig +++ b/drivers/dax/Kconfig @@ -47,7 +47,7 @@ config DEV_DAX_HMEM config DEV_DAX_CXL tristate "CXL DAX: direct access to CXL RAM regions" - depends on CXL_REGION && DEV_DAX + depends on CX...
7abcb0b10668eaf3c174ff383f3b2a7a8c95fb34
Analyze and fix the following issue in the Linux kernel code: cxl: avoid returning uninitialized error code
Problem Details: The new cxl_add_to_region() function returns an uninitialized value on success: drivers/cxl/core/region.c:2628:6: error: variable 'rc' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (IS_ERR(cxlr)) { ^~~~~~~~~~~~ drivers/cxl/core/region...
```diff diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c index 91bb9ac881ff..8ba71ca4135c 100644 --- a/drivers/cxl/core/region.c +++ b/drivers/cxl/core/region.c @@ -2623,10 +2623,9 @@ int cxl_add_to_region(struct cxl_port *root, struct cxl_endpoint_decoder *cxled) cxlr = to_cxl_region(region_dev); ...
8fcf2d012c8641c18adcd139dba6a1e556338d36
Analyze and fix the following issue in the Linux kernel code: ubi: block: Fix a possible use-after-free bug in ubiblock_create()
Problem Details: Smatch warns: drivers/mtd/ubi/block.c:438 ubiblock_create() warn: '&dev->list' not removed from list 'dev' is freed in 'out_free_dev:, but it is still on the list. To fix this, delete the list item before freeing. Fixes: 91cc8fbcc8c7 ("ubi: block: set BLK_MQ_F_BLOCKING") Signed-off-by: Harshit Mog...
```diff diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c index 6a9eb2c860b5..1de87062c67b 100644 --- a/drivers/mtd/ubi/block.c +++ b/drivers/mtd/ubi/block.c @@ -429,6 +429,7 @@ int ubiblock_create(struct ubi_volume_info *vi) return 0; out_remove_minor: + list_del(&dev->list); idr_remove(&ubiblock_m...
943f4e64ee177cf44d7f2c235281fcda7c32bb28
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: cs35l41: Correct error condition handling
Problem Details: Function cs_dsp_coeff_write_ctrl() can return 3 possible values: 0 - no change, 1 - value has changed and -1 - error, so positive value is not an error. Fixes: 7406bdbc4fb8 ("ASoC: wm_adsp: Return whether changed when writing controls") Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Si...
```diff diff --git a/sound/pci/hda/hda_cs_dsp_ctl.c b/sound/pci/hda/hda_cs_dsp_ctl.c index 5433f6227ac9..463ca06036bf 100644 --- a/sound/pci/hda/hda_cs_dsp_ctl.c +++ b/sound/pci/hda/hda_cs_dsp_ctl.c @@ -218,10 +218,10 @@ int hda_cs_dsp_write_ctl(struct cs_dsp *dsp, const char *name, int type, cs_ctl = cs_dsp_get_ctl(...
6f098cde9df2c86d60db727d6270272751943674
Analyze and fix the following issue in the Linux kernel code: cpufreq: qcom-hw: Add missing null pointer check
Problem Details: of_device_get_match_data() may return NULL, so add a check to prevent potential null pointer dereference. Issue reported by Qualcomm's internal static analysis tool. Fixes: 4f7961706c63 ("cpufreq: qcom-hw: Move soc_data to struct qcom_cpufreq") Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasi...
```diff diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index 957cf6bb8c05..d3f55ca06ed3 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -706,6 +706,8 @@ static int qcom_cpufreq_hw_driver_probe(struct platform_device *pdev) return -ENOMEM; ...