On Tue, Dec 19, 2017 at 11:14:40AM +0100, Giuseppe Scrivano wrote: > mqueue_evict_inode() doesn't access the ipc namespace if it was > already freed. It can happen if in a new IPC namespace the inode was > created without a prior mq_open() which creates the vfsmount used to > access the superblock from mq_clear_sbinfo(). > > Keep a direct pointer to the superblock used by the inodes so we can > correctly reset the reference to the IPC namespace being destroyed. > > Bug introduced with 9c583773d03633 ("ipc, mqueue: lazy call > kern_mount_data in new namespaces")
And just what will happen in the same scenario if you mount the damn thing in userland without ever calling mq_open(), touch a file there, then unmount and then leave the ipc namespace?