Merge tag 'powerpc-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[linux-2.6-microblaze.git] / net / xfrm / xfrm_compat.c
index e28f0c9..d8e8a11 100644 (file)
@@ -234,6 +234,7 @@ static int xfrm_xlate64_attr(struct sk_buff *dst, const struct nlattr *src)
        case XFRMA_PAD:
                /* Ignore */
                return 0;
+       case XFRMA_UNSPEC:
        case XFRMA_ALG_AUTH:
        case XFRMA_ALG_CRYPT:
        case XFRMA_ALG_COMP:
@@ -387,7 +388,7 @@ static int xfrm_attr_cpy32(void *dst, size_t *pos, const struct nlattr *src,
 
        memcpy(nla, src, nla_attr_size(copy_len));
        nla->nla_len = nla_attr_size(payload);
-       *pos += nla_attr_size(payload);
+       *pos += nla_attr_size(copy_len);
        nlmsg->nlmsg_len += nla->nla_len;
 
        memset(dst + *pos, 0, payload - copy_len);
@@ -563,7 +564,7 @@ static struct nlmsghdr *xfrm_user_rcv_msg_compat(const struct nlmsghdr *h32,
                return NULL;
 
        len += NLMSG_HDRLEN;
-       h64 = kvmalloc(len, GFP_KERNEL | __GFP_ZERO);
+       h64 = kvmalloc(len, GFP_KERNEL);
        if (!h64)
                return ERR_PTR(-ENOMEM);