From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by dpdk.org (Postfix) with ESMTP id C4FA95F28 for ; Tue, 10 Jul 2018 00:44:11 +0200 (CEST) Received: by mail-pf0-f194.google.com with SMTP id j3-v6so14645145pfh.11 for ; Mon, 09 Jul 2018 15:44:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kHUb5UlfBtbGoZOivUmnxScZhDGyNdMy8ULONOkh6C4=; b=R501n8uNyyiMO3Ow6HmhYyvpRtMUodKkkwB90zE/jmp2/6nWY9Q3JWJDiQojSiQFcd YMFX2aOOdk++mwGfIzu+ppALd58lvfkbONgWIqzUSci/uWgODPvjX8Ff6LI1wNcYzOab RKENY2za+Xxoq6GJl2SPCDjNr0ol+B7ovN91LLR3pCTPVxmAj55UVLVLcvhBFRr1ViP6 NhBTJqpC7gsqCu0lthXHg6bMsCEH35B3ecEP0S0NXPwxdUsBvGzD9ycqM1qTByvvgPaj 4KswSpliXjR35O5WjturrJaB4MLEX/XkjXKUwX6/+e83Qbk7QlzgtQ4g09y4IcjjMiJu 2rdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kHUb5UlfBtbGoZOivUmnxScZhDGyNdMy8ULONOkh6C4=; b=eWVTutgqfyP4jsm/A6/2V31BKUXzcULUzx3g/naYf5KWvBkhony3J2fI1DD7Bg7zKu 1C8n7U9XHzYxdA+2A6iBcTXc8IDjivdwUymuLRcjJxvz3hkdWAqR+zHY4wAThy2/m/11 iaFiCuPK9WAmyEt51JkFd35Qr6rtNE4qRth1oU1S5cTanhArDFbjdnZaAcTZuFNL3vx6 5kWxg6r+Rq5WyQiPa1ZkRAU9plXBjzpY6qyJ1AqyUHflg9BP1uELlcSKJhFsqOl2iYtv ArZLHMnPqRuLguA/W3vhTv4uodoSL73Tb0mVod/rRrJMZOya3lBGbby3i7PQFCr+Jv+6 +Xpw== X-Gm-Message-State: APt69E2aRfcQiNItZVSeXQO/380kZTf8ZjJB6ejTgVNXouDTQ709dH0M eM8oOEWn0wVd5mUe9b2HNbVyfQ== X-Google-Smtp-Source: AAOMgpeofQ1J6JUWz0pVaUpSG36afJ5Tnq0WqFL4xrnHbWsKxd6D9b1xYjH6fJxm4cIRzX3/0dJAag== X-Received: by 2002:a63:9902:: with SMTP id d2-v6mr20407829pge.343.1531176250973; Mon, 09 Jul 2018 15:44:10 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id w11-v6sm28816025pgm.82.2018.07.09.15.44.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jul 2018 15:44:10 -0700 (PDT) Date: Mon, 9 Jul 2018 15:44:08 -0700 From: Stephen Hemminger To: Jeff Guo Cc: bruce.richardson@intel.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, gaetan.rivet@6wind.com, jingjing.wu@intel.com, thomas@monjalon.net, motih@mellanox.com, matan@mellanox.com, harry.van.haaren@intel.com, qi.z.zhang@intel.com, shaopeng.he@intel.com, bernard.iremonger@intel.com, arybchenko@solarflare.com, wenzhuo.lu@intel.com, jblunck@infradead.org, shreyansh.jain@nxp.com, dev@dpdk.org, helin.zhang@intel.com Message-ID: <20180709154408.6cbb4c31@xeon-e3> In-Reply-To: <1531137666-10351-8-git-send-email-jia.guo@intel.com> References: <1498711073-42917-1-git-send-email-jia.guo@intel.com> <1531137666-10351-1-git-send-email-jia.guo@intel.com> <1531137666-10351-8-git-send-email-jia.guo@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v7 7/7] igb_uio: fix uio release issue when hot unplug X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2018 22:44:12 -0000 On Mon, 9 Jul 2018 20:01:06 +0800 Jeff Guo wrote: > @@ -195,12 +205,22 @@ igbuio_pci_irqhandler(int irq, void *dev_id) > { > struct rte_uio_pci_dev *udev = (struct rte_uio_pci_dev *)dev_id; > struct uio_info *info = &udev->info; > + struct pci_dev *pdev = udev->pdev; > > /* Legacy mode need to mask in hardware */ > if (udev->mode == RTE_INTR_MODE_LEGACY && > !pci_check_and_mask_intx(udev->pdev)) > return IRQ_NONE; > > + mutex_lock(&udev->lock); > + /* check the uevent of the kobj */ > + if ((&pdev->dev.kobj)->state_remove_uevent_sent == 1) { > + dev_notice(&pdev->dev, "device:%s, sent remove uevent!\n", > + (&pdev->dev.kobj)->name); > + udev->state = RTE_UDEV_UNPLUG; > + } > + mutex_unlock(&udev->lock); Did you run with lockdep? I don't think you can safely acquire a mutex (would sleep) in IRQ context.