From patchwork Wed Nov 27 07:21:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180248 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp5735463ilf; Tue, 26 Nov 2019 23:21:58 -0800 (PST) X-Google-Smtp-Source: APXvYqxH5BIQVqX3KCNhfUvj8cKz1lIaECpCFkk6UF+57mr6UqmSQOVDtqV/3q0V1NVDVjV8BSLP X-Received: by 2002:a17:906:c296:: with SMTP id r22mr30835803ejz.156.1574839318834; Tue, 26 Nov 2019 23:21:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574839318; cv=none; d=google.com; s=arc-20160816; b=ETcY5VQJ2RncsCz1hgr8qHff2dOcTNWC5wWh6WR8mdh6S6MjoW/XRYCxHHHZK3Vkts cdoQIh4SFZTEhD+NGgCclvp0Ir3KCmgOprecAQKwmrmkzmkTxkJ7ElgoqDrB8xpRD9q7 OXb1FjFSEjAB/HD4Pc1I8RqokdB4/PUjfaZEWLxbR3bOlnyY7X7kIMxovr2C/a35xUki 7NvvAiUKF2iPxSdxNfQc8gR3/bqpD41lui/YW7tXARr/VwBytD9oChdxxUTu97RXIW5X 359utDB8WgRPJxcJSSfROsdTdviRW4bWcMrnda8MNDnDNHmmB0XTnhXC/eSj3i0mLw8O /53g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=Yu9KDyxptDwqLuTA7xTY8BCLlGAehUEuHl2YkpDAZ2k=; b=NHru7wk8izys/WhhPEZ0DfHsbHFTIgzf9CFwNchkrpHQIZbb6XYgbzkEnhbtDUZH4N vRTH6IFJutjdT+mi/9rarulCiIiPyoWz2zecqeTrghQ8APvo+Im3GtEcdxc17oQ/VTRs 0gI4NZ984QE2NsNys7tvqtAjlQONeY3BpZOdH/ZZdt3FDUsmvD9FC0lPs8xPFMR/TpY7 ZGPQOSV+04MEws50yYyuF6ULrkwh4HDBNpVsSWhAMnkx0fjKakCm+AVAIwsJWHBPUy+h 0xjuH6XioiInyiTkKo0hzSiCG5WL58FQGrwqwOg4QvXDFi1wMPYslonrd4lI5WbIcR+Y 6EXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fLu9uh0i; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 m19si69058ejc.66.2019.11.26.23.21.58; Tue, 26 Nov 2019 23:21:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=fLu9uh0i; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S1726281AbfK0HVx (ORCPT + 15 others); Wed, 27 Nov 2019 02:21:53 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:37400 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726260AbfK0HVx (ORCPT ); Wed, 27 Nov 2019 02:21:53 -0500 Received: by mail-wm1-f66.google.com with SMTP id f129so6162934wmf.2 for ; Tue, 26 Nov 2019 23:21:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Yu9KDyxptDwqLuTA7xTY8BCLlGAehUEuHl2YkpDAZ2k=; b=fLu9uh0iUpaS33IDv+MTle941viXGSA0Nu4lAgbCfX8WtNyd3OWT5WhaTh74z2Kpow 44oTX680QS8X5O1RsAWX0adi2rdUzM6JTLBYM9lWWx48kWyNXGcpKe49HBZSc9COM7+a cQeUj3h6YgcMKj4xKaglM3aduAM21l/gUGX/CXienLEiMVHa8fuoI99I5UGxJQvzpIhM fCbWDkdYnksU7cbAHWNheJr6W4ilbphOC2LzXwPqn0TMdfQOEUrNab9ygC/6bOS77SP8 7YwJcT2nuJgNcVuc0ytXCis+qjxYRuHu4ZfcJYwFdYxTAXgPSZplv77TGfYreJLMd3Bv dneA== 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:mime-version :content-transfer-encoding; bh=Yu9KDyxptDwqLuTA7xTY8BCLlGAehUEuHl2YkpDAZ2k=; b=e3pbXvc2gxuKz2Ucn8pGwsoTTp8sFAyYQ7QxPVOUtDZ9QJ+BPxt0gu6gNQRu/cbvD/ XrUy6JZpmfjkjvahUqFfJWtEgOaHFB1bG8bph4KCvS77TXuYp+W96gbjYcRxBRacG0lC JGgzmp35d8IjwKtnd/K4y6texyD7bYRM4XOoW7u8HF5kS47QpxaT6pLZZsJ9B2ea6a5g VGsj+YPqIuTO7V/Ojsmn7gr135wk9qU84gCOV2VPgptmsh2tkkk9aVeNLpPFEVNutbWI 2aw0vLglQxWV1rOANkLEnwYyxoHRM70l5r3J9g7azRZWXuLt0yhG5Ba/NnJvYYeaAE1V MRyQ== X-Gm-Message-State: APjAAAV9YlPrgX6OiRjFudT6tyzYDkJKR58LUjE3ZxT1Z/2BHPAl0dIt Yct1Cdsr8OWVrPWd2Yog7u14Z7L+z28= X-Received: by 2002:a1c:3d08:: with SMTP id k8mr2615871wma.119.1574839310071; Tue, 26 Nov 2019 23:21:50 -0800 (PST) Received: from localhost.localdomain ([95.149.164.101]) by smtp.gmail.com with ESMTPSA id y6sm18151872wrn.21.2019.11.26.23.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 23:21:49 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 1/6] can: dev: can_dellink(): remove return at end of void function Date: Wed, 27 Nov 2019 07:21:19 +0000 Message-Id: <20191127072124.30445-1-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marc Kleine-Budde [ Upstream commit d36673f5918c8fd3533f7c0d4bac041baf39c7bb ] This patch remove the return at the end of the void function can_dellink(). Signed-off-by: Marc Kleine-Budde Signed-off-by: Lee Jones --- drivers/net/can/dev.c | 1 - 1 file changed, 1 deletion(-) -- 2.24.0 diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index 9dd968ee792e..e0d067701edc 100644 --- a/drivers/net/can/dev.c +++ b/drivers/net/can/dev.c @@ -1041,7 +1041,6 @@ static int can_newlink(struct net *src_net, struct net_device *dev, static void can_dellink(struct net_device *dev, struct list_head *head) { - return; } static struct rtnl_link_ops can_link_ops __read_mostly = { From patchwork Wed Nov 27 07:21:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180247 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp5735453ilf; Tue, 26 Nov 2019 23:21:58 -0800 (PST) X-Google-Smtp-Source: APXvYqz7zzhkKg4a0bGT9d3sGU4fcxTs+G8lZ19hyE7LrzWhIDf2urWrmAaDtBjk3eanBftDzSED X-Received: by 2002:a05:6402:148f:: with SMTP id e15mr852095edv.254.1574839318445; Tue, 26 Nov 2019 23:21:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574839318; cv=none; d=google.com; s=arc-20160816; b=B1FPGr0pvJT0y3Mxb6FjK7TW4EDIksk7D1NeFMyDjCdyUvedsD033Zo660cBlgteua a0+cwEfGIVioQ+alj0itbKwwha/DGThA24BKkJB4po9pGLH0r7EmACUl8iPvLeTyWwvd KuQY/o2ao4izPVcyLpxSEhQKUObs8KFmMiUfonlZjfu/sCUHMVd2o8rwemZp6Mv2dAfm SxGtyffbIrg+vo6hqlS8NyMHFIRrYZF/9hgN4F0ecyGCYGh6xqoNfWN1zZ4KHPqo7fIq vVsxSHzSJznaK80USy93W8TYG+8PKb8A8GyxFTMfd966/ubcj8MJIlmBcznE0lC5e6tr RxfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=MfKJ/5LhXGWemwyCoLTmrzrTqXxWjUaJEcDcUsWi2Bw=; b=QjHK8VXrZbKUOhVIH4v4HJFWO0iuQtIT3ssXWX+YyaFPfsyea2/hoGGFa4YjVYgGBf JaxUou+4SiS8rEcfOlLd6G+QIgcUyifTcMoSG5vcCPN7ndyOqD13ovsBDEPug3gufsof +X8F+vOgSRDpKvDu4zAcnrz5xqjwa8S/tnrjCSejTdeDeWviEW9hlLiB3soLCn5lkSwH kDvK/C+jlDEmba3a/ZdO55FR40H8rXlZ/kczxdiD2HldqmMtFBjKSkZYKC2s/slkkcnl Ff97b4ql/zEYL481Fc1EjEy9LkQkv/WRqY2UouGYnZRRPoNlaCyfr/rKqEaSorgwXDVH mNww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c657nsNx; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 m19si69058ejc.66.2019.11.26.23.21.58; Tue, 26 Nov 2019 23:21:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=c657nsNx; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S1726267AbfK0HVx (ORCPT + 15 others); Wed, 27 Nov 2019 02:21:53 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:32921 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726078AbfK0HVx (ORCPT ); Wed, 27 Nov 2019 02:21:53 -0500 Received: by mail-wm1-f68.google.com with SMTP id t26so4181254wmi.0 for ; Tue, 26 Nov 2019 23:21:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=MfKJ/5LhXGWemwyCoLTmrzrTqXxWjUaJEcDcUsWi2Bw=; b=c657nsNxD6nOQLg7WIu9zeDoxAnWqYvzCSy8lAO6VxGKn/hAU9huTL3S5nZZ/VREyS KrCJkjYnwG4aakAbtEk8/HfW4PENQpk6rOJnOADm2E4tzF7gt5L1/SX4UoxH9QDjl3eJ BQ1b9xNsD1Tyq2K57Tf3LFSPmtXt4+Jc0ZFXJ978zhOQGmwv7Yhf44Xm1ZCEYfiT8Ydm hX+CKVNpw+f8jtwmKQcIR+NGUg9nb8O02y7exroWyiBYUXkaKBowoV9YYuNsQ6iaQR6k nNTeDo8UHLwoan4/olH6KTG1Mp+hFqFPm6M7c4pbnLVI4l6zlbukc8+uhIiWW6Qc9OMH Ao6A== 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:mime-version:content-transfer-encoding; bh=MfKJ/5LhXGWemwyCoLTmrzrTqXxWjUaJEcDcUsWi2Bw=; b=r5E9W0mM3OEA82gGWSwB1PWIzZ4ZPvFqzmLmOvVweL5L4HDRR6/cOLzpVXHzNXvFH7 rSo0nouHsrUEL+dcjOs/T/TXj/tmkw7Fso/5pv7AQPmr88CdGcD2eAVa/Cqyh5ZIMkej xTjCqMeUC+7DC/e4VeK1C/SYiNXNvyzkfmNPK0CuaiQynB3FV5ft22LTJJ2Hj7LhyBIy x1/WHB+QANOoota78dakYNMVxAA/DDqjTvI8W2hsso0Ipfcz56AkKYdOaTmFRuwpBrHq UOwfW/b1JuCFG0v9nAp42V3LcdxquhuWlyU1QpAlCZLDO67egMv8PBhcypRIwAQSY8pS 9ADQ== X-Gm-Message-State: APjAAAUZqGilB+w0JWBoZZpXkDiMwkk2jdDs7kxDp0XhoSOqyk8MybIE JM+/wG2uQ58cH7zz5YZfe12ESOuGzCQ= X-Received: by 2002:a7b:c7c7:: with SMTP id z7mr2620937wmk.133.1574839310696; Tue, 26 Nov 2019 23:21:50 -0800 (PST) Received: from localhost.localdomain ([95.149.164.101]) by smtp.gmail.com with ESMTPSA id y6sm18151872wrn.21.2019.11.26.23.21.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 23:21:50 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 2/6] arm64: fix for bad_mode() handler to always result in panic Date: Wed, 27 Nov 2019 07:21:20 +0000 Message-Id: <20191127072124.30445-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127072124.30445-1-lee.jones@linaro.org> References: <20191127072124.30445-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Hari Vyas [ Upstream commit e4ba15debcfd27f60d43da940a58108783bff2a6 ] The bad_mode() handler is called if we encounter an uunknown exception, with the expectation that the subsequent call to panic() will halt the system. Unfortunately, if the exception calling bad_mode() is taken from EL0, then the call to die() can end up killing the current user task and calling schedule() instead of falling through to panic(). Remove the die() call altogether, since we really want to bring down the machine in this "impossible" case. Signed-off-by: Hari Vyas Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas Signed-off-by: Lee Jones --- arch/arm64/kernel/traps.c | 1 - 1 file changed, 1 deletion(-) -- 2.24.0 diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 6b4579e07aa2..02710f99c137 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -448,7 +448,6 @@ asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr) pr_crit("Bad mode in %s handler detected, code 0x%08x -- %s\n", handler[reason], esr, esr_get_class_string(esr)); - die("Oops - bad mode", regs, 0); local_irq_disable(); panic("bad mode"); } From patchwork Wed Nov 27 07:21:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180249 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp5735473ilf; Tue, 26 Nov 2019 23:21:59 -0800 (PST) X-Google-Smtp-Source: APXvYqwYlcwmHo5zy5gGDB1iYYAX2rBInmEIKJ15EIuh4c43XOmrA0RFjrYRlwOz/IJEkUzzlPsL X-Received: by 2002:a17:906:1a47:: with SMTP id j7mr46774653ejf.232.1574839319294; Tue, 26 Nov 2019 23:21:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574839319; cv=none; d=google.com; s=arc-20160816; b=JwHfwJ//7DtjgCS1jGGwfODpBmjE6wD8gb4ZeenvtdkPa0AS2DFE+RNnjmI/tnScCa eOeAlCnF3zHSy9r+9lbC9jvPtuQEYRe55D5djeB+aGhbAjI/N2tiyj/QJLoEdjSlEdDo 8dpzMjiFZdPmcLc0v9jWbyp8Bjy8ItaUPP82JWGMRn7xs3LwsT6shtVEbw81GQoHq5ZN 2ZbnCD006hdd6PBSr4XvpJaB7trpOTAmsxAoW9pjYkBG9iLcD4Vi6DZtRzoIhNrcHEaJ uy3A5lj1dS+epCI/qjz9/7XtFPgyU8lVL3TMiB5RNPZEYxlw59M0xQEL7xHA7IoB3sZc qTjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ObvK4D1522uU+aqw4/rA24ESPbrBwV4/rk1T5o0KCo4=; b=eMcah+r3JsPjPjnjVCipUTVYWOiwGjht78m2FmgGwd64rYmCimmy5jdQBX0FxB+FJk umJiK8iGETboDxBXfPQJ/+WgioO1rTA2gszGgrTvlOPkaoQ0XIGL3lNOUTZSWPCS/zXk xOXhlK4MBBOuigY156uMvm43hmf8dPc2IoSb7G026FVVFAkGin/nIVO81dIgdNzr1dtd SIxh/wXNiSrxPQ4s6l+w30lZ0Td0vNJCjM28uhM0wHbTBrv/HaGZNmtl250h1zQpUxsd 7pm/tArqeN/gmrhVzUbSN6nsYhkjqX0R3i0Vp0twWafYuVIwvmHtlCg3m/Dk01ig++nJ MFKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oFYYA9ny; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 m19si69058ejc.66.2019.11.26.23.21.59; Tue, 26 Nov 2019 23:21:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=oFYYA9ny; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S1726292AbfK0HVz (ORCPT + 15 others); Wed, 27 Nov 2019 02:21:55 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:34037 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726078AbfK0HVz (ORCPT ); Wed, 27 Nov 2019 02:21:55 -0500 Received: by mail-wm1-f67.google.com with SMTP id j18so4176269wmk.1 for ; Tue, 26 Nov 2019 23:21:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ObvK4D1522uU+aqw4/rA24ESPbrBwV4/rk1T5o0KCo4=; b=oFYYA9nyvtJD0NpP4OebCaWnC/qREvinG7lPhmDrsRP77YXfBhQQsom68/0EfHcf5C GaIg94d82H3u28J4+gVKRyaUrgG/UPPjbCSPzSBzhjuFjPx9P4tcPBBATh9jT2wZpYdX CT12CByXLbx2kNszqYEhIXuCyuleaQlbCp/TBaqUwLW4SNrfWBry8eTCMnBdhLXi99ha UdwWkZKggaEqsq4bZ0Y7fdYjk78QTXyYC1U9EDrtWPQZTiEt2y3Ndjb/Oazd9PLeyu/j b3OMUhcjse2/Deo3YkUI2MFvT1aPI8DoLURO8YLB/12vtoqHA4R+OjaaLiZrRLjSOP2/ qUhQ== 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:mime-version:content-transfer-encoding; bh=ObvK4D1522uU+aqw4/rA24ESPbrBwV4/rk1T5o0KCo4=; b=QnqcYbFaiJsUM9ulGzkHFLPFUEQYCsj1oRaxGEbhx9vpZ1gPC4VPdJ8PNpmZNoe5NI bnQlsCkQM99UywVaZ+r8v6hWaHjSZ18GS7DUBayOxhgvTm3AtIRDYeUNg21iq42LN9vx UTpHyxXH4dNWod9WWmHTS7RniakmCu9GxfRFNtQKdZ1TIS826V96CPgymc3uZwwzduWc 7vX+UhlOwZnza8b/cY1IqAkJYpvRIM1vveil03Pf3FfuH8ScFmtEv22215CLK+KSuYmw vaRjXof/m3KPDSkFuFqLic/FXTqXlQo2QpO/FfQ4XixcRsj7t0vKjBOFfpORWEU78Vv3 y/IQ== X-Gm-Message-State: APjAAAWaUcxvPPXQIDCNdaBtQnRI7Xtj9h2Jlou45c+7gnceRFbGv3hD RseP/lHrlzhHwTopFa+HitrCMsNGhdY= X-Received: by 2002:a05:600c:218c:: with SMTP id e12mr2794349wme.30.1574839311282; Tue, 26 Nov 2019 23:21:51 -0800 (PST) Received: from localhost.localdomain ([95.149.164.101]) by smtp.gmail.com with ESMTPSA id y6sm18151872wrn.21.2019.11.26.23.21.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 23:21:50 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 3/6] cpufreq: Skip cpufreq resume if it's not suspended Date: Wed, 27 Nov 2019 07:21:21 +0000 Message-Id: <20191127072124.30445-3-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127072124.30445-1-lee.jones@linaro.org> References: <20191127072124.30445-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Bo Yan [ Upstream commit 703cbaa601ff3fb554d1246c336ba727cc083ea0 ] cpufreq_resume can be called even without preceding cpufreq_suspend. This can happen in following scenario: suspend_devices_and_enter --> dpm_suspend_start --> dpm_prepare --> device_prepare : this function errors out --> dpm_suspend: this is skipped due to dpm_prepare failure this means cpufreq_suspend is skipped over --> goto Recover_platform, due to previous error --> goto Resume_devices --> dpm_resume_end --> dpm_resume --> cpufreq_resume In case schedutil is used as frequency governor, cpufreq_resume will eventually call sugov_start, which does following: memset(sg_cpu, 0, sizeof(*sg_cpu)); .... This effectively erases function pointer for frequency update, causing crash later on. The function pointer would have been set correctly if subsequent cpufreq_add_update_util_hook runs successfully, but that function returns earlier because cpufreq_suspend was not called: if (WARN_ON(per_cpu(cpufreq_update_util_data, cpu))) return; The fix is to check cpufreq_suspended first, if it's false, that means cpufreq_suspend was not called in the first place, so do not resume cpufreq. Signed-off-by: Bo Yan Acked-by: Viresh Kumar [ rjw: Dropped printing a message ] Signed-off-by: Rafael J. Wysocki Signed-off-by: Lee Jones --- drivers/cpufreq/cpufreq.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.24.0 diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 0836d2939c7a..a68a2d5ac042 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1627,6 +1627,9 @@ void cpufreq_resume(void) if (!cpufreq_driver) return; + if (unlikely(!cpufreq_suspended)) + return; + cpufreq_suspended = false; if (!has_target()) From patchwork Wed Nov 27 07:21:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180250 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp5735481ilf; Tue, 26 Nov 2019 23:21:59 -0800 (PST) X-Google-Smtp-Source: APXvYqz6khSOPi48IxAsr66KqUrZyPzSa1StoiG1Ta8FWMfnSCXgnygra0mHmrstKWtDmK3qmf3S X-Received: by 2002:a17:906:b5b:: with SMTP id v27mr47061039ejg.327.1574839319685; Tue, 26 Nov 2019 23:21:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574839319; cv=none; d=google.com; s=arc-20160816; b=TzIGy/kMaCaqvMrPJiwQdjE73kB0dZsMKUKl3Tlod4ji40sPuWmz8RlSRcOpqeI3iS JDeEstFKaJoZJLRGZqqpfBn7By+5J0Nn48GQcFZ2yvyO5CPlU1rwRt5rBtZ1p78s+dZL oJcRebqoO3IXkVmd2jmvKE0dI0mwpImbBVDV0qWc1Uauf1vS2tELkgE4sUZSDOym7Qn7 zi9C23elddBsTaIaqRMh23ms4+kqzY5us+OldIBvqz3RQTRDLpC12Erd4ZH4IkuCzpp+ 7X6PInXdrlVzDS4OOJ/pjKgjZMaBPBYXYWR8QCMJEG0ZmeryIQa9G7Nm7q6NABffuTKt cvhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=3e3k1oohMwi/CIBzV4BTFHUMYD58PCHmDDNOIUgpFX8=; b=rn/cutjYTVAvsvTa75iKVKAYs9GLC/XFCSJ9TefHoJwk5CLCOBSsmIl/Zh/5tQlhEI E3rsGv40dyEYf0MtJ5BASMRGbppx71ty/f8suZ+JLUsuHmmuTm2QunnuZ2JzT0AZSB1P QXSCIyLGAt3SFRaycolT88vSq65VBvrpSyn/jUMyPGFnXY6BMra8R33qH/afoxnOY/S3 NdXWqdgMCNuD6++UgjHhGQ19Ifp7GXq5VfDdDgNr2tPs8WWwexwcrhI0k58kvulVu3zr 3hJZbSMNJ6p/Z+QBxvI37bzSL2CK1vO+tIZybJoUfFgrRAEaG9o3n24O7rKZ57CdVb1A ZBJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BwuanHBl; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 m19si69058ejc.66.2019.11.26.23.21.59; Tue, 26 Nov 2019 23:21:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=BwuanHBl; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S1726078AbfK0HVz (ORCPT + 15 others); Wed, 27 Nov 2019 02:21:55 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:38977 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726260AbfK0HVz (ORCPT ); Wed, 27 Nov 2019 02:21:55 -0500 Received: by mail-wr1-f68.google.com with SMTP id y11so22256258wrt.6 for ; Tue, 26 Nov 2019 23:21:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=3e3k1oohMwi/CIBzV4BTFHUMYD58PCHmDDNOIUgpFX8=; b=BwuanHBlSGiB0SMRYFVOhKBgOxnOH00qH53m8N+9VBllwChKBquiZU7plX/u/0yvvi 4zazPRC4PNpo6raGpYDymT2tzHhmKg0p7tFFjgDKCYls3FgoOKGxuCrCeZ8hnuC0JjLA i91EVRoHWCuPrx8DORatdFIEh9Xt5mo8daTgJjXB5p+IDEw1WUCNezFVzIM9Ws9F/AO8 y0myRl4GPXKxHS3QqENi/DlpTJSvg3Yo1n5tad5AyUlQlQXtKjabUBoTRDfJnj0f71jt ZwG/4dmE5zQnNJthKT5smA1Qeu1T3W/aymht1cjvpU2ChPqL8zThZKtUgLFdvT05X/eU D6fA== 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:mime-version:content-transfer-encoding; bh=3e3k1oohMwi/CIBzV4BTFHUMYD58PCHmDDNOIUgpFX8=; b=jyFSxIZP3ZQohAazwamGFtugak/ATiK+BlTu/hTZKt+uYUiSL0sItmg32EgO7GZCti 5L5guj1WrX9N5ReNZInoZIBAT2TRAE2KhS+iIlCMWEq86NgiFZx/rHDVu0KpHdrV6/13 bXRsSYdNqNKAH/hJfpRXzd0UrQjuFJpTqbcaH+ULG4PuZl2Al8Eg5jygYVDRXJul1A6M 4OxpF3U1g/XpdQ6Gm/PSNEqzi/7nBoRG25lD0ysv6HeVcYZVLzt/+w0f348LwtCwfS61 2YSsJHXthX5w/xBIJgDbJL4VL89tkLvNBEe1LSirBvh47bAAHZ2ABRiMBMtmpg3lHAdh 54Xg== X-Gm-Message-State: APjAAAVpr6NzSpuIhCqlUUFehue/e/PW+hKFtbgwYrwsk2mrYq2yOsR6 /QuSzZfT/UjhL+HCeFcHVu63qe9WTT0= X-Received: by 2002:a5d:438c:: with SMTP id i12mr19231296wrq.196.1574839311928; Tue, 26 Nov 2019 23:21:51 -0800 (PST) Received: from localhost.localdomain ([95.149.164.101]) by smtp.gmail.com with ESMTPSA id y6sm18151872wrn.21.2019.11.26.23.21.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 23:21:51 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 4/6] dm: use blk_set_queue_dying() in __dm_destroy() Date: Wed, 27 Nov 2019 07:21:22 +0000 Message-Id: <20191127072124.30445-4-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127072124.30445-1-lee.jones@linaro.org> References: <20191127072124.30445-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Bart Van Assche [ Upstream commit 2e91c3694181dc500faffec16c5aaa0ac5e15449 ] After QUEUE_FLAG_DYING has been set any code that is waiting in get_request() should be woken up. But to get this behaviour blk_set_queue_dying() must be used instead of only setting QUEUE_FLAG_DYING. Signed-off-by: Bart Van Assche Signed-off-by: Mike Snitzer Signed-off-by: Lee Jones --- drivers/md/dm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.24.0 diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 3d9a80759d95..c752c55f0bb2 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2939,9 +2939,7 @@ static void __dm_destroy(struct mapped_device *md, bool wait) set_bit(DMF_FREEING, &md->flags); spin_unlock(&_minor_lock); - spin_lock_irq(q->queue_lock); - queue_flag_set(QUEUE_FLAG_DYING, q); - spin_unlock_irq(q->queue_lock); + blk_set_queue_dying(q); if (dm_request_based(md) && md->kworker_task) flush_kthread_worker(&md->kworker); From patchwork Wed Nov 27 07:21:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180251 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp5735489ilf; Tue, 26 Nov 2019 23:22:00 -0800 (PST) X-Google-Smtp-Source: APXvYqy9FNOpjXHelrh5sayvdNHLD3DQHbjiJ3pTt6Vy0bL/SOTpTbVRQGI//1Tgyt4YGeWF66Io X-Received: by 2002:aa7:d9cf:: with SMTP id v15mr4255944eds.182.1574839320073; Tue, 26 Nov 2019 23:22:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574839320; cv=none; d=google.com; s=arc-20160816; b=gv+AIioh7C8QKrn2eyuVWxT2ttixqKaNxaNGVBuw5BHN5CXYWgVmdxqtdQfNpXCs6e jOLBi913tRqyhPEyHI0cSsRTWkOfZ/mRklmOmTx/uyG7kAhRsggbUYK8L/mZAkhpDGG1 pk80kcOFbBlxjkbcQX2DdXESATODvpvfpAUZsLPlNaZ9Jjy71fcHJLHkKGHECPmnONOP AI2ylm6CQHv5g55ZyBeq/gkK8t4VLFYmr8mxwE93ldTrFTVVAQmHpV4xzNhQfzGfOvri Le1AjBiFbXIgX/T5Tu5bUkX2Va/9/qq2YrkHb81BNNRBCaVj9nnRa6FQnu3mKkKLwHCY 0vxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=en22Qz+GY6oZwRgNSeL3wdglbjbmHRAr7MDxv/V2MP8=; b=Ro7XnkP7E6/QePHRhCcER1gypjMSCHijs4AFOlnmI810m1sU9DyQeerDiZyil1aFjA SjLZ8RTKc/VJkbJDHPTmXlyZMuDWz7zZuZ/YGGqCJUyBWmpHn3/DqjCX5HIkoOZ9eHmW yj8lE8BireNNT3wtDmCwoWmoWRRuVthqyKm85iZcZye89Gdnwr+XEXgdW3qSmN0x3uLu ii4C+Ad0OLLua37gHJUJ0+xlP+nF+gdu24GaGQJDHWGngAbeR3w3qslOcWLrhRplgv8s MQzCIJBBBm2ytebqyP7ptI+pL1QRmZmvctdgXQTkpCNwiEJHZrXzIZRxSzYxjJ6oy91F cDnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w9vJW1En; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 m19si69058ejc.66.2019.11.26.23.21.59; Tue, 26 Nov 2019 23:22:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=w9vJW1En; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S1726296AbfK0HV4 (ORCPT + 15 others); Wed, 27 Nov 2019 02:21:56 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:37983 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726282AbfK0HV4 (ORCPT ); Wed, 27 Nov 2019 02:21:56 -0500 Received: by mail-wr1-f66.google.com with SMTP id i12so25433892wro.5 for ; Tue, 26 Nov 2019 23:21:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=en22Qz+GY6oZwRgNSeL3wdglbjbmHRAr7MDxv/V2MP8=; b=w9vJW1EnK+g6MeSQKgpBzWbqwgwZgvJVM6yxCn3GCkNWxr68xRj8SEakKGSxOrJ4Sl fa80J+t367tRd0olbeb2UJZqGDpfm5qOiHRlRPLGKeVLXcM3SYLwsMhOpB8iLyFuak8i qQplTEdykxtSGX17DZCjBjQDMVpWMVVqb7rEqOfwyH20InEEowS/kbPIp0+yT7kdzP4b cC3PxeS2HU6zDJUueRnnnO7r2cOHmWkzxMOcPsue9Nt5WIu8AcHA1Ehjc+JH8JT+kYSq eWPTpFcRcuYZltwTLjRlUCZe5dgAHn3M+soEsL589ar+AI4JGAA1qq6C5g64g5wNYm35 kfhQ== 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:mime-version:content-transfer-encoding; bh=en22Qz+GY6oZwRgNSeL3wdglbjbmHRAr7MDxv/V2MP8=; b=fu+K/WPF7Q5tWsYQmQ8ELUmVk7U98YFqg3SdMQbLEz5BGj5iaPw45+K8zAwRhF/XCg aK/PjCh7j6ZFwEGNvgIQAjzK+9oTonCTKAk9dg7B8fmuii0+V/dkA/Bl4X5T2YJp5Qq9 K9LMnMtO6CBOoEOdz4I46YnWHU42veRewumydFmlsKzRUzk3y8+nK5ic208kCqrgcoWU MCxXMq40sQHdoiGCQDoO0dbo70k8fWWSKf18wRuyEfaT54PcmoBFyekvwtURIFZZGNoj idbGQ0l5n0Na4cn1OOUOdhBS+U9afmAfeAoTV42n+EJdN4qjAHRilSgiLWDhCD9LxUs5 yxvQ== X-Gm-Message-State: APjAAAXwj6pbx48Mkv5d8FINxew3cE4hxdHHHID1ghVgyunzniKjzuaR oVQSZ1WhxGbJIAuaBDLe6WJFIj3PtHo= X-Received: by 2002:adf:db01:: with SMTP id s1mr38451271wri.372.1574839312771; Tue, 26 Nov 2019 23:21:52 -0800 (PST) Received: from localhost.localdomain ([95.149.164.101]) by smtp.gmail.com with ESMTPSA id y6sm18151872wrn.21.2019.11.26.23.21.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 23:21:52 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 5/6] mmc: block: Fix tag condition with packed writes Date: Wed, 27 Nov 2019 07:21:23 +0000 Message-Id: <20191127072124.30445-5-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127072124.30445-1-lee.jones@linaro.org> References: <20191127072124.30445-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Adrian Hunter [ Upstream commit d806b46e5f496a6335ebd7f8432d2533507ce9a2 ] Apparently a cut-and-paste error, 'do_data_tag' is using 'brq' for data size even though 'brq' has not been set up. Instead use blk_rq_sectors(). Signed-off-by: Adrian Hunter Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson Signed-off-by: Lee Jones --- drivers/mmc/card/block.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.24.0 diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index f600bdcaf5b4..07592e428755 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -1772,8 +1772,7 @@ static void mmc_blk_packed_hdr_wrq_prep(struct mmc_queue_req *mqrq, do_data_tag = (card->ext_csd.data_tag_unit_size) && (prq->cmd_flags & REQ_META) && (rq_data_dir(prq) == WRITE) && - ((brq->data.blocks * brq->data.blksz) >= - card->ext_csd.data_tag_unit_size); + blk_rq_bytes(prq) >= card->ext_csd.data_tag_unit_size; /* Argument of CMD23 */ packed_cmd_hdr[(i * 2)] = cpu_to_le32( (do_rel_wr ? MMC_CMD23_ARG_REL_WR : 0) | From patchwork Wed Nov 27 07:21:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180252 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp5735493ilf; Tue, 26 Nov 2019 23:22:00 -0800 (PST) X-Google-Smtp-Source: APXvYqyNLVmEyBBjmX7Ot2589Id10DIxECQwBJ/l08oTT9aq0k+no3VGps9G3/aVMf9nOa1Y8d5d X-Received: by 2002:a05:6402:282:: with SMTP id l2mr31019835edv.187.1574839320470; Tue, 26 Nov 2019 23:22:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574839320; cv=none; d=google.com; s=arc-20160816; b=NBVsmiV386IWKL8bZHoKfLDdR3nd7LFl9Ub4vsfStBxtAINbSeDliLXN9MyTysLfsD 7NBEg+u36Ga3M+qwIkz2yc++vJjBsXx/WWGmj7Apycv4UnmzxcrriAhT+QCF5TzG00Si 0n6PpXzz1VoAkVCklsabGwK7GY+H4wb+vVkYKGi4DkoK/r4J66l5LUgBT4OGd7xR/Dje e7GQq7i0/KbXBHJfQzs5Ds2PbsEQ6ULfRUZqCcNtVWQ/o0dWBMViSottf2B2Cnt8uFWZ B/xH+PtvltnGz4duRzoeuDP2q6P5wF8CuQBY0XTkRmuN/4ugDYt/luaVNgRCq1gwQo4I 9/vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=eZYw16U+8nuxkccXCYNgtvJx1TG7O/vbSuX+/oKS/b8=; b=m/Yh3KGnM8ooSEk2ucVMEtMDEpnXmmz7s7Zg9akm6P8siEXoSxTfHu3HjkMNh0k/02 B+LJ60xhh7sWE5dHxk3O9SaPciBK2zk+LivRosdo1/KLaN1goXK57ZcJyvvDfBzXSkvz GSnsfc90ncnmRIReHDjDqrCl7t9SZArUDIFyEfollxRqjN8wVqvpPqAam2qE+sPpnAXP 83wy68t8xdYPQbqTJAe7pMVElJcfPgfrJMeOwzvFWPckm1ucDO4uLCPtRPdAj7UZB5ZD pglfsPCgF6/XreN+eZEx9RQk4OTYjwD/jjh5zbkxhbhGS8Ve4PW/kW1c8ea8lH5satYA TkIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JVUkem6m; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 m19si69058ejc.66.2019.11.26.23.22.00; Tue, 26 Nov 2019 23:22:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=JVUkem6m; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S1726282AbfK0HV6 (ORCPT + 15 others); Wed, 27 Nov 2019 02:21:58 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:42699 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726260AbfK0HV6 (ORCPT ); Wed, 27 Nov 2019 02:21:58 -0500 Received: by mail-wr1-f67.google.com with SMTP id a15so25372046wrf.9 for ; Tue, 26 Nov 2019 23:21:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=eZYw16U+8nuxkccXCYNgtvJx1TG7O/vbSuX+/oKS/b8=; b=JVUkem6mwUz7LUmutuOGbPEynAM3riP2XuMK7Us1xCv3+TGT3hmebH4LX9Jgyk6yyA c//7f7HoQzfSVOlPqi1lU885qL2BWLAAkjs4crY1nocRD4sCumDJt+uO1ZyHS9gTArpy zWBeJojZEg8s9yUs/PphkMplgphJUjX5Blp79Z26/X2q0cJOS5qKvosw+7CfsOj0dMYk VxyHQlsPdLU2hIB4/KGzztRLpulOZyRUAIbO/eUTjuI+iWsMHF1DUqhnGGjzI0s51rS4 oPeHm/SE3Z5tI2anEPUizL0ysd/k418IhoBYJq6SSfd8zSROMLb+ur7UxEO7/VoAU/EJ SkkQ== 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:mime-version:content-transfer-encoding; bh=eZYw16U+8nuxkccXCYNgtvJx1TG7O/vbSuX+/oKS/b8=; b=Gnuia5mcaPShMer8P8jsbuLZCEPlR+SC8AlfFHPkLYmTCWPZi0UQARD1m9k3051d7o GbIsfFPUP+O8mjW6bMIwMckYcUmdznvpS9t9R5HXZKEOIoFr4Lmfzg+5EzXwLHTHdVM1 0ekRXHaWvT1IsMgxF29As2guB73uOEaFw2KWLCtPJdXMRnHFKkh7AwYIwqH2aG/8Svzx TmiffwluQl2GVQor5XRGf5UMXFlcvvJfof7Fv554EHIRL9cHT2qgM+O1vkBjkV3PHkYL Fm/Hq/LtwLEc2pN36dPST/exanEiWhQfwuYRvgJXSHVbqaW7gTvVOjpVM4z7zsxz5FwM ft1g== X-Gm-Message-State: APjAAAVIgXst+Ku9A0SKcZEjhV6K3VbxrcEYGs1M5pHKXGiwLGbUWtN9 BzoWz9rrGxydLTGuLSXf4B6dNVVQY58= X-Received: by 2002:adf:e506:: with SMTP id j6mr42008736wrm.19.1574839313896; Tue, 26 Nov 2019 23:21:53 -0800 (PST) Received: from localhost.localdomain ([95.149.164.101]) by smtp.gmail.com with ESMTPSA id y6sm18151872wrn.21.2019.11.26.23.21.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 23:21:53 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 6/6] ocfs2: remove ocfs2_is_o2cb_active() Date: Wed, 27 Nov 2019 07:21:24 +0000 Message-Id: <20191127072124.30445-6-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127072124.30445-1-lee.jones@linaro.org> References: <20191127072124.30445-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Gang He [ Upstream commit a634644751c46238df58bbfe992e30c1668388db ] Remove ocfs2_is_o2cb_active(). We have similar functions to identify which cluster stack is being used via osb->osb_cluster_stack. Secondly, the current implementation of ocfs2_is_o2cb_active() is not totally safe. Based on the design of stackglue, we need to get ocfs2_stack_lock before using ocfs2_stack related data structures, and that active_stack pointer can be NULL in the case of mount failure. Link: http://lkml.kernel.org/r/1495441079-11708-1-git-send-email-ghe@suse.com Signed-off-by: Gang He Reviewed-by: Joseph Qi Reviewed-by: Eric Ren Acked-by: Changwei Ge Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Lee Jones --- fs/ocfs2/dlmglue.c | 2 +- fs/ocfs2/stackglue.c | 6 ------ fs/ocfs2/stackglue.h | 3 --- 3 files changed, 1 insertion(+), 10 deletions(-) -- 2.24.0 diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 555b57a16499..faaf8bfd2f52 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c @@ -3426,7 +3426,7 @@ static int ocfs2_downconvert_lock(struct ocfs2_super *osb, * we can recover correctly from node failure. Otherwise, we may get * invalid LVB in LKB, but without DLM_SBF_VALNOTVALID being set. */ - if (!ocfs2_is_o2cb_active() && + if (ocfs2_userspace_stack(osb) && lockres->l_ops->flags & LOCK_TYPE_USES_LVB) lvb = 1; diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c index 783bcdce5666..5d965e83bd43 100644 --- a/fs/ocfs2/stackglue.c +++ b/fs/ocfs2/stackglue.c @@ -48,12 +48,6 @@ static char ocfs2_hb_ctl_path[OCFS2_MAX_HB_CTL_PATH] = "/sbin/ocfs2_hb_ctl"; */ static struct ocfs2_stack_plugin *active_stack; -inline int ocfs2_is_o2cb_active(void) -{ - return !strcmp(active_stack->sp_name, OCFS2_STACK_PLUGIN_O2CB); -} -EXPORT_SYMBOL_GPL(ocfs2_is_o2cb_active); - static struct ocfs2_stack_plugin *ocfs2_stack_lookup(const char *name) { struct ocfs2_stack_plugin *p; diff --git a/fs/ocfs2/stackglue.h b/fs/ocfs2/stackglue.h index e1b30931974d..66334a30cea8 100644 --- a/fs/ocfs2/stackglue.h +++ b/fs/ocfs2/stackglue.h @@ -298,7 +298,4 @@ void ocfs2_stack_glue_set_max_proto_version(struct ocfs2_protocol_version *max_p int ocfs2_stack_glue_register(struct ocfs2_stack_plugin *plugin); void ocfs2_stack_glue_unregister(struct ocfs2_stack_plugin *plugin); -/* In ocfs2_downconvert_lock(), we need to know which stack we are using */ -int ocfs2_is_o2cb_active(void); - #endif /* STACKGLUE_H */