diff options
author | Thomas Haller <thaller@redhat.com> | 2022-09-06 22:55:43 +0200 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-09-15 12:01:02 +0200 |
commit | 3eb9a6b6503cdf228314fd6185df337d1ce11bc0 (patch) | |
tree | 867f424f371edff9e4e150368c07eb9f0ce2ab2d /net | |
parent | mptcp: allow privileged operations from user namespaces (diff) | |
download | linux-3eb9a6b6503cdf228314fd6185df337d1ce11bc0.tar.xz linux-3eb9a6b6503cdf228314fd6185df337d1ce11bc0.zip |
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 <thaller@redhat.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mptcp/pm_netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index afc98adf2746..9813ed0fde9b 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; |