svn commit: r364209 - stable/12/sys/compat/linprocfs
Edward Tomasz Napierala
trasz at FreeBSD.org
Thu Aug 13 18:54:02 UTC 2020
Author: trasz
Date: Thu Aug 13 18:54:01 2020
New Revision: 364209
URL: https://svnweb.freebsd.org/changeset/base/364209
Log:
MFC r362806:
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>
Sponsored by: The FreeBSD Foundation
Modified:
stable/12/sys/compat/linprocfs/linprocfs.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/compat/linprocfs/linprocfs.c
==============================================================================
--- stable/12/sys/compat/linprocfs/linprocfs.c Thu Aug 13 18:51:57 2020 (r364208)
+++ stable/12/sys/compat/linprocfs/linprocfs.c Thu Aug 13 18:54:01 2020 (r364209)
@@ -1634,6 +1634,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
@@ -1772,6 +1794,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-stable-12
mailing list