svn commit: r362806 - head/sys/compat/linprocfs
Edward Tomasz Napierala
trasz at FreeBSD.org
Tue Jun 30 16:24:29 UTC 2020
Author: trasz
Date: Tue Jun 30 16:24:28 2020
New Revision: 362806
URL: https://svnweb.freebsd.org/changeset/base/362806
Log:
Make linprocfs(5) create the /proc/<PID>/task/ directores.
This is to silence down some Chromium assertions.
PR: kern/240991
Analyzed by: Alex S <iwtcex at gmail.com>
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25256
Modified:
head/sys/compat/linprocfs/linprocfs.c
Modified: head/sys/compat/linprocfs/linprocfs.c
==============================================================================
--- head/sys/compat/linprocfs/linprocfs.c Tue Jun 30 16:23:51 2020 (r362805)
+++ head/sys/compat/linprocfs/linprocfs.c Tue Jun 30 16:24:28 2020 (r362806)
@@ -1620,6 +1620,28 @@ out:
}
/*
+ * The point of the following two functions is to work around
+ * an assertion in Chromium; see kern/240991 for details.
+ */
+static int
+linprocfs_dotaskattr(PFS_ATTR_ARGS)
+{
+
+ vap->va_nlink = 3;
+ return (0);
+}
+
+/*
+ * Filler function for proc/<pid>/task/.dummy
+ */
+static int
+linprocfs_dotaskdummy(PFS_FILL_ARGS)
+{
+
+ return (0);
+}
+
+/*
* Filler function for proc/sys/kernel/random/uuid
*/
static int
@@ -1758,6 +1780,11 @@ linprocfs_init(PFS_INIT_ARGS)
pfs_create_file(dir, "auxv", &linprocfs_doauxv,
NULL, &procfs_candebug, NULL, PFS_RD|PFS_RAWRD);
pfs_create_file(dir, "limits", &linprocfs_doproclimits,
+ NULL, NULL, NULL, PFS_RD);
+
+ /* /proc/<pid>/task/... */
+ dir = pfs_create_dir(dir, "task", linprocfs_dotaskattr, NULL, NULL, 0);
+ pfs_create_file(dir, ".dummy", &linprocfs_dotaskdummy,
NULL, NULL, NULL, PFS_RD);
/* /proc/scsi/... */
More information about the svn-src-all
mailing list