[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 13/25: libdiskfs: Fix short-circuiting translators.
From: |
Samuel Thibault |
Subject: |
[hurd] 13/25: libdiskfs: Fix short-circuiting translators. |
Date: |
Mon, 24 Oct 2016 00:16:45 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 63cfc3cdfd817d8f794c83bc39f86ab8b910fe71
Author: Justus Winter <address@hidden>
Date: Mon Oct 3 15:19:08 2016 +0200
libdiskfs: Fix short-circuiting translators.
* libdiskfs/file-set-trans.c (diskfs_S_file_set_translator): When
setting a short-circuited translator, clear the translator record
first. Improve error handling.
This notably fixes a crash in ext2fs when setting a symlink on a node
with an existing translator record.
---
libdiskfs/file-set-trans.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/libdiskfs/file-set-trans.c b/libdiskfs/file-set-trans.c
index 6e1a61d..3238037 100644
--- a/libdiskfs/file-set-trans.c
+++ b/libdiskfs/file-set-trans.c
@@ -168,7 +168,20 @@ diskfs_S_file_set_translator (struct protid *cred,
np->dn_stat.st_rdev = makedev (major, minor);
}
- diskfs_truncate (np, 0);
+ err = diskfs_truncate (np, 0);
+ if (err)
+ {
+ pthread_mutex_unlock (&np->lock);
+ return err;
+ }
+
+ err = diskfs_set_translator (np, NULL, 0, cred);
+ if (err)
+ {
+ pthread_mutex_unlock (&np->lock);
+ return err;
+ }
+
if (newmode == S_IFLNK)
{
char *arg = passive + strlen (passive) + 1;
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 25/25: boot: Ignore EINTR., (continued)
- [hurd] 25/25: boot: Ignore EINTR., Samuel Thibault, 2016/10/23
- [hurd] 24/25: Avoid warnings if increasing a threads priority fails., Samuel Thibault, 2016/10/23
- [hurd] 18/25: ext2fs: Rename parameter., Samuel Thibault, 2016/10/23
- [hurd] 09/25: Fix installing runsystem.hurd, Samuel Thibault, 2016/10/23
- [hurd] 12/25: fakeroot: set FAKED_MODE, Samuel Thibault, 2016/10/23
- [hurd] 14/25: ext2fs: Disable option to specify alternate superblock., Samuel Thibault, 2016/10/23
- [hurd] 17/25: trans/crash: Fix setting core file template at runtime., Samuel Thibault, 2016/10/23
- [hurd] 21/25: fshelp: Fix fetching the control port., Samuel Thibault, 2016/10/23
- [hurd] 06/25: startup: Fix looping over runsystem, Samuel Thibault, 2016/10/23
- [hurd] 16/25: trans/crash: Use empty core file templates to disable the feature., Samuel Thibault, 2016/10/23
- [hurd] 13/25: libdiskfs: Fix short-circuiting translators.,
Samuel Thibault <=
- [hurd] 11/25: random: Hash continuous areas in the csprng pool., Samuel Thibault, 2016/10/23
- [hurd] 23/25: procfs: Gracefully degrade meminfo., Samuel Thibault, 2016/10/23
- [hurd] 22/25: Fix some RPC request headers #ifdef guards, Samuel Thibault, 2016/10/23