Re: [PATCH for-rc] RDMA/vmw_pvrdma: Correctly set and check device ib_active status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 18, 2020 at 02:38:59AM +0000, Vishnu Dasa wrote:
> Avoid calling ib_dispatch_event on an inactive device in order to
> prevent writing to invalid I/O mapped addresses which could cause a
> guest crash.
> 
> Also, set the ib_active status to 'false' in pvrdma_pci_remove and
> in the failure path of pvrdma_pci_probe.
> 
> Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver")
> Acked-by: Adit Ranadive <aditr@xxxxxxxxxx>
> Signed-off-by: Vishnu Dasa <vdasa@xxxxxxxxxx>
> ---
>  drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)

To fix this bug you need to change pvrdma_netdevice_event to use
ib_device_get_by_netdev() instead of the pvrdma_device_list global

And then use ib_device_put in the pvrdma_netdevice_event_work() once
the pointer is no longer needed.

The core code handles all the required locking

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux