git: kdmsg: shut down the transport while waiting for reconnect workers

Aaron LI aly at crater.dragonflybsd.org
Mon Oct 5 06:32:14 PDT 2026


commit bcbcc84a901cb2810c2c10b30f7a602edc235e9d
Author: David Bidner <david at crap.solutions>
Date:   Sun Oct 4 05:53:08 2026 +0200

    kdmsg: shut down the transport while waiting for reconnect workers
    
    KILLRX and a wakeup on msg_ctl do not interrupt a reader blocked in
    fp_read() on a quiet connection. Reconnect can then wait indefinitely
    for the reader and writer to exit. HAMMER2's recluster ioctl holds the
    root vnode during this wait, blocking other filesystem operations.
    
    Shut down msg_fp before sleeping in the worker-wait loop. This wakes
    blocked transport I/O and leaves the existing state cleanup and file
    reference handling in place.
    
    Keep the shutdown inside the loop: lksleep() releases msglk, so another
    reconnect may replace the connection while this caller is asleep. A
    one-time shutdown before the loop can leave this caller waiting on the
    replacement workers.
    
    Bug: https://bugs.dragonflybsd.org/issues/3434

Summary of changes:
 sys/kern/kern_dmsg.c | 2 ++
 1 file changed, 2 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/bcbcc84a901cb2810c2c10b30f7a602edc235e9d


-- 
DragonFly BSD source repository


More information about the Commits mailing list