From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by dpdk.org (Postfix) with ESMTP id 6D4044C74 for ; Thu, 8 Nov 2018 19:01:52 +0100 (CET) Received: by mail-wm1-f44.google.com with SMTP id f19-v6so2093699wmb.0 for ; Thu, 08 Nov 2018 10:01:52 -0800 (PST) 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:mime-version:content-transfer-encoding; bh=lNj7FWgtnpIX3hJFYbQQQ9R7ttQAraG6JSPYxDMDVAc=; b=LBLofrc04Y+p3jPOsr3n+/Z+zH8MnJ9vh+X4REdI9P9MceTrlx8WE/g7sswTXpSpjF xWekMC+6MkBGomi2pf/iBwDDVrRW3g1L/dClPbKpHtrILsBsrM1aADVxhRgTArKhHlQs nZI3F2AZafC2JRyz0T2Ok4Fa7rl4jeEX4DbHX5KP8fKR2ZgOLrx1yR1PwQvRTYICqY1U 70Y1Sm72t4m1jnKkFaap0E1sOUiuRzYTQmF3M8a+RzPN82f6Hxua4J1xcr8xeaUIXggh x1hToDyw+EhrO/NQ4fVWJWYdo2LsrPY6GEsyMCwmGdkF4qOliWUvPvvOOKgWsXoO+HC+ /5YQ== X-Gm-Message-State: AGRZ1gJtyruE3TjJqUK11xvgWl9eO+CyjWvcigOQ17sorgwG3snAuSs3 07Zh57JdAfLEjO7wcXJd+bE= X-Google-Smtp-Source: AJdET5f7mvM9bz9IJ/4HCjbrTZzgqQA0LqTiUSnVs9PsGGe5Ww2ZZO7ID/+xVEm+YQKh+rN2EN1iSw== X-Received: by 2002:a1c:8604:: with SMTP id i4-v6mr2111510wmd.23.1541700112026; Thu, 08 Nov 2018 10:01:52 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id j4-v6sm5672876wrp.68.2018.11.08.10.01.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Nov 2018 10:01:51 -0800 (PST) From: Luca Boccassi To: Jeff Guo Cc: Ferruh Yigit , dpdk stable Date: Thu, 8 Nov 2018 18:01:11 +0000 Message-Id: <20181108180111.25873-15-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108180111.25873-1-bluca@debian.org> References: <20181029125329.17729-20-bluca@debian.org> <20181108180111.25873-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'igb_uio: fix unexpected removal for hot-unplug' has been queued to LTS release 16.11.9 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: Thu, 08 Nov 2018 18:01:52 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/10/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Luca Boccassi --- >>From 1fab71698f322c95bff494a06a3d739ef506ea47 Mon Sep 17 00:00:00 2001 From: Jeff Guo Date: Thu, 18 Oct 2018 14:27:15 +0800 Subject: [PATCH] igb_uio: fix unexpected removal for hot-unplug [ upstream commit 70efa4116420b6f7a0734711dd603d3024366c79 ] When a device is hot-unplugged, pci_remove will be invoked unexpectedly before pci_release, it will caused kernel hung issue which will throw the error info of "Trying to free already-free IRQ XXX". And on the other hand, if pci_remove before pci_release, the interrupt will not got chance to be disabled. So this patch aim to fix this issue by adding pci_release call in pci_remove, it will gurranty that all pci clean up will be done before pci removal. Signed-off-by: Jeff Guo Acked-by: Ferruh Yigit --- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c index 4be89ef86..e88e38873 100644 --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c @@ -493,6 +493,8 @@ igbuio_pci_remove(struct pci_dev *dev) { struct rte_uio_pci_dev *udev = pci_get_drvdata(dev); + igbuio_pci_release(&udev->info, NULL); + sysfs_remove_group(&dev->dev.kobj, &dev_attr_grp); uio_unregister_device(&udev->info); igbuio_pci_release_iomem(&udev->info); -- 2.19.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-08 17:59:30.336224655 +0000 +++ 0015-igb_uio-fix-unexpected-removal-for-hot-unplug.patch 2018-11-08 17:59:30.064751011 +0000 @@ -1,8 +1,10 @@ -From 70efa4116420b6f7a0734711dd603d3024366c79 Mon Sep 17 00:00:00 2001 +From 1fab71698f322c95bff494a06a3d739ef506ea47 Mon Sep 17 00:00:00 2001 From: Jeff Guo Date: Thu, 18 Oct 2018 14:27:15 +0800 Subject: [PATCH] igb_uio: fix unexpected removal for hot-unplug +[ upstream commit 70efa4116420b6f7a0734711dd603d3024366c79 ] + When a device is hot-unplugged, pci_remove will be invoked unexpectedly before pci_release, it will caused kernel hung issue which will throw the error info of "Trying to free already-free IRQ XXX". And on the other hand, @@ -14,14 +16,14 @@ Signed-off-by: Jeff Guo Acked-by: Ferruh Yigit --- - kernel/linux/igb_uio/igb_uio.c | 2 ++ + lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 2 ++ 1 file changed, 2 insertions(+) -diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c -index fede66cf2..3cf394bdf 100644 ---- a/kernel/linux/igb_uio/igb_uio.c -+++ b/kernel/linux/igb_uio/igb_uio.c -@@ -570,6 +570,8 @@ igbuio_pci_remove(struct pci_dev *dev) +diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c +index 4be89ef86..e88e38873 100644 +--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c ++++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c +@@ -493,6 +493,8 @@ igbuio_pci_remove(struct pci_dev *dev) { struct rte_uio_pci_dev *udev = pci_get_drvdata(dev);