summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8bdbb55)
raw | patch | inline | side by side (parent: 8bdbb55)
author | Gerd Hoffmann <kraxel@redhat.com> | |
Tue, 16 Feb 2016 13:25:00 +0000 (14:25 +0100) | ||
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
Thu, 3 Mar 2016 23:06:52 +0000 (15:06 -0800) |
commit 34855706c30d52b0a744da44348b5d1cc39fbe51 upstream.
This avoids integer overflows on 32bit machines when calculating
reloc_info size, as reported by Alan Cox.
Cc: gnomes@lxorguk.ukuu.org.uk
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This avoids integer overflows on 32bit machines when calculating
reloc_info size, as reported by Alan Cox.
Cc: gnomes@lxorguk.ukuu.org.uk
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/qxl/qxl_ioctl.c | patch | blob | history |
index 56a13a915155a7126008a814241c81018f0af6ff..0928c5e2bafdc2afd2e722749283ed5d824614b0 100644 (file)
cmd->command_size))
return -EFAULT;
- reloc_info = kmalloc(sizeof(struct qxl_reloc_info) * cmd->relocs_num, GFP_KERNEL);
+ reloc_info = kmalloc_array(cmd->relocs_num,
+ sizeof(struct qxl_reloc_info), GFP_KERNEL);
if (!reloc_info)
return -ENOMEM;