+ dm-table-get_target-fix-last-index.patch added to -mm tree

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

 



The patch titled

     dm table: get_target: fix last index

has been added to the -mm tree.  Its filename is

     dm-table-get_target-fix-last-index.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: dm table: get_target: fix last index
From: Milan Broz <mbroz@xxxxxxxxxx>


The table is indexed from 0, so an index equal to t->num_targets should be
rejected.

(There is no code in the current tree that would exercise this bug.)

Signed-off-by: Milan Broz <mbroz@xxxxxxxxxx>
Signed-off-by: Alasdair G Kergon <agk@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/md/dm-table.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/md/dm-table.c~dm-table-get_target-fix-last-index drivers/md/dm-table.c
--- devel/drivers/md/dm-table.c~dm-table-get_target-fix-last-index	2006-05-30 14:52:54.000000000 -0700
+++ devel-akpm/drivers/md/dm-table.c	2006-05-30 14:52:54.000000000 -0700
@@ -802,7 +802,7 @@ sector_t dm_table_get_size(struct dm_tab
 
 struct dm_target *dm_table_get_target(struct dm_table *t, unsigned int index)
 {
-	if (index > t->num_targets)
+	if (index >= t->num_targets)
 		return NULL;
 
 	return t->targets + index;
_

Patches currently in -mm which might be from mbroz@xxxxxxxxxx are

dm-table-get_target-fix-last-index.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 Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux