From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755765AbdIISbn (ORCPT ); Sat, 9 Sep 2017 14:31:43 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:48914 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751575AbdIISbm (ORCPT ); Sat, 9 Sep 2017 14:31:42 -0400 Date: Sat, 9 Sep 2017 19:31:35 +0100 From: Al Viro To: Gargi Sharma Cc: linux-kernel@vger.kernel.org, riel@surriel.com, julia.lawall@lip6.fr, akpm@linux-foundation.org, mingo@kernel.org, pasha.tatashin@oracle.com, ktkhai@virtuozzo.com, oleg@redhat.com, wangkefeng.wang@park.jinmi.com Subject: Re: [RFC 1/2] proc: Return if nothing to unmount Message-ID: <20170909183135.GB5426@ZenIV.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 09, 2017 at 06:03:16PM +0530, Gargi Sharma wrote: > If a task exits before procfs is mounted, proc_flush_task_mnt will > be called with a NULL mnt parameter. In that case, not only is there > nothing to unhash, but trying to do so will oops the kernel with a > null pointer dereference. You are misreading that sucker. It's about userland mounts, it's about the internal ones in pidns, for each pidns the process belongs to. IOW, what you are adding is dead code. The very first alloc_pid() in that pidns should've called pid_ns_prepare_proc(), which creates that vfsmount.