Commit 7e2f037b authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] tcrypt: Fix error checking for comp allocation
  [CRYPTO] doc: Fix typo in hash example
  [CRYPTO] api: scatterwalk_copychunks() fails to advance through scatterlist
parents 0a14fe6e 7bc301e9
...@@ -60,7 +60,7 @@ Here's an example of how to use the API: ...@@ -60,7 +60,7 @@ Here's an example of how to use the API:
desc.tfm = tfm; desc.tfm = tfm;
desc.flags = 0; desc.flags = 0;
if (crypto_hash_digest(&desc, &sg, 2, result)) if (crypto_hash_digest(&desc, sg, 2, result))
fail(); fail();
crypto_free_hash(tfm); crypto_free_hash(tfm);
......
...@@ -91,6 +91,8 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk, ...@@ -91,6 +91,8 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk,
memcpy_dir(buf, vaddr, len_this_page, out); memcpy_dir(buf, vaddr, len_this_page, out);
scatterwalk_unmap(vaddr, out); scatterwalk_unmap(vaddr, out);
scatterwalk_advance(walk, nbytes);
if (nbytes == len_this_page) if (nbytes == len_this_page)
break; break;
...@@ -99,7 +101,5 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk, ...@@ -99,7 +101,5 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk,
scatterwalk_pagedone(walk, out, 1); scatterwalk_pagedone(walk, out, 1);
} }
scatterwalk_advance(walk, nbytes);
} }
EXPORT_SYMBOL_GPL(scatterwalk_copychunks); EXPORT_SYMBOL_GPL(scatterwalk_copychunks);
...@@ -768,7 +768,7 @@ static void test_deflate(void) ...@@ -768,7 +768,7 @@ static void test_deflate(void)
tv = (void *)tvmem; tv = (void *)tvmem;
tfm = crypto_alloc_comp("deflate", 0, CRYPTO_ALG_ASYNC); tfm = crypto_alloc_comp("deflate", 0, CRYPTO_ALG_ASYNC);
if (tfm == NULL) { if (IS_ERR(tfm)) {
printk("failed to load transform for deflate\n"); printk("failed to load transform for deflate\n");
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment