Skip to content

Commit ad37f77

Browse files
0x7f454c46klassert
authored andcommitted
xfrm/compat: Don't allocate memory with __GFP_ZERO
32-bit to 64-bit messages translator zerofies needed paddings in the translation, the rest is the actual payload. Don't allocate zero pages as they are not needed. Fixes: 5106f4a ("xfrm/compat: Add 32=>64-bit messages translator") Signed-off-by: Dmitry Safonov <dima@arista.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
1 parent d1949d0 commit ad37f77

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/xfrm/xfrm_compat.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ static struct nlmsghdr *xfrm_user_rcv_msg_compat(const struct nlmsghdr *h32,
564564
return NULL;
565565

566566
len += NLMSG_HDRLEN;
567-
h64 = kvmalloc(len, GFP_KERNEL | __GFP_ZERO);
567+
h64 = kvmalloc(len, GFP_KERNEL);
568568
if (!h64)
569569
return ERR_PTR(-ENOMEM);
570570

0 commit comments

Comments
 (0)