Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Feb 2018 10:48:52 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r329979 - stable/11/sys/compat/linux
Message-ID:  <201802251048.w1PAmqa0024084@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Sun Feb 25 10:48:52 2018
New Revision: 329979
URL: https://svnweb.freebsd.org/changeset/base/329979

Log:
  MFC r329703:
  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).
  
  Found by:	Johannes Lundberg <johalun0@gmail.com>
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/sys/compat/linux/linux_mmap.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linux/linux_mmap.c
==============================================================================
--- stable/11/sys/compat/linux/linux_mmap.c	Sun Feb 25 10:47:33 2018	(r329978)
+++ stable/11/sys/compat/linux/linux_mmap.c	Sun Feb 25 10:48:52 2018	(r329979)
@@ -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);
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802251048.w1PAmqa0024084>