]> git.neil.brown.name Git - history.git/commit
[NETLINK]: Use SKB_MAXORDER to calculate NLMSG_GOODSIZE
authorThomas Graf <tgraf@suug.ch>
Sun, 6 Feb 2005 14:00:12 +0000 (06:00 -0800)
committerDavid S. Miller <davem@nuts.davemloft.net>
Sun, 6 Feb 2005 14:00:12 +0000 (06:00 -0800)
commit8625513b9176c291b40fd7098f4932a7d36c40df
tree2fbd5ef9391151082db8fcc68e512b0a37f99172
parent8bd2cfd86bdd28e846b8119fe208f632b9fe0cf7
[NETLINK]: Use SKB_MAXORDER to calculate NLMSG_GOODSIZE

NLMSG_GOODSIZE specifies a good default size for the skb tailroom
used in netlink messages when the size is unknown at the time of
the allocation.

The current value doesn't make much sense anymore because
skb_shared_info isn't taken into account which means that
depending on the architecture NLMSG_GOOSIZE can exceed PAGE_SIZE
resulting in a waste of almost a complete page.

Using SKB_MAXORDER solves this potential leak at the cost of
slightly smaller but safer sizes for some architectures.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netlink.h