From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2F66FA0A0E; Wed, 3 Feb 2021 18:04:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9BC51240669; Wed, 3 Feb 2021 18:04:08 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mails.dpdk.org (Postfix) with ESMTP id 1DE2E240506 for ; Wed, 3 Feb 2021 18:04:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612371846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=T6o0MnJ9YvNFsU2WbCRgjXQ9wLiq4B9+FJ0SECU6BP0=; b=fCebwyUfah4VpmHPK1TYzVBUbtHX5JCm5fQiN3cOZeiIdnm0XvIQGHXMthN8c1EbD/YYU0 26gQLYn6VCPwN8wTXESpHYIBFzmPV+edd9Bm1sbCCXQOGGVV4r6rmAzFOcKtAFGk0q7nZh Sj55Wro9OCamcGjKaUKXOi5IuYxP0k0= Received: from mail-vk1-f200.google.com (mail-vk1-f200.google.com [209.85.221.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-424-6qQ2dsyGNKCfCK1iK4Y2VA-1; Wed, 03 Feb 2021 12:04:03 -0500 X-MC-Unique: 6qQ2dsyGNKCfCK1iK4Y2VA-1 Received: by mail-vk1-f200.google.com with SMTP id h25so8791vkn.1 for ; Wed, 03 Feb 2021 09:04:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=T6o0MnJ9YvNFsU2WbCRgjXQ9wLiq4B9+FJ0SECU6BP0=; b=njkSt1GS1kGqFC+oUGHqBM4lICygv8vPhKEBNFCFvHBqj7zZVSY7ZA8hRfT9uIuoHD AhsVS5MNpCbbpZmRBBE0J0iH3EDQzMJqA/X8M8Na0QNBWVKjxQx5z64LioFuFPYk5o5U at3mEy7qEqMB+jkuHZuEV8sGw8I8WrUt5L9jhOgGdF/zBpKrSrXe1R3Hanf6pewPQWgc QsrMybG2Rz9EO6jd4rdrRzy2P7cE3YFsEdEAM53yMfregyTrrC2yoXbzRWpITeRJMBcj TpKXW7EE7f9fcEeMRb2yBXjn2nzEHoBWOjJ4uQ8uDGAdmHAvPYDHoBCGlcYkqHv3jmvl Hqrg== X-Gm-Message-State: AOAM533cjuWWMUN8QCkJfmSxlYPLx6IpOGgxgCVaiHLuwG2dbfSnlLyG YrMRuNgAhCQ03/QXnwD3kJpT2AFRLXOZcFRYKb1SAFr3G0VzgYuImdZaqDEysISyL13VK8pY0E2 9mayzHh4lZcrQ5fB3cXQ= X-Received: by 2002:a1f:b4cb:: with SMTP id d194mr2603657vkf.9.1612371841871; Wed, 03 Feb 2021 09:04:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJysi1tmOP/fN48RRnvDh5kvvjhDxwnm0+NtSx59aEYJlYDeC1auAQ+Hq1qPbduCf/OzG/W1aqtHcjtn5oVHw24= X-Received: by 2002:a1f:b4cb:: with SMTP id d194mr2603464vkf.9.1612371840235; Wed, 03 Feb 2021 09:04:00 -0800 (PST) MIME-Version: 1.0 References: <20210203155811.53005-1-maxime.coquelin@redhat.com> In-Reply-To: <20210203155811.53005-1-maxime.coquelin@redhat.com> From: David Marchand Date: Wed, 3 Feb 2021 18:03:48 +0100 Message-ID: To: Maxime Coquelin Cc: dev , "Wang, Yinan" , "Xia, Chenbo" , Adrian Moreno Zapata , Wei Ling , Yu Jiang , "Burakov, Anatoly" Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] net/virtio: fix secondary process crash with PCI devices X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Feb 3, 2021 at 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 crash.* Ah the joy of multiprocess support :-). > > This patch reverts to proper behavior, by storing the > rte_pci_device pointer into the pre-process per* > virtio_pci_internal struct. It provides also helper to get also provides* > 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 > Signed-off-by: Maxime Coquelin The patch lgtm. Reviewed-by: David Marchand Thanks. -- David Marchand