From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id CD4C8187 for ; Mon, 30 Apr 2018 16:08:28 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id 94-v6so6855883wrf.5 for ; Mon, 30 Apr 2018 07:08:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pZf+y63sD9/IqjEyjCNg4T5GIH4GsyPgwvtnD4CNJFs=; b=W+GOoEgsTpeMfe+m+iGbxj2x+5PjXpAZmNG9XLakX8DKlHY4k2srjir/1ocz5RE52F s3uPHE1SyPLYLI1Sp9aO/9t6VGU+vdxrAaates0952n+76OCBIm2/NXmM8stJ/pETm3W XD5feDfeoCXrYxP0gO1BdxRd+vK/dRRgbLGC6IvNeBYs7TU2PCbdIwqu9RJRsYVc1459 J9E4TsprQ2GjRxYYmOt5EQAdcSrVLhUaLynqSvjI9fODu1kV75y0NdtN4WCv9kdeua7X 4zcePhhkxo9r6b1zZ6easLzz53qzNB7+RYWf2Gyq/jQnZawQ+eLICbtLK4fUfuzhy+Y9 NcpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pZf+y63sD9/IqjEyjCNg4T5GIH4GsyPgwvtnD4CNJFs=; b=UJD64yRYmsKfLjN+aXzAufgFXR7v4Hbrj+tVRtzX5dvKRONq7sdhggk7zz2GgNijih 2Vx0BHD/uFtEka1HMrnsj0B4k1xDntTDkVelLGWoqotT/dLq3UdAR4JAzlixqoUaUsL1 Ti//BQxdjz2XrOGIPLEsAoNUPkhGDYBXFz6OdS6LSpW4lRlNosCh+47OMtARlfM/Tg3h JGxHp7VuLHiU3q6i9SL4Ez0B2GvoaP6/lu5sU1OjEZTewSJtsXHTYX7dtvHjct7X0Sxd JjRSyrNCUbkiRV0rqoHXhLCXIsDpRNb8uoFze7JkpHmvBrMNN+VSRMkotSVGgZtad7s2 FOkg== X-Gm-Message-State: ALQs6tBWNEkp+MHdTGZ7bIgsvPzyGIFxLU+ovApqM7/akQlRLRAYAv0/ eva+WaollIlJIPq+Wf5sLCo= X-Google-Smtp-Source: AB8JxZruQhywyibSbBlQZUgKbCtj2U8P4yL5MiRRvjnDnDcdCoYSoBbncMQx65h+jhnnpZi9pQn3xA== X-Received: by 2002:adf:8827:: with SMTP id d36-v6mr8601096wrd.41.1525097308065; Mon, 30 Apr 2018 07:08:28 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id u37-v6sm8453281wrb.53.2018.04.30.07.08.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:08:27 -0700 (PDT) From: luca.boccassi@gmail.com To: Zhiyong Yang Cc: Jianfeng Tan , Maxime Coquelin , dpdk stable Date: Mon, 30 Apr 2018 15:03:56 +0100 Message-Id: <20180430140606.4615-78-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430140606.4615-1-luca.boccassi@gmail.com> References: <20180430140606.4615-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/virtio: fix queues pointer check' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 14:08:29 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 57b1aaa5c84333d5c8a89346e0a81e9d7a35a2dd Mon Sep 17 00:00:00 2001 From: Zhiyong Yang Date: Wed, 21 Mar 2018 11:03:40 +0800 Subject: [PATCH] net/virtio: fix queues pointer check [ upstream commit 7c7f2e6088aeb24d9ffbf41d1076512ca8da8a85 ] It is necessary to add pointer checking because in some case the code will cause crash. For example, the code goes here before memory allocation of rxvq is finished. Fixes: 7365504f77e3 ("net/virtio: support guest announce") Signed-off-by: Zhiyong Yang Reviewed-by: Jianfeng Tan Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_ethdev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 884f74ad0..f377d8aa3 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1273,9 +1273,13 @@ static void virtio_notify_peers(struct rte_eth_dev *dev) { struct virtio_hw *hw = dev->data->dev_private; - struct virtnet_rx *rxvq = dev->data->rx_queues[0]; + struct virtnet_rx *rxvq; struct rte_mbuf *rarp_mbuf; + if (!dev->data->rx_queues) + return; + + rxvq = dev->data->rx_queues[0]; rarp_mbuf = rte_net_make_rarp_packet(rxvq->mpool, (struct ether_addr *)hw->mac_addr); if (rarp_mbuf == NULL) { -- 2.14.2