Bug fixes and refactoring patches related to locking
Status from this message: Applied. Thanks!
Get series with b4
b4 am [email protected]Versions newest first
30 of 62 patches are in this archive. The cover letter announces 62.
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/62 | kvm: Make pi_enable_wakeup_handler() easier to analyzearch/ | +4 | 0 replies | |
| 2/62 | blk-ioc: Prepare for enabling thread-safety analysisblock/ | +1 | 0 replies | |
| 3/62 | drbd: Balance RCU calls in drbd_adm_dump_devices()drivers/ | +6 | 0 replies | |
| 4/62 | dax/bus.c: Fix a locking bugdrivers/ | +1 | 2 replies | |
| 5/62 | dma-buf: Convert dma_buf_import_sync_file() to the early-return styledrivers/ | +6 | 0 replies | |
| 6/62 | dma-buf: Handle all dma_resv_lock() errorsdrivers/ | +5 | 0 replies | |
| 7/62 | drm/amdgpu: Unlock a mutex before destroying itdrivers/ | +1 | 2 replies | |
| 8/62 | drm/amdgpu: Fix locking bugs in error pathsdrivers/ | +7 | 0 replies | |
| 9/62 | drm: bridge: cdns-mhdp8546: Fix a locking bug in an error pathdrivers/ | +1 | 0 replies | |
| 10/62 | drm: Make drm_read() easier to analyzedrivers/ | +3 | 0 replies | |
| 11/62 | drm/pagemap: Unlock cache->lock before freeing itdrivers/ | +2 | 3 replies | |
| 12/62 | drm/gpusvm.c: Fix a locking bug in an error pathdrivers/ | +3 | 2 replies | |
| 13/62 | drm/qxl: Fix a buffer leak in an error pathdrivers/ | +1 | 0 replies | |
| 14/62 | hwmon: (it87) Check the it87_lock() return valuedrivers/ | +3 | 1 reply | |
| 15/62 | Input: synaptics-rmi4 - fix a locking bug in an error pathdrivers/ | +3 | 0 replies | |
| 16/62 | md: Make mddev_suspend() easier to analyzedrivers/ | +5 | 0 replies | |
| 17/62 | bnxt_en: Make bnxt_resume() easier to analyzedrivers/ | +1 | 0 replies | |
| 18/62 | bnxt_en: Fix bnxt_dl_reload_up()drivers/ | +2 | 0 replies | |
| 19/62 | ice: Fix a locking bug in an error pathdrivers/ | +2 | 3 replies | |
| 20/62 | octeontx2-pf: Fix locking in an error pathdrivers/ | +1 | 0 replies | |
| 21/62 | qed: Make _qed_mcp_cmd_and_union() easier to analyzedrivers/ | +30 | 0 replies | |
| 22/62 | mctp i3c: Fix locking in error pathsdrivers/ | +4 | 1 reply | |
| 23/62 | net: phy: mxl-86110: Fix locking in an error pathdrivers/ | +1 | 2 replies | |
| 24/62 | net/cw1200: Fix locking in error pathsdrivers/ | +2 | 2 replies | |
| 25/62 | wlcore: Fix a locking bugdrivers/ | +2 | 0 replies | |
| 26/62 | misc: nsm: Fix a locking bug in an error pathdrivers/ | +1 | 1 reply | |
| 27/62 | pci: Fix locking in pci_do_resource_release_and_resize() error pathsdrivers/ | +1 | 1 reply | |
| 28/62 | PNP: isapnp: Check the isapnp_cfg_begin() return valuedrivers/ | +12 | 1 reply | |
| 29/62 | fnic: Make fnic_queuecommand() easier to analyzedrivers/ | +3 | 2 replies | |
| 30/62 | megaraid: Protect more code with instance->reset_mutexdrivers/ | +9 | 0 replies |
Reviews trailers per patch
8 of 30 patches have a Reviewed-by or Acked-by.
| Patch | Matthew Brost | Alexander Graf | Dan Williams | Daniel Golle | Andrew Lunn | Yang Wang | Rafael J. Wysocki (Intel) | Jonathan Cameron | Karan Tilak Kumar | Matt Johnston |
|---|---|---|---|---|---|---|---|---|---|---|
| 1/62 | ||||||||||
| 2/62 | ||||||||||
| 3/62 | ||||||||||
| 4/62 | R-b | R-b | ||||||||
| 5/62 | ||||||||||
| 6/62 | ||||||||||
| 7/62 | R-b | |||||||||
| 8/62 | ||||||||||
| 9/62 | ||||||||||
| 10/62 | ||||||||||
| 11/62 | R-b | |||||||||
| 12/62 | ||||||||||
| 13/62 | ||||||||||
| 14/62 | ||||||||||
| 15/62 | ||||||||||
| 16/62 | ||||||||||
| 17/62 | ||||||||||
| 18/62 | ||||||||||
| 19/62 | ||||||||||
| 20/62 | ||||||||||
| 21/62 | ||||||||||
| 22/62 | A-b | |||||||||
| 23/62 | R-b | R-b | ||||||||
| 24/62 | ||||||||||
| 25/62 | ||||||||||
| 26/62 | R-b | |||||||||
| 27/62 | ||||||||||
| 28/62 | A-b | |||||||||
| 29/62 | R-b | |||||||||
| 30/62 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 10 reviewers.
Cover letter [PATCH 00/62] Bug fixes and refactoring patches related to locking
From: Bart Van Assche <[email protected]>
Hi Peter,
Annotating all source files in the kernel tree with lock context annotations led to the discovery of a significant number of locking bugs. This patch series includes fixes for the discovered bugs. Additionally, multiple refactoring patches have been included that make it easier for the compiler to verify correctness of locking operations. Please consider this patch series for the next merge window.
While the previous version of this patch series only covered mutexes, this patch series covers all synchronization operations currently annotated with lock context annotations. The previous version is available here:
[PATCH RFC 00/33] Compile-time thread-safety checking, LKML, February 2025
(https://lore.kernel.org/lkml/[email protected]/).
Thanks,
Bart.
Bart Van Assche (62):
kvm: Make pi_enable_wakeup_handler() easier to analyze
blk-ioc: Prepare for enabling thread-safety analysis
drbd: Balance RCU calls in drbd_adm_dump_devices() dax/bus.c: Fix a locking bug
dma-buf: Convert dma_buf_import_sync_file() to the early-return style
dma-buf: Handle all dma_resv_lock() errors
drm/amdgpu: Unlock a mutex before destroying it drm/amdgpu: Fix locking bugs in error paths
drm: bridge: cdns-mhdp8546: Fix a locking bug in an error path
drm: Make drm_read() easier to analyze
drm/pagemap: Unlock cache->lock before freeing it drm/gpusvm.c: Fix a locking bug in an error path
drm/qxl: Fix a buffer leak in an error path
hwmon: (it87) Check the it87_lock() return value
Input: synaptics-rmi4 - fix a locking bug in an error path
md: Make mddev_suspend() easier to analyze
bnxt_en: Make bnxt_resume() easier to analyze
bnxt_en: Fix bnxt_dl_reload_up()
ice: Fix a locking bug in an error path
octeontx2-pf: Fix locking in an error path
qed: Make _qed_mcp_cmd_and_union() easier to analyze
mctp i3c: Fix locking in error paths
net: phy: mxl-86110: Fix locking in an error path net/cw1200: Fix locking in error paths
wlcore: Fix a locking bug
misc: nsm: Fix a locking bug in an error path
pci: Fix locking in pci_do_resource_release_and_resize() error paths
PNP: isapnp: Check the isapnp_cfg_begin() return value
fnic: Make fnic_queuecommand() easier to analyze
megaraid: Protect more code with instance->reset_mutex
target: Make transport_handle_queue_full() easier to analyze
usbip: Move a check outside put_busid_priv()
fbdev/omap2: Make the source code easier to analyze
btrfs: Fix a bug in try_release_subpage_extent_buffer()
cachefiles: Fix a locking bug in an error path
f2fs: Fix handling of radix_tree_preload() failures
lib: Split codetag_lock_module_list()
treewide: Modify mutex_lock_interruptible() return value checks accel/ivpu: Check the ivpu_bo_lock() return value
dma-buf: Check the dma_resv_lock() return value
drm: Check the dma_resv_lock() return value
drm/amdgpu: Check the dma_resv_lock() return value drm/gma500: Check the dma_resv_lock() return value drm/i915: Check the dma_resv_lock() return value drm/imagination: Check the dma_resv_lock() return value drm/lima: Check the dma_resv_lock() return value drm/loongson: Check the dma_resv_lock() return value drm/msm: Check the dma_resv_lock() return value drm/nouveau: Check the dma_resv_lock() return value drm/panfrost: Check the dma_resv_lock() return value drm/panthor: Check the dma_resv_lock() return value drm/radeon: Check the dma_resv_lock() return value drm/ttm: Check the dma_resv_lock() return value
drm/vgem: Check the dma_resv_lock() return value drm/virtio: Check the dma_resv_lock() return value drm/vmwgfx: Check the dma_resv_lock() return value
drm/xe: Check the dma_resv_lock() return value
RDMA/core: Check the dma_resv_lock() return value RDMA/mlx5: Check the dma_resv_lock() return value
iommufd: Check the dma_resv_lock() return value
vfio/pci: Check the dma_resv_lock() return value
dma-resv: Make checking the dma_resv_lock() return value mandatory
arch/x86/kvm/vmx/posted_intr.c | 7 +- block/blk-ioc.c | 2 +- drivers/accel/ivpu/ivpu_gem.c | 41 ++++++++---- drivers/block/drbd/drbd_nl.c | 8 ++- drivers/dax/bus.c | 3 +- drivers/dma-buf/dma-buf.c | 66 +++++++++++++------ drivers/dma-buf/dma-resv.c | 6 +- drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 4 +- drivers/gpio/gpio-mlxbf2.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c | 12 ++-- .../drm/bridge/cadence/cdns-mhdp8546-core.c | 3 +- drivers/gpu/drm/drm_file.c | 5 +- drivers/gpu/drm/drm_gem.c | 17 +++-- drivers/gpu/drm/drm_gem_shmem_helper.c | 42 ++++++++---- drivers/gpu/drm/drm_gpusvm.c | 5 +- drivers/gpu/drm/drm_gpuvm.c | 4 +- drivers/gpu/drm/drm_mode_config.c | 7 +- drivers/gpu/drm/drm_pagemap_util.c | 2 + drivers/gpu/drm/drm_prime.c | 4 +- drivers/gpu/drm/gma500/gem.c | 10 ++- drivers/gpu/drm/i915/i915_vma.h | 4 +- drivers/gpu/drm/imagination/pvr_gem.c | 9 ++- drivers/gpu/drm/imagination/pvr_job.c | 4 +- drivers/gpu/drm/imagination/pvr_vm.c | 4 +- drivers/gpu/drm/lima/lima_gem.c | 4 +- drivers/gpu/drm/loongson/lsdc_gem.c | 6 +- drivers/gpu/drm/msm/msm_gem.h | 4 +- drivers/gpu/drm/nouveau/nouveau_gem.c | 14 ++-- drivers/gpu/drm/nouveau/nouveau_prime.c | 4 +- drivers/gpu/drm/nouveau/nouveau_uvmm.c | 15 +++-- drivers/gpu/drm/panfrost/panfrost_gem.c | 10 ++- drivers/gpu/drm/panfrost/panfrost_mmu.c | 4 +- drivers/gpu/drm/panthor/panthor_gem.c | 10 ++- drivers/gpu/drm/panthor/panthor_mmu.c | 7 +- drivers/gpu/drm/qxl/qxl_ioctl.c | 2 +- drivers/gpu/drm/radeon/radeon_prime.c | 4 +- drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 39 +++++++---- .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 7 +- drivers/gpu/drm/ttm/tests/ttm_resource_test.c | 4 +- drivers/gpu/drm/ttm/tests/ttm_tt_test.c | 15 +++-- drivers/gpu/drm/ttm/ttm_bo.c | 9 ++- drivers/gpu/drm/vgem/vgem_fence.c | 4 +- drivers/gpu/drm/virtio/virtgpu_plane.c | 11 ++-- drivers/gpu/drm/virtio/virtgpu_prime.c | 18 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_gem.c | 4 +- drivers/gpu/drm/xe/xe_bo.c | 4 +- drivers/gpu/drm/xe/xe_ggtt.c | 2 +- drivers/gpu/drm/xe/xe_pm.c | 4 +- drivers/hwmon/gigabyte_waterforce.c | 2 +- drivers/hwmon/it87.c | 4 +- drivers/hwmon/nzxt-kraken3.c | 2 +- drivers/infiniband/core/ib_core_uverbs.c | 5 +- drivers/infiniband/core/umem_dmabuf.c | 10 ++- .../infiniband/core/uverbs_std_types_dmabuf.c | 6 +- drivers/infiniband/hw/mlx5/mr.c | 21 ++++-- drivers/infiniband/hw/mlx5/odp.c | 4 +- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- drivers/infiniband/ulp/srpt/ib_srpt.c | 4 +- drivers/input/rmi4/rmi_f54.c | 5 +- drivers/iommu/iommufd/pages.c | 10 ++- drivers/iommu/iommufd/selftest.c | 4 +- drivers/leds/leds-blinkm.c | 2 +- drivers/md/md.c | 9 +-- drivers/media/dvb-frontends/bcm3510.c | 2 +- drivers/media/dvb-frontends/dib0070.c | 4 +- drivers/media/dvb-frontends/dib0090.c | 8 +-- drivers/media/dvb-frontends/dib7000m.c | 4 +- drivers/media/dvb-frontends/dib7000p.c | 4 +- drivers/media/dvb-frontends/dib8000.c | 10 +-- drivers/media/dvb-frontends/dib9000.c | 42 ++++++------ drivers/media/dvb-frontends/dibx000_common.c | 10 +-- drivers/media/usb/dvb-usb-v2/af9035.c | 2 +- drivers/media/usb/dvb-usb-v2/anysee.c | 2 +- drivers/media/usb/dvb-usb-v2/au6610.c | 2 +- drivers/media/usb/dvb-usb-v2/az6007.c | 6 +- drivers/media/usb/dvb-usb-v2/ce6230.c | 2 +- drivers/media/usb/dvb-usb-v2/dvbsky.c | 2 +- drivers/media/usb/dvb-usb-v2/ec168.c | 2 +- drivers/media/usb/dvb-usb-v2/lmedm04.c | 2 +- drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c | 2 +- drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 2 +- drivers/media/usb/dvb-usb/af9005.c | 2 +- drivers/media/usb/dvb-usb/az6027.c | 2 +- drivers/media/usb/dvb-usb/cxusb.c | 2 +- drivers/media/usb/dvb-usb/dib0700_core.c | 20 +++--- drivers/media/usb/dvb-usb/dibusb-common.c | 2 +- drivers/media/usb/dvb-usb/digitv.c | 2 +- drivers/media/usb/dvb-usb/dtv5100.c | 2 +- drivers/media/usb/dvb-usb/dvb-usb-urb.c | 3 +- drivers/media/usb/dvb-usb/dw2102.c | 16 ++--- drivers/media/usb/dvb-usb/gp8psk.c | 6 +- drivers/media/usb/dvb-usb/m920x.c | 2 +- drivers/media/usb/dvb-usb/opera1.c | 4 +- drivers/media/usb/dvb-usb/pctv452e.c | 4 +- drivers/media/usb/dvb-usb/technisat-usb2.c | 10 +-- drivers/media/usb/dvb-usb/ttusb2.c | 2 +- drivers/media/usb/dvb-usb/vp702x.c | 5 +- .../media/usb/ttusb-budget/dvb-ttusb-budget.c | 4 +- drivers/media/usb/uvc/uvc_ctrl.c | 6 +- drivers/misc/nsm.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- .../net/ethernet/broadcom/bnxt/bnxt_devlink.c | 2 + drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 4 +- .../ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/i2c.c | 4 +- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 56 ++++++++-------- drivers/net/mctp/mctp-i3c.c | 5 +- drivers/net/phy/mxl-86110.c | 2 +- drivers/net/usb/cdc_subset.c | 2 +- drivers/net/wireless/intersil/p54/p54usb.c | 2 +- drivers/net/wireless/st/cw1200/pm.c | 2 + drivers/net/wireless/ti/wlcore/main.c | 4 +- drivers/net/wireless/ti/wlcore/sysfs.c | 2 +- drivers/pci/setup-bus.c | 2 +- drivers/platform/x86/lenovo/thinkpad_acpi.c | 12 ++-- drivers/pnp/isapnp/core.c | 16 +++-- drivers/scsi/fnic/fnic_scsi.c | 9 +-- drivers/scsi/hpsa.c | 2 +- drivers/scsi/megaraid/megaraid_sas_base.c | 15 +++-- drivers/target/target_core_transport.c | 2 +- drivers/tty/tty_io.c | 6 +- drivers/usb/class/cdc-wdm.c | 3 +- drivers/usb/class/usblp.c | 2 +- drivers/usb/class/usbtmc.c | 2 +- drivers/usb/core/message.c | 2 +- drivers/usb/core/sysfs.c | 24 +++---- drivers/usb/gadget/legacy/inode.c | 13 ++-- drivers/usb/misc/yurex.c | 2 +- drivers/usb/storage/transport.c | 2 +- drivers/usb/usb-skeleton.c | 2 +- drivers/usb/usbip/stub_dev.c | 21 ++++-- drivers/usb/usbip/stub_main.c | 3 +- drivers/usb/usbip/stub_rx.c | 2 +- drivers/vfio/pci/vfio_pci_dmabuf.c | 25 ++++--- .../video/fbdev/omap2/omapfb/omapfb-ioctl.c | 4 +- .../video/fbdev/omap2/omapfb/omapfb-main.c | 4 +- .../video/fbdev/omap2/omapfb/omapfb-sysfs.c | 4 +- drivers/video/fbdev/omap2/omapfb/omapfb.h | 4 +- drivers/w1/masters/omap_hdq.c | 8 +-- fs/afs/validation.c | 2 +- fs/afs/vl_alias.c | 6 +- fs/btrfs/extent_io.c | 1 + fs/cachefiles/namei.c | 1 - fs/f2fs/checkpoint.c | 8 ++- fs/f2fs/node.c | 8 ++- fs/fsopen.c | 2 +- fs/orangefs/devorangefs-req.c | 2 +- fs/proc/base.c | 2 +- include/linux/codetag.h | 3 +- include/linux/dma-resv.h | 4 +- kernel/seccomp.c | 10 +-- lib/alloc_tag.c | 8 +-- lib/codetag.c | 12 ++-- mm/kmemleak.c | 4 +- net/rxrpc/recvmsg.c | 2 +- net/rxrpc/sendmsg.c | 2 +- security/integrity/ima/ima_fs.c | 2 +- sound/pci/oxygen/oxygen_lib.c | 2 +- 160 files changed, 695 insertions(+), 443 deletions(-)