Commit 365cf663 authored by Roland Kammerer's avatar Roland Kammerer Committed by Jens Axboe
Browse files

drbd: switch from kmalloc() to kmalloc_array()



We had one call to kmalloc that actually allocates an array. Switch that
one to the kmalloc_array() function.

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d3d2948f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4126,7 +4126,7 @@ static int receive_uuids(struct drbd_connection *connection, struct packet_info
		return config_unknown_volume(connection, pi);
	device = peer_device->device;

	p_uuid = kmalloc(sizeof(u64)*UI_EXTENDED_SIZE, GFP_NOIO);
	p_uuid = kmalloc_array(UI_EXTENDED_SIZE, sizeof(*p_uuid), GFP_NOIO);
	if (!p_uuid) {
		drbd_err(device, "kmalloc of p_uuid failed\n");
		return false;
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@
#endif

extern const char *drbd_buildtag(void);
#define REL_VERSION "8.4.7"
#define REL_VERSION "8.4.10"
#define API_VERSION 1
#define PRO_VERSION_MIN 86
#define PRO_VERSION_MAX 101