All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>,
	Frank Sorenson <fsorenso@redhat.com>
Subject: [PATCH V2] mke2fs: prevent creation of filesystem with unsupported revision
Date: Thu, 01 May 2014 15:39:33 -0500	[thread overview]
Message-ID: <5362B105.9080702@redhat.com> (raw)
In-Reply-To: <5362A6A2.7040504@redhat.com>

From: Frank Sorenson <fsorenso@redhat.com>

Don't create a filesystem with an unsupported revision number

Signed-off-by: Frank Sorenson <fsorenso@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

V2: Frank did this independently, and it's better.  I forgot about
using com_err here.

--- a/misc/mke2fs.c	
+++ a/misc/mke2fs.c	
@@ -1684,6 +1684,11 @@ profile_error:
 					_("bad revision level - %s"), optarg);
 				exit(1);
 			}
+			if (r_opt > EXT2_MAX_SUPP_REV) {
+				com_err(program_name, EXT2_ET_REV_TOO_HIGH,
+					_("while trying to create revision %d"), r_opt);
+				exit(1);
+			}
 			fs_param.s_rev_level = r_opt;
 			break;
 		case 's':	/* deprecated */

  reply	other threads:[~2014-05-01 20:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-01 19:55 [PATCH] mke2fs: don't accept too-high revision levels Eric Sandeen
2014-05-01 20:39 ` Eric Sandeen [this message]
2014-05-01 22:20   ` [PATCH V2] mke2fs: prevent creation of filesystem with unsupported revision Andreas Dilger
2014-05-01 22:35   ` [PATCH V3] " Eric Sandeen
2014-07-04 19:32     ` Theodore Ts'o
2016-01-14 18:35 ` [PATCH] mke2fs: don't accept too-high revision levels Eric Sandeen
2016-01-14 19:36   ` Andreas Dilger

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=5362B105.9080702@redhat.com \
    --to=sandeen@redhat.com \
    --cc=fsorenso@redhat.com \
    --cc=linux-ext4@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.