From: Thomas Haller Date: Tue, 6 Sep 2022 20:55:43 +0000 (+0200) Subject: mptcp: account memory allocation in mptcp_nl_cmd_add_addr() to user X-Git-Tag: v6.1-rc1~170^2~221^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3eb9a6b6503cdf228314fd6185df337d1ce11bc0;p=users%2Fdwmw2%2Flinux.git mptcp: account memory allocation in mptcp_nl_cmd_add_addr() to user Now that non-root users can configure MPTCP endpoints, account the memory allocation to the user. Signed-off-by: Thomas Haller Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni --- diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index afc98adf27466..9813ed0fde9bd 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -1327,7 +1327,7 @@ static int mptcp_nl_cmd_add_addr(struct sk_buff *skb, struct genl_info *info) return -EINVAL; } - entry = kmalloc(sizeof(*entry), GFP_KERNEL); + entry = kmalloc(sizeof(*entry), GFP_KERNEL_ACCOUNT); if (!entry) { GENL_SET_ERR_MSG(info, "can't allocate addr"); return -ENOMEM;