freebsd-dev/sys
Hiren Panchasara 9d71a3975e Rework r306337.
In sendit(), if mp->msg_control is present, then in sockargs() we are
allocating mbuf to store mp->msg_control. Later in kern_sendit(), call
to getsock_cap(), will check validity of file pointer passed, if this
fails EBADF is returned but mbuf allocated in sockargs() is not freed.
Made code changes to free the same.

Since freeing control mbuf in sendit() after checking (control != NULL)
may lead to double freeing of control mbuf in sendit(), we can free
control mbuf in kern_sendit() if there are any errors in the routine.

Submitted by:		    Lohith Bellad <lohith.bellad@me.com>
Reviewed by:		    glebius
MFC after:		    3 weeks
Differential Revision:	    https://reviews.freebsd.org/D8152
2016-10-21 18:27:30 +00:00
..
amd64 Implement BPF_MOD and BPF_XOR instructions. 2016-10-21 06:55:07 +00:00
arm Driver for PCI Ethernet NIC on Alpine V1 and V2. 2016-10-20 11:31:11 +00:00
arm64 Driver for PCI Ethernet NIC on Alpine V1 and V2. 2016-10-20 11:31:11 +00:00
boot Support for Alpine Serializer/Deserializer. 2016-10-20 11:26:51 +00:00
bsm
cam Make pass driver better support CAM_CDB_POINTER flag. 2016-10-17 15:02:17 +00:00
cddl Add vfs.zfs.zil_log_limit sysctl. 2016-10-16 18:49:15 +00:00
compat Tidy up ia32_sysvec sv_flags setting 2016-10-20 20:29:54 +00:00
conf netmap: if_ptnet depends on inet 2016-10-21 15:17:42 +00:00
contrib Use proper integer-pointer type conversions. 2016-10-18 00:55:15 +00:00
crypto Fix C++ includability of crypto headers with static array sizes 2016-10-18 23:20:49 +00:00
ddb Determine the operand/address size of %cs in a new function 2016-09-25 16:30:29 +00:00
dev Add names for some DASP devices. 2016-10-21 15:23:54 +00:00
fs A problem w.r.t. interoperation between the FreeBSD NFSv4.1 server with 2016-10-20 23:53:16 +00:00
gdb
geom gmirror: Add a subroutine to free synchronization BIOs. 2016-10-20 23:08:40 +00:00
gnu Revert and redo r306083. 2016-09-22 15:17:36 +00:00
i386 Implement BPF_MOD and BPF_XOR instructions. 2016-10-21 06:55:07 +00:00
isa
kern Rework r306337. 2016-10-21 18:27:30 +00:00
kgssapi
libkern
mips rtwn(4), urtwn(4): merge common code, add support for 11ac devices. 2016-10-17 20:38:24 +00:00
modules - Add required header for fixing make in sys/modules/gpio 2016-10-21 03:23:17 +00:00
net hyperv/hn: Add network change support. 2016-10-21 08:02:05 +00:00
net80211 [net80211] Initial full-offload scan support. 2016-10-19 05:03:46 +00:00
netgraph
netinet Make ICMPv6 hard error handling for TCP consistent with the ICMPv4 2016-10-21 10:32:57 +00:00
netinet6 Make ICMPv6 hard error handling for TCP consistent with the ICMPv4 2016-10-21 10:32:57 +00:00
netipsec
netnatm
netpfil Fix ipfw table lookup handler to return entry value, but not its index. 2016-10-19 11:51:17 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4 2016-09-30 08:23:06 +00:00
opencrypto Add support for the fpu_kern(9) KPI on arm64. It hooks into the existing 2016-10-20 09:22:10 +00:00
pc98 Fix building on i386 and arm. But 'public domain' headers on the files 2016-10-13 06:56:23 +00:00
powerpc Remove a hack requiring dtsec0 to always be enabled for mdio. 2016-10-21 02:16:11 +00:00
riscv rtwn(4), urtwn(4): merge common code, add support for 11ac devices. 2016-10-17 20:38:24 +00:00
rpc
security
sparc64 Fix building on i386 and arm. But 'public domain' headers on the files 2016-10-13 06:56:23 +00:00
sys Fix C++ includability of crypto headers with static array sizes 2016-10-18 23:20:49 +00:00
teken
tests
tools
ufs Add FFS pager, which uses buffer cache read operation to validate pages. 2016-10-19 11:09:29 +00:00
vm Simplify keg_drain() a bit by using LIST_FOREACH_SAFE. 2016-10-20 23:10:27 +00:00
x86 Mark a bunch of mpsafe sysctls as such. 2016-10-19 19:42:01 +00:00
xdr
xen xen/vchan: change license of header from Lesser GPL v2.1 to BSD 2016-09-30 13:41:24 +00:00
Makefile