From patchwork Thu Sep 5 03:07:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 173108 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp154027ilq; Wed, 4 Sep 2019 20:07:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxA1EVV8205gCUwRXbFV112K+YaEegD2AuKYaIOCG2BLCMUphlfBvnRT0Kq/dK/dDD4W2oY X-Received: by 2002:a63:3046:: with SMTP id w67mr1160065pgw.37.1567652866728; Wed, 04 Sep 2019 20:07:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567652866; cv=none; d=google.com; s=arc-20160816; b=mGCBm2vvzlFK3kYXFVjr2EbyZp1sx0FlfR+Ns0XP3PeuQIVF+2gNKeIbb5AT6+qLyY I9s8e0c4DyKpD6W/Wa5hoSyK7jeTcMEWn2CMegwjkKbuKLOvrVzVaCZXOxFanLm1xifA /a9tsYcaGmofor8qy5SJnWNMjZjwwLb5eoLK1WsKEgQqF1FtH3YASiI0Lj4mDHo26V+W 7+OcQmWOqAaCJGmCUmZQRtnFBUMZ4UmlS8MpZyRPgtx8u32KACsihHIWY7sOPCMuF/YL 7SLieoJEkR3QmXmxeFjSWtQslHHSPBixcnH8gmcGfL7MPaW43oxRg+c+twbKiZHqeQk2 fYJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=bv8aLyZNsRQTuIGo9WBDbNKWSEWFm7lp2gBa2Tmb/+Y=; b=ktTUYUjaBE82fzeMVj5bbrp1uheMw2Zy/072VA7eRdIx2xHF2F0B5IA7Mj6+k88TLR v54UHWS4TDeujygse2VUEVynuPD9oCWVf/HaYPEMo2qrFO8LQUNJ/LW5eobGd0rmZuh/ aMDsS2Ju6tbcfTtNXK381aaieLqmRma34gmkD6zM9dFt/XUlLTDilu8mAl9rY/jtLiu5 fEOUdzm+WaudVzUYG5oHgjtlinKgYc2aLozHcKw8SOVByBi+jYJEHRfl15OSbbpgh0oY UAiaKu9Q7VSvk/HaCb9xq8zlWjTfUpEjlMNl8Y3nq1uinfi6LXSL61ICzgQwuB+OD/Fn AGmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="dJ/kcZiL"; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q206si511254pgq.483.2019.09.04.20.07.46; Wed, 04 Sep 2019 20:07:46 -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=@linaro.org header.s=google header.b="dJ/kcZiL"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731068AbfIEDHp (ORCPT + 28 others); Wed, 4 Sep 2019 23:07:45 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:33803 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727156AbfIEDHp (ORCPT ); Wed, 4 Sep 2019 23:07:45 -0400 Received: by mail-pg1-f194.google.com with SMTP id n9so569261pgc.1 for ; Wed, 04 Sep 2019 20:07:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bv8aLyZNsRQTuIGo9WBDbNKWSEWFm7lp2gBa2Tmb/+Y=; b=dJ/kcZiLoIWOyyw6EfFPZeTXLsTZNg9iDTuBuXEqB+kjja/lH3LAkPeOLFJAsOWKCc C/z6F3GUxZ/IB7EDbx9Q1NptWBRZprPFMK5DtN2adq5zQx7CI500p6v2GhBCDewaN/05 GM3lH33ZsVbgMrZZVG7Bp2m/1UrW4z8G9ztPyacNo9gFE1b5xSmhBxudlHqFKmPtOldy IoCm5mHDORE/jjJKkueXfSaUX72IOBNrHiwt63UBkSpiASgBZkMzI2rpreM5GrrxVkGa flKKFL1ofwgPuI9Ap/pt1WBEWqVlX4gFTOGVEeJUxSVIbk9YhecfTtoYN4CrlRp3uy9X h9ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bv8aLyZNsRQTuIGo9WBDbNKWSEWFm7lp2gBa2Tmb/+Y=; b=Tf7wKhbArVJibdXgcPEP6rJlsWfA7FQ/9Gnn0nGNiNQp6iEo5UiUhgBkL14nxcWX6I 2oO4WVQV3kcuW8QdyeWrZjN0npx1ksY4V+23rRXQlRCTjxaq1OkwmnIeLfPy4wejSvfs oMMn1jC6C7FUX7y7Tr4OPVTDniI1Wv1lBCebeaUzRwrwmz43wQfYxG6UnALfUJunSiuy vWo9DaPu9fVJhvgTFyBuVLz08yLE3Gv0igjPRbtHPjg1DNzjhMy7nlGZ8GSequUHvBtZ NCqbplKlcAotUVPEgY83tv9qTM2JeNp6KNOfHDf9okPCurB60l4q6+Lo6QdeVfSyzwjv ICcA== X-Gm-Message-State: APjAAAWcb60pQMEiItQYsg8x99EBq+MF/ZguDVA+KlWtiZ4L3cvTIU4h KRHJFBmD3vxpsKeU2odbBd8gMw== X-Received: by 2002:aa7:8d12:: with SMTP id j18mr1128275pfe.33.1567652864452; Wed, 04 Sep 2019 20:07:44 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id x9sm425686pgp.75.2019.09.04.20.07.41 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Sep 2019 20:07:43 -0700 (PDT) From: Baolin Wang To: stable@vger.kernel.org, peterz@infradead.org, mingo@redhat.com Cc: longman@redhat.com, arnd@arndb.de, baolin.wang@linaro.org, orsonzhai@gmail.com, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org Subject: [BACKPORT 4.14.y v2 2/6] locking/lockdep: Add debug_locks check in __lock_downgrade() Date: Thu, 5 Sep 2019 11:07:14 +0800 Message-Id: <7d3d221015cd343df47de4a68ed4776aca2ca0ab.1567649729.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Waiman Long [Upstream commit 513e1073d52e55b8024b4f238a48de7587c64ccf] Tetsuo Handa had reported he saw an incorrect "downgrading a read lock" warning right after a previous lockdep warning. It is likely that the previous warning turned off lock debugging causing the lockdep to have inconsistency states leading to the lock downgrade warning. Fix that by add a check for debug_locks at the beginning of __lock_downgrade(). Reported-by: Tetsuo Handa Reported-by: syzbot+53383ae265fb161ef488@syzkaller.appspotmail.com Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: https://lkml.kernel.org/r/1547093005-26085-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar Signed-off-by: Baolin Wang --- kernel/locking/lockdep.c | 3 +++ 1 file changed, 3 insertions(+) -- 1.7.9.5 diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 565005a..5c370c6 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -3650,6 +3650,9 @@ static int reacquire_held_locks(struct task_struct *curr, unsigned int depth, unsigned int depth; int i; + if (unlikely(!debug_locks)) + return 0; + depth = curr->lockdep_depth; /* * This function is about (re)setting the class of a held lock, From patchwork Thu Sep 5 03:10:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 173111 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp156512ilq; Wed, 4 Sep 2019 20:11:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyo6LfmLY62hZVHnG7HKw+USbFTqXaY+BllGgLFaJzKAIa2g5uF+MRwkMrt56UnY8Ti/L+m X-Received: by 2002:a17:902:169:: with SMTP id 96mr976748plb.297.1567653080782; Wed, 04 Sep 2019 20:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567653080; cv=none; d=google.com; s=arc-20160816; b=fB/3V4ouQ+EZcf0FVhGszWvvMtdk5DkdP61C5Ope/R0fIEM+qM+4hhgEFxaydnwONC FKtaoi7EDqHuhh2us++sJE1wtEdT8k/z4XM1V1HeD5GcgVBMC3GnvPrkeQzbnxRmT03C 3AmolGP7sLGlAlEqOTnRPWhVtXiiNgaIgH1WPHjTaIK2F6IdE6iSjR7GJS4LFTz4x9Xa Vw45WqZqvvDO2hSTq2lnGduh+Wa7HzKgSlLF/9+Fh+mJNekSNQqATSLdropTGzGEGnRW /aezIHrTRrikA6eV2qt9cMIxKfJrD5WjesgwKVFRKpOVW7j3+nHfta4hvCHjQIbShfue MrrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=fcnS+G2pmrv/7FtDCpDg3ydXize5+qRthlkH+i6Nzg4=; b=GLIqWo2qnTjMdnlX5SJcT+SdQPKw5sokSqqJAtmOTZnvm7w3sp30R3x9kdU0PDEOa9 3tF3V2ssPG9yyWsL7WCA7nAd/DByKAEx0HYoOYySQAmmZPOIuc6m++zJ4qpvffDqqvqh VA/GwzWz/PreW9NK+V4Zte//6feIjCAxud7/BD6AMW6EJHYd27OsKhyi9veJ5DB5hUtx 2UmB71snfAI7DZVpvW1JkvaCDp1JtTWuQqxyIJU5mgxLgMTQbB7XvWXM1UMZ0e7uoE2/ 0ZnW72DMcOvV/Cdg1p/tmfdiv7SQmKyfhTUfMuxvKMm+40nL5Oaqh7e/N28AFCVpQ35n Y7fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZDy0QoVX; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1si522864pgs.132.2019.09.04.20.11.20; Wed, 04 Sep 2019 20:11:20 -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=@linaro.org header.s=google header.b=ZDy0QoVX; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731115AbfIEDLT (ORCPT + 28 others); Wed, 4 Sep 2019 23:11:19 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:37019 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729809AbfIEDLS (ORCPT ); Wed, 4 Sep 2019 23:11:18 -0400 Received: by mail-pl1-f196.google.com with SMTP id b10so580224plr.4 for ; Wed, 04 Sep 2019 20:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fcnS+G2pmrv/7FtDCpDg3ydXize5+qRthlkH+i6Nzg4=; b=ZDy0QoVXR8NP5HmcAeSd42ZlxZcaLRWuNT1x335B6K+p+Wl3Du5eTC5yr6GVVDrjSH 7WRPbXrq1z8SL59ItZNjYg8SzxrkWTv6LI7g+hPEQl2BjMN2TmQxgCKh8woupiYlfAlj AV0o7p5uLxvxmSttnBp6QAb3dzRHetI1bKxJE7v6/CDOhbqHlreQ6Hz/6+puwDsD0Nq7 YiBQQfuUrE1WkAkIq3ITPMKBQi/oLcpy5oCvmMtSPX6o1XstJ5KBLtOEqVYy4td6/8rp k4RHtKkJeyANVP6Y72Z9ATUdqnf4C7K624iLqDVZ9ropU0y3Z3zO4zvDwY5xE5A3Foq0 PBPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fcnS+G2pmrv/7FtDCpDg3ydXize5+qRthlkH+i6Nzg4=; b=VsFPXfBizDsLDMlHFQINAMUfb2h50z8WOz7DRypT/IzW/gsYTOSrtfsj0VfVufAlo2 iGHPodTS7xNGeW4c6zboCwv2qW/M7NvWQSkO9C2gZKRfLD/O7YDiRs8/lt0eJgeYHSn/ qX7DpBmzQtbz2cRMyD2xiOp26EtDVOuT2cXe9CrOYE6xQlfakUSZML5dRNeB7FGUIWd8 AkoHSLW1m2kYo4K6g4KARb2/aBpU/p2cdc3wIhrf+o9uECjGelxQUyjr6E9sOQSpG9Am JVbEn3/7ZNj/ZLwZ4TaD5s1ehEZtnoQ1kXTwQfDjDz2MR+rExYRrDNmIzWyV1Nbrvj8l m4Tw== X-Gm-Message-State: APjAAAW3Hu0o4ouFynxm0Yh8GXTP8feSoP/xSNbl1nnpV+2Wtm7jPDoQ LmjVY5P9E8qwGIFwJO6ZwLk4qw== X-Received: by 2002:a17:902:8a81:: with SMTP id p1mr1019815plo.71.1567653078050; Wed, 04 Sep 2019 20:11:18 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id q4sm531864pfh.115.2019.09.04.20.11.15 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Sep 2019 20:11:17 -0700 (PDT) From: Baolin Wang To: stable@vger.kernel.org, paulus@samba.org Cc: ebiggers@google.com, linux-ppp@vger.kernel.org, netdev@vger.kernel.org, arnd@arndb.de, baolin.wang@linaro.org, orsonzhai@gmail.com, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org Subject: [BACKPORT 4.14.y v2 5/6] ppp: mppe: Revert "ppp: mppe: Add softdep to arc4" Date: Thu, 5 Sep 2019 11:10:45 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Biggers [Upstream commit 25a09ce79639a8775244808c17282c491cff89cf] Commit 0e5a610b5ca5 ("ppp: mppe: switch to RC4 library interface"), which was merged through the crypto tree for v5.3, changed ppp_mppe.c to use the new arc4_crypt() library function rather than access RC4 through the dynamic crypto_skcipher API. Meanwhile commit aad1dcc4f011 ("ppp: mppe: Add softdep to arc4") was merged through the net tree and added a module soft-dependency on "arc4". The latter commit no longer makes sense because the code now uses the "libarc4" module rather than "arc4", and also due to the direct use of arc4_crypt(), no module soft-dependency is required. So revert the latter commit. Cc: Takashi Iwai Cc: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: David S. Miller Signed-off-by: Baolin Wang --- drivers/net/ppp/ppp_mppe.c | 1 - 1 file changed, 1 deletion(-) -- 1.7.9.5 diff --git a/drivers/net/ppp/ppp_mppe.c b/drivers/net/ppp/ppp_mppe.c index d9eda7c..6c7fd98 100644 --- a/drivers/net/ppp/ppp_mppe.c +++ b/drivers/net/ppp/ppp_mppe.c @@ -63,7 +63,6 @@ MODULE_DESCRIPTION("Point-to-Point Protocol Microsoft Point-to-Point Encryption support"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_ALIAS("ppp-compress-" __stringify(CI_MPPE)); -MODULE_SOFTDEP("pre: arc4"); MODULE_VERSION("1.0.2"); static unsigned int