netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] netlink: fix netlink_ack with large messages
@ 2013-11-07 18:57 Jiri Benc
  2013-11-08 20:07 ` David Miller
  0 siblings, 1 reply; 12+ messages in thread
From: Jiri Benc @ 2013-11-07 18:57 UTC (permalink / raw)
  To: netdev; +Cc: Pablo Neira Ayuso

Commit c05cdb1b864f ("netlink: allow large data transfers from user-space")
does not handle cases where netlink_ack is used to report an error. In such
case, the original message is copied to the ack message, which needs to be
large enough.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
---
 net/netlink/af_netlink.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 8df7f64..090f624 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1809,7 +1809,7 @@ out_put:
 	sock_put(sk);
 out:
 #endif
-	return alloc_skb(size, gfp_mask);
+	return netlink_alloc_large_skb(size, gfp_mask);
 }
 EXPORT_SYMBOL_GPL(netlink_alloc_skb);
 
-- 
1.7.6.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-11-13 20:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-07 18:57 [PATCH net] netlink: fix netlink_ack with large messages Jiri Benc
2013-11-08 20:07 ` David Miller
2013-11-09  0:04   ` Thomas Graf
2013-11-09  5:00     ` David Miller
2013-11-09 13:43       ` Jamal Hadi Salim
2013-11-09 18:03         ` Pablo Neira Ayuso
2013-11-12 15:29           ` Jiri Benc
2013-11-12 19:35             ` David Miller
2013-11-13 11:25               ` Jiri Benc
2013-11-13 20:43                 ` David Miller
2013-11-09 19:27         ` David Miller
2013-11-09 19:49           ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).