From patchwork Fri Nov 22 10:51:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180028 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp66181ilf; Fri, 22 Nov 2019 03:15:50 -0800 (PST) X-Google-Smtp-Source: APXvYqy3mQy93jKT0EFKL+3zC8QRcPhliB/zRFcLKGS2Hda36lfSsngsqicqBCuhRGBmyO17s3te X-Received: by 2002:a50:eb91:: with SMTP id y17mr375672edr.216.1574421350120; Fri, 22 Nov 2019 03:15:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574421350; cv=none; d=google.com; s=arc-20160816; b=cMd+FIccC3AS2eeRIdmsDrtx9iAEilRpM0bBpssdWMkvteQzaUwv6Qb6AiCTaUlwp1 vCJru74KmaAhYenr3dC2emeZMa7IosdDHQw7WOj69lAFp6HZkt4P9r0gB+5UFZpu7HGk P5lb4nJTtPMLsJb3f4tUKbvjchBxt4yPm6nLQ9rwo1cPp/hx9pYF58Jyx+YMvQsGrSeV GzFU3jtriN+Jlpx3Jmdtn1IIwkqxcYW2uy1cSsHDzTyZIZsxPP7+ONVZcXc3c57gV7b2 ULMQ98yKxqhq+FDgILbSSuvUtUuVIsSScLAKSo42cV8/0PGC4tt9b/zfd2nKzk2RdtsT IKUw== 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=hOK9c8LEfLGj1ZQvql1/dtYzUEEKXclu/9p6dFGwKr8=; b=R+Rh8WrPWv2rR87jCnOtDJ4yMDZRZ7NbIIDp9hQ7oShOhEXw8Wd2EhYkeS3HS05cQT cffrqmLgeWLIRYCKKyQ2SMoUEF+a6uAXELiyMbzw+Uz1oMM+wxZCQvWbWltKtW2zD0kA DeE+T/4RIi+2GR2ueYqPosoaHDZbtudv7KCXDrq0QSMB/ycmKa/F/98hm+hdu6Rd9ZfM jaT6jMpNm8H1+ANcuUdxd/q/sC9USuCSoC41qyyXZDPfcU1vEpUNltJDlP3L3cNSxSl+ 7Nn5CQPV6czMrNJAxvqSulPskLL2JaF74U6R0Rt6lUeUG49GPXsXpkxjNMqElKB+lyFC I33w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WICBWhDI; 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 e12si814823ejr.39.2019.11.22.03.15.49; Fri, 22 Nov 2019 03:15:50 -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=WICBWhDI; 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 S1729993AbfKVKvd (ORCPT + 15 others); Fri, 22 Nov 2019 05:51:33 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42618 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729140AbfKVKvc (ORCPT ); Fri, 22 Nov 2019 05:51:32 -0500 Received: by mail-wr1-f66.google.com with SMTP id a15so8026736wrf.9 for ; Fri, 22 Nov 2019 02:51:32 -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=hOK9c8LEfLGj1ZQvql1/dtYzUEEKXclu/9p6dFGwKr8=; b=WICBWhDIxvmJEc7PpyTMY93WSKHgLq3kfcXfcaEZfFENdrN1bqWqoqPBsjtJiGyZko wyRF6TmX6SqGKZwfy+9QqaVF2pYfN9quqczBr3TaEclRSjPKHUxTKjDqDEZJgtpgEYmD 21AoLQdHdKXLEN9f633cO4K5eHjwRL+Vr7KA4LK9mV4956R8/6EA8RvDEcPySSgzvcAo KcwP9KDMebhwxeQgZVd6CcONWCdlmHLD0jNW1Dku7DM5Xa2KRSxhIbAwEUlB3dv5WmqO XFjR5DLOViJLI6Jwmd+EMIJtMMPfzv7z5KqRl8PEyXgKnhC7twcGx+8+Ac3bBtV97Ad5 bg5A== 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=hOK9c8LEfLGj1ZQvql1/dtYzUEEKXclu/9p6dFGwKr8=; b=EHjICR1hwMiXu578DBzkCfcD7W+eZgCrYZBcDyUTWnmDzzD6muSAdQgbi2iLpv/Yxg SWz3x9haav0XXjlAPDHW+CpYUq80TQukgWQ1VLBwm7QZFwatN7S5qFMdbZNjXg4BlG/N VdOS4PMIUnF08B/LQ3LyVn85BkYqHjfhXj7FEX0Zov5a481IX8Hz1hT8vfUFcBsXl7Sz kfGewnihxhGfX5x/umX9TWzWGdHaPP/iUGk4kGxIDG0U4EK8NE3fatZOirCggkRXmpK+ K6ht1sr73lmKwU6sAu4nD0Z8fycK+7DXEuVS/ZlbWgs98a01OQV6mINOtXSDwIeGAmQU QZ2Q== X-Gm-Message-State: APjAAAV3dFjMBGLxN0M5r7cj8cZ7xYmGvmZJxAcqTzQxORHjAtvUsDfQ xmEv3Ac+ncis+3O5I08HUQL4vg== X-Received: by 2002:adf:ef51:: with SMTP id c17mr18196011wrp.266.1574419891724; Fri, 22 Nov 2019 02:51:31 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id w4sm2894338wmk.29.2019.11.22.02.51.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:51:31 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.4 1/9] ARM: 8904/1: skip nomap memblocks while finding the lowmem/highmem boundary Date: Fri, 22 Nov 2019 10:51:05 +0000 Message-Id: <20191122105113.11213-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: Chester Lin [ Upstream commit 1d31999cf04c21709f72ceb17e65b54a401330da ] adjust_lowmem_bounds() checks every memblocks in order to find the boundary between lowmem and highmem. However some memblocks could be marked as NOMAP so they are not used by kernel, which should be skipped while calculating the boundary. Signed-off-by: Chester Lin Reviewed-by: Mike Rapoport Signed-off-by: Russell King Signed-off-by: Lee Jones --- arch/arm/mm/mmu.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.24.0 diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index aead23f15213..d9ddb5721565 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1121,6 +1121,9 @@ void __init sanity_check_meminfo(void) phys_addr_t block_end = reg->base + reg->size; phys_addr_t size_limit = reg->size; + if (memblock_is_nomap(reg)) + continue; + if (reg->base >= vmalloc_limit) highmem = 1; else From patchwork Fri Nov 22 10:51:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 179989 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp34878ilf; Fri, 22 Nov 2019 02:51:44 -0800 (PST) X-Google-Smtp-Source: APXvYqwK31Ezd6EcOVNTZWONvNuw/Jp05QnWUlcfKKTH8QnXF2fIxkrWLujmJ4VvROBrK058/5gb X-Received: by 2002:a17:906:3e90:: with SMTP id a16mr21400630ejj.265.1574419903640; Fri, 22 Nov 2019 02:51:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574419903; cv=none; d=google.com; s=arc-20160816; b=wxFXgIRuIm/8C3weU1CGKwfqT+n1FzfPxErt968txy2fun4yAWvmtDo7ghU4e8uSAP aH6GeZyCUm+Mdru3vMnDip3/v+m9/kcm+MTDwLaW0e0x/XV7cwptYOKWBf8ptf8jT636 VsIslE/gX/ggC8jRfm7gz2K8Yg80kxYzAPv8hW7cT52Wza5kC2+uOdpbQYbB4QpbLbWe pU8FGFLN8D5QRIR6NmPa0V9G8Oiifc3i/Ho01sha6dkd1jsdTp9kIdn8PgB634gQgQb6 tnK1FE4VzMAiR8iAL3z0VXWXJRcLvckaB3UavJc5VwVkgOntvLqGS7nSBSCpH6eg212q hD+w== 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=Yu9KDyxptDwqLuTA7xTY8BCLlGAehUEuHl2YkpDAZ2k=; b=Dpu6q/ZwGvBQnlzQ27cNLgps+eTJtVLs8otKR7HE/U7Z9sNyy4yjMTLszX2+2HWG8M 14NIfYkIi6SPF+UCXHmzAxm7jTCcX6/HY0Ws7bwrgPuQlVhNe3GWDu9opXv+Gly0ZrQr +Ji5romhqPgWqRQU4f1bKiL4UNW//xYGvV2vr040SwAlMvRZMd38dX8k+8a/DyEmcecy 2pKN8nt38r8PGfPWUYaI7y7AtSKhIhZeleADabat+tCUPr2IKnOZMxKrzyMfQk0NezxZ TITtSfNdrhqrmBBARzh0uKMfEiS/4ydi3eq0fpO0Nd24qXHYTl0mMJ/oMBZjNnrGEZP7 i8TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=An5nyaCm; 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 y51si2885664edb.29.2019.11.22.02.51.43; Fri, 22 Nov 2019 02:51:43 -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=An5nyaCm; 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 S1730094AbfKVKvj (ORCPT + 15 others); Fri, 22 Nov 2019 05:51:39 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40483 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730090AbfKVKvi (ORCPT ); Fri, 22 Nov 2019 05:51:38 -0500 Received: by mail-wr1-f65.google.com with SMTP id 4so4727750wro.7 for ; Fri, 22 Nov 2019 02:51:37 -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=Yu9KDyxptDwqLuTA7xTY8BCLlGAehUEuHl2YkpDAZ2k=; b=An5nyaCmsN9LwBfK8eEqIspPgSCpP3ohEiPD6soKUiKPOBmAHxNQ9H6EhnAGlcejny ofUkeAVk6jcom/azjeO5xz/WxymV0FwLcQ8XfBZssXrL4XprsIjeqlqvQ7ckOOBpSkS+ t8IMhzGmYBLxH53RTHGPbCfkFxxa3u2eskJlJ5m4B+IdLB5sD8D/YrkdW1bjW256n39x X/S5ecqVFBRpe6yPPQ23Lfk24+w5sV1JS4L379yQPLhOzz8JT1t6sZMA84xEbGIg2D3L OLdQ12hlxGVu2WvABBPPeVBHXFiHe4bFT+LL5DqDqFTgvDz+6wZsOBaYWSVj/AbeChYx ReBQ== 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=Yu9KDyxptDwqLuTA7xTY8BCLlGAehUEuHl2YkpDAZ2k=; b=D9QwuLwIF30rrihdBQ5Hqr7XjoX0+OniaKk9zhowhkR/zyWYzjqcno3+d/aK876KnK 1hKxI5jbly1RMwK7bi/gJJrH+yBHLJkex89P/VWfVb5uzUFAWxsdJDyCoW2IUdhIzRqw pFFyNNESv5EQMcr1emdiiVUpjcix2+dZcLxd8tbJ/yE/Rm52vMJ7HbdrhmKhlCqa1/m8 QQTep8xmVY+6/jn1SYMxA4fqiBLtn2ZyKxOpZMcmPLBswgevDVcVzvT5pXfemQG9JQai pkFbAuajjYbTK+nIK9kya8EhfjmfBvPhD2cRLzMVGsaJCaR2h9wT19Y/Uku5mfLBlbjn WtoQ== X-Gm-Message-State: APjAAAWaWOgUnBoup129WZ6QNIFdhiSTCLNF5ZxAGX+NwGG9wR3WrCjc 6MDkTyctVnhn7o3cl1IZGh/Kjwty/aY= X-Received: by 2002:adf:a551:: with SMTP id j17mr15993927wrb.18.1574419896440; Fri, 22 Nov 2019 02:51:36 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id w4sm2894338wmk.29.2019.11.22.02.51.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:51:36 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.4 2/9] can: dev: can_dellink(): remove return at end of void function Date: Fri, 22 Nov 2019 10:51:06 +0000 Message-Id: <20191122105113.11213-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105113.11213-1-lee.jones@linaro.org> References: <20191122105113.11213-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: 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 Fri Nov 22 10:51:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 179999 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp36841ilf; Fri, 22 Nov 2019 02:53:36 -0800 (PST) X-Google-Smtp-Source: APXvYqyxFVwyKj4ac8HDlLrEn/DL2BgVXi6CtsfJM4Hv+phYz0wrZcIhGX7TVuQl8h2h8zKHzpjy X-Received: by 2002:a17:906:1e03:: with SMTP id g3mr22118007ejj.331.1574419904037; Fri, 22 Nov 2019 02:51:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574419904; cv=none; d=google.com; s=arc-20160816; b=BJ8BqPbG8EAz/OOfu6U/07ldbGJ1YrWVF1ZdU4brGKa8fACFZcntd61vbKmHQpfyRr lie9w5AhTaHjhSFq7eDnJ7P5MVPvB65wS/9liCwMKk8nqkKIZmSY94OfvsyzuUAnyADJ nWjnGrMkGX+PWkcdbWIlCMwYtckn51u0iqkqT9Oh1o65t5zsnwVl2NV2wAkwXWmJBqk8 Xi7xyYVdfBeiA++th5SdfzyEGKVtgWq1o/HYpbxvVd/9OiK/zy3DCnEqDoJjzqH9TAQ/ rLTzIYWlP3ldPgLn/zzNEftSzbQsNzmrIvzjH2wyGNXYGmBlj39NsrPb/D91eFiRfBYK W/sA== 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=e2LPuV0qYbiH9R+FF1KlWPA1vM09QMNklY/WEwTeTuOVGp5EloRAiVmHvCh8SWTBoO Se2Zjl2QFVyUDlrXsl+/wxficIDew5OUeL/7zQpTG1JGTye8FVHjxl6YodlHHWAyB+Hn MXkYQDW4O/c8jzFxU3m0pX98P8370mS/WFofnGA2noFj0pGHDne7T0Kme5lY7kKhGXnJ qyYhecSszkZlK3SOiwUp6RsRU0883x9WAH33RIPNK/KKhon+neIw1o0Jp5fEd1CtPArM 74QkwV4pjjJJxgWF0YIs6IKOtGWBlyW+JU+sK+JaFCBBaFitAcns71732eRYrVr8qgtv 6wiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ecezFEN5; 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 y51si2885664edb.29.2019.11.22.02.51.43; Fri, 22 Nov 2019 02:51:44 -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=ecezFEN5; 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 S1730007AbfKVKvl (ORCPT + 15 others); Fri, 22 Nov 2019 05:51:41 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:33508 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730083AbfKVKvk (ORCPT ); Fri, 22 Nov 2019 05:51:40 -0500 Received: by mail-wr1-f68.google.com with SMTP id w9so8103876wrr.0 for ; Fri, 22 Nov 2019 02:51:39 -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=ecezFEN5tASpm9yGZqiy0PFAxq9dAZihSqIw8xLd3ulOl4A43rbKLoismCKETZl2BQ xbKABtiUqRdQI7Qx75AXrqC8KPqhAMBYabuwsPZanVws3SmthfPZHQHuPfvin7c3aj3f KGnVy1Lixo9g6rYMdOL/qwyO0XdYSr/ObVZpSloCPQm/9wRVFMZsYoGKp37GBETsTx8Z R0HbqooUVf1hJWzGjvVUkpKV7QFnk2wFHhOPdWeSzBKwntImeY6gLy8Scjw/52SdoTKl bdVwlUHqZqBA+5k/dga6IoukJzBbFHcEqF315GD3uk/mYFWSz92Qm2xp+DNkZrvxmTJD zxjQ== 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=GkurZ7KubvywH63/RwRoHE6wr59W74vxOyqAFsA51z/YFECguSO7zFtS97S9/C9nPf LITZeBJsDsapFw57aE/sXVJwk+pfRS24EKkn8id13Q+uxlu4Oab5tRs6CfgQKlvdUz46 S4Epr54aMODA0LBKu5sUPIkIvVQ5o40N7yXHyHeiLHGrWFnipJb0oX7cKSOf/KSW/Hy1 hCOo3tvvCistAmGJ057M0cnKsxfkDwtD/GZ34rmcDLSx063J3r8XCnpzRLYPx0C+IAHH y5GWk7XxRaVDVHYhd/973KZlkhlYvYkWStpgbEeDOTvYfU367JaG0AZrfRxVGMbiyT+k Ijvg== X-Gm-Message-State: APjAAAXzgwlrY7lUUeJrfVkNP3rHKh1zfbyuPnYZ2E8/228sAj5NTkcb WxbuthJHT0tAGTt98JeflDHqIQ== X-Received: by 2002:adf:e68d:: with SMTP id r13mr17981459wrm.199.1574419898594; Fri, 22 Nov 2019 02:51:38 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id w4sm2894338wmk.29.2019.11.22.02.51.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:51:38 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.4 3/9] arm64: fix for bad_mode() handler to always result in panic Date: Fri, 22 Nov 2019 10:51:07 +0000 Message-Id: <20191122105113.11213-3-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105113.11213-1-lee.jones@linaro.org> References: <20191122105113.11213-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 Fri Nov 22 10:51:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180027 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp65963ilf; Fri, 22 Nov 2019 03:15:39 -0800 (PST) X-Google-Smtp-Source: APXvYqx5dmSuFpNkqkdO7UNnA8ejDRNX08GyzdksxmuApNDaR7sEkmZXmpVatDBCBzNrQZq9DuDE X-Received: by 2002:a17:906:4304:: with SMTP id j4mr21293974ejm.10.1574421339659; Fri, 22 Nov 2019 03:15:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574421339; cv=none; d=google.com; s=arc-20160816; b=HybudEoqGpehpDaeVaiX5vxB8bnyDVeKzY3XGvnZ6DBmpVl7s1f4USEdwLZBq7Xmez P4qebL3co78wiVYfoa8bOW8UgiOF9BUpRChk+B9sqQuZFqKp/+KmmoZOkyV9+jxso3Sp qRC34bal1nL5qLVe7YUJxs+j33NE7Y+2B683HS2g7Ge0XgxVSkfhqSOQ5vl44JNu9ETy X0reDYE7RjerpKdiCou3lmuSJdJ6pMUyn6Og40rj6I1BhE1dqbyiosK+js6iNpmhIE/H iVDF64ZArJhMsMNL3PXcDXi0UNcfYNbjoX+3aksOsVATT5xgT/DNIub/M/Xqo8xiWAkk eNwA== 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=L/JAl7CA6dMt0XFY/oL59i1hPm5dHKpHH33aXcaHhORAlRrF9IYkyoS5K2rrmzMhV0 5LKeRhgiof+8jSa8ZL/RVzJssg/loBmnl5EahaikQECqGAPO74UMS7EVVDikH2e+o3+w JRa7b8hB7nTGezLWgNiaQoPLVcpxJQZJn7TIyiFtwTWoBX3PQitYdH1+g6EJZdqAgZd3 Z4uHlSO/T5T0tNu5PJKibK3NEoB8Mx6MxpgO5dQrwzgIR0PgKq/B4n3wij4vrP0jwOUK dRHDLm1vFYIHZPNG9MULO81FD8xbbVI9GyrwmoccFN4cj9G7HAcIP2idWk91gog/LIzg YvIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VisIS0Rk; 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 rk11si347318ejb.359.2019.11.22.03.15.39; Fri, 22 Nov 2019 03:15:39 -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=VisIS0Rk; 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 S1730083AbfKVKvm (ORCPT + 15 others); Fri, 22 Nov 2019 05:51:42 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:41653 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728236AbfKVKvl (ORCPT ); Fri, 22 Nov 2019 05:51:41 -0500 Received: by mail-wr1-f66.google.com with SMTP id b18so8026415wrj.8 for ; Fri, 22 Nov 2019 02:51:40 -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=VisIS0RksZUtaeTkk3UvDcdVc3/4kSCMfopBofj1/6RYKTV/xeb8UwMA2RaoP/wXRG aL87yxgB+jGx48F4PwfXteIyxKuU/v87DNSlurHO+H/XbZXyvUD9JVyQWKjIYoxpVdgX r7mxnnq/ZX5uV3VgjG4vdaut0K0/bwtMsYnXRqpbe0mDjZVBKTkBHuPZr+n+sR6pEeHC DIQeI8Hv7U4jdO2kh8024mFTaiyW+a1OfPRBAF6A08jrS8YY42NTkR5Zl1pDeUttDmLt 3yJbR0yDHGcqD8qTPSUXvg+RX5dWVQMbkA8pmFaG/+Y9b0aWIcv0tJNjZeaHXP1bqYwo p3Hw== 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=iMLq1iI6+FXBG7v1XjMkYYAe3myc2eTsJzNEr+rhtwLJFs6Oz6geujhHMFXPD8kfeX CXJz0qZuxThX1QwnzK55X2xE9p4T4a8MUsvsZoe6yCbNOSrnK8g1NBOGM3hMwXKJeUQd 2MHUieLzLC0bCcq2K6nchgAEWHDgYP4BQwsvxr1rcWxtvylkqXAdzbKhlGqfYNRvvNe5 hGdeCMzNZtK75KSXEJZhd/JPvvL9SWRbR9FvQvmSEs1foics8N3qFRQL+iz6apYo1a1e 2y4srOmQ7Ke1/OLmVAZ6tB52PnncJLtsefIq5OeBa61IIag1m/i68fmnMSXorFHSJTRy FrDg== X-Gm-Message-State: APjAAAVQSYrpCiZd7YRgRvoa+8F3hQuWwZzei+pC2CVCJUIPF6dRLQxG 8D233nt3IjLnCcMMCUc1TtlnuQ== X-Received: by 2002:a05:6000:354:: with SMTP id e20mr1167456wre.17.1574419899560; Fri, 22 Nov 2019 02:51:39 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id w4sm2894338wmk.29.2019.11.22.02.51.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:51:39 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.4 4/9] cpufreq: Skip cpufreq resume if it's not suspended Date: Fri, 22 Nov 2019 10:51:08 +0000 Message-Id: <20191122105113.11213-4-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105113.11213-1-lee.jones@linaro.org> References: <20191122105113.11213-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 Fri Nov 22 10:51:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180026 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp65956ilf; Fri, 22 Nov 2019 03:15:39 -0800 (PST) X-Google-Smtp-Source: APXvYqyFS0jT/WUl70v8vq3LJEnZIWe53Q/pgIVNx38O21hgxnlvTiKWPmlsx9VDOzJIEREjXQ8P X-Received: by 2002:a50:f699:: with SMTP id d25mr357725edn.72.1574421339238; Fri, 22 Nov 2019 03:15:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574421339; cv=none; d=google.com; s=arc-20160816; b=KyKKZGdKgxloJup4IdiwRo87hy7x63/QonaGhkWaB3T7B4d74BdZ1wHiJhXqCIXn2r eD9zX7cnSi8VNbe5qe7FzXQUH2Ih6WxrLQw1gJafIwdWzBPFhkiYKiAy23fyE5w20k9F UOeo1kLYWx/snvUK+rMtx+ZSvqjXNFHYfgj9juLd11g9SrF3u6EP9kurXslKheHTsY1V W393a2sMPIHsXdpdlIgRjEYm4IB2wzmd2F4V7hdWye5YxlIbTX2cSd62dNGSBhf8A7rL 6SycuHqJ+4JAMHWN98mIygGj2CAyn5w1n6/Cp+TePuszYp/2EtXsmQa3LiiZYX+XSsol XElA== 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=xoswTEced0zgBg3f0q2Jl0pYmerTX2npX5p/p8vJwQY=; b=VMINLKMT4SzBxX0M3tt8YTsYvubrcyOENWWRdkUxhmw96c+ctO790J96/jD17suqC/ rzbwwDln7lIyiU+vKg2fv9rHqBKVF2TI6qTEdQ4jKhPHcEVrR96sxq86rI+a16ExU8Sz d2lKfEPWhG/YnsaO+n306e0FZEbOUnuaH5J07c5udJjmm57uj2NuoDKKycWyyaWc2L4z Iitnh52DZ3H+guqpeU1ciQL5rErvSCXJUwatvANUBgoz23ghguPEkCOb8zwgMCetkmJr nZFwGaiD4E6jDJpZzs5Cxs9gGjdjUGyTQRw/qLo3Ed4YXAZxf0FDZYv4hS+3O5KeM2Sg RYMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d0fRaHbG; 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 rk11si347318ejb.359.2019.11.22.03.15.39; Fri, 22 Nov 2019 03:15:39 -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=d0fRaHbG; 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 S1727184AbfKVLPi (ORCPT + 15 others); Fri, 22 Nov 2019 06:15:38 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46089 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730003AbfKVKvm (ORCPT ); Fri, 22 Nov 2019 05:51:42 -0500 Received: by mail-wr1-f68.google.com with SMTP id z7so4625307wrl.13 for ; Fri, 22 Nov 2019 02:51:41 -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=xoswTEced0zgBg3f0q2Jl0pYmerTX2npX5p/p8vJwQY=; b=d0fRaHbGkO9SZLpmTd+orsxx3VQXbNb8pQVDFeYLwJxA6KQ0sZ9ND5lJ496yR59TAD FerJ3hEcnsr58Kx8f/Xe12ph4bqaMpDJk/8URPW4eNbzyqc43zUYqB5Pz3evcAOkbBdu aZglLxVtHNDLFvlNXxcqDkZmilVa4qkUcWj8tF2zFaE8l4k87e096b6/y9xj+bZVQED4 6wv9xtQnUJQXRfDHp/I26rCOVvyEF1BWnf4pLuC7jix4pRb4eweZTN+M8E8UDOzST/eM rqbJZjrNRJ2vUbTkAbU901BTZeG/f4dNSojpWQso6CI1tZ123UQlULz3xPLaYeyGeTD+ Mtxw== 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=xoswTEced0zgBg3f0q2Jl0pYmerTX2npX5p/p8vJwQY=; b=L79zT1WO6pyajvjSkYts7lRK6dURV0UxrSJWSK/zZROZBNQvLOCDQyHvs0L14yRAHg yTjV1haUrtXQZfn9uzvNdN7zMkG/OEEkm0iKyms458AZZAFTzsqKTWywmuWmiL3+vViB 41h0GJwAlx+0rzXnuadinnvNcwbw+5dLWpkGqpgGEP3mU5ODcNGlYmiksjXbL9zUrkde WPy09jYCix6lczL/V0Gyfku+DjBTYo/euGFVI7OEHv2dCR4GS6YSqPgjuYn0YPwnZfft guc01+r4UTqeqwY3JULKOr3xJ3q7pAnIaDuGAK4429uxB34IiFiJwnXRwztm5y/2kGFW wfbA== X-Gm-Message-State: APjAAAWaOLLDc+mRMhN/HVMgHxcC/GFRVU44bnLGfDlMU1QKtSjdBrIY ArA8xJ3L24fg4jQupmRNjjy+1Q== X-Received: by 2002:a5d:4b05:: with SMTP id v5mr16697880wrq.210.1574419900607; Fri, 22 Nov 2019 02:51:40 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id w4sm2894338wmk.29.2019.11.22.02.51.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:51:40 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.4 5/9] bcache: silence static checker warning Date: Fri, 22 Nov 2019 10:51:09 +0000 Message-Id: <20191122105113.11213-5-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105113.11213-1-lee.jones@linaro.org> References: <20191122105113.11213-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: Dan Carpenter [ Upstream commit da22f0eea555baf9b0a84b52afe56db2052cfe8d ] In olden times, closure_return() used to have a hidden return built in. We removed the hidden return but forgot to add a new return here. If "c" were NULL we would oops on the next line, but fortunately "c" is never NULL. Let's just remove the if statement. Signed-off-by: Dan Carpenter Reviewed-by: Coly Li Signed-off-by: Jens Axboe Signed-off-by: Lee Jones --- drivers/md/bcache/super.c | 3 --- 1 file changed, 3 deletions(-) -- 2.24.0 diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index e42092146083..58e16a3fb3bd 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1395,9 +1395,6 @@ static void cache_set_flush(struct closure *cl) struct btree *b; unsigned i; - if (!c) - closure_return(cl); - bch_cache_accounting_destroy(&c->accounting); kobject_put(&c->internal); From patchwork Fri Nov 22 10:51:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 179991 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp36366ilf; Fri, 22 Nov 2019 02:53:08 -0800 (PST) X-Google-Smtp-Source: APXvYqwB9jIInWdD57U+kq21GtRqyIrC2m+KOy5lO02YReVk44CFfSBuWt3RTReK/tmIYnf22ERo X-Received: by 2002:a50:fc18:: with SMTP id i24mr253020edr.41.1574419906481; Fri, 22 Nov 2019 02:51:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574419906; cv=none; d=google.com; s=arc-20160816; b=KhVONk+ZpWarjdtxcWReeDbn5WmOz40WYyUmNYaEpBNYjtGKZau5pKzsu2DdfnnjHA YLZ37Vxkbift4qFNvo7bafUTTURdWUj77msfBPrf39cIEu4VkwZPc1S0cvaqivVDalQq DrEdLwt3U9ZyNcLcU07ag1He5tNW0Y1MtlKxx/jobP8ttqHqG4tyQHWA5fEzFrKhQ7l3 i8NGvpLl36PF8MKaBM50PcMgijZjo0RpWQ8XncasPemvk1j8Zm0DAqlID34LUBQiMtdD BnES7ElUkZNuFBCB9WBjALWZ5VyHc3qhBpa/EDj9TuHcuRWebkR+/lnCVreifsOfqjfK izDg== 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=NfFazw8r5uFLEmj/i7KsMmGBB+inPOfprG84C54kLtwh7T6Sg/kjpr3bZxjmHhK4aY 4GMpMMwl4aEMBPXvPYqL1z8iEi8t8JQUz5CJOagZWNtPO5UuC6rVWqNA8gPd4tV2/KbC +7FIzFyHLFFtpL6aPIBL6MvstpXQjMwGe4hUihyw53okvvQKC3KQpctaqKoTeS7E6TQn dNTnOWKyibtPhpcN6AalpE67JQFAhqk4FGjRPnVLgTKtSd/cmprosoDlDcg3LSg01XOe OBLn1kSbaFxe6Wdpy8UaDoog0PCZA0uTSzl+LfXZykCcYhePEKYCfMi2ydatr3uG/WIe H8lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a+S6XuN6; 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 ca22si3912836ejb.22.2019.11.22.02.51.46; Fri, 22 Nov 2019 02:51:46 -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=a+S6XuN6; 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 S1730105AbfKVKvn (ORCPT + 15 others); Fri, 22 Nov 2019 05:51:43 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:37250 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730100AbfKVKvn (ORCPT ); Fri, 22 Nov 2019 05:51:43 -0500 Received: by mail-wm1-f66.google.com with SMTP id f129so5706519wmf.2 for ; Fri, 22 Nov 2019 02:51:42 -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=a+S6XuN6DLpHQmyuKX87vN0F4OV+FjAfy2BG0BOQyhpiTyPVCs+b2ocA7lPK6xouDZ ZajotSTaPKx3LcttuXSt2OqYJmXD/N6K649gRa/kVR+XSXDoLN0VE15TXxscNh0RBtf3 62nJEHwnXUx6MaHsIpLY2ikzIlGtIxCp2/sDs3T4iHQ2lVUWlZB8uPjN51DQGSybt9b9 2cGXMd30cZFAzVKZQLSSlWu8dysm/oI8sHCCA3nJMRCM3kZF6+4C/zYUl2IiLpQ5YheB LtNWHPggcHDCjrqkPPKp4sCYXA9cwXya36dnT08dG5uztxfg3/WlyttNi+U/UyB8MyYY e1Ow== 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=Uo0fhqhbqscohMK7cSIuAqKdhG3TLP2+p/IxSWj2G5BSWrb6ab2GPKGfZVe5aiX43G n9CRd0efGcP0XYlFkeo4J8KqjAX3rRpow+DUgWFslfIwGvY+GhhmmNcF9+IWMHaW7l3K WPR6GBbyyTgY3VI2hPAKNWHn9vnihMTZIu0XtJA9vlJ4HYUjWosicNCEeiNpCbOmLygS SPTkwSTnnJPjDtxOaNnev1K2zXiiXdRhCld5EPBse7IPJEh+DL3ufZeCZlvNVKtcYcle 3itKGjYi3Xe798Qg67mILyMT43u8BDiICXQjRRDlb0BHxuhZszKMFhDXCuKcFHFhCOf5 JLZw== X-Gm-Message-State: APjAAAXpkW1/E7z0FQdExmq3OJz58XNKAWl18Q4wnt03W8ZJUcuRNm1v zT2zoJvztrtjS85qfup7QNhz9A== X-Received: by 2002:a7b:c08c:: with SMTP id r12mr15674067wmh.67.1574419901594; Fri, 22 Nov 2019 02:51:41 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id w4sm2894338wmk.29.2019.11.22.02.51.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:51:41 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.4 6/9] dm: use blk_set_queue_dying() in __dm_destroy() Date: Fri, 22 Nov 2019 10:51:10 +0000 Message-Id: <20191122105113.11213-6-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105113.11213-1-lee.jones@linaro.org> References: <20191122105113.11213-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 Fri Nov 22 10:51:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 179992 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp36440ilf; Fri, 22 Nov 2019 02:53:14 -0800 (PST) X-Google-Smtp-Source: APXvYqzyXwEiDbEF++KX8bFyxYlE2Du4yJO0RNrdydTlNGLf4alCFqZwvVwI0gsU0AmC6K2mfusi X-Received: by 2002:a50:ec89:: with SMTP id e9mr255263edr.104.1574419907259; Fri, 22 Nov 2019 02:51:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574419907; cv=none; d=google.com; s=arc-20160816; b=eYitlR0TvQWALHQMimiFs5siSaEPvIdUCgB4ybMjSZ6lF/JT6YiRVK0X/PHLl2x4Ji f+iIu6JFEqdsZQ76Ga7dT+pIs4v4gXPsMqr/aTSbLXvHZ+3paelNbvTwX6OvbemZY7tz Ttwk+3xhZCTWzAS8MNGl320/WpY/rNBQ50aY9FZ55nCocVj0CvI46myTeD4Gq5ZPSAk7 9QYSz6OOn+19vMaRdFXXSMQffRpFIOunoLf1NLhH49Og1moG9pvo+TJLmWDD2T/r52nY OozWFDt+pUjlFLdRGy7gxKD8B1S68juelGBD6wPVjSbJWcu2aqOH/aYp0/cWPYqwiXRZ OU7w== 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=KYsBHbDlxPPmITa2OB5d5XDd2f8eg3keyEz/vkYQ67gzTd8iLyu+YZZd/HhAgTpp4T 8A6qj4SuDlTA6oYmiCUWyMdcLEQHH6nLP+PD6NI6DU9wUbYHwKirSJVEReZYeHVeY4Ns kpEPNoVyz33nmJPYG0htV13XgN1Rkj8H+zlLIyVEibf0oYKvHWabJT0iJTSYIyCSpc4L 7RDTEtk4ongarh/krprp5S9pssyyVNhgarRMFomEBnt/FnrA7kU5uXi8finuZRcRco8j pn0BTtJaP2CxAx1H/KYhVVERT4ty8g2A6jx3ER5ZengM8cW62ANeuwGeup/WAqssdYv5 yflA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ImlxrSHD; 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 ca22si3912836ejb.22.2019.11.22.02.51.46; Fri, 22 Nov 2019 02:51:47 -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=ImlxrSHD; 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 S1730106AbfKVKvp (ORCPT + 15 others); Fri, 22 Nov 2019 05:51:45 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45518 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729187AbfKVKvo (ORCPT ); Fri, 22 Nov 2019 05:51:44 -0500 Received: by mail-wr1-f68.google.com with SMTP id z10so7997169wrs.12 for ; Fri, 22 Nov 2019 02:51:43 -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=ImlxrSHDuMxLPzF3ssEu96SgSAOzmmKxeushivYhKfcF1a6j243TAAoSwWGCKdqeI+ qNHcUnz1EqqoWOEVie5BpvoY+7RDTOqcc3v/9K5DUa6UicVma/71ezoK77tNblU7hoA/ 0gJaQFbCNI1BMKO11oMuDJjN0Bd3/4mf03BlAnzogVGUiipBXxgnRtVXS5BztsbxTxXm o3xMyD1C1Ymt/VhH0P1xBJgOegO8e62yYrv52ZT/DbQxBNByiWHV+VPd3bt2JWFLqf4A 9S3OdqEvgZKwpJW2pL5aizEWRUv6mLq4KmnEqlAZFznvc58EJbS5YjMkBYFRZ2qNfI9M u/+g== 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=MzgJWw6GTwOt7hB+rzJiQI+aKGofkak9+wZPkhbdfWxYT8+ZazxmoSFB+sH5n3+kpW jKb8DvK3Nj3TvbwjAnXIN+UOJOabO4jXtpStClHZOvEaP1Kec5VBlc8LF2r8reCjGvFg VxjTOjlLHPmOaRaylRSaTGU4mTq4kNntK9hgkAp8ctzre3XJPIvu0CB4+AJaLSSUfz3/ ON3aaMxBV5qMLX7aiUHcfXvSLlyhrejyLgeoQQ/ZwR8EvLbdKr9khuD7fHpIdSLcmOmF IwrlG/aWzivRLCtY91DkaUHIUUZEEe9P3WK9Yz4nyz4iwIua026zIR3s1dAPUb6vVn7x XZpg== X-Gm-Message-State: APjAAAXr0tqAVc0pp0HTyBauklbXFfQbTYenDgrPKhxWin8Ra7SoUZb4 8LoqcZ9/4nfTEOH3kC7mWsfCnw== X-Received: by 2002:adf:edd2:: with SMTP id v18mr16130223wro.253.1574419902585; Fri, 22 Nov 2019 02:51:42 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id w4sm2894338wmk.29.2019.11.22.02.51.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:51:42 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.4 7/9] mmc: block: Fix tag condition with packed writes Date: Fri, 22 Nov 2019 10:51:11 +0000 Message-Id: <20191122105113.11213-7-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105113.11213-1-lee.jones@linaro.org> References: <20191122105113.11213-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 Fri Nov 22 10:51:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 179995 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp36638ilf; Fri, 22 Nov 2019 02:53:24 -0800 (PST) X-Google-Smtp-Source: APXvYqyBMd40rSp06Sc7xpqUOwdU2uUMU6SOptET5EYKK2j2efrBueGC/Rbc34F9IgqMfoLWg+Uw X-Received: by 2002:a17:906:4bcb:: with SMTP id x11mr21998613ejv.100.1574419917914; Fri, 22 Nov 2019 02:51:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574419917; cv=none; d=google.com; s=arc-20160816; b=k8RsQroYFqbxsTRkiAixKuqmCFq7UsQycHfS68fSf30R9uP3INPp5jqRpWRszZii7K 2vOn5nLwT0pCqyASBRUSXttIQq/AJl2TeNiL/wsj9Y82oFZ8UKPLlEuDEfbeYjcI4a/r vLDAyPV0efj4gRjGCXeJKzF0lVX0UzJk4XmCk4ox6pyLExw70j6hNqVlfB7qPGQzjqt9 skbs9O4fBvUzTIk91pbjGyrLj3CdNj6UeOCCJrc0MXoM/BeVVKKthn8FC4O13Qr9Pdfp ThKU/dRCqYv9miTnZV5XmuJha+rIkbXfX2hRKOj8UWBkCnSysrSpmd1/T/1ufmDM9M80 IbVg== 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=RiXeKeADHx4Khbj3rbwgT7B/1RiAxXdpDe0CNwuxf2aHNMZXsS6wjZv/+xdW7qswd/ 0cMiklb83MzOdgh76OjViJT18DUMygijRL3Ecg1u3TgUKwkuvW051tFdyUqg75ls11cp HT5s0N7F7EAUQTo0JdyvQNKYdn8wlvTFMkxG8kbOcRIkRZYKZMXbQX3PZOllF1q7gdli eK44JJw+9BhaDhk/MboNOCd2aJKhVzQRVjRuwH+2eh+LG/X4Ww5DBW4rUJXjsBwWPD5c NoMG7Mhz4tVbsIJVeo2Bs1TpK4DAUSnaaJZKwiAM78sqhNhL8UyYoB+7RHtLd8gVEVFW R9gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XVNFpM3V; 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 h2si547902ejy.259.2019.11.22.02.51.57; Fri, 22 Nov 2019 02:51:57 -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=XVNFpM3V; 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 S1729892AbfKVKvp (ORCPT + 15 others); Fri, 22 Nov 2019 05:51:45 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:33528 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729177AbfKVKvp (ORCPT ); Fri, 22 Nov 2019 05:51:45 -0500 Received: by mail-wr1-f65.google.com with SMTP id w9so8104214wrr.0 for ; Fri, 22 Nov 2019 02:51:44 -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=XVNFpM3VQfxOeyUpUkOYYjbuTvz+dyp2Rfy9HnWGMHxyB7pyJKqjBJqgGVAPImm34o cAf70PF7zG5P0mgHlo2ayidtTp5vhI0pYiTfaLZ/X8iAlPCyzcJnY7t0diq8psKCYXGG a6dHwl9x8etMe8peebxVYQwjfYnAvhDhvO+CJfq5peCde8uxbXcDvFZB9gl924xOAcbU yRZzkio7PAnWtiWNzBhYxvWuACfFi+IbqodnRe1XO8LuUWROP+UTIQkrEjggW6KonsFq VewFF7C3Qpx53Hso14xzYYWKVVSp6vHUTkVFuIc9A8+gmtTAKd2jtAXEjP2NuiTxXb/E DjXQ== 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=kgJuLKd8i54pi8sZGwRnU0W7VMD2QtYAiA7vfnO0paSzSp4S/YugautAD74F7soROW EywToh1KYgVIeSiW+b5isOaiuMgikkwicazhrV+hKVTSsKaj1r5x8fgS30ihcaQ+/c27 nyZYzGxyaaEjiRuQn7foGAq+7FN1vhiS4R7lbW6GVMjZRVBtkCI9EAsf6q5bFCmuNVGy HeecD0ASJrAFcHpzeawrsI8xIQfFPpXZerDKa/x+XmQDehTgzkA+eLLZrIsFomFfa7SU Y9FxJfqiEqxJ77GgdF4iywzglksCy5F4NKVHzAYYV5eT548gdbVkf4iX3LwePBwFbGyQ hK9Q== X-Gm-Message-State: APjAAAWRqFT48tj71XvnljR3M5ip94u7eSsGWERNdxkutB5kFbIMenWU Ic7+6QlVHwlHXi5BbkfyBJNZew== X-Received: by 2002:a5d:4c8c:: with SMTP id z12mr16899509wrs.347.1574419903537; Fri, 22 Nov 2019 02:51:43 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id w4sm2894338wmk.29.2019.11.22.02.51.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:51:43 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.4 8/9] ocfs2: remove ocfs2_is_o2cb_active() Date: Fri, 22 Nov 2019 10:51:12 +0000 Message-Id: <20191122105113.11213-8-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105113.11213-1-lee.jones@linaro.org> References: <20191122105113.11213-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 */ From patchwork Fri Nov 22 10:51:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180000 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp36870ilf; Fri, 22 Nov 2019 02:53:37 -0800 (PST) X-Google-Smtp-Source: APXvYqyc4jo7mzcWMqGsLIgRSGpuKlIlmOiYUEXL7OZWsE98hgzjewloqWx9v58kC5vprH/y6uvg X-Received: by 2002:a17:907:43ef:: with SMTP id ol23mr3460678ejb.264.1574419916544; Fri, 22 Nov 2019 02:51:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574419916; cv=none; d=google.com; s=arc-20160816; b=YkAavJLPHoXpu3Ky7QNrYeeFiQLmEBAipbBiBgHc574nQkG7hQXBsYzNzZtAh5BWOy EAvjNkHm+kpIw5Qf8XY4tmFo2Fw0jAg0AkYiZtYTVz5a+SCt3xdIL08lfCsAHWNsZoww MgGRn0MbFh3i79Z5kRYW8LM4m8mebrvN/HrukM2pZ/qeNwMHN9N0w6wrcN0XFq6cu0YS kBGbMSZaTq5iGmAbC+9JxkfGb+S/gG/HBh2YHTRTIM4VHKCrkM0hZ5u/zc2BcrFnnDEN 4t0CG3SWoLHgav9h+6v8RVR/4zs4GgFSOP6r1KOIqINmv7E7Pp3g44o5Bl240G22Niq+ eFMg== 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=IYvLW8dFLd2i3abuhtpQEsje/E4kH68QhKyD7uWKyBc=; b=VX2MDa26ZhaVilWPeFa0q2zQGZuU4su2Ej6oOi3rm2RmQep0S5KKsr77g+HY7icXr0 4Q0BQDhzAtLzKNm9GeknMsQAOT1u8XXzkDwIHhTZGuvRggGhfv9J/fQp66WjlbSZXIa3 D1gAnXJXBQkVi8PjuuVzA98mqzQNOGhGnsSlbyTgRnkLMuvmPvsaiwQV7Rvar/vDvAQk HeK39XaYR+7/3ORKEXouO/68pIYPTaSzailUrzT96SMXjW/wUqkCUaBpEt58K5RX6H9x IcNsnWB+9F5QH85MF17MjksbxF2sy3TGsr5ZwA+U9PWgaxQh5KPeR0j11gSRCHUNfNes e+5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mizHDut5; 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 h2si547902ejy.259.2019.11.22.02.51.54; Fri, 22 Nov 2019 02:51:56 -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=mizHDut5; 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 S1730009AbfKVKvr (ORCPT + 15 others); Fri, 22 Nov 2019 05:51:47 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:36812 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730030AbfKVKvq (ORCPT ); Fri, 22 Nov 2019 05:51:46 -0500 Received: by mail-wm1-f67.google.com with SMTP id n188so5121796wme.1 for ; Fri, 22 Nov 2019 02:51:45 -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=IYvLW8dFLd2i3abuhtpQEsje/E4kH68QhKyD7uWKyBc=; b=mizHDut5vTuyzETw7KbpwD+bz1bUNIbTnGzACpyTFp33vtbIm/uniwWpJeYuRxNVU9 J2B+URcM2A9bQ31Le9jHZsthBuQPGDTNYuKLQNtgt1WFXyy2eUGiiwY3GtQw0MC1oOlV fgPLDhZn1iMbY7/ynH6B2ciGxNy5a8qlenfdAJcrfBNfhi/YdQ8MlIMJNfVVv7uW/hSR 8MW5SMcuLOwRW2FT7zYPtlOzEbDkWXkxy6mKYMpBNNZBTIN4wNnuWWD98tDs6RFMpxgX tJQa3SM3a+aFBSInP59S50GfDs0bFIXNcYCYZV5XuJvgX4LzckElhLKv4jybyw77LaeB o2uQ== 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=IYvLW8dFLd2i3abuhtpQEsje/E4kH68QhKyD7uWKyBc=; b=NgFy8K3rMfiOkBex1EsGn/tELaohyPEl08LUDmGPmCx9AlbbK9eAVIwpPVHLPBRYhH 4gUM25Lc+RP9AOlq3p+QYqYfgTLeNx0qOqSqygrQHa73/Ynn59GLKvnFsHhUliFK14FH M/xmbGrWmZwW8ykDcfh6g+bPab1ZrdUh0icVGRo0SSv0xDrdoA0YSCOLKmHWR1eBqOz5 S/+IM41ejo7qudqo/p7dBroVcwjTNiStCFQn4By0paKaDXpvTyECF1hS80jOQBpmRjnP h2GtxZ4hOfX8VriCx7zgdTBS7DRB8SzkwO+1W4oQQJxdGks22Gk+oZ/sCXAI6IEaVZah /Klg== X-Gm-Message-State: APjAAAXmELdjFFxa7z9t+X4Sq5FWt3K8fxEEMnb52gw3fgBRrexTRRp2 aSjGFD3SKTC/TOvWkRFG0Q/cpbXlQ4A= X-Received: by 2002:a1c:5603:: with SMTP id k3mr16874605wmb.150.1574419904536; Fri, 22 Nov 2019 02:51:44 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id w4sm2894338wmk.29.2019.11.22.02.51.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:51:44 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.4 9/9] ext4: avoid unnecessary stalls in ext4_evict_inode() Date: Fri, 22 Nov 2019 10:51:13 +0000 Message-Id: <20191122105113.11213-9-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105113.11213-1-lee.jones@linaro.org> References: <20191122105113.11213-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: Jan Kara [ Upstream commit 3abb1a0fc2871f2db52199e1748a1d48a54a3427 ] These days inode reclaim calls evict_inode() only when it has no pages in the mapping. In that case it is not necessary to wait for transaction commit in ext4_evict_inode() as there can be no pages waiting to be committed. So avoid unnecessary transaction waiting in that case. We still have to keep the check for the case where ext4_evict_inode() gets called from other paths (e.g. umount) where inode still can have some page cache pages. Reported-by: Johannes Weiner Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Signed-off-by: Lee Jones --- fs/ext4/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.24.0 diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 3557c5717c8d..821349149726 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -212,7 +212,8 @@ void ext4_evict_inode(struct inode *inode) */ if (inode->i_ino != EXT4_JOURNAL_INO && ext4_should_journal_data(inode) && - (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode))) { + (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode)) && + inode->i_data.nrpages) { journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; tid_t commit_tid = EXT4_I(inode)->i_datasync_tid;