Module Name: src Committed By: riz Date: Mon Jan 7 16:53:36 UTC 2013
Modified Files: src/sys/kern [netbsd-6-0]: uipc_syscalls.c Log Message: Pull up following revision(s) (requested by mlelstv in ticket #778): sys/kern/uipc_syscalls.c: revision 1.157 sys/kern/uipc_syscalls.c: revision 1.158 If an untraced process sleeps in recvmsg/sendmsg, the syscall does not allocate an iov structure for ktrace. When tracing is then enabled and the process wakes up, it crashes the kernel. Undo the last commit which introduced this error path. Avoid the mentioned kmem_alloc assertion by adding a sanity check analog to similar code in sys_generic.c for I/O on file handles instead of sockets. This also causes the syscall to return EMSGSIZE if the msg_iovlen member of the msg structure is less than or equal to 0, as defined in recvmsg(2)/sendmsg(2). The sanity check prevented messages that carry only ancillary data. To generate a diff of this commit: cvs rdiff -u -r1.154.2.1 -r1.154.2.1.4.1 src/sys/kern/uipc_syscalls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.