]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: Avoid netlink mmap alloc if msg size exceeds frame size
authorThomas Graf <tgraf@suug.ch>
Sat, 30 Nov 2013 12:21:31 +0000 (13:21 +0100)
committerJesse Gross <jesse@nicira.com>
Mon, 6 Jan 2014 23:52:06 +0000 (15:52 -0800)
commit9bf8510d99009fb0d6773bdaac8f11c744740060
tree164aafabd87e384e55527a37ab67761ef7473c86
parent81e55e8b5282d4265e748a9f8b711ea0db1dadb7
netlink: Avoid netlink mmap alloc if msg size exceeds frame size

An insufficent ring frame size configuration can lead to an
unnecessary skb allocation for every Netlink message. Check frame
size before taking the queue lock and allocating the skb and
re-check with lock to be safe.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Reviewed-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
net/netlink/af_netlink.c