diff options
| -rw-r--r-- | crypto/tcrypt.c | 8 | ||||
| -rw-r--r-- | drivers/net/wireless/airo.c | 4 | ||||
| -rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_crypto.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 577a3aff3113..53f4ee804bdb 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c | |||
| @@ -415,12 +415,12 @@ out: | |||
| 415 | static int test_cipher_jiffies(struct crypto_tfm *tfm, int enc, char *p, | 415 | static int test_cipher_jiffies(struct crypto_tfm *tfm, int enc, char *p, |
| 416 | int blen, int sec) | 416 | int blen, int sec) |
| 417 | { | 417 | { |
| 418 | struct scatterlist sg[8]; | 418 | struct scatterlist sg[1]; |
| 419 | unsigned long start, end; | 419 | unsigned long start, end; |
| 420 | int bcount; | 420 | int bcount; |
| 421 | int ret; | 421 | int ret; |
| 422 | 422 | ||
| 423 | sg_set_buf(&sg[0], p, blen); | 423 | sg_set_buf(sg, p, blen); |
| 424 | 424 | ||
| 425 | for (start = jiffies, end = start + sec * HZ, bcount = 0; | 425 | for (start = jiffies, end = start + sec * HZ, bcount = 0; |
| 426 | time_before(jiffies, end); bcount++) { | 426 | time_before(jiffies, end); bcount++) { |
| @@ -441,12 +441,12 @@ static int test_cipher_jiffies(struct crypto_tfm *tfm, int enc, char *p, | |||
| 441 | static int test_cipher_cycles(struct crypto_tfm *tfm, int enc, char *p, | 441 | static int test_cipher_cycles(struct crypto_tfm *tfm, int enc, char *p, |
| 442 | int blen) | 442 | int blen) |
| 443 | { | 443 | { |
| 444 | struct scatterlist sg[8]; | 444 | struct scatterlist sg[1]; |
| 445 | unsigned long cycles = 0; | 445 | unsigned long cycles = 0; |
| 446 | int ret = 0; | 446 | int ret = 0; |
| 447 | int i; | 447 | int i; |
| 448 | 448 | ||
| 449 | sg_set_buf(&sg[0], p, blen); | 449 | sg_set_buf(sg, p, blen); |
| 450 | 450 | ||
| 451 | local_bh_disable(); | 451 | local_bh_disable(); |
| 452 | local_irq_disable(); | 452 | local_irq_disable(); |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 1609ce11389d..750c0167539c 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
| @@ -1591,9 +1591,9 @@ static void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen, struct | |||
| 1591 | aes_counter[12] = (u8)(counter >> 24); | 1591 | aes_counter[12] = (u8)(counter >> 24); |
| 1592 | counter++; | 1592 | counter++; |
| 1593 | memcpy (plain, aes_counter, 16); | 1593 | memcpy (plain, aes_counter, 16); |
| 1594 | sg_set_buf(&sg[0], plain, 16); | 1594 | sg_set_buf(sg, plain, 16); |
| 1595 | crypto_cipher_encrypt(tfm, sg, sg, 16); | 1595 | crypto_cipher_encrypt(tfm, sg, sg, 16); |
| 1596 | cipher = kmap(sg[0].page) + sg[0].offset; | 1596 | cipher = kmap(sg->page) + sg->offset; |
| 1597 | for (j=0; (j<16) && (i< (sizeof(context->coeff)/sizeof(context->coeff[0]))); ) { | 1597 | for (j=0; (j<16) && (i< (sizeof(context->coeff)/sizeof(context->coeff[0]))); ) { |
| 1598 | context->coeff[i++] = ntohl(*(u32 *)&cipher[j]); | 1598 | context->coeff[i++] = ntohl(*(u32 *)&cipher[j]); |
| 1599 | j += 4; | 1599 | j += 4; |
diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c index e65e1f979275..97c981fa6b8e 100644 --- a/net/sunrpc/auth_gss/gss_krb5_crypto.c +++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c | |||
| @@ -75,7 +75,7 @@ krb5_encrypt( | |||
| 75 | memcpy(local_iv, iv, crypto_tfm_alg_ivsize(tfm)); | 75 | memcpy(local_iv, iv, crypto_tfm_alg_ivsize(tfm)); |
| 76 | 76 | ||
| 77 | memcpy(out, in, length); | 77 | memcpy(out, in, length); |
| 78 | sg_set_buf(&sg[0], out, length); | 78 | sg_set_buf(sg, out, length); |
| 79 | 79 | ||
| 80 | ret = crypto_cipher_encrypt_iv(tfm, sg, sg, length, local_iv); | 80 | ret = crypto_cipher_encrypt_iv(tfm, sg, sg, length, local_iv); |
| 81 | 81 | ||
| @@ -115,7 +115,7 @@ krb5_decrypt( | |||
| 115 | memcpy(local_iv,iv, crypto_tfm_alg_ivsize(tfm)); | 115 | memcpy(local_iv,iv, crypto_tfm_alg_ivsize(tfm)); |
| 116 | 116 | ||
| 117 | memcpy(out, in, length); | 117 | memcpy(out, in, length); |
| 118 | sg_set_buf(&sg[0], out, length); | 118 | sg_set_buf(sg, out, length); |
| 119 | 119 | ||
| 120 | ret = crypto_cipher_decrypt_iv(tfm, sg, sg, length, local_iv); | 120 | ret = crypto_cipher_decrypt_iv(tfm, sg, sg, length, local_iv); |
| 121 | 121 | ||
