NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/1354 union FS can deadlock

The following reply was made to PR kern/1354; it has been noted by GNATS.

From: David Holland <>
Subject: Re: kern/1354 union FS can deadlock
Date: Tue, 28 Jun 2016 03:39:54 +0000

 From: "J. Hannken-Illjes" <>
 Cc: David Holland <>
 Subject: PR/1354 union FS can deadlock
 Date: Mon, 27 Jun 2016 11:04:32 +0200
 Should be fixed by Rev 1.43 of sys/miscfs/union/union_vnops.c:
 date: 1999-03-22 18:24:22 +0100;  author: sommerfe;  state: Exp;  lines: +17 -4;
 vinvalbuf, called from vclean, could cause a locking-against-self
 deadlock in VOP_FSYNC() if the unreferenced vnode picked for
 reclamation happened to be stacked on top of a vnode the process
 already had locked.  This could happen if the same filesystem was
 accessed both through a union mount and directly; it seemed to happen
 most frequently when the direct access was through NFS.
 Avoid this deadlock by changing vinvalbuf to pass a new FSYNC_RECLAIM
 flag bit to VOP_FSYNC() to indicate that a reclaim is in progress and
 only a `shallow' fsync is necessary.
 Do nothing in *_fsync() in umapfs, nullfs, and unionfs when
 FSYNC_RECLAIM is set; the underlying vnodes will shortly be released
 in *_reclaim and may be reclaimed (and fsync'ed) later.
 J. Hannken-Illjes - - TU Braunschweig (Germany)

Home | Main Index | Thread Index | Old Index