From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= Subject: Fwd: [PATCH] fix minixfs block limit check Date: Wed, 09 May 2012 23:58:29 +0200 Message-ID: <4FAAE885.2030908@gmail.com> References: <4FAACF55.5070809@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig93495DF0785FBF6A70BB5530" To: linux-fsdevel@vger.kernel.org Return-path: Received: from mail-wg0-f44.google.com ([74.125.82.44]:45087 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932162Ab2EIV6f (ORCPT ); Wed, 9 May 2012 17:58:35 -0400 Received: by wgbdr13 with SMTP id dr13so746186wgb.1 for ; Wed, 09 May 2012 14:58:34 -0700 (PDT) In-Reply-To: <4FAACF55.5070809@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig93495DF0785FBF6A70BB5530 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Since it was ignored on LKML, I guess this should be the right place to send this patch to. -------- Original Message -------- Subject: [PATCH] fix minixfs block limit check Date: Wed, 09 May 2012 22:11:01 +0200 From: Vladimir '=CF=86-coder/phcoder' Serbinenko To: linux-kernel@vger.kernel.org Hello, all. On minix2 and minix3 usually max_size is 7fffffff and the check in question prohibits creation of last block spanning right before 7fffffff. Here is a fix: --- fs/minix/itree_v2.c 2011-04-23 01:34:36.363725380 +0200 +++ /home/phcoder/projects/fs/minix/itree_v2.c 2012-05-09 21:47:52.335621065 +0200 @@ -32,7 +32,8 @@ 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 >=3D (minix_sb(inode->i_sb)->s_max_size/sb->s_blocksize)) { + } else if ((u64) block * (u64) sb->s_blocksize + >=3D minix_sb(inode->i_sb)->s_max_size) { if (printk_ratelimit()) printk("MINIX-fs: block_to_path: " --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig93495DF0785FBF6A70BB5530 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk+q6IUACgkQNak7dOguQgn/MwD+KYhU33Kx3yssfMoDJ7XqQUS0 Y1GYUggAW+jflQOuCmwA/15RYDSg13drxWHKf9Xe1yRtcrElkUwubT1fF2lMoHSo =U8qG -----END PGP SIGNATURE----- --------------enig93495DF0785FBF6A70BB5530--