]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: not trim skb for mmaped socket when dump
authorKen-ichirou MATSUZAWA <chamaken@gmail.com>
Fri, 29 Jan 2016 01:45:50 +0000 (10:45 +0900)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jan 2016 04:25:17 +0000 (20:25 -0800)
commitfcddee45bbe869979be305f5d0d363350b47ee2d
tree71b2557ea8cbafc6f6080614b43f86a15df54b9c
parent5c93dc257d7d92a657fb5fc8aafb279dde2f2351
netlink: not trim skb for mmaped socket when dump

We should not trim skb for mmaped socket since its buf size is fixed
and userspace will read as frame which data equals head. mmaped
socket will not call recvmsg, means max_recvmsg_len is 0,
skb_reserve was not called before commit: 76af002055e6.

Fixes: 76af002055e6 (netlink: Trim skb to alloc size to avoid MSG_TRUNC)
Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/af_netlink.c