From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759485Ab2CWSpZ (ORCPT ); Fri, 23 Mar 2012 14:45:25 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:44571 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759426Ab2CWSpY convert rfc822-to-8bit (ORCPT ); Fri, 23 Mar 2012 14:45:24 -0400 From: Arkadiusz =?utf-8?q?Mi=C5=9Bkiewicz?= To: Vasiliy Kulikov Subject: Re: [PATCH] proc: fix mount -t proc -o AAA Date: Fri, 23 Mar 2012 19:45:19 +0100 User-Agent: KMail/1.13.7 (Linux/3.3.0-final-dirty; KDE/4.8.1; x86_64; ; ) Cc: linux-kernel@vger.kernel.org, Andrew Morton , Alexey Dobriyan References: <201203220903.15360.a.miskiewicz@gmail.com> <20120323171058.GA3279@albatros> In-Reply-To: <20120323171058.GA3279@albatros> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 8BIT Message-Id: <201203231945.19501.a.miskiewicz@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 23 of March 2012, Vasiliy Kulikov wrote: > Thanks for the report. Please test the following patch. Seems to be working fine, now - thanks! > > -------------------------------------------------------------- > From: Vasiliy Kulikov > Date: Fri, 23 Mar 2012 20:56:42 +0400 > Subject: [PATCH] proc: fix mount -t proc -o AAA > > proc_parse_options() inside of proc_mount() runs only once at the boot > time without any given options. So, following umount(2)+mount(2) ignore > mount options: proc_parse_options() is not called as ->s_root is already > initialized. To fix that parse mount options unconditionally. > > Signed-off-by: Vasiliy Kulikov > Reported-by: Arkadiusz Miśkiewicz > --- > fs/proc/root.c | 9 +++++---- > 1 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/fs/proc/root.c b/fs/proc/root.c > index 46a15d8..eed44bf 100644 > --- a/fs/proc/root.c > +++ b/fs/proc/root.c > @@ -115,12 +115,13 @@ static struct dentry *proc_mount(struct > file_system_type *fs_type, if (IS_ERR(sb)) > return ERR_CAST(sb); > > + if (!proc_parse_options(options, ns)) { > + deactivate_locked_super(sb); > + return ERR_PTR(-EINVAL); > + } > + > if (!sb->s_root) { > sb->s_flags = flags; > - if (!proc_parse_options(options, ns)) { > - deactivate_locked_super(sb); > - return ERR_PTR(-EINVAL); > - } > err = proc_fill_super(sb); > if (err) { > deactivate_locked_super(sb); -- Arkadiusz Miśkiewicz PLD/Linux Team arekm / maven.pl http://ftp.pld-linux.org/