| Age | Commit message (Collapse) | Author |
|
The fixture setup checks the result of mkdtemp() with ASSERT_NE(), which
hands the pointer to the harness. The harness casts both operands to
intmax_t to print them, and on 32-bit architectures gcc warns about the
cast from a pointer to an integer of a different size. The configfs
test builds with -Werror, so it fails to build there:
kselftest_harness.h:797:49: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
Compare the result against NULL inside ASSERT_TRUE(), so that the
harness only sees an int.
Fixes: a7fdcb2edd0f ("selftests/configfs: add tests for the userspace interface")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Reviewed-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20261103141627.30838-1-sashal@kernel.org
Signed-off-by: Breno Leitao <leitao@debian.org>
|
|
configfs_rmdir() drops the last reference to an item while its dentry is
still hashed, so a symlink(2) resolving that target takes a reference on
freed memory. syzbot reported it [1].
Race mkdir/rmdir of a target against symlink/unlink of a link to it,
watching /sys/kernel/warn_count.
Fails until the fix [2] lands.
Link: https://syzkaller.appspot.com/bug?extid=6b16e3d085833cbf3e25 [1]
Link: https://lore.kernel.org/all/20260730093435.195441-1-vasilisalmpanis@gmail.com/ [2]
Link: https://patch.msgid.link/20260826-config_selftest-v1-4-e364b07e91ac@debian.org
Signed-off-by: Breno Leitao <leitao@debian.org>
|
|
samples/configfs had nothing to link from, so symlink(2) went untested
beyond the EPERM a subsystem without ->allow_link() returns.
Cover creating and removing a link, the relative body configfs stores, the
count ->allow_link() and ->drop_link() keep, the busy errors both ends
return, and what get_target() rejects.
Link: https://patch.msgid.link/20260826-config_selftest-v1-3-e364b07e91ac@debian.org
Signed-off-by: Breno Leitao <leitao@debian.org>
|
|
configfs has no selftest coverage. Its userspace ABI is entirely
mkdir/rmdir/read/write on attribute files, and the error each of those
returns is part of the contract.
Add tests driving the subsystems samples/configfs registers, each in its
own mount namespace on a private configfs mount.
Link: https://patch.msgid.link/20260826-config_selftest-v1-1-e364b07e91ac@debian.org
Signed-off-by: Breno Leitao <leitao@debian.org>
|