Module Name: src Committed By: bouyer Date: Wed Jun 17 20:15:57 UTC 2009
Modified Files: src/sys/compat/linux/common [netbsd-5-0]: linux_socket.c Log Message: Pull up following revision(s) (requested by njoly in ticket #806): sys/compat/linux/common/linux_socket.c: revision 1.100 In sendmsg(2), do copy the msghdr structure before trying to use it. To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.98.6.1 src/sys/compat/linux/common/linux_socket.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/compat/linux/common/linux_socket.c diff -u src/sys/compat/linux/common/linux_socket.c:1.98 src/sys/compat/linux/common/linux_socket.c:1.98.6.1 --- src/sys/compat/linux/common/linux_socket.c:1.98 Wed Aug 6 15:01:23 2008 +++ src/sys/compat/linux/common/linux_socket.c Wed Jun 17 20:15:56 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.98 2008/08/06 15:01:23 plunky Exp $ */ +/* $NetBSD: linux_socket.c,v 1.98.6.1 2009/06/17 20:15:56 bouyer Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.98 2008/08/06 15:01:23 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.98.6.1 2009/06/17 20:15:56 bouyer Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -411,6 +411,10 @@ u_int8_t *control; struct mbuf *ctl_mbuf = NULL; + error = copyin(SCARG(uap, msg), &msg, sizeof(msg)); + if (error) + return error; + msg.msg_flags = MSG_IOVUSRSPACE; /*