summaryrefslogtreecommitdiff
path: root/net/ipv4/udp_diag.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2020-03-26 12:09:58 +0100
committerWolfram Sang <wsa@the-dreams.de>2020-03-26 12:09:58 +0100
commit6d7e0a34206d4a5d0c619c0608eae57f4c557064 (patch)
tree8024562a9ba37065989414731f5132b3dcc67012 /net/ipv4/udp_diag.c
parent90224e6468e15d5eb22a10ae1849cf8ca2e7360a (diff)
parent16fbf79b0f83bc752cee8589279f1ebfe57b3b6e (diff)
Merge tag 'v5.6-rc7' into i2c/for-5.7
Linux 5.6-rc7
Diffstat (limited to 'net/ipv4/udp_diag.c')
-rw-r--r--net/ipv4/udp_diag.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/udp_diag.c b/net/ipv4/udp_diag.c
index 910555a4d9fe..dccd2286bc28 100644
--- a/net/ipv4/udp_diag.c
+++ b/net/ipv4/udp_diag.c
@@ -64,8 +64,9 @@ static int udp_dump_one(struct udp_table *tbl, struct sk_buff *in_skb,
goto out;
err = -ENOMEM;
- rep = nlmsg_new(sizeof(struct inet_diag_msg) +
- sizeof(struct inet_diag_meminfo) + 64,
+ rep = nlmsg_new(nla_total_size(sizeof(struct inet_diag_msg)) +
+ inet_diag_msg_attrs_size() +
+ nla_total_size(sizeof(struct inet_diag_meminfo)) + 64,
GFP_KERNEL);
if (!rep)
goto out;