Message ID | 1417619157-13690-2-git-send-email-maxim.uvarov@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDX25FHYWQNBB5WN7SRQKGQEI4E63PQ@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C9B9325E66 for <linaro@patches.linaro.org>; Wed, 3 Dec 2014 15:06:31 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gq15sf9680946lab.11 for <linaro@patches.linaro.org>; Wed, 03 Dec 2014 07:06:30 -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:in-reply-to :references: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=3/sDi+lHJOtLZ67Ypns+y2bl3q6N9Tj3NDk28bh7Wig=; b=YwiLxPLwT+nmvyx1crPMQNZv1IBUNKBpWoOgp03KZE/xxmxF5OmVORPp7xLyyH4f4K 1NPwKMcTg4woF/eUEsXqd4t2pcN7GYDJytrl+VJighVdFNL1eHOcg8KXRQzPx9Jw+Bpc j/sXvl2Ls64E0WhIdZIwlNL9dFi3V2XlR4axULYl8+2FXQ6ZV8YJPW/s39xCuIhOsjoM as4H5RtoObo+XeR4/4g5ODbgrlinW+DJFr5nk76y9yzIBMIRx42gzju9Juif9Wa6p/hi 6MKli4E7OizrJZuGf6jw6ybh+4jaudl5o52wWTM59GN7N8WyLr3MdqZd3iTz/c6g4hmm +gtw== X-Gm-Message-State: ALoCoQnvA6lcZz10BcYKS9obKP0XDgLCy2BsxYv8lflnfz1GDwyKPwp04zPB03zPAZus/hZGs1U/ X-Received: by 10.152.8.67 with SMTP id p3mr1183303laa.4.1417619190838; Wed, 03 Dec 2014 07:06:30 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.72 with SMTP id y8ls175198lay.99.gmail; Wed, 03 Dec 2014 07:06:30 -0800 (PST) X-Received: by 10.112.130.65 with SMTP id oc1mr4756153lbb.7.1417619190599; Wed, 03 Dec 2014 07:06:30 -0800 (PST) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id jn6si23234213lbc.119.2014.12.03.07.06.30 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Dec 2014 07:06:30 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by mail-lb0-f182.google.com with SMTP id f15so13201608lbj.41 for <patchwork-forward@linaro.org>; Wed, 03 Dec 2014 07:06:30 -0800 (PST) X-Received: by 10.112.189.10 with SMTP id ge10mr4596448lbc.23.1417619190490; Wed, 03 Dec 2014 07:06:30 -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 ew9csp680264lbc; Wed, 3 Dec 2014 07:06:29 -0800 (PST) X-Received: by 10.236.32.40 with SMTP id n28mr6599545yha.16.1417619188754; Wed, 03 Dec 2014 07:06:28 -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 b67si231473ykd.48.2014.12.03.07.06.27 for <multiple recipients> (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 03 Dec 2014 07:06:28 -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 1XwBVa-0005IL-EY; Wed, 03 Dec 2014 15:06:26 +0000 Received: from mail-lb0-f172.google.com ([209.85.217.172]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from <maxim.uvarov@linaro.org>) id 1XwBVP-0005HY-V9 for lng-odp@lists.linaro.org; Wed, 03 Dec 2014 15:06:16 +0000 Received: by mail-lb0-f172.google.com with SMTP id u10so12403550lbd.31 for <lng-odp@lists.linaro.org>; Wed, 03 Dec 2014 07:06:10 -0800 (PST) X-Received: by 10.112.159.129 with SMTP id xc1mr4838082lbb.24.1417619169989; Wed, 03 Dec 2014 07:06:09 -0800 (PST) Received: from localhost.localdomain ([188.92.105.210]) by mx.google.com with ESMTPSA id r4sm6449679lar.3.2014.12.03.07.06.08 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Dec 2014 07:06:08 -0800 (PST) From: Maxim Uvarov <maxim.uvarov@linaro.org> To: lng-odp@lists.linaro.org Date: Wed, 3 Dec 2014 18:05:52 +0300 Message-Id: <1417619157-13690-2-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 In-Reply-To: <1417619157-13690-1-git-send-email-maxim.uvarov@linaro.org> References: <1417619157-13690-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv4 1/6] linux-generic: set not initialized socket to -1 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.182 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 706a3cc..faa197f 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -114,6 +114,9 @@ static void init_pktio_entry(pktio_entry_t *entry) entry->s.inq_default = ODP_QUEUE_INVALID; memset(&entry->s.pkt_sock, 0, sizeof(entry->s.pkt_sock)); memset(&entry->s.pkt_sock_mmap, 0, sizeof(entry->s.pkt_sock_mmap)); + /* set sockfd to -1, because a valid socked might be initialized to 0 */ + entry->s.pkt_sock.sockfd = -1; + entry->s.pkt_sock_mmap.sockfd = -1; } static odp_pktio_t alloc_lock_pktio_entry(void)
In case of stdin is not attached socket() can return 0 for valid socket fd. Not initialized socket has to be -1. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> --- platform/linux-generic/odp_packet_io.c | 3 +++ 1 file changed, 3 insertions(+)