summaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-02-05 05:46:55 +0100
committerDavid S. Miller <davem@davemloft.net>2015-02-05 05:46:55 +0100
commitf2683b743f2334ef49a5361bf596dd1fbd2c9be4 (patch)
tree7f53b2614742238e966ba8a815ef6c5079422ee2 /net/netlink
parenttcp: do not pace pure ack packets (diff)
parentvhost: vhost_scsi_handle_vq() should just use copy_from_user() (diff)
downloadlinux-f2683b743f2334ef49a5361bf596dd1fbd2c9be4.tar.xz
linux-f2683b743f2334ef49a5361bf596dd1fbd2c9be4.zip
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
More iov_iter work from Al Viro. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/af_netlink.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 155854802d44..6feb16d5e1b8 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2298,7 +2298,12 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
goto out;
}
+ /* It's a really convoluted way for userland to ask for mmaped
+ * sendmsg(), but that's what we've got...
+ */
if (netlink_tx_is_mmaped(sk) &&
+ msg->msg_iter.type == ITER_IOVEC &&
+ msg->msg_iter.nr_segs == 1 &&
msg->msg_iter.iov->iov_base == NULL) {
err = netlink_mmap_sendmsg(sk, msg, dst_portid, dst_group,
&scm);