From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id 4957E5A76 for ; Tue, 3 Nov 2015 12:11:55 +0100 (CET) Received: by wicll6 with SMTP id ll6so67312440wic.0 for ; Tue, 03 Nov 2015 03:11:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind_com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=Hxx3aaIrAsUYsDIX17X8nPKR9K5Fnw7VD9i49HIVT8k=; b=xyvxoqwZAb5GKy4egDCCYGsAnRpS7IBMKYtI4KDA5Q0Dfwhrbdr/L4yzxiAWxJR9Rw oTuKhsxW/Xs4IsN60VcEdn++scdhQRW3y8MElRQKjtaEuJRCYtHeT89v7n09yliE5U9u G4BnC7+WcLuF7K2lgKZ+p4D6tTPp5ReN0YUep7NLmEtSU4qdt7e1QmcjeNJi9XAkrg3r qJqLpC43lXV29Pjy2BDPfZO6GnBtVVYTI9ZsX/cvJAzntU2P3pN+iyHMxFsXHJHOU5Fm ApDhxpRy+dqHRF3C5c4Ojox1u+fYs6K8KjHxk6/nryhNaU8f5x4bMz76DR7IdkB4804M +qkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=Hxx3aaIrAsUYsDIX17X8nPKR9K5Fnw7VD9i49HIVT8k=; b=CAp63IPj6WfLjhlMRMsmDtsRksbUJLo3F3CECXCO1pYITXC8+0Tq+7bMa6cD9Pt+7M ByM9X74DcnbRpBKIfPVjnjvOP0jn8cps9IADv+FNeVohOvl3+4JMt7SATRwJjGWUfcHd FXwP+4yVTzaE3jQRIQETUzRy42oARlZ4IzFDwRGzpRE6qqTd3q+Z4ZxI0VFUC9EuoaIj AUb80WF9vJJ1HxkqjESCg1gIZ+JPrl1/S7jAF7V2TU+0T8nQn9FfC33m/wonoFpseggO +1iuhyryuWAvg6mNIKW2OHQlfAwO9bPGH/eKjNz5CB/NPFB/lPWKbXXHGgB3LhNkW2xy b+ew== X-Gm-Message-State: ALoCoQngWI+vsBiGylP+10f/wz2LOFyVh94HQhuBWXZqD9ow57dLlE+HiTtaMT5oTMmesG9OnzCI X-Received: by 10.194.186.196 with SMTP id fm4mr34077323wjc.152.1446549115069; Tue, 03 Nov 2015 03:11:55 -0800 (PST) Received: from xps13.localnet (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id bh5sm26967494wjb.42.2015.11.03.03.11.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Nov 2015 03:11:53 -0800 (PST) From: Thomas Monjalon To: David Marchand , Maxime Leroy Date: Tue, 03 Nov 2015 12:10:43 +0100 Message-ID: <1835472.4si0y6iqvT@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1446108903-14412-4-git-send-email-david.marchand@6wind.com> References: <1446108903-14412-1-git-send-email-david.marchand@6wind.com> <1446108903-14412-4-git-send-email-david.marchand@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 3/3] ethdev: prevent segfaults in rte_eth_dev_is_detachable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 11:11:55 -0000 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.