git: fuse: fix a lost wakeup in the I/O helper

Aaron LI aly at crater.dragonflybsd.org
Wed Nov 18 05:12:57 PST 2026


commit 053116cafd76a7ce620ebdfedcf6869e986e327d
Author: David Bidner <david at crap.solutions>
Date:   Sun Nov 1 08:32:42 2026 +0100

    fuse: fix a lost wakeup in the I/O helper
    
    fuse_io_thread() slept first and drained the queue only after waking.
    After draining it released helper_spin and called tsleep()
    unconditionally.  fuse_vop_strategy() queues a bio under helper_spin,
    drops the lock and then calls wakeup(), so a wakeup that arrived
    between that final spin_unlock() and the interlock taken inside
    tsleep() was lost.  The helper then slept forever with the bio queued
    and the caller hung in biowait().
    
    Hold helper_spin while checking the queue and use ssleep(), which
    takes the sleep-queue interlock and drops the spinlock in one step,
    so the wakeup cannot be lost.
    
    Bug: https://bugs.dragonflybsd.org/issues/3459

Summary of changes:
 sys/vfs/fuse/fuse_vnops.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/053116cafd76a7ce620ebdfedcf6869e986e327d


-- 
DragonFly BSD source repository


More information about the Commits mailing list