Received: by 10.223.185.116 with SMTP id b49csp718169wrg; Wed, 21 Feb 2018 05:54:59 -0800 (PST) X-Google-Smtp-Source: AH8x227kOs9oQCHDUYAQYae+dhb+cXOyAY7yQ5aDqb5S1vrxNAtE0rMCAFf13+HH+hy+olaPPBoA X-Received: by 10.98.139.18 with SMTP id j18mr3419168pfe.179.1519221299014; Wed, 21 Feb 2018 05:54:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519221298; cv=none; d=google.com; s=arc-20160816; b=EKzteusce+Htvg3DfVoiBKUYBMx1nvT8Ax342ScLBwQI2Ag3iTQNUFO+rKSefzbNTw udjl45ILK0AnA9jvh3l+X80JBaBjhpbsP/SNwNL3x6DEBkdijKeupWlM9u4lhXadTqto U33TDVrlKfBD47nDOjAcjzolwbPVWzYPxM/qbUlgqd2ICyw7mDsGdB2LAUbCxG2+5Ff6 YUCjHvhn8jyjQDxrKJ8789XuFPHzefVdzFLte5FOxclWQPdw5cIvHn4sd78UsD9NR8oP BsA2Vg/QzcKy+IeVcwSsIoJUPwX6Iui3tnn+IeaWY94bEhWqOULtyV/Erv5gu1rtBg/C CnGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=zTT57gAReJU3Tho7ytFz2xLMMiPbhHc4x4XGM4Vpupc=; b=g3KjQ/rgHKifKhz18rjjgyEXBp4/ivh56h9oAEOD7Bn4yUd6Ay1WBD+dbs7bpF72SJ uUq6JB80E59842jIXsn5b4Jp/HYsP9Lu4BIpR8S9WBlC6LyWIDFumigxQNgfK6OJpPx+ 41FlE0nV3vwoK9UYhl0nAoHJh2yl1UZtBQxFj+77CxPtHoxCykaTb+t862JLVRVXEZHm L+2jU/gA425ZPGvxQmpuaXZTSmfYpshyrt9nB1cmZjVX9h3RbYCKBTWj9ODZJo9TajkZ Nrvvg/eed7uj0gr4hzawqAo/8AgnbAGQ3rtRdKDfPnEfjeMOcxYqLDFJ67vlEeiJ9LpD 969w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6-v6si1562229pls.65.2018.02.21.05.54.44; Wed, 21 Feb 2018 05:54:58 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965172AbeBUNHh (ORCPT + 99 others); Wed, 21 Feb 2018 08:07:37 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:41674 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965160AbeBUNHe (ORCPT ); Wed, 21 Feb 2018 08:07:34 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 15508FE2; Wed, 21 Feb 2018 13:07:33 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Artem Savkov , Herbert Xu Subject: [PATCH 4.15 045/163] crypto: sun4i_ss_prng - convert lock to _bh in sun4i_ss_prng_generate Date: Wed, 21 Feb 2018 13:47:54 +0100 Message-Id: <20180221124532.874587428@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124529.931834518@linuxfoundation.org> References: <20180221124529.931834518@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Artem Savkov commit 2e7d1d61ea6c0f1c4da5eb82cafac750d55637a7 upstream. Lockdep detects a possible deadlock in sun4i_ss_prng_generate() and throws an "inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage" warning. Disabling softirqs to fix this. Fixes: b8ae5c7387ad ("crypto: sun4i-ss - support the Security System PRNG") Signed-off-by: Artem Savkov Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/sunxi-ss/sun4i-ss-prng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/crypto/sunxi-ss/sun4i-ss-prng.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-prng.c @@ -28,7 +28,7 @@ int sun4i_ss_prng_generate(struct crypto algt = container_of(alg, struct sun4i_ss_alg_template, alg.rng); ss = algt->ss; - spin_lock(&ss->slock); + spin_lock_bh(&ss->slock); writel(mode, ss->base + SS_CTL); @@ -51,6 +51,6 @@ int sun4i_ss_prng_generate(struct crypto } writel(0, ss->base + SS_CTL); - spin_unlock(&ss->slock); + spin_unlock_bh(&ss->slock); return 0; }