Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4147004imm; Mon, 17 Sep 2018 08:54:50 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbW1dzBsuqtkTT3hDyecSCg7+OSq3/agfT2uonOwsaDO6cLn4e1G3fOmcUFzfmpDSdxHHHG X-Received: by 2002:a17:902:968d:: with SMTP id n13-v6mr25569820plp.33.1537199690305; Mon, 17 Sep 2018 08:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537199690; cv=none; d=google.com; s=arc-20160816; b=Eef6Hnvi22q5DLlvkhuT1sCOmdsy+/29siNrswBOyP5m0ZjzjBbD4ssnAvvzlQ6fV6 4g/CiMlfc5pzp3YLboLmg0Bbi7ZeLoi0TFv7QBHVzPM65SB2BQy9HtkMwvlgkJzMBeg2 bZZ14pCuvdcX0s0Q57ByGo/rVzKYGLeVnbwiHCUl2+92CQpP4jmIAli51bqNa2lUkOrJ 9iu2MyFouL/28zHM+xGlDdFTvunP2lALc8o3VsuvaADUs1ZEp9xbVZyDx9KRJsb2uwyp h/aUXPxup9PMdd8p/atWW8YoOBsdx2/pPrkqrej1Xjs8lCrwU6R4IJaJOEPdO89kefQT IXqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:from:cc:to:subject:dkim-signature:dkim-filter; bh=bOcEP/oLH1YgqNSsOvMtCk5AFKqswcuMjqT14BzrzLM=; b=PrGl+z7lmOJKa+iqzXphuLV6J8GkyxYHMXzNNazjfEKRFsv/Do255pPWR7TX/m2lHN Gw2E2jhtU35JaO4ucf+0xS23w+DrqU8NiZyt0ys8qWs2KaYdsVocRahmVa7t4qSJU1CZ VB5KALmsU3OgOWJDP5kqeTDK3NeON9IKTGLg2tavlzVcgtj53jbytbrcmM1OhWR6vITU bzBjiHqwNyJ4SrivTXC9vLxRxobItXn583qWx3EeJQekkoDs0/TnrvsH/lguzq2ZikeL IoE6/cDIN6JxiKTqregqBpneVH6Sqyncsm/Tm5G8KVKg+CWShixICBEjNzllPVeVyXWG WMJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=atYj9hrH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9-v6si15859249pgm.93.2018.09.17.08.54.21; Mon, 17 Sep 2018 08:54:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=atYj9hrH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729344AbeIQVPZ (ORCPT + 99 others); Mon, 17 Sep 2018 17:15:25 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:40953 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728409AbeIQVPZ (ORCPT ); Mon, 17 Sep 2018 17:15:25 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180917154729euoutp02faa43c4e6c9627fe8b701e2691a90719~VOpKUfDLF0064500645euoutp02o for ; Mon, 17 Sep 2018 15:47:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180917154729euoutp02faa43c4e6c9627fe8b701e2691a90719~VOpKUfDLF0064500645euoutp02o DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1537199249; bh=bOcEP/oLH1YgqNSsOvMtCk5AFKqswcuMjqT14BzrzLM=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=atYj9hrHKuaLysVOgF0v+iIg+tpOzpkjFtCw1G2NxGJ/jmXOngGUPmb591PVwpDUF Y12+a9u9NzMPVWejoyWWjoZnqBiBY6jCIrnX5/ka2VMhgyP4RZQSTuKHJBGzuvoA08 1RG3UIFUb/prErBnhAzEB6dQUGEzh+4b1B3AAIJY= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180917154727eucas1p26eaac8d054cb774cb48dbc18d0a581c5~VOpJTSXx22008020080eucas1p2n; Mon, 17 Sep 2018 15:47:27 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 12.80.04441.F8CCF9B5; Mon, 17 Sep 2018 16:47:27 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20180917154726eucas1p18eb2e915a45177d5cd7a192278eacc48~VOpH40eWM2730527305eucas1p1o; Mon, 17 Sep 2018 15:47:26 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20180917154726eusmtrp26ee5ac4df470f68e8f797fba358cd61b~VOpHnxRPO0381703817eusmtrp2F; Mon, 17 Sep 2018 15:47:26 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-33-5b9fcc8fe3bf Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 3E.5C.04284.E8CCF9B5; Mon, 17 Sep 2018 16:47:26 +0100 (BST) Received: from [106.120.51.18] (unknown [106.120.51.18]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20180917154725eusmtip27058124a012294de1b64edce071ca0ad~VOpHOR7iq3230832308eusmtip2_; Mon, 17 Sep 2018 15:47:25 +0000 (GMT) Subject: Re: [PATCH v2 1/4] crypto: s5p-sss: Fix race in error handling To: Christoph Manszewski , linux-crypto@vger.kernel.org Cc: Krzysztof Kozlowski , Vladimir Zapolskiy , Herbert Xu , "David S. Miller" , linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Bartlomiej Zolnierkiewicz From: Kamil Konieczny Date: Mon, 17 Sep 2018 17:47:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180917151006eucas1p2226806b94605b061bc1bc3e9b5a6c495~VOIhXssSK0729007290eucas1p25@eucas1p2.samsung.com> Content-Language: en-US Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA02Sa0hTYRjHec9lO5Mmx2n4oFIx05jkDYROJFIguI+BIOKwWnq8oFPZ8R6B oLVSu9jNNc15wUrBS94vWOJtLZfDS5BSKmmF1j7kMlDT5fEo+e33Pv/n+T//B14Kl3WSHlRy WiarTVOnykVORNfYxoT/PYtRFVRVcJJ5pW8hGVN/PWIqrUUEU7LqxVitrWJmYX4DY6b7KkWM 3voaYxybhfh5ibKjYRZTdg36KNsab4uUOzWPCOXdjkaktLcduyiKcQqNZ1OTs1ltYNgVpyTj 6hCZ4SBzP+kmxAVomyhGEgroEFhuH95jGf0SQW/hdYF/I/huPlGMnHbZjmCtvlF0MNAw8wYT hBcIlprM+w8bAsdcLc53udIRUGdYFPPsRkfCDfu4mG/C6SoMSkdn96xE9Bn40m3BeCZoH9DN D+zxUToaRhZrEM9S2gXMT5d381GUhM6BTWsqX8Zpd5hbNmICH4duWyXO+wP9Tgz1K3ZcmM2G Mp0eE2KHwx97p1hgV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iVRHiZ+YBCvCmJlVWpRfnxRaU5qcWHGE2BfpvILCWanA9MFXkl 8YamhuYWlobmxubGZhZK4rznDSqjhATSE0tSs1NTC1KLYPqYODilGhjzFoctYxF7WPhbjVnT YvPjprZpvRZas5ycz+25elu2jv3eb9+qN3IKEgHiT6pDbhdoNK186nf8bqeB3smZcRvYrgUx svmF3nnyT9+jyPXX5b2bJatTZR30LiwIS6+cvOY5d7nkHIfDPXYvnG+5MgqXbb/gWfq46cyq ibXMJ99GWs3rmm+z84kSS3FGoqEWc1FxIgAILd4S3QIAAA== Message-Id: <20180917154726eucas1p18eb2e915a45177d5cd7a192278eacc48~VOpH40eWM2730527305eucas1p1o@eucas1p1.samsung.com> X-CMS-MailID: 20180917154726eucas1p18eb2e915a45177d5cd7a192278eacc48 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20180917151006eucas1p2226806b94605b061bc1bc3e9b5a6c495 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180917151006eucas1p2226806b94605b061bc1bc3e9b5a6c495 References: <1537196970-5987-1-git-send-email-c.manszewski@samsung.com> <20180917151006eucas1p2226806b94605b061bc1bc3e9b5a6c495~VOIhXssSK0729007290eucas1p25@eucas1p2.samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17.09.2018 17:09, Christoph Manszewski wrote: > Remove a race condition introduced by error path in functions: > s5p_aes_interrupt and s5p_aes_crypt_start. Setting the busy field of > struct s5p_aes_dev to false made it possible for s5p_tasklet_cb to > change the req field, before s5p_aes_complete was called. > > Change the first parameter of s5p_aes_complete to struct > ablkcipher_request. Before spin_unlock, make a copy of the currently > handled request, to ensure s5p_aes_complete function call with the > correct request. > > Signed-off-by: Christoph Manszewski Acked-by: Kamil Konieczny Thanks! Kamil -- Best regards, Kamil Konieczny Samsung R&D Institute Poland