diff options
author | Roland Kammerer <roland.kammerer@linbit.com> | 2017-08-29 10:20:48 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-08-29 15:34:46 -0600 |
commit | 365cf663b64791e341f425385c7ae152327c7009 (patch) | |
tree | 240e25c55c0cdee8c6eb1a44583dce25b228d731 | |
parent | d3d2948f4353300e483e03be3f400dc07cf504ce (diff) | |
download | lwn-365cf663b64791e341f425385c7ae152327c7009.tar.gz lwn-365cf663b64791e341f425385c7ae152327c7009.zip |
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: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 2 | ||||
-rw-r--r-- | include/linux/drbd.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 4e8a543ded70..796eaf347dc0 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -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; diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 002611c85318..2d0259327721 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h @@ -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 |