From: Jason Gunthorpe <jgg@nvidia.com>
To: Vishnu Dasa <vdasa@vmware.com>
Cc: <aditr@vmware.com>, <dledford@redhat.com>,
<linux-rdma@vger.kernel.org>, <stable@vger.kernel.org>,
<pv-drivers@vmware.com>
Subject: Re: [PATCH for-rc] RDMA/vmw_pvrdma: Correctly set and check device ib_active status
Date: Mon, 21 Sep 2020 11:16:11 -0300 [thread overview]
Message-ID: <20200921141611.GS3699@nvidia.com> (raw)
In-Reply-To: <20200918023859.22181-1-vdasa@vmware.com>
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@vmware.com>
> Signed-off-by: Vishnu Dasa <vdasa@vmware.com>
> ---
> 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
prev parent reply other threads:[~2020-09-21 14:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-18 2:38 [PATCH for-rc] RDMA/vmw_pvrdma: Correctly set and check device ib_active status Vishnu Dasa
2020-09-21 14:16 ` Jason Gunthorpe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200921141611.GS3699@nvidia.com \
--to=jgg@nvidia.com \
--cc=aditr@vmware.com \
--cc=dledford@redhat.com \
--cc=linux-rdma@vger.kernel.org \
--cc=pv-drivers@vmware.com \
--cc=stable@vger.kernel.org \
--cc=vdasa@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.