Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1157426
| Path | csiph.com!aioe.org!news.ecp.fr!news2.arglkargh.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!weretis.net!feeder4.news.weretis.net!storethat.news.telefonica.de!telefonica.de!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.14 39/64] ext4: check for zero length extent explicitly |
| Date | Wed, 03 Jun 2015 14:20:02 +0200 |
| Message-ID | <pxfOi-E4-29@gated-at.bofh.it> (permalink) |
| References | <pxfOh-E4-7@gated-at.bofh.it> |
| X-Original-To | linux-kernel@vger.kernel.org |
| X-Mailer | git-send-email 2.4.2 |
| User-Agent | quilt/0.64 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-15 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 42 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Eryu Guan <guaneryu@gmail.com>, Theodore Tso <tytso@mit.edu> |
| X-Original-Date | Wed, 3 Jun 2015 20:43:07 +0900 |
| X-Original-Message-ID | <20150603063930.121494568@linuxfoundation.org> |
| X-Original-References | <20150603063928.472620468@linuxfoundation.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1157426 |
Show key headers only | View raw
3.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eryu Guan <guaneryu@gmail.com> commit 2f974865ffdfe7b9f46a9940836c8b167342563d upstream. The following commit introduced a bug when checking for zero length extent 5946d08 ext4: check for overlapping extents in ext4_valid_extent_entries() Zero length extent could pass the check if lblock is zero. Adding the explicit check for zero length back. Signed-off-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- fs/ext4/extents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -361,7 +361,7 @@ static int ext4_valid_extent(struct inod ext4_lblk_t lblock = le32_to_cpu(ext->ee_block); ext4_lblk_t last = lblock + len - 1; - if (lblock > last) + if (len == 0 || lblock > last) return 0; return ext4_data_block_valid(EXT4_SB(inode->i_sb), block, len); } -- 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/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 3.14 39/64] ext4: check for zero length extent explicitly Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-06-03 14:20 +0200
csiph-web