Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[sfrench/cifs-2.6.git] / kernel / user_namespace.c
index 492c255e6c5a31ee135004123193310a8e6e3ce2..c3d7583fcd216d6f0b44b8d38c65ecc60c3e6fde 100644 (file)
@@ -764,8 +764,9 @@ static int insert_extent(struct uid_gid_map *map, struct uid_gid_extent *extent)
                struct uid_gid_extent *forward;
 
                /* Allocate memory for 340 mappings. */
-               forward = kmalloc(sizeof(struct uid_gid_extent) *
-                                UID_GID_MAP_MAX_EXTENTS, GFP_KERNEL);
+               forward = kmalloc_array(UID_GID_MAP_MAX_EXTENTS,
+                                       sizeof(struct uid_gid_extent),
+                                       GFP_KERNEL);
                if (!forward)
                        return -ENOMEM;