Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63d464fe authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Lee Jones
Browse files

UPSTREAM: 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.

Bug: 254441685
Fixes: 5106f4a8acff ("xfrm/compat: Add 32=>64-bit messages translator")
Signed-off-by: default avatarDmitry Safonov <dima@arista.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit ad37f77fd3659e87fd9833a83692e0e4eba0f5cd)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I0b9273973be61ac311676c5a72e5b3866b082a28
parent c4705515
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -564,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);