]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/grant-table: Use kmalloc_array() in arch_gnttab_valloc()
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 25 Aug 2016 11:23:06 +0000 (13:23 +0200)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Fri, 3 Feb 2017 20:55:24 +0000 (15:55 -0500)
commit6ac4339d6ff4c9ee57bffbe19e3a898c6c435a37
treee1c5484a067a431236dbb89210c3c8ef7ad64d08
parent5492365bfaca1695f6c3ea6a753935ddcbe0ebe7
xen/grant-table: Use kmalloc_array() in arch_gnttab_valloc()

* A multiplication for the size determination of a memory allocation
  indicated that an array data structure should be processed.
  Thus reuse the corresponding function "kmalloc_array".

  This issue was detected by using the Coccinelle software.

* Replace the specification of a data type by a pointer dereference
  to make the corresponding size determination a bit safer according to
  the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
OraBug: 25497392

(cherry picked from commit 4f0fbdf22e739c94ad4c18c790be014dddaedd28)
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
arch/x86/xen/grant-table.c