From: Greg KH <gregkh@linuxfoundation.org>
To: "Thomas Bächler" <thomas@archlinux.org>
Cc: tj@kernel.org, d@falconindy.com, linux-kernel@vger.kernel.org,
P@draigbrady.com, alexandre.f.demers@gmail.com,
"3.14" <stable@vger.kernel.org>
Subject: Re: [PATCHv2] fs: Don't return 0 from get_anon_bdev
Date: Thu, 3 Apr 2014 13:32:52 -0700 [thread overview]
Message-ID: <20140403203252.GA8855@kroah.com> (raw)
In-Reply-To: <1396554937-11952-1-git-send-email-thomas@archlinux.org>
On Thu, Apr 03, 2014 at 09:55:37PM +0200, Thomas B�chler wrote:
> Commit 9e30cc9595303b27b48 removed an internal mount. This
> has the side-effect that rootfs now has FSID 0. Many
> userspace utilities assume that st_dev in struct stat
> is never 0, so this change breaks a number of tools in
> early userspace.
>
> Since we don't know how many userspace programs are affected,
> make sure that FSID is at least 1.
>
> References: http://article.gmane.org/gmane.linux.kernel/1666905
> References: http://permalink.gmane.org/gmane.linux.utilities.util-linux-ng/8557
> Cc: 3.14 <stable@vger.kernel.org>
> Signed-off-by: Thomas B�chler <thomas@archlinux.org>
> ---
> fs/super.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/super.c b/fs/super.c
> index 80d5cf2..7624267 100644
> --- a/fs/super.c
> +++ b/fs/super.c
> @@ -802,7 +802,10 @@ void emergency_remount(void)
>
> static DEFINE_IDA(unnamed_dev_ida);
> static DEFINE_SPINLOCK(unnamed_dev_lock);/* protects the above */
> -static int unnamed_dev_start = 0; /* don't bother trying below it */
> +/* Many userspace utilities consider an FSID of 0 invalid.
> + * Always return at least 1 from get_anon_bdev.
> + */
> +static int unnamed_dev_start = 1;
>
> int get_anon_bdev(dev_t *p)
> {
Very nice, I'll go queue this one up instead of the other patch from
Tejun.
greg k-h
next prev parent reply other threads:[~2014-04-03 20:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20140403191617.GB2472@mtj.dyndns.org>
2014-04-03 19:49 ` [PATCH] fs: Don't return 0 from get_anon_bdev Thomas Bächler
2014-04-03 19:51 ` Tejun Heo
2014-04-03 19:55 ` [PATCHv2] " Thomas Bächler
2014-04-03 20:32 ` Greg KH [this message]
2014-04-03 20:21 ` [PATCH] " H. Peter Anvin
2014-04-03 23:41 ` Alexandre Demers
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=20140403203252.GA8855@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=P@draigbrady.com \
--cc=alexandre.f.demers@gmail.com \
--cc=d@falconindy.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=thomas@archlinux.org \
--cc=tj@kernel.org \
/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).