From: Seunghun Lee <waydi1@gmail.com>
To: sedat.dilek@gmail.com, Richard Weinberger <richard.weinberger@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ovl: Prevent rw remount when it should be ro mount
Date: Fri, 02 Jan 2015 00:30:42 +0900 [thread overview]
Message-ID: <54A56822.8010308@gmail.com> (raw)
In-Reply-To: <CA+icZUVfdo=BN0TC6sFmOj3SqfLjsJHN-1YAUh8JS=TVF9XPgg@mail.gmail.com>
On 01/02/2015 12:24 AM, Sedat Dilek wrote:
> On Thu, Jan 1, 2015 at 4:13 PM, Richard Weinberger
> <richard.weinberger@gmail.com> wrote:
>> On Thu, Jan 1, 2015 at 6:07 AM, Seunghun Lee <waydi1@gmail.com> wrote:
>>> Overlayfs should be mounted read-only when upper fs is r/o or nonexistend.
>>> But now it can be remounted read-write and this can causes kernel panic.
>>> So we should prevent read-write remount when the above situation.
>>>
>>> Signed-off-by: Seunghun Lee <waydi1@gmail.com>
>> This patch makes zero sense, did you use the wrong diff?
>>
> Hmm, was also my 1st thoughts when I saw squashfs_remount() in overlayfs code.
>
> - Sedat -
>
>>> ---
>>> fs/overlayfs/super.c | 8 ++++++++
>>> 1 file changed, 8 insertions(+)
>>>
>>> diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
>>> index 84f3144..1faa5e5 100644
>>> --- a/fs/overlayfs/super.c
>>> +++ b/fs/overlayfs/super.c
>>> @@ -522,6 +522,14 @@ static int ovl_show_options(struct seq_file *m, struct dentry *dentry)
>>> return 0;
>>> }
>>>
>>> +static int squashfs_remount(struct super_block *sb, int *flags, char *data)
>>> +{
>>> + if (!ufs->upper_mnt || (ufs->upper_mnt->mnt_sb->s_flags & MS_RDONLY))
>>> + *flags |= MS_RDONLY;
>>> +
>>> + return 0;
>>> +}
>>> +
>>> static const struct super_operations ovl_super_operations = {
>>> .put_super = ovl_put_super,
>>> .statfs = ovl_statfs,
>>> --
>>> 2.1.3
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>> Please read the FAQ at http://www.tux.org/lkml/
>>
>>
>> --
>> Thanks,
>> //richard
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
Sorry, I sent wrong patch.
I will resend it.
Thanks.
next prev parent reply other threads:[~2015-01-01 15:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-01 5:07 [PATCH] ovl: Prevent rw remount when it should be ro mount Seunghun Lee
2015-01-01 15:13 ` Richard Weinberger
2015-01-01 15:24 ` Sedat Dilek
2015-01-01 15:30 ` Seunghun Lee [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-01-01 15:38 Seunghun Lee
2015-01-01 18:33 ` Sedat Dilek
2015-01-02 17:23 ` Seunghun Lee
2015-01-02 17:26 Seunghun Lee
2015-01-04 2:59 ` hujianyang
2015-01-06 14:02 ` Seunghun Lee
2015-01-07 2:56 ` hujianyang
2015-01-07 15:04 ` Seunghun Lee
2015-01-08 13:50 ` Miklos Szeredi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54A56822.8010308@gmail.com \
--to=waydi1@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=richard.weinberger@gmail.com \
--cc=sedat.dilek@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).