[Devel] [PATCH RHEL7 COMMIT] ext4/mfsync: fix mem size to allocate in EXT4_IOC_MFSYNC

Konstantin Khorenko khorenko at virtuozzo.com
Sat Apr 29 10:23:54 PDT 2017


The commit is pushed to "branch-rh7-3.10.0-514.16.1.vz7.30.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.16.1.vz7.30.10
------>
commit 6739f1bc92b020c589a53904e36136f985b90723
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Sat Apr 29 21:17:05 2017 +0400

    ext4/mfsync: fix mem size to allocate in EXT4_IOC_MFSYNC
    
    A misprint in size of allocation resulted in allocation much more memory than
    required, which results in unnecessary high order pages allocation.
    
    https://jira.sw.ru/browse/PSBM-65802
    
    Reported-by: Alexey Kuznetsov <kuznet at virtuozzo.com>
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 fs/ext4/ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 9232330..117d89d 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -796,7 +796,7 @@ resize_out:
 
 		usr_fd = (__u32 __user *) (arg + sizeof(__u32));
 
-		filpp = kzalloc(mfsync.size * sizeof(*filp), GFP_KERNEL);
+		filpp = kzalloc(mfsync.size * sizeof(*filpp), GFP_KERNEL);
 		if (!filpp)
 			return -ENOMEM;
 		flags = kzalloc(mfsync.size * sizeof(*flags), GFP_KERNEL);


More information about the Devel mailing list