diff options
author | Thomas Graf <tgraf@suug.ch> | 2012-06-28 05:57:45 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-29 02:56:43 +0200 |
commit | 58050fce3530939372e6c2f4b4beb76fcb4caa65 (patch) | |
tree | ee2b85eda9973fed36102dad66f583e43a4a6cab /net/ieee802154/nl-phy.c | |
parent | tcp: plug dst leak in tcp_v6_conn_request() (diff) | |
download | linux-58050fce3530939372e6c2f4b4beb76fcb4caa65.tar.xz linux-58050fce3530939372e6c2f4b4beb76fcb4caa65.zip |
net: Use NLMSG_DEFAULT_SIZE in combination with nlmsg_new()
Using NLMSG_GOODSIZE results in multiple pages being used as
nlmsg_new() will automatically add the size of the netlink
header to the payload thus exceeding the page limit.
NLMSG_DEFAULT_SIZE takes this into account.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Cc: Jiri Pirko <jpirko@redhat.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee802154/nl-phy.c')
-rw-r--r-- | net/ieee802154/nl-phy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ieee802154/nl-phy.c b/net/ieee802154/nl-phy.c index eed291626da6..d54be34cca94 100644 --- a/net/ieee802154/nl-phy.c +++ b/net/ieee802154/nl-phy.c @@ -101,7 +101,7 @@ static int ieee802154_list_phy(struct sk_buff *skb, if (!phy) return -ENODEV; - msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL); + msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); if (!msg) goto out_dev; |