Skip to content
Snippets Groups Projects
Select Git revision
  • v4.15-rc9
  • master default
  • vpu-jpeg-h264-wip
  • vpu-ficus-v2
  • wip-vpu-jpeg-v1
  • m2m-mc-v3
  • vpu-ficus-wip
  • proc-cmdline
  • v4.18-rc1
  • v4.17
  • v4.17-rc7
  • v4.17-rc6
  • v4.17-rc5
  • v4.17-rc4
  • v4.17-rc3
  • v4.17-rc2
  • v4.17-rc1
  • v4.16
  • v4.16-rc7
  • v4.16-rc6
  • v4.16-rc5
  • v4.16-rc4
  • v4.16-rc3
  • v4.16-rc2
  • v4.16-rc1
  • v4.15
  • v4.15-rc8
27 results

util.c

Blame
  • af_unix.c 52.56 KiB
    /*
     * NET4:	Implementation of BSD Unix domain sockets.
     *
     * Authors:	Alan Cox, <alan@lxorguk.ukuu.org.uk>
     *
     *		This program is free software; you can redistribute it and/or
     *		modify it under the terms of the GNU General Public License
     *		as published by the Free Software Foundation; either version
     *		2 of the License, or (at your option) any later version.
     *
     * Fixes:
     *		Linus Torvalds	:	Assorted bug cures.
     *		Niibe Yutaka	:	async I/O support.
     *		Carsten Paeth	:	PF_UNIX check, address fixes.
     *		Alan Cox	:	Limit size of allocated blocks.
     *		Alan Cox	:	Fixed the stupid socketpair bug.
     *		Alan Cox	:	BSD compatibility fine tuning.
     *		Alan Cox	:	Fixed a bug in connect when interrupted.
     *		Alan Cox	:	Sorted out a proper draft version of
     *					file descriptor passing hacked up from
     *					Mike Shaver's work.
     *		Marty Leisner	:	Fixes to fd passing
     *		Nick Nevin	:	recvmsg bugfix.
     *		Alan Cox	:	Started proper garbage collector
     *		Heiko EiBfeldt	:	Missing verify_area check
     *		Alan Cox	:	Started POSIXisms
     *		Andreas Schwab	:	Replace inode by dentry for proper
     *					reference counting
     *		Kirk Petersen	:	Made this a module
     *	    Christoph Rohland	:	Elegant non-blocking accept/connect algorithm.
     *					Lots of bug fixes.
     *	     Alexey Kuznetosv	:	Repaired (I hope) bugs introduces
     *					by above two patches.
     *	     Andrea Arcangeli	:	If possible we block in connect(2)
     *					if the max backlog of the listen socket
     *					is been reached. This won't break
     *					old apps and it will avoid huge amount
     *					of socks hashed (this for unix_gc()
     *					performances reasons).
     *					Security fix that limits the max
     *					number of socks to 2*max_files and
     *					the number of skb queueable in the
     *					dgram receiver.
     *		Artur Skawina   :	Hash function optimizations
     *	     Alexey Kuznetsov   :	Full scale SMP. Lot of bugs are introduced 8)
     *	      Malcolm Beattie   :	Set peercred for socketpair
     *	     Michal Ostrowski   :       Module initialization cleanup.
     *	     Arnaldo C. Melo	:	Remove MOD_{INC,DEC}_USE_COUNT,
     *	     				the core infrastructure is doing that
     *	     				for all net proto families now (2.5.69+)
     *
     *
     * Known differences from reference BSD that was tested:
     *
     *	[TO FIX]
     *	ECONNREFUSED is not returned from one end of a connected() socket to the
     *		other the moment one end closes.
     *	fstat() doesn't return st_dev=0, and give the blksize as high water mark
     *		and a fake inode identifier (nor the BSD first socket fstat twice bug).
     *	[NOT TO FIX]
     *	accept() returns a path name even if the connecting socket has closed
     *		in the meantime (BSD loses the path and gives up).
     *	accept() returns 0 length path for an unbound connector. BSD returns 16
     *		and a null first byte in the path (but not for gethost/peername - BSD bug ??)
     *	socketpair(...SOCK_RAW..) doesn't panic the kernel.
     *	BSD af_unix apparently has connect forgetting to block properly.
     *		(need to check this with the POSIX spec in detail)
     *
     * Differences from 2.0.0-11-... (ANK)
     *	Bug fixes and improvements.