[folded-merged] exofs-avoid-vla-in-structures-v2.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: exofs-avoid-vla-in-structures-v2
has been removed from the -mm tree.  Its filename was
     exofs-avoid-vla-in-structures-v2.patch

This patch was dropped because it was folded into exofs-avoid-vla-in-structures.patch

------------------------------------------------------
From: Kees Cook <keescook@xxxxxxxxxxxx>
Subject: exofs-avoid-vla-in-structures-v2

- use DRY for easier to read stripe updates (ndesaulniers)
- add const to unchanging variable (ndesaulniers)
- update references with message-id URLs
- add Reviewed-by

Link: http://lkml.kernel.org/r/20180418163546.GA45794@beast
Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
Reviewed-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
Cc: Boaz Harrosh <ooo@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/exofs/ore_raid.c |   12 ++++++------
 fs/exofs/super.c    |    2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff -puN fs/exofs/ore_raid.c~exofs-avoid-vla-in-structures-v2 fs/exofs/ore_raid.c
--- a/fs/exofs/ore_raid.c~exofs-avoid-vla-in-structures-v2
+++ a/fs/exofs/ore_raid.c
@@ -139,6 +139,8 @@ static int _sp2d_alloc(unsigned pages_in
 
 	/* Allocate additionally needed a1pa items in PAGE_SIZE chunks. */
 	for (i = 0; i < pages_in_unit; ++i) {
+		struct __1_page_stripe *stripe = &sp2d->_1p_stripes[i];
+
 		if (unlikely(__a1pa >= __a1pa_end)) {
 			num_a1pa = min_t(unsigned, PAGE_SIZE / sizeof__a1pa,
 							pages_in_unit - i);
@@ -152,7 +154,7 @@ static int _sp2d_alloc(unsigned pages_in
 			}
 			__a1pa_end = __a1pa + alloc_size;
 			/* First *pages is marked for kfree of the buffer */
-			sp2d->_1p_stripes[i].alloc = true;
+			stripe->alloc = true;
 		}
 
 		/*
@@ -160,11 +162,9 @@ static int _sp2d_alloc(unsigned pages_in
 		 * it which was either part of the original PAGE_SIZE
 		 * allocation or the subsequent allocation in this loop.
 		 */
-		sp2d->_1p_stripes[i].pages = (void *)__a1pa;
-		sp2d->_1p_stripes[i].scribble =
-			sp2d->_1p_stripes[i].pages + group_width;
-		sp2d->_1p_stripes[i].page_is_read =
-			(char *)(sp2d->_1p_stripes[i].scribble + group_width);
+		stripe->pages = (void *)__a1pa;
+		stripe->scribble = stripe->pages + group_width;
+		stripe->page_is_read = (char *)stripe->scribble + group_width;
 		__a1pa += sizeof__a1pa;
 	}
 
diff -puN fs/exofs/super.c~exofs-avoid-vla-in-structures-v2 fs/exofs/super.c
--- a/fs/exofs/super.c~exofs-avoid-vla-in-structures-v2
+++ a/fs/exofs/super.c
@@ -552,7 +552,7 @@ static int __alloc_dev_table(struct exof
 	/* Twice bigger table: See exofs_init_comps() and comment at
 	 * exofs_read_lookup_dev_table()
 	 */
-	size_t numores = numdevs * 2 - 1;
+	const size_t numores = numdevs * 2 - 1;
 	struct exofs_dev *eds;
 	unsigned i;
 
_

Patches currently in -mm which might be from keescook@xxxxxxxxxxxx are

exofs-avoid-vla-in-structures.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux