summaryrefslogtreecommitdiff
path: root/scripts/const_structs.checkpatch
diff options
context:
space:
mode:
authorYang Erkun <yangerkun@huawei.com>2026-08-05 20:29:26 +0800
committerJens Axboe <axboe@kernel.dk>2026-08-15 20:01:20 -0600
commit285908f554fe32d9ca7cb7c3a03a05144faeb461 (patch)
tree57bf559c34aff4ac448a6d0e36a7de905cb0e7b0 /scripts/const_structs.checkpatch
parent0fdee7c5fa886554503001cecea049f053237381 (diff)
downloadlinux-stable-285908f554fe32d9ca7cb7c3a03a05144faeb461.tar.gz
linux-stable-285908f554fe32d9ca7cb7c3a03a05144faeb461.zip
nbd: remove queue freeze in nbd_add_socket
nbd_add_socket() kreallocs config->socks, which a concurrent reader in nbd_handle_cmd() could UAF; commit b98e762e3d71 ("nbd: freeze the queue while we're adding connections")froze the queue to block that. But the freeze costs an RCU grace period on every socket added, and setup adds them one by one. After the previous patch, nbd_add_socket() is rejected once nbd->pid is set, so it only runs during setup. There the capacity is 0 and the write cache is off (cleared on disconnect by the preceding patch, and re-enabled only later in nbd_set_size), so submit_bio_noacct() rejects every bio before it reaches the driver -- non-zero-sector ones via bio_check_eod(), and flush-only ones via the !bdev_write_cache() branch. No I/O is in flight, so the freeze is unnecessary. Reviewed-by: Yu Kuai <yukuai@fygo.io> Signed-off-by: Yang Erkun <yangerkun@huawei.com> Link: https://patch.msgid.link/20260805122930.57647-5-yangerkun@huawei.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions