freebsd-dev/tests/sys
Mark Johnston 141fe2dcee aio: Interlock with listen(2)
soo_aio_queue() did not handle the possibility that the provided socket
is a listening socket.  Up until recently, to fix this one would have to
acquire the socket lock first and check, since the socket buffer locks
were destroyed by listen(2).

Now that the socket buffer locks belong to the socket, simply check
SOLISTENING(so) after acquiring them, and make listen(2) return an error
if any AIO jobs are enqueued on the socket.

Add a couple of simple regression test cases.

Note that this fixes things only for the default AIO implementation;
cxgbe(4)'s TCP offload has a separate pru_aio_queue implementation which
requires its own solution.

Reported by:	syzbot+c8aa122fa2c6a4e2a28b@syzkaller.appspotmail.com
Reported by:	syzbot+39af117d43d4f0faf512@syzkaller.appspotmail.com
Reported by:	syzbot+60cceb9569145a0b993b@syzkaller.appspotmail.com
Reported by:	syzbot+2d522c5db87710277ca5@syzkaller.appspotmail.com
Reviewed by:	tuexen, gallatin, jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31901
2021-09-10 17:21:11 -04:00
..
acl tests/sys/acl: Add ATF C test for newly added acl_* functions. 2021-08-27 11:52:21 +03:00
aio aio: Interlock with listen(2) 2021-09-10 17:21:11 -04:00
audit tests/sys/audit: add missing comma delimiter between fields 2021-03-02 18:37:12 +00:00
auditpipe Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
capsicum Fix MK_TESTS build with MK_ASAN/MK_UBSAN 2021-08-02 14:33:24 +01:00
cddl tests/sys/cddl: correctly quote atf_set "require.progs" 2021-03-08 09:38:27 +00:00
common pf tests: test ALTQ CBQ on top of if_vlan 2021-08-25 08:57:10 +02:00
devrandom Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
fifo Avoid hard-coding pipe buffer sizes in the pipe and fifo kqueue tests. 2020-05-20 17:48:18 +00:00
file path_test: Fix test sorting 2021-09-08 11:41:19 -04:00
fs Silence more gtest warnings, now in fusefs tests 2021-08-27 23:39:36 +02:00
geom Add a regression test for ggatec remote code execution 2021-08-27 14:52:45 -06:00
kern Unbreak MSG_CMSG_CLOEXEC 2021-03-18 20:52:20 +00:00
kqueue Enable timer tests in sys.kqueue.libkqueue.kqueue_test.main on i386 2020-04-22 09:53:41 +00:00
mac Resolve conflict between the fusefs(5) and mac_bsdextended(4) tests 2020-05-02 20:14:59 +00:00
mqueue Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
net bridge tests: verify that we can't change MTU of bridge member interfaces 2021-07-28 22:03:38 +02:00
netgraph tests/netgraph: Check for PR241954 2021-06-13 22:29:56 +02:00
netinet netinet tests: delete an interface with pending lookups 2021-08-17 17:01:21 +02:00
netinet6 tests: Only log critical errors from scapy 2021-05-12 20:54:30 +02:00
netipsec ping: fix some man pages and tests after r368045 2020-11-26 04:55:02 +00:00
netmap netmap: update unit tests with libnetmap tests 2021-04-02 14:39:30 +00:00
netpfil pf tests: synproxy to localhost test 2021-09-10 15:16:37 +02:00
opencrypto cdefs.h: Remove __GNUCLIKE___OFFSETOF, it's unused 2021-05-06 16:34:55 -06:00
pjdfstest Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
posixshm uipc_shm: Implements fspacectl(2) support 2021-08-12 23:04:18 +08:00
sys bitstring(3): Add bitstring traversal macros. 2021-08-16 23:24:05 +03:00
vfs tests/sys/vfs/lookup_cap_dotdot: No longer aborts after ATF update 2021-02-04 17:57:27 +00:00
vm shared shadow vm object invalidation regression test 2021-04-07 12:39:05 -07:00
vmm vmm: Add credential to cdev object 2021-08-18 13:41:33 -04:00
Makefile vmm: Add credential to cdev object 2021-08-18 13:41:33 -04:00
Makefile.depend
Makefile.inc Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00