From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:42704 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726252AbeLKSgV (ORCPT ); Tue, 11 Dec 2018 13:36:21 -0500 Date: Tue, 11 Dec 2018 18:36:19 +0000 From: Al Viro To: Jan Kara Cc: linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 2/2] proc: Protect readers of /proc/mounts from remount Message-ID: <20181211183619.GF2217@ZenIV.linux.org.uk> References: <20181211172423.7709-1-jack@suse.cz> <20181211172423.7709-3-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181211172423.7709-3-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Dec 11, 2018 at 06:24:23PM +0100, Jan Kara wrote: > Readers of /proc/mounts (and similar files) are currently unprotected > from concurrently running remount on the filesystem they are reporting. > This can not only result in bogus reported information but also in > confusion in filesystems ->show_options callbacks resulting in > use-after-free issues or similar (for example ext4 handling of quota > file names is prone to such races). > > Fix the problem by protecting showing of mount information with > sb->s_umount semaphore. Umm... Which tree is it against and what exactly does your hold_sb() do?