diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/af_alg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 6a3ad8011585..bc21f520d489 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c | |||
@@ -399,7 +399,7 @@ int af_alg_cmsg_send(struct msghdr *msg, struct af_alg_control *con) | |||
399 | { | 399 | { |
400 | struct cmsghdr *cmsg; | 400 | struct cmsghdr *cmsg; |
401 | 401 | ||
402 | for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { | 402 | for_each_cmsghdr(cmsg, msg) { |
403 | if (!CMSG_OK(msg, cmsg)) | 403 | if (!CMSG_OK(msg, cmsg)) |
404 | return -EINVAL; | 404 | return -EINVAL; |
405 | if (cmsg->cmsg_level != SOL_ALG) | 405 | if (cmsg->cmsg_level != SOL_ALG) |