netlink: mmap: fix tx type check
authorKen-ichirou MATSUZAWA <chamaken@gmail.com>
Thu, 20 Aug 2015 03:43:53 +0000 (12:43 +0900)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Aug 2015 23:04:46 +0000 (16:04 -0700)
commitc953e23936f902c7719166327e3113639105c981
treeee8594db6b25182cb5c37032eff933810b218c6f
parent0bad90985d39e69ca035fdd70bcc743812641d18
netlink: mmap: fix tx type check

I can't send netlink message via mmaped netlink socket since

    commit: a8866ff6a5bce7d0ec465a63bc482a85c09b0d39
    netlink: make the check for "send from tx_ring" deterministic

msg->msg_iter.type is set to WRITE (1) at

    SYSCALL_DEFINE6(sendto, ...
        import_single_range(WRITE, ...
            iov_iter_init(1, WRITE, ...

call path, so that we need to check the type by iter_is_iovec()
to accept the WRITE.

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