diff options
Diffstat (limited to 'crypto/algif_skcipher.c')
| -rw-r--r-- | crypto/algif_skcipher.c | 7 | 
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index 15cf3c5222e0..cfdaab2b7d76 100644 --- a/crypto/algif_skcipher.c +++ b/crypto/algif_skcipher.c @@ -100,7 +100,8 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg,  	areq->tsgl_entries = af_alg_count_tsgl(sk, len, 0);  	if (!areq->tsgl_entries)  		areq->tsgl_entries = 1; -	areq->tsgl = sock_kmalloc(sk, sizeof(*areq->tsgl) * areq->tsgl_entries, +	areq->tsgl = sock_kmalloc(sk, array_size(sizeof(*areq->tsgl), +						 areq->tsgl_entries),  				  GFP_KERNEL);  	if (!areq->tsgl) {  		err = -ENOMEM; @@ -205,7 +206,7 @@ static struct proto_ops algif_skcipher_ops = {  	.sendmsg	=	skcipher_sendmsg,  	.sendpage	=	af_alg_sendpage,  	.recvmsg	=	skcipher_recvmsg, -	.poll_mask	=	af_alg_poll_mask, +	.poll		=	af_alg_poll,  };  static int skcipher_check_key(struct socket *sock) @@ -301,7 +302,7 @@ static struct proto_ops algif_skcipher_ops_nokey = {  	.sendmsg	=	skcipher_sendmsg_nokey,  	.sendpage	=	skcipher_sendpage_nokey,  	.recvmsg	=	skcipher_recvmsg_nokey, -	.poll_mask	=	af_alg_poll_mask, +	.poll		=	af_alg_poll,  };  static void *skcipher_bind(const char *name, u32 type, u32 mask)  |