diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-01-11 12:25:15 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-01-11 12:25:43 +0100 |
commit | bf24996d891966454b3395ab965b87c033b21d7d (patch) | |
tree | 76fd5567a23fb0b3b3db6f1841a926fed4a6b867 /libdiskfs/file-getfh.c | |
parent | d580a97c6c8a1e1419cc7c21f6dd9d1d12b79f92 (diff) | |
download | hurd-bf24996d891966454b3395ab965b87c033b21d7d.tar.gz hurd-bf24996d891966454b3395ab965b87c033b21d7d.tar.bz2 hurd-bf24996d891966454b3395ab965b87c033b21d7d.zip |
libdiskfs: catch mmap failure
Just backtrace for now
Diffstat (limited to 'libdiskfs/file-getfh.c')
-rw-r--r-- | libdiskfs/file-getfh.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libdiskfs/file-getfh.c b/libdiskfs/file-getfh.c index 140373c4..2ff066b5 100644 --- a/libdiskfs/file-getfh.c +++ b/libdiskfs/file-getfh.c @@ -45,8 +45,11 @@ diskfs_S_file_getfh (struct protid *cred, data_t *fh, pthread_mutex_lock (&node->lock); if (*fh_len < sizeof (union diskfs_fhandle)) - *fh = mmap (0, sizeof (union diskfs_fhandle), PROT_READ|PROT_WRITE, - MAP_ANON, 0, 0); + { + *fh = mmap (0, sizeof (union diskfs_fhandle), PROT_READ|PROT_WRITE, + MAP_ANON, 0, 0); + assert_backtrace (*fh != MAP_FAILED); + } *fh_len = sizeof *f; f = (union diskfs_fhandle *) *fh; |