Merge branches 'fixes', 'misc' and 'spectre' into for-next
[linux-block.git] / arch / arm / kernel / sys_oabi-compat.c
index a87684532327b2959899cf618cd7d72ca480d790..40da0872170fca836d734b12257c63906d1e6b8f 100644 (file)
@@ -287,7 +287,7 @@ asmlinkage long sys_oabi_epoll_wait(int epfd,
                return -EINVAL;
        if (!access_ok(VERIFY_WRITE, events, sizeof(*events) * maxevents))
                return -EFAULT;
-       kbuf = kmalloc(sizeof(*kbuf) * maxevents, GFP_KERNEL);
+       kbuf = kmalloc_array(maxevents, sizeof(*kbuf), GFP_KERNEL);
        if (!kbuf)
                return -ENOMEM;
        fs = get_fs();
@@ -328,7 +328,7 @@ asmlinkage long sys_oabi_semtimedop(int semid,
                return -EINVAL;
        if (!access_ok(VERIFY_READ, tsops, sizeof(*tsops) * nsops))
                return -EFAULT;
-       sops = kmalloc(sizeof(*sops) * nsops, GFP_KERNEL);
+       sops = kmalloc_array(nsops, sizeof(*sops), GFP_KERNEL);
        if (!sops)
                return -ENOMEM;
        err = 0;