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@gmail.com> MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25256
This commit is contained in:
parent
6d33315d2f
commit
c2da36fecd
@ -1619,6 +1619,28 @@ out:
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
@ -1760,6 +1782,11 @@ linprocfs_init(PFS_INIT_ARGS)
|
||||
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/... */
|
||||
dir = pfs_create_dir(root, "scsi", NULL, NULL, NULL, 0);
|
||||
pfs_create_file(dir, "device_info", &linprocfs_doscsidevinfo,
|
||||
|
Loading…
x
Reference in New Issue
Block a user