Define mknod_ptmx()

Previous thread: n_tty: Fix handling of control characters and continuations by Linux Kernel Mailing List on Friday, January 2, 2009 - 12:59 pm. (1 message)

Next thread: tty: Fix PPP hang under load by Linux Kernel Mailing List on Friday, January 2, 2009 - 1:00 pm. (1 message)
From: Linux Kernel Mailing List
Date: Friday, January 2, 2009 - 12:59 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1f8f1e...
Commit:     1f8f1e296583f9f832c2fe7b5a219675b74bf43e
Parent:     e4adca27bcbb8a73c4cf1dfa71392654cfa33345
Author:     Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
AuthorDate: Fri Jan 2 13:42:02 2009 +0000
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Fri Jan 2 10:19:36 2009 -0800

    Define mknod_ptmx()
    
    /dev/ptmx is closely tied to the devpts filesystem. An open of /dev/ptmx,
    allocates the next pty index and the associated device shows up in the
    devpts fs as /dev/pts/n.
    
    Wih multiple instancs of devpts filesystem, during an open of /dev/ptmx
    we would be unable to determine which instance of the devpts is being
    accessed.
    
    So we move the 'ptmx' node into /dev/pts and use the inode of the 'ptmx'
    node to identify the superblock and hence the devpts instance.  This patch
    adds ability for the kernel to internally create the [ptmx, c, 5:2] device
    when mounting devpts filesystem.  Since the ptmx node in devpts is new and
    may surprise some userspace scripts, the default permissions for the new
    node is 0000.  These permissions can be changed either using chmod or by
    remounting with the new '-o ptmxmode=0666' mount option.
    
    Changelog[v5]:
    	- [Serge Hallyn bugfix]: Letting new_inode() assign inode number to
    	  ptmx can collide with hand-assigning inode numbers to ptys. So,
    	  hand-assign specific inode number to ptmx node also.
    	- [Serge Hallyn]: Maybe safer to grab root dentry mutex while creating
    	  ptmx node
    	- [Bugfix with Serge Hallyn] Replace lookup_one_len() in mknod_ptmx()
    	  wih d_alloc_name() (lookup during ->get_sb() locks up system). To
    	  simplify patchset, fold the ptmx_dentry patch into this.
    
    Changelog[v4]:
    	- Change default permissions of pts/ptmx node to 0000.
    	- Move code for ptmxmode ...
Previous thread: n_tty: Fix handling of control characters and continuations by Linux Kernel Mailing List on Friday, January 2, 2009 - 12:59 pm. (1 message)

Next thread: tty: Fix PPP hang under load by Linux Kernel Mailing List on Friday, January 2, 2009 - 1:00 pm. (1 message)