mirror-linux/drivers/block
Seamus Connor 47bdf1d29c ublk: fix ublksrv pid handling for pid namespaces
When ublksrv runs inside a pid namespace, START/END_RECOVERY compared
the stored init-ns tgid against the userspace pid (getpid vnr), so the
check failed and control ops could not proceed. Compare against the
caller’s init-ns tgid and store that value, then translate it back to
the caller’s pid namespace when reporting GET_DEV_INFO so ublk list
shows a sensible pid.

Testing: start/recover in a pid namespace; `ublk list` shows
reasonable pid values in init, child, and sibling namespaces.

Fixes: c2c8089f32 ("ublk: validate ublk server pid")
Signed-off-by: Seamus Connor <sconnor@purestorage.com>
Reviewed-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-01-21 07:46:14 -07:00
..
aoe Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
drbd for-6.19/block-20251201 2025-12-03 19:26:18 -08:00
mtip32xx block: switch ->getgeo() to struct gendisk 2025-08-13 02:59:29 -04:00
null_blk null_blk: fix kmemleak by releasing references to fault configfs items 2026-01-13 07:24:37 -07:00
rnbd rnbd-clt: fix refcount underflow in device unmap path 2026-01-15 07:22:09 -07:00
rnull for-6.19/block-20251201 2025-12-03 19:26:18 -08:00
xen-blkback xen/blkback: convert timeouts to secs_to_jiffies() 2025-01-12 20:21:03 -08:00
zram Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
Kconfig rnull: move driver to separate directory 2025-09-02 05:23:56 -06:00
Makefile rnull: move driver to separate directory 2025-09-02 05:23:56 -06:00
amiflop.c block: switch ->getgeo() to struct gendisk 2025-08-13 02:59:29 -04:00
ataflop.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
brd.c brd: use page reference to protect page lifetime 2025-09-01 08:37:29 -06:00
floppy.c floppy: fix for PAGE_SIZE != 4KB 2025-11-17 08:22:00 -07:00
loop.c loop: add missing bd_abort_claiming in loop_set_status 2026-01-07 08:04:42 -07:00
n64cart.c block: move the nonrot flag to queue_limits 2024-06-19 07:58:28 -06:00
nbd.c for-6.19/block-20251201 2025-12-03 19:26:18 -08:00
ps3disk.c ps3disk: use memcpy_{from,to}_bvec index 2025-11-14 09:10:16 -07:00
ps3vram.c block: pass a queue_limits argument to blk_alloc_disk 2024-02-19 16:58:23 -07:00
rbd.c drivers/block: WQ_PERCPU added to alloc_workqueue users 2025-09-09 09:11:31 -06:00
rbd_types.h
sunvdc.c drivers/block: WQ_PERCPU added to alloc_workqueue users 2025-09-09 09:11:31 -06:00
swim.c block: switch ->getgeo() to struct gendisk 2025-08-13 02:59:29 -04:00
swim3.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
swim_asm.S
ublk_drv.c ublk: fix ublksrv pid handling for pid namespaces 2026-01-21 07:46:14 -07:00
virtio_blk.c virtio_blk: NULL out vqs to avoid double free on failed resume 2025-11-06 16:32:58 -07:00
xen-blkfront.c block: switch ->getgeo() to struct gendisk 2025-08-13 02:59:29 -04:00
z2ram.c block: remove BLK_MQ_F_SHOULD_MERGE 2024-12-23 08:17:23 -07:00
zloop.c zloop: use READ_ONCE() to read lo->lo_state in queue_rq path 2025-12-15 09:32:42 -07:00