svn commit: r329703 - head/sys/compat/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Wed Feb 21 10:13:18 UTC 2018
Author: hselasky
Date: Wed Feb 21 10:13:17 2018
New Revision: 329703
URL: https://svnweb.freebsd.org/changeset/base/329703
Log:
Allow LinuxKPI character devices to receive mmap() calls from the Linux
binary mode user-space emulation layer. This is a regression issue after
r328436, when LinuxKPI character devices started to use DTYPE_DEV in
the "f_type" field of the associated file structure(s).
MFC after: 3 days
Found by: Johannes Lundberg <johalun0 at gmail.com>
Sponsored by: Mellanox Technologies
Modified:
head/sys/compat/linux/linux_mmap.c
Modified: head/sys/compat/linux/linux_mmap.c
==============================================================================
--- head/sys/compat/linux/linux_mmap.c Wed Feb 21 08:13:17 2018 (r329702)
+++ head/sys/compat/linux/linux_mmap.c Wed Feb 21 10:13:17 2018 (r329703)
@@ -129,7 +129,7 @@ linux_mmap_common(struct thread *td, uintptr_t addr, s
error = fget(td, fd, cap_rights_init(&rights, CAP_MMAP), &fp);
if (error != 0)
return (error);
- if (fp->f_type != DTYPE_VNODE) {
+ if (fp->f_type != DTYPE_VNODE && fp->f_type != DTYPE_DEV) {
fdrop(fp, td);
return (EINVAL);
}
More information about the svn-src-all
mailing list