• Michael S. Tsirkin's avatar
    vhost: move memory pointer to VQs · 47283bef
    Michael S. Tsirkin authored
    commit 2ae76693b8bcabf370b981cd00c36cd41d33fabc
        vhost: replace rcu with mutex
    replaced rcu sync for memory accesses with VQ mutex locl/unlock.
    This is correct since all accesses are under VQ mutex, but incomplete:
    we still do useless rcu lock/unlock operations, someone might copy this
    code into some other context where this won't be right.
    This use of RCU is also non standard and hard to understand.
    Let's copy the pointer to each VQ structure, this way
    the access rules become straight-forward, and there's
    no need for RCU anymore.
    Reported-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    47283bef
scsi.c 58.3 KB