]> git.baikalelectronics.ru Git - kernel.git/commit
drbd: correctly handle failed crypto_alloc_hash
authorLars Ellenberg <lars.ellenberg@linbit.com>
Mon, 13 Jun 2016 22:26:39 +0000 (00:26 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 14 Jun 2016 03:43:08 +0000 (21:43 -0600)
commit537e361956706f0ad2618f070fe157176864358d
tree3af5073c4650026854b1af1af191ac9f22ec6464
parent1aeaa737a8edae72d2aea93ab59700bd22887c62
drbd: correctly handle failed crypto_alloc_hash

crypto_alloc_hash returns an ERR_PTR(), not NULL.

Also reset peer_integrity_tfm to NULL, to not call crypto_free_hash()
on an errno in the cleanup path.

Reported-by: Insu Yun <wuninsu@gmail.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/drbd/drbd_receiver.c
include/linux/drbd.h