[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 02/61: Fix spurious unlock on error
From: |
Samuel Thibault |
Subject: |
[hurd] 02/61: Fix spurious unlock on error |
Date: |
Tue, 27 May 2014 08:32:09 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 58f78ea0c81a106cb2b9220eb9290bef15466cd9
Author: Samuel Thibault <address@hidden>
Date: Fri Apr 4 20:55:34 2014 +0200
Fix spurious unlock on error
Thanks Cyril Roelandt for finding the issue.
* libdiskfs/dir-renamed.c (diskfs_rename_dir): On diskfs_lookup error,
set fnp to NULL to avoid unlocking it spuriously.
---
libdiskfs/dir-renamed.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libdiskfs/dir-renamed.c b/libdiskfs/dir-renamed.c
index 9b7ec3a..9e37e23 100644
--- a/libdiskfs/dir-renamed.c
+++ b/libdiskfs/dir-renamed.c
@@ -209,7 +209,12 @@ diskfs_rename_dir (struct node *fdp, struct node *fnp,
const char *fromname,
if (tmpnp)
diskfs_nrele (tmpnp);
if (err)
- goto out;
+ {
+ assert (!tmpnp);
+ /* diskfs_lookup has not locked fnp then, do not unlock it. */
+ fnp = NULL;
+ goto out;
+ }
diskfs_dirremove (fdp, fnp, fromname, ds);
ds = 0;
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (d8b7d42 -> 55dd7de), Samuel Thibault, 2014/05/27
- [hurd] 02/61: Fix spurious unlock on error,
Samuel Thibault <=
- [hurd] 04/61: hurd: add a new type for the exec_startup protocol, Samuel Thibault, 2014/05/27
- [hurd] 10/61: console-client: drop DIST_FILES from Makefile, Samuel Thibault, 2014/05/27
- [hurd] 05/61: exec: fix receiver lookup, Samuel Thibault, 2014/05/27
- [hurd] 08/61: hurd: add a new type interrupt_t for the interrupt protocol, Samuel Thibault, 2014/05/27
- [hurd] 09/61: libports: fix receiver lookup, Samuel Thibault, 2014/05/27
- [hurd] 06/61: libdiskfs: fix receiver lookup, Samuel Thibault, 2014/05/27
- [hurd] 11/61: boot: remove the ourdevice hack, Samuel Thibault, 2014/05/27
- [hurd] 01/61: libpager: fix receiver lookups, Samuel Thibault, 2014/05/27
- [hurd] 03/61: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd, Samuel Thibault, 2014/05/27
- [hurd] 19/61: Add missing receiver lookup fix, Samuel Thibault, 2014/05/27