diff options
-rw-r--r-- | net/netlink/af_netlink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 81dc1bb6e016..f1ffb34e253f 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -2831,7 +2831,8 @@ static int netlink_dump(struct sock *sk) | |||
2831 | * reasonable static buffer based on the expected largest dump of a | 2831 | * reasonable static buffer based on the expected largest dump of a |
2832 | * single netdev. The outcome is MSG_TRUNC error. | 2832 | * single netdev. The outcome is MSG_TRUNC error. |
2833 | */ | 2833 | */ |
2834 | skb_reserve(skb, skb_tailroom(skb) - alloc_size); | 2834 | if (!netlink_rx_is_mmaped(sk)) |
2835 | skb_reserve(skb, skb_tailroom(skb) - alloc_size); | ||
2835 | netlink_skb_set_owner_r(skb, sk); | 2836 | netlink_skb_set_owner_r(skb, sk); |
2836 | 2837 | ||
2837 | len = cb->dump(skb, cb); | 2838 | len = cb->dump(skb, cb); |