lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun,  1 Jul 2018 14:18:47 +0800
From:   Huaisheng Ye <yehs2007@...o.com>
To:     dan.j.williams@...el.com
Cc:     dave.jiang@...el.com, willy@...radead.org,
        ross.zwisler@...ux.intel.com, vishal.l.verma@...el.com,
        jack@...e.com, chengnt@...ovo.com, linux-nvdimm@...ts.01.org,
        linux-kernel@...r.kernel.org, linux-ext4@...r.kernel.org,
        Huaisheng Ye <yehs1@...ovo.com>
Subject: [PATCH 2/3] fs/ext2/inode: Fix a type cast error for fsdax

From: Huaisheng Ye <yehs1@...ovo.com>

The type of offset within struct iomap is loff_t, which represents
file offset of mapping.

In ext2_iomap_begin, iomap->offset shall be given a type cast as
loff_t instead of u64.

Signed-off-by: Huaisheng Ye <yehs1@...ovo.com>
---
 fs/ext2/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index 7163590..ca211bd 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -816,7 +816,7 @@ static int ext2_iomap_begin(struct inode *inode, loff_t offset, loff_t length,
 
 	iomap->flags = 0;
 	iomap->bdev = inode->i_sb->s_bdev;
-	iomap->offset = (u64)first_block << blkbits;
+	iomap->offset = (loff_t)first_block << blkbits;
 	iomap->dax_dev = sbi->s_daxdev;
 
 	if (ret == 0) {
-- 
1.8.3.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ