DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: dev@dpdk.org, yinan.wang@intel.com, chenbo.xia@intel.com,
	amorenoz@redhat.com, david.marchand@redhat.com,
	weix.ling@intel.com, yux.jiang@intel.com,
	anatoly.burakov@intel.com
Subject: Re: [dpdk-dev] [PATCH] net/virtio: fix secondary process crash with PCI devices
Date: Wed, 3 Feb 2021 18:19:14 +0100	[thread overview]
Message-ID: <7f595b3f-66fb-6820-c168-e3ffa441bf93@redhat.com> (raw)
In-Reply-To: <20210203155811.53005-1-maxime.coquelin@redhat.com>



On 2/3/21 4:58 PM, Maxime Coquelin wrote:
> The Virtio rework series mistakenly moved the rte_pci_device
> pointer to struct virtio_hw, which is shared between the two
> processes. But this structure is per-process, so this change
> made secondary process to try accessing primary process-only
> memory, leading to a crash
> 
> This patch reverts to proper behavior, by storing the
> rte_pci_device pointer into the pre-process
> virtio_pci_internal struct. It provides also helper to get
> the pointer from the virtio_hw struct pointer.
> 
> Bugzilla ID: 633
> Fixes: c8d4b02f72ae ("net/virtio: move legacy IO to virtio PCI")
> 
> Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>  drivers/net/virtio/virtio_pci.c        | 25 +++++--------------------
>  drivers/net/virtio/virtio_pci.h        | 12 +++++++++++-
>  drivers/net/virtio/virtio_pci_ethdev.c |  2 ++
>  3 files changed, 18 insertions(+), 21 deletions(-)
> 

Applied to dpdk-next-virtio/main with typo fixed.

Thanks,
Maxime


      parent reply	other threads:[~2021-02-03 17:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 15:58 Maxime Coquelin
2021-02-03 17:03 ` David Marchand
2021-02-03 17:19 ` Maxime Coquelin [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=7f595b3f-66fb-6820-c168-e3ffa441bf93@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=amorenoz@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=weix.ling@intel.com \
    --cc=yinan.wang@intel.com \
    --cc=yux.jiang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).