Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[sfrench/cifs-2.6.git] / drivers / crypto / chelsio / chtls / chtls_io.c
index 708e232e3cdf7f037720e747ded9f84a4ae1871c..afebbd87c4aa1d22ca179f558552cb2f410fcc0a 100644 (file)
@@ -240,7 +240,7 @@ static int tls_copy_ivs(struct sock *sk, struct sk_buff *skb)
        }
 
        /* generate the  IVs */
-       ivs = kmalloc(number_of_ivs * CIPHER_BLOCK_SIZE, GFP_ATOMIC);
+       ivs = kmalloc_array(CIPHER_BLOCK_SIZE, number_of_ivs, GFP_ATOMIC);
        if (!ivs)
                return -ENOMEM;
        get_random_bytes(ivs, number_of_ivs * CIPHER_BLOCK_SIZE);