• M
    vhost: move memory pointer to VQs · 47283bef
    Michael S. Tsirkin 提交于
    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: NEric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
    47283bef
vhost.c 38.8 KB