<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/tools/testing/selftests/ublk/ctrl.c, branch stable</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/tools/testing/selftests/ublk/ctrl.c?h=stable</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/tools/testing/selftests/ublk/ctrl.c?h=stable'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2026-10-16T00:25:35Z</updated>
<entry>
<title>selftests: ublk: move the control command helpers into ctrl.c</title>
<updated>2026-10-16T00:25:35Z</updated>
<author>
<name>Ming Lei</name>
<email>tom.leiming@gmail.com</email>
</author>
<published>2026-10-11T06:35:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=cdf6e5de86a91da6e4d621260bc70e99e2f3a25e'/>
<id>urn:sha1:cdf6e5de86a91da6e4d621260bc70e99e2f3a25e</id>
<content type='text'>
Move the ublk_ctrl_*() helpers and ublk_setup_ring() out of kublk.c,
so a small test program can send control commands without copying
them. kublk still links every *.c file, ctrl.c included.

ublk_ctrl_deinit() now also exits the control ring, and ublk_ctrl_init()
checks the allocation and closes /dev/ublk-control when the ring setup
fails. kublk calls them only around its own lifetime, but a test which
opens a control handle per thread must not leak.

No functional change for kublk.

Signed-off-by: Ming Lei &lt;tom.leiming@gmail.com&gt;
Tested-by: Josef Bacik &lt;josef@toxicpanda.com&gt;
Link: https://patch.msgid.link/20261011063555.1142277-10-tom.leiming@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
