From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 3/3] ethdev: prevent segfaults in rte_eth_dev_is_detachable Date: Tue, 03 Nov 2015 12:20:02 +0100 Message-ID: <33652013.vVXR4tZhrp@xps13> References: <1446108903-14412-1-git-send-email-david.marchand@6wind.com> <1835472.4si0y6iqvT@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: David Marchand Return-path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 6C8428E6C for ; Tue, 3 Nov 2015 12:21:13 +0100 (CET) Received: by wmff134 with SMTP id f134so81382986wmf.1 for ; Tue, 03 Nov 2015 03:21:13 -0800 (PST) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2015-11-03 12:19, David Marchand: > On Tue, Nov 3, 2015 at 12:10 PM, Thomas Monjalon > wrote: > > > 2015-10-29 09:55, David Marchand: > > > From: Maxime Leroy > > > > > > Some drivers like virtual ones don't specify any driver pointer in the > > > structure rte_eth_dev. > > > > > > To prevent segfault, we should check if this pointer is NULL before > > > dereferencing it. > > > > > > Signed-off-by: Maxime Leroy > > > Signed-off-by: David Marchand > > > > It is not clear what the problem is. > > And the driver fields should probably be removed or changed as it too > > tigthly > > related to the PCI driver. > > > > It does look odd to me as well, quickly went through head, and did not see > a case where this could happen. > Maxime is not available at the moment, so I think I will just drop this > patch. > > How about this patchset rebased on head with just the first two patches ? Perfect, thanks