lkml.org 
[lkml]   [2020]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v12 02/17] s390/vfio-ap: decrement reference count to KVM
    Date
    Decrement the reference count to KVM when notified that KVM pointer is
    invalidated via the vfio group notifier.

    Signed-off-by: Tony Krowiak <akrowiak@stny.rr.com>
    Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com>
    ---
    drivers/s390/crypto/vfio_ap_ops.c | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c
    index 66fd9784a156..31e39c1f6e56 100644
    --- a/drivers/s390/crypto/vfio_ap_ops.c
    +++ b/drivers/s390/crypto/vfio_ap_ops.c
    @@ -1095,7 +1095,11 @@ static int vfio_ap_mdev_group_notifier(struct notifier_block *nb,
    matrix_mdev = container_of(nb, struct ap_matrix_mdev, group_notifier);

    if (!data) {
    + if (matrix_mdev->kvm)
    + kvm_put_kvm(matrix_mdev->kvm);
    +
    matrix_mdev->kvm = NULL;
    +
    return NOTIFY_OK;
    }

    --
    2.21.1
    \
     
     \ /
      Last update: 2020-11-24 22:42    [W:4.208 / U:0.596 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site