File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,24 @@ static int devpts_ptmx_path(struct path *path)
152152 return 0 ;
153153}
154154
155+ /*
156+ * Try to find a suitable devpts filesystem. We support the following
157+ * scenarios:
158+ * - The ptmx device node is located in the same directory as the devpts
159+ * mount where the pts device nodes are located.
160+ * This is e.g. the case when calling open on the /dev/pts/ptmx device
161+ * node when the devpts filesystem is mounted at /dev/pts.
162+ * - The ptmx device node is located outside the devpts filesystem mount
163+ * where the pts device nodes are located. For example, the ptmx device
164+ * is a symlink, separate device node, or bind-mount.
165+ * A supported scenario is bind-mounting /dev/pts/ptmx to /dev/ptmx and
166+ * then calling open on /dev/ptmx. In this case a suitable pts
167+ * subdirectory can be found in the common parent directory /dev of the
168+ * devpts mount and the ptmx bind-mount, after resolving the /dev/ptmx
169+ * bind-mount.
170+ * If no suitable pts subdirectory can be found this function will fail.
171+ * This is e.g. the case when bind-mounting /dev/pts/ptmx to /ptmx.
172+ */
155173struct vfsmount * devpts_mntget (struct file * filp , struct pts_fs_info * fsi )
156174{
157175 struct path path ;
You can’t perform that action at this time.
0 commit comments