Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298414
b: refs/heads/master
c: 5219a53
h: refs/heads/master
v: v3
  • Loading branch information
Steffen Klassert authored and Herbert Xu committed Mar 29, 2012
1 parent d6d61fc commit 76fb406
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e1229940045a537c61fb69f86010a8774e576d0
refs/heads/master: 5219a5342ab13650ae0f0c62319407268c48d0ab
8 changes: 8 additions & 0 deletions trunk/crypto/crypto_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,20 @@ static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)

if ((type == (CRYPTO_MSG_GETALG - CRYPTO_MSG_BASE) &&
(nlh->nlmsg_flags & NLM_F_DUMP))) {
struct crypto_alg *alg;
u16 dump_alloc = 0;

if (link->dump == NULL)
return -EINVAL;

list_for_each_entry(alg, &crypto_alg_list, cra_list)
dump_alloc += CRYPTO_REPORT_MAXSIZE;

{
struct netlink_dump_control c = {
.dump = link->dump,
.done = link->done,
.min_dump_alloc = dump_alloc,
};
return netlink_dump_start(crypto_nlsk, skb, nlh, &c);
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/linux/cryptouser.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,6 @@ struct crypto_report_rng {
char type[CRYPTO_MAX_NAME];
unsigned int seedsize;
};

#define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + \
sizeof(struct crypto_report_blkcipher))

0 comments on commit 76fb406

Please sign in to comment.