Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Correctly handle the NULL path when no compat_10 co...
details: https://anonhg.NetBSD.org/src/rev/d4822c3c66a0
branches: trunk
changeset: 448564:d4822c3c66a0
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Tue Feb 05 08:53:18 2019 +0000
description:
Correctly handle the NULL path when no compat_10 code is available.
This should address kern/53948 (thanks, kamil@, for the PR and for
testing the fix)
diffstat:
sys/kern/vfs_syscalls.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diffs (38 lines):
diff -r a612f6ed020c -r d4822c3c66a0 sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c Tue Feb 05 08:33:25 2019 +0000
+++ b/sys/kern/vfs_syscalls.c Tue Feb 05 08:53:18 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_syscalls.c,v 1.521 2019/01/31 02:27:06 manu Exp $ */
+/* $NetBSD: vfs_syscalls.c,v 1.522 2019/02/05 08:53:18 pgoyette Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.521 2019/01/31 02:27:06 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.522 2019/02/05 08:53:18 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_fileassoc.h"
@@ -1635,14 +1635,13 @@
int error;
if (path == NULL) {
- MODULE_CALL_HOOK(vfs_openat_10_hook, (&pb), 0, error);
- if (error)
- return error;
- } else {
- error = pathbuf_copyin(path, &pb);
- if (error)
+ MODULE_CALL_HOOK(vfs_openat_10_hook, (&pb), enosys(), error);
+ if (error != ENOSYS)
return error;
}
+ error = pathbuf_copyin(path, &pb);
+ if (error)
+ return error;
pathstring = pathbuf_stringcopy_get(pb);
Home |
Main Index |
Thread Index |
Old Index