[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 12/13] trans: unlock nodes with faked attributes in fakeroot
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 12/13] trans: unlock nodes with faked attributes in fakeroot |
Date: |
Tue, 10 Dec 2013 01:13:45 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Mon 09 Dec 2013 15:16:40 +0100, a écrit :
> When a node has faked attributes, we cannot drop our node.
> Reinitialize the lock box as if the node was dropped. This fixes the
> following bug:
>
> % fakeroot-hurd /bin/sh -c 'touch /tmp/$$.lock
> chown 0 /tmp/$$.lock
> l(){ flock /tmp/$$.lock true; }; l; l'
> <hangs>
Ack.
> * trans/fakeroot.c (fake_node_dropweak): Unlock the node if the last
> real reference is dropped but we keep a fake one.
> ---
> trans/fakeroot.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/trans/fakeroot.c b/trans/fakeroot.c
> index 3756f48..920367d 100644
> --- a/trans/fakeroot.c
> +++ b/trans/fakeroot.c
> @@ -172,6 +172,9 @@ fakeroot_netfs_release_protid (void *cookie)
> account for that fake reference. */
> np->nn->faked |= FAKE_REFERENCE;
>
> + /* Clear the lock box as if the file was closed. */
> + fshelp_lock_init (&np->userlock);
> +
> /* We keep our node. */
> goto out;
> }
> --
> 1.7.10.4
>
--
Samuel
La fonction memfrob() crypte les n premiers octets de la
zone de mémoire s en effectuant un OU-exclusif entre
chaque octet et le nombre 42.
(extrait de la page de man de memfrob -- Manuel du programmeur Linux)
- Re: [PATCH 07/13] trans: return nodes locked when creating fake nodes in fakeroot, (continued)
[PATCH 08/13] trans: fix reference counting and destruction of fake nodes, Justus Winter, 2013/12/09
[PATCH 11/13] trans: improve the error handling in fakeauth, Justus Winter, 2013/12/09
[PATCH 09/13] trans: fix locking in fakeroot's netfs_S_dir_lookup, Justus Winter, 2013/12/09
[PATCH 12/13] trans: unlock nodes with faked attributes in fakeroot, Justus Winter, 2013/12/09
- Re: [PATCH 12/13] trans: unlock nodes with faked attributes in fakeroot,
Samuel Thibault <=
[PATCH 05/13] trans: handle invalid responses to dir_lookup requests in fakeroot, Justus Winter, 2013/12/09
[PATCH 10/13] trans: fix reference counting bug in fakeroot, Justus Winter, 2013/12/09
[PATCH 13/13] console-client: remove spurious pthread_spin_unlocks, Justus Winter, 2013/12/09
Re: More fixes for fakeroot-hurd, Samuel Thibault, 2013/12/09
[PATCH 1/5] utils/settrans: fix the teardown of chrooted environments, Justus Winter, 2013/12/10