From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id C9BC01BE0 for ; Thu, 8 Nov 2018 04:10:34 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Nov 2018 19:10:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,478,1534834800"; d="scan'208";a="247928784" Received: from jguo15x-mobl.ccr.corp.intel.com (HELO [10.67.68.69]) ([10.67.68.69]) by orsmga004.jf.intel.com with ESMTP; 07 Nov 2018 19:10:30 -0800 To: Stephen Hemminger Cc: ferruh.yigit@intel.com, konstantin.ananyev@intel.com, anatoly.burakov@intel.com, thomas@monjalon.net, bernard.iremonger@intel.com, dev@dpdk.org, helin.zhang@intel.com, gaetan.rivet@6wind.com, qi.z.zhang@intel.com, arybchenko@solarflare.com, bruce.richardson@intel.com, matan@mellanox.com, shaopeng.he@intel.com References: <1541583691-145432-1-git-send-email-jia.guo@intel.com> <1541583691-145432-3-git-send-email-jia.guo@intel.com> <20181107113344.79229734@shemminger-XPS-13-9360> From: Jeff Guo Message-ID: <4bcbd2be-240e-9f60-86f8-f0d9ca7e1293@intel.com> Date: Thu, 8 Nov 2018 11:10:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181107113344.79229734@shemminger-XPS-13-9360> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH 2/2] but/pci: fix fd close for 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: Thu, 08 Nov 2018 03:10:35 -0000 hi, stephen On 11/8/2018 3:33 AM, Stephen Hemminger wrote: > On Wed, 7 Nov 2018 17:41:31 +0800 > Jeff Guo wrote: > >> When device is hot-unplugged, the device fd will be deleted in kernel. >> Then in the progress of detaching device, if it try to close the fd, >> it will cause a kernel crash, which shown a kernel null pointer error. > If this happens, then it is a kernel bug and the kernel should be fixed. > Working around it in userspace is not a great long term solution. agree with you. The key is sometime hold by kernel. But i think it is at least reasonable for avoiding no-use process in user space, whatever kernel's behavior. I am not sure if there is any better idea we can find, but seems it is an option now.