From patchwork Thu Jun 1 09:03:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Eremin-Solenikov X-Patchwork-Id: 100853 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp709952qge; Thu, 1 Jun 2017 02:16:15 -0700 (PDT) X-Received: by 10.55.65.22 with SMTP id o22mr488362qka.158.1496308575366; Thu, 01 Jun 2017 02:16:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496308575; cv=none; d=google.com; s=arc-20160816; b=oWz06zFxClMf3TfVx628j9YhfFUypjdPn4rR+7NvOGtkETZJmSEmsvrTb8VWlIiUt2 yK2L+D8dBOdpIQQH95zocNRRPYvHxk0ehPMoAA3koi7hmcFSSR9uPZLW5TSnOwZhnl0h zKncLRBiu/CjWlz5ds5uS4w8WP2QNa4WjKqcOOSZ1+ByQgnCqzgZoJurs0SOJHwuJ6+c RW13mqAK69K5vrlFPWzjmI+bKxAECba8o+BBiyq2NjoXYJ3ZOqYIz2CGO/mswB58T307 XhgZ910xmGjZYSPCYJaj6txLZaqLrtzJbXwQTtClampnAOOO0hcfj2K/NvaX6Z/xT6/d AcRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:delivered-to:arc-authentication-results; bh=k7ncCAr/V0RFPxf1aYemxiK3annSa5UH8MIgv9p2Iew=; b=cUxT3lFBZJLKN2mSFsNO5kjMa2Eco+jTgewvRotto7J4xvwAxvkiqLTqEbHgfK2Hnq zTs6V2eZmAfWxOmCPE1X5TpqWqrJHfFHGjHntu90xrXonSWzMf4fAox5imjnhodPF8JK iBFNWj4qRPt/MRTpR8tOPlXzrFDsYPzjdkmLRB/vF6Wrclfgc8McAeDw+Hrb6+GoP/nn ETtLzPQ19rkNu0lRBYDWzRFzSiE+nIjxSOfbKbHgAdelwy6jzh5Fovm2qXy6WhTcU6OA j60DS67qjfHDPcVMeXyfInNoGNY3zmvE9hRYpCXeWdsUY7PVd22tSOyINuNdkR1Ex38K VYKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id e1si18640187qkf.42.2017.06.01.02.16.15; Thu, 01 Jun 2017 02:16:15 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 11FD760646; Thu, 1 Jun 2017 09:16:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 8D596609CC; Thu, 1 Jun 2017 09:06:14 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 0836360D88; Thu, 1 Jun 2017 09:06:06 +0000 (UTC) Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) by lists.linaro.org (Postfix) with ESMTPS id 498F960D3A for ; Thu, 1 Jun 2017 09:04:01 +0000 (UTC) Received: by mail-lf0-f49.google.com with SMTP id 99so22620320lfu.1 for ; Thu, 01 Jun 2017 02:04:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=k7ncCAr/V0RFPxf1aYemxiK3annSa5UH8MIgv9p2Iew=; b=NuUCs+rD2wk2JnKhOIYw9pxtaYvWrc28Xr1Q1gn7jjX6CV/KqmEkiUHh6dc/6jg8Kd N2NffZNJldOLeN7Nsg4x4MCV6OpoQtv0aVovMeaa4Hh1j0YR46Tis5xy6featgkpHFq+ xNX0b4hUnS0t+7EKwkTPs8bApjasfqUSQszAgkgrH4Xv+BjYjvRIonoOOVoi1wMEL5vW V5V9K9AhAc6q/aGu9M7Or70826mRztcKOUT0awE6Rt5UOeJnLAy6WjJ8hSviEFbyn3TS xlSLU6LrmfK2/ibrz/hgL3fg+es6p0NpaP1QH+UpkpaLOyAK7Ds3MwpjDrNl5JV+RErN ASLA== X-Gm-Message-State: AODbwcAfE6EQbRxKMRUqD7yn5MlS7ThqzxN0S7PUGoHJAKJb7doHwdSb Xy3NoF7rjSw7724Ca8UFKNHN X-Received: by 10.25.38.129 with SMTP id m123mr201422lfm.150.1496307840035; Thu, 01 Jun 2017 02:04:00 -0700 (PDT) Received: from forlindon.lumag.auriga.ru ([188.162.64.12]) by smtp.gmail.com with ESMTPSA id 129sm4232819ljf.36.2017.06.01.02.03.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2017 02:03:59 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Thu, 1 Jun 2017 12:03:32 +0300 Message-Id: <20170601090339.9313-17-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170601090339.9313-1-dmitry.ereminsolenikov@linaro.org> References: <20170601090339.9313-1-dmitry.ereminsolenikov@linaro.org> Subject: [lng-odp] [PATCH API-NEXT v5 16/23] linux-generic: crypto: NULL session->next pointer on session allocation X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Signed-off-by: Dmitry Eremin-Solenikov --- platform/linux-generic/odp_crypto.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.11.0 diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index ea7c702650f6..32fece308beb 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -88,8 +88,10 @@ odp_crypto_generic_session_t *alloc_session(void) odp_spinlock_lock(&global->lock); session = global->free; - if (session) + if (session) { global->free = session->next; + session->next = NULL; + } odp_spinlock_unlock(&global->lock); return session;