On Thu, Feb 21, 2019 at 03:45:06PM +0800, Fam Zheng wrote: > We’ve noticed an issue that frequent open,close,open,close... of /dev/ptmx eventually causes soft lockup. > > Here is a summary of what happened. > > Upon user opening /dev/ptmx, devpts_pty_new calls d_alloc_name and d_add, the new dentry is inserted into dcache_hashtable. > > Later when closing, devpts_pty_kill calls d_delete and dput, ... since it looks like a normal negative dentry, to be eventually evicted upon memory pressure. That's not the worst problem in there, actually - consider touch /tmp/a mount --bind /tmp/a /dev/pts/<number> followed by devpts_pty_kill() taking that sucker out...