Message ID | 1416932951-3861-1-git-send-email-maxim.uvarov@linaro.org |
---|---|
State | Accepted |
Commit | 53c6bf187ccccffe02d603c82cdbaaf1b3b7ef6f |
Headers | show
Return-Path: <patchwork-forward+bncBDX25FHYWQNBB3642KRQKGQEOY4A5XI@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A80BC246DF for <linaro@patches.linaro.org>; Tue, 25 Nov 2014 16:29:36 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id r20sf802978wiv.9 for <linaro@patches.linaro.org>; Tue, 25 Nov 2014 08:29:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=cmwXWFTEYAao8h7WSoxDghSzdpzVRd/bmAD1+7YF55k=; b=MCbr/JYt3F0V3tVT6oVqq2/udjgRSU6sG5OlZq3QaL54QvGAT+TXMaIsk+akR9qvED JgcdsPnmt5THzs/efiG6I7Lc6gz5JvqfeuCboLLgTEo/Br9RQNq51qdyuEKVZlAkYPYe PSVlLYvA3iR1p/mqmWq7Ei7L743ngReSui8bNYc9VhOZCvjil9mahmfSGCzMS2/qlSRy HrRvDKw89YJPqXZKOHUr3Sp4p8XpUybCo+hDEHLfnl33341YJDCZkCW1VlaZPClKwiXy ndvS4wPhzYaEaM/CRc0KJh7OlMghZfOL7n7+lQIKkvkoToZwI9hF1fodK8diOUhEurD3 SmGw== X-Gm-Message-State: ALoCoQmVspf13qOe1O3GXffZqGQ7JNKgJcZNrXQp2s//HLSvZgYFdpZwFyIbuh6K0HwC7vaOHj8Z X-Received: by 10.152.8.67 with SMTP id p3mr7878548laa.4.1416932975273; Tue, 25 Nov 2014 08:29:35 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.65 with SMTP id kw1ls291413lac.70.gmail; Tue, 25 Nov 2014 08:29:34 -0800 (PST) X-Received: by 10.152.7.229 with SMTP id m5mr28590664laa.32.1416932974959; Tue, 25 Nov 2014 08:29:34 -0800 (PST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id g1si1865716lah.45.2014.11.25.08.29.34 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Nov 2014 08:29:34 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id f15so924106lbj.23 for <patchwork-forward@linaro.org>; Tue, 25 Nov 2014 08:29:34 -0800 (PST) X-Received: by 10.152.9.7 with SMTP id v7mr28470452laa.40.1416932974829; Tue, 25 Nov 2014 08:29:34 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp465508lbc; Tue, 25 Nov 2014 08:29:34 -0800 (PST) X-Received: by 10.236.53.195 with SMTP id g43mr24636484yhc.184.1416932973526; Tue, 25 Nov 2014 08:29:33 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id o44si1839877qge.27.2014.11.25.08.29.32 for <multiple recipients> (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 25 Nov 2014 08:29:33 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from <lng-odp-bounces@lists.linaro.org>) id 1XtIzb-00047s-JX; Tue, 25 Nov 2014 16:29:31 +0000 Received: from mail-lb0-f177.google.com ([209.85.217.177]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from <maxim.uvarov@linaro.org>) id 1XtIzU-00047h-Oz for lng-odp@lists.linaro.org; Tue, 25 Nov 2014 16:29:24 +0000 Received: by mail-lb0-f177.google.com with SMTP id 10so846942lbg.22 for <lng-odp@lists.linaro.org>; Tue, 25 Nov 2014 08:29:18 -0800 (PST) X-Received: by 10.152.228.164 with SMTP id sj4mr8435737lac.98.1416932958239; Tue, 25 Nov 2014 08:29:18 -0800 (PST) Received: from localhost.localdomain ([188.92.105.210]) by mx.google.com with ESMTPSA id pz3sm461480lbb.27.2014.11.25.08.29.16 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Nov 2014 08:29:17 -0800 (PST) From: Maxim Uvarov <maxim.uvarov@linaro.org> To: lng-odp@lists.linaro.org Date: Tue, 25 Nov 2014 19:29:11 +0300 Message-Id: <1416932951-3861-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 X-Topics: patch Subject: [lng-odp] [PATCH] check for null pointer in get_entry() return X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.linaro.org/mailman/listinfo/lng-odp>, <mailto:lng-odp-request@lists.linaro.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxim.uvarov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 |
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index c523350..5c8146a 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -165,6 +165,8 @@ odp_pktio_t odp_pktio_open(const char *dev, odp_buffer_pool_t pool) /* if successful, alloc_pktio_entry() returns with the entry locked */ pktio_entry = get_entry(id); + if (!pktio_entry) + return ODP_PKTIO_INVALID; ODP_DBG("ODP_PKTIO_USE_FANOUT: %d\n", fanout); if (getenv("ODP_PKTIO_DISABLE_SOCKET_MMAP") == NULL) {
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> --- platform/linux-generic/odp_packet_io.c | 2 ++ 1 file changed, 2 insertions(+)