summary refs log tree commit diff stats
path: root/linux-user/arm/cpu_loop.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2023-07-27 12:58:28 +0200
committerEric Blake <eblake@redhat.com>2023-07-27 08:33:44 -0500
commite5b815b0defcc3617f473ba70c3e675ef0ee69c2 (patch)
treea5600a661f32ec925144eb7775adc96f364a16cb /linux-user/arm/cpu_loop.c
parentccdd31267678db9d80578b5f80bbe94141609ef4 (diff)
downloadfocaccia-qemu-e5b815b0defcc3617f473ba70c3e675ef0ee69c2.tar.gz
focaccia-qemu-e5b815b0defcc3617f473ba70c3e675ef0ee69c2.zip
qemu-nbd: regression with arguments passing into nbd_client_thread()
Unfortunately
    commit 03b67621445d601c9cdc7dfe25812e9f19b81488
    Author: Denis V. Lunev <den@openvz.org>
    Date:   Mon Jul 17 16:55:40 2023 +0200
    qemu-nbd: pass structure into nbd_client_thread instead of plain char*
has introduced a regression. struct NbdClientOpts resides on stack inside
'if' block. This specifically means that this stack space could be reused
once the execution will leave that block of the code.

This means that parameters passed into nbd_client_thread could be
overwritten at any moment.

The patch moves the data to the namespace of main() function effectively
preserving it for the whole process lifetime.

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Eric Blake <eblake@redhat.com>
CC: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
CC: <qemu-stable@nongnu.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-ID: <20230727105828.324314-1-den@openvz.org>
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'linux-user/arm/cpu_loop.c')
0 files changed, 0 insertions, 0 deletions