+ minixfs-fix-block-limit-check.patch added to -mm tree

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

 



The patch titled
     Subject: minixfs: fix block limit check
has been added to the -mm tree.  Its filename is
     minixfs-fix-block-limit-check.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Vladimir Serbinenko <phcoder@xxxxxxxxx>
Subject: minixfs: fix block limit check

On minix2 and minix3 usually max_size is 7fffffff and the check in
question prohibits creation of last block spanning right before 7fffffff,
due to downward rounding during the division.  Fix it by using
multiplication instead.

Signed-off-by: Vladimir Serbinenko  <phcoder@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/minix/itree_v2.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -puN fs/minix/itree_v2.c~minixfs-fix-block-limit-check fs/minix/itree_v2.c
--- a/fs/minix/itree_v2.c~minixfs-fix-block-limit-check
+++ a/fs/minix/itree_v2.c
@@ -32,7 +32,8 @@ static int block_to_path(struct inode * 
 	if (block < 0) {
 		printk("MINIX-fs: block_to_path: block %ld < 0 on dev %s\n",
 			block, bdevname(sb->s_bdev, b));
-	} else if (block >= (minix_sb(inode->i_sb)->s_max_size/sb->s_blocksize)) {
+    } else if ((u64) block * (u64) sb->s_blocksize
+           >= minix_sb(inode->i_sb)->s_max_size) {
 		if (printk_ratelimit())
 			printk("MINIX-fs: block_to_path: "
 			       "block %ld too big on dev %s\n",
_
Subject: Subject: minixfs: fix block limit check

Patches currently in -mm which might be from phcoder@xxxxxxxxx are

minixfs-fix-block-limit-check.patch
minixfs-fix-block-limit-check-fix.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