aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGordon Tetlow <gordon@FreeBSD.org>2020-09-02 16:22:14 +0000
committerGordon Tetlow <gordon@FreeBSD.org>2020-09-02 16:22:14 +0000
commit6bf1f3a72341aec2f7bf4b89c46e0734c6564ffa (patch)
treeec3dcac66745e28c2df69b6fa7f0ae6c8768eeb3
parentac5a6eb691d7a5f809ad93588861bd7aa1751d80 (diff)
downloadsrc-6bf1f3a72341aec2f7bf4b89c46e0734c6564ffa.tar.gz
src-6bf1f3a72341aec2f7bf4b89c46e0734c6564ffa.zip
Fix getfsstat compatibility system call panic.
Approved by: so Security: FreeBSD-EN-20:18.getfsstat
Notes
Notes: svn path=/releng/11.4/; revision=365254
-rw-r--r--sys/kern/vfs_syscalls.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 0e957f5d596f..ac24c8a25dee 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -409,6 +409,8 @@ kern_getfsstat(struct thread *td, struct statfs **buf, size_t bufsize,
case MNT_NOWAIT:
break;
default:
+ if (bufseg == UIO_SYSSPACE)
+ *buf = NULL;
return (EINVAL);
}
restart: