autofs: rename sx lock description for am_lock
Rename am_lock description from autofslk -> autfsm.
The lock description, autofslk, is used as the description for
autofs_softc->sc_lock, which is used to protect autofs requests and the
like as opposed to am_lock which protects autofs nodes for a given
mount.
This change allows witness to distinguish different lock orders for each
lock.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D57972
linuxulator: Add linux_extattr_get_vp() for atomic getxattr
Move the atomic size-probe-and-read logic into a new
linux_extattr_get_vp() function in linux_xattr.c instead of
modifying the generic extattr_get_vp() in vfs_extattr.c.
This keeps Linux-specific getxattr semantics (ERANGE on
too-small buffer, EOPNOTSUPP to ENOATTR mapping)
self-contained within the linuxulator.
The function probes the attribute size and reads the data
under a single vnode lock, preventing a TOCTOU race between
the size probe and data read.
Signed-off-by: YAO, Xin <mr.yaoxin at outlook.com>
Reviewed by: kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/2263
linuxulator: Fix O_PATH file descriptors errno for f*xattr(2)
LTP open13 expects these operations to fail with EBADF, matching
Linux behavior, but FreeBSD currently returns EOPNOTSUPP
for fgetxattr() on an O_PATH fd
Look up Linux fd-based xattr descriptors with getvnode()
and route the operations through shared kern_extattr_*_fp()
helpers so the O_PATH check and the extattr operation use the
same referenced file.
Apply the same EBADF handling to fsetxattr(), fremovexattr(), and
flistxattr() so the xattr paths stay consistent.
Signed-off-by: YAO, Xin <mr.yaoxin at outlook.com>
PR: 295537
Reviewed by: kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/2263
tests/netinet/socket_afinet: reduce tautology in test cases names
Just avoid repeating the test program name in every test case name.
No functional change.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D56727
tests/socket_afinet: extend bind_connected_port_test to cover more cases
- Test SOCK_DGRAM (UDP) sockets.
- Test binding to 0:port and to a addr:port in presence of connected socket
using the port.
Differential Revision: https://reviews.freebsd.org/D56707
tests/socket_afinet: make child_bind() return a full spectre of results
There is no functional change for existing tests, but allows to write a test
that would expect an immediate success of bind(2).
inpcb: use correct mask in in6_pcblookup_lbgroup()
There is no visible bug fixed as in current tree masks are the same.
Fixes: 6883b120c53735ff1681ef96d257f376731f56b3