CVE-2026-89491: ocfs2: cluster: don't sleep while holding o2hb_live_lock in o2hb_region_pin()

Published Sep 11, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

ocfs2: cluster: don't sleep while holding o2hblivelock in o2hbregionpin()

Patch series "ocfs2: cluster: o2hbregionpin() fixes", v2.

This series fixes three related issues in o2hbregionpin(), all are from the original implementation in commit: 58a3158a5d17 ("ocfs2/cluster: Pin/unpin o2hb regions"):

1) It is called with o2hblivelock (a spinlock) held, but the underlying configfsdependitem() sleeps (takes inode rwsem and pins the filesystem). This triggers BUG under CONFIGDEBUGATOMICSLEEP.

2) When called from the configfs dropitem callback, it creates a lock order inversion: parent inodelock -> configfs root inodelock, which can deadlock against subsystem unregistration paths taking root -> parent.

3) If pinning fails partway through o2hbregionincuser(), the o2hbdependentusers counter is leaked and partially-pinned regions are never released, leaving heartbeat regions unprotected on subsequent mounts.

Patch 1 reworks o2hbregionpin() to drop o2hblivelock across each sleeping configfsdependitem() call, using a configitem reference to keep the region alive while unlocked.

Patch 2 adds a fromcallback parameter to select configfsdependitemunlocked() when called from configfs context, avoiding the inodelock nesting.

Patch 3 fixes the error path in o2hbregionincuser() to unpin and decrement the counter on failure.

This patch (of 3):

o2hbregionpin() is always called with the o2hblivelock spinlock held (from o2hbregionincuser() and o2hbheartbeatgroupdropitem()), but it calls o2nmdependitem() -> configfsdependitem(), which sleeps: it pins the configfs filesystem and takes the configfs root inode rwsem. Under CONFIGDEBUGATOMICSLEEP this triggers:

BUG: sleeping function called from invalid context at kernel/locking/rwsem.c inatomic(): 1, ... name: mount.ocfs2 downwrite configfsdependitem o2hbregionpin o2hbregionincuser o2hbregistercallback dlmregisterdomainhandlers ... ocfs2dlminit ocfs2mountvolume ocfs2fillsuper

Rework o2hbregionpin() to pin one region at a time with the lock dropped across the sleeping call: under o2hblivelock find the next eligible region and take a configitem reference to keep it alive, drop the lock, call o2nmdependitem(), then retake the lock and record the pin. The configitemput() is done with the lock released as well, since o2hbregionrelease() also acquires o2hblivelock and can sleep. The region list may change while unlocked, so the scan restarts from the top after each pin. Local heartbeat still pins only the matching region; global heartbeat pins all eligible regions.

The unpin path is unaffected: configfsundependitem() only takes a spinlock and does not sleep.

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch ocfs2: cluster: o2hb_region_pin() fixes
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch Local heartbeat still pins only the matching region
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch Patch 1 reworks o2hb_region_pin() to drop o2hb_live_lock across each
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch Patch 2 adds a from_callback parameter to select
  5. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch Patch 3 fixes the error path in o2hb_region_inc_user() to unpin and
  6. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch Patch series "ocfs2: cluster: o2hb_region_pin() fixes", v2.

Event History

Sep 11, 2026
CVE Published
via MITRE·07:43 PM
Data Sourced
via MITRE·07:43 PM
Description

Frequently Asked Questions

1

How might this issue present in an affected system?

Systems built with CONFIG_DEBUG_ATOMIC_SLEEP can trigger a BUG because configfs_depend_item() may sleep while o2hb_live_lock, a spinlock, is held. A lock-order inversion can also deadlock with subsystem unregistration paths.

2

What is the impact if region pinning fails partway through user registration?

The o2hb_dependent_users counter can leak, and partially pinned heartbeat regions may never be released. This can leave heartbeat regions unprotected during subsequent mounts.

3

Which operations are involved in the deadlock scenario?

The inversion occurs when o2hb_region_pin() is called from the configfs drop_item callback: that path takes the parent inode lock before the configfs root inode lock. Subsystem unregistration can take those locks in the opposite root-to-parent order.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203