diff options
author | David S. Miller <davem@davemloft.net> | 2012-04-01 20:19:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-02 04:33:42 -0400 |
commit | 6662df33f85b87bb29f2ecad124efe7bb2c08e05 (patch) | |
tree | 13c8ac420b8d10ec3a7aa9aa7fdaa221e430c9cc /crypto/aead.c | |
parent | b21dddb9dfe50ca1e205faf4b25900895494d25b (diff) |
crypto: Stop using NLA_PUT*().
These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'crypto/aead.c')
-rw-r--r-- | crypto/aead.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/aead.c b/crypto/aead.c index 04add3dca6fe..c772b9c79ee7 100644 --- a/crypto/aead.c +++ b/crypto/aead.c | |||
@@ -125,9 +125,9 @@ static int crypto_aead_report(struct sk_buff *skb, struct crypto_alg *alg) | |||
125 | raead.maxauthsize = aead->maxauthsize; | 125 | raead.maxauthsize = aead->maxauthsize; |
126 | raead.ivsize = aead->ivsize; | 126 | raead.ivsize = aead->ivsize; |
127 | 127 | ||
128 | NLA_PUT(skb, CRYPTOCFGA_REPORT_AEAD, | 128 | if (nla_put(skb, CRYPTOCFGA_REPORT_AEAD, |
129 | sizeof(struct crypto_report_aead), &raead); | 129 | sizeof(struct crypto_report_aead), &raead)) |
130 | 130 | goto nla_put_failure; | |
131 | return 0; | 131 | return 0; |
132 | 132 | ||
133 | nla_put_failure: | 133 | nla_put_failure: |
@@ -210,9 +210,9 @@ static int crypto_nivaead_report(struct sk_buff *skb, struct crypto_alg *alg) | |||
210 | raead.maxauthsize = aead->maxauthsize; | 210 | raead.maxauthsize = aead->maxauthsize; |
211 | raead.ivsize = aead->ivsize; | 211 | raead.ivsize = aead->ivsize; |
212 | 212 | ||
213 | NLA_PUT(skb, CRYPTOCFGA_REPORT_AEAD, | 213 | if (nla_put(skb, CRYPTOCFGA_REPORT_AEAD, |
214 | sizeof(struct crypto_report_aead), &raead); | 214 | sizeof(struct crypto_report_aead), &raead)) |
215 | 215 | goto nla_put_failure; | |
216 | return 0; | 216 | return 0; |
217 | 217 | ||
218 | nla_put_failure: | 218 | nla_put_failure: |