From patchwork Thu Apr 2 19:18:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228219 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 779E8C43331 for ; Thu, 2 Apr 2020 19:18:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4B226206F8 for ; Thu, 2 Apr 2020 19:18:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PUWez78L" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388757AbgDBTSF (ORCPT ); Thu, 2 Apr 2020 15:18:05 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:56213 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728452AbgDBTSF (ORCPT ); Thu, 2 Apr 2020 15:18:05 -0400 Received: by mail-wm1-f65.google.com with SMTP id r16so4628704wmg.5 for ; Thu, 02 Apr 2020 12:18:04 -0700 (PDT) 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=Gww7ZWZZzzTgIH1NABGXfQvWuKronr667Izz47F9iEE=; b=PUWez78LxxCXO2HEAFZ6lL0rNKBCd1Vb6mC1D0JqYQNZcmPM53mW7HHgaQm+L3B/+8 /qhMHNEaofOYj/zW8MoviuTwIkaHageLp+Il/guJtYHjhmxfYOq8dsyE63GlxroOVNBA mD7pVfn8CvhI2DGpy697Oajv5kXb19gDpUGA14AhR6Q8UHMJXOIH2QerqgAn+1Up/U/F uJdyDCH7iyaP1EDk5d3uPZEb97aUwOok5l5Ubir1cKnpb0LZq8J/YvnGjXj2457qmsbJ FvZyGb8mf7VFM/YA6AuiH3UqvAtEOLi6rjq71ujYdwBOyUJUiY+z/FjQKOckh/4BwgIA hB2Q== 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=Gww7ZWZZzzTgIH1NABGXfQvWuKronr667Izz47F9iEE=; b=GHI7MSksaaYbglYBBuoXOToyfRZXCcz/MGAmtZOzvX7FU3FGcocEazsSqWQEDBURCx nRJv7vV79WhYLn5ym9qAEjwmeefGVIS6UhinZigYC72OBw4ILKsB1WV5upGSu2DH/hzd 6nFildwSTSvnmF5vUuTYfrqnXc1/AGtNzAYMIow2D0JiZ5oM2lxFbTZnuYgNYJGWl45l K0dTz/2hoIYwQAvAtlJh4+PoZeks0NDJnZBC7aCLei7jAf++8h/ZzCOvSfVAziOBAwMx 8GVz3inVZV6zSFQWr6GvlO5jbkO89yORNnxhZTB65h+7+ntJAggR2jLp6Qfx7+5hQOs0 IRJw== X-Gm-Message-State: AGi0Pua0KqDEOroYnwDY0kxblNiDwLIzliG0Jl5+Leuyb91N+MtT4D3W YNxsuVQEQ9pmTHlZtROqQFsll2/N9Fs81Q== X-Google-Smtp-Source: APiQypJtgWrO8cAMDq3rZS793qe68mS74ucxAA5lCI46i9EuyNwjWh/8j2p+hlS88UCDrojUQhXIcQ== X-Received: by 2002:a1c:3105:: with SMTP id x5mr5035328wmx.51.1585855083347; Thu, 02 Apr 2020 12:18:03 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id l10sm8622707wrq.95.2020.04.02.12.18.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:18:02 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 01/20] clk: qcom: rcg: Return failure for RCG update Date: Thu, 2 Apr 2020 20:18:37 +0100 Message-Id: <20200402191856.789622-1-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Taniya Das [ Upstream commit 21ea4b62e1f3dc258001a68da98c9663a9dbd6c7 ] In case of update config failure, return -EBUSY, so that consumers could handle the failure gracefully. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1557339895-21952-2-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd Signed-off-by: Lee Jones --- drivers/clk/qcom/clk-rcg2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/qcom/clk-rcg2.c b/drivers/clk/qcom/clk-rcg2.c index 350a01f748706..f7f31da1d6305 100644 --- a/drivers/clk/qcom/clk-rcg2.c +++ b/drivers/clk/qcom/clk-rcg2.c @@ -107,7 +107,7 @@ static int update_config(struct clk_rcg2 *rcg) } WARN(1, "%s: rcg didn't update its configuration.", name); - return 0; + return -EBUSY; } static int clk_rcg2_set_parent(struct clk_hw *hw, u8 index) From patchwork Thu Apr 2 19:18:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228218 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F7E1C2BA18 for ; Thu, 2 Apr 2020 19:18:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ECF58206F8 for ; Thu, 2 Apr 2020 19:18:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qZSaAadJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728452AbgDBTSH (ORCPT ); Thu, 2 Apr 2020 15:18:07 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:40389 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388745AbgDBTSH (ORCPT ); Thu, 2 Apr 2020 15:18:07 -0400 Received: by mail-wm1-f66.google.com with SMTP id a81so4928632wmf.5 for ; Thu, 02 Apr 2020 12:18:05 -0700 (PDT) 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=7zz7r9V0x/QZvtIG3hUTtMT9sO8PLDBN9RVONCQN7gs=; b=qZSaAadJ+ihwlxK1Fadt8pb9Wm8DW2yaNhSpuQsdm4EjqK3P5vsWTI3qbafb+xM2cS KoXZYgFAcTgZP83yBTfyfhJBw7Na5tYevyc8FFpDmrPDNd+IGjj8YS+gC3elbnebP+EJ UVRqpL2Nhf5LSAI0+ZDTIISeWsNa1iKUZLUvZGvy5AVMIfuaHyr4OutmCqczHubnR8wT u1rmyc0rKg6038XZAFYIuvVLyqhZ0l1mwNjIUG48pxUoYFXgXs92K1ZuLoMOQMIVT0cB AAaZuoSwMCYnXUSHwGqzbrP0hFsgFl0CVacJ+3RSVfoIz0l84OzNZTyQChX0qfZKzChi yStQ== 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=7zz7r9V0x/QZvtIG3hUTtMT9sO8PLDBN9RVONCQN7gs=; b=RKECdPS+w/5UEa0HcvvzBp1WD3rdbZolTcckpXzkK6niypmjLVjJFVJWauh/zdq+Id HuhpuAlJPaENUuhFMg6h0C4gRUP6KnALi+M38fZ4vmzd3b+iiCQYDMBsrZOwqqkP38Ls LHr65mdAxI3xjD4eNjyDv1EGOT1Ia+l0FXNv+9RcnhGoOIyH6eAGKAjzdU4GzqczfPji w4CBeMJPfiSYa5MCi0FMNk7tjrlijwX8IKl9qTVImD46SFEBp+Tu6iRn7TZNKpOZ4y+d a7iARZUZdlMp7LmepwdHisginklzK1jeaSpwGtHK7mfsjY9f2yfV/MLgkEXoqUnaID7Y QJWQ== X-Gm-Message-State: AGi0PubZHhc3GDgl01g14+8tKKcs5kACYh494qwFUlyW+GR68rUOKDzo iWxSWM50FHm46ac32FTPUl05+zOOiCmdSQ== X-Google-Smtp-Source: APiQypIDlV1sC4gQKUcEiijYMWPovS+A+QvbsCYbPEAkU/gs/pMuMq+659LBsFzG0Cxf/UZnsrGwtA== X-Received: by 2002:a1c:68d5:: with SMTP id d204mr4824648wmc.15.1585855084251; Thu, 02 Apr 2020 12:18:04 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id l10sm8622707wrq.95.2020.04.02.12.18.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:18:03 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 02/20] drm/msm: stop abusing dma_map/unmap for cache Date: Thu, 2 Apr 2020 20:18:38 +0100 Message-Id: <20200402191856.789622-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191856.789622-1-lee.jones@linaro.org> References: <20200402191856.789622-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: Rob Clark [ Upstream commit 0036bc73ccbe7e600a3468bf8e8879b122252274 ] Recently splats like this started showing up: WARNING: CPU: 4 PID: 251 at drivers/iommu/dma-iommu.c:451 __iommu_dma_unmap+0xb8/0xc0 Modules linked in: ath10k_snoc ath10k_core fuse msm ath mac80211 uvcvideo cfg80211 videobuf2_vmalloc videobuf2_memops vide CPU: 4 PID: 251 Comm: kworker/u16:4 Tainted: G W 5.2.0-rc5-next-20190619+ #2317 Hardware name: LENOVO 81JL/LNVNB161216, BIOS 9UCN23WW(V1.06) 10/25/2018 Workqueue: msm msm_gem_free_work [msm] pstate: 80c00005 (Nzcv daif +PAN +UAO) pc : __iommu_dma_unmap+0xb8/0xc0 lr : __iommu_dma_unmap+0x54/0xc0 sp : ffff0000119abce0 x29: ffff0000119abce0 x28: 0000000000000000 x27: ffff8001f9946648 x26: ffff8001ec271068 x25: 0000000000000000 x24: ffff8001ea3580a8 x23: ffff8001f95ba010 x22: ffff80018e83ba88 x21: ffff8001e548f000 x20: fffffffffffff000 x19: 0000000000001000 x18: 00000000c00001fe x17: 0000000000000000 x16: 0000000000000000 x15: ffff000015b70068 x14: 0000000000000005 x13: 0003142cc1be1768 x12: 0000000000000001 x11: ffff8001f6de9100 x10: 0000000000000009 x9 : ffff000015b78000 x8 : 0000000000000000 x7 : 0000000000000001 x6 : fffffffffffff000 x5 : 0000000000000fff x4 : ffff00001065dbc8 x3 : 000000000000000d x2 : 0000000000001000 x1 : fffffffffffff000 x0 : 0000000000000000 Call trace: __iommu_dma_unmap+0xb8/0xc0 iommu_dma_unmap_sg+0x98/0xb8 put_pages+0x5c/0xf0 [msm] msm_gem_free_work+0x10c/0x150 [msm] process_one_work+0x1e0/0x330 worker_thread+0x40/0x438 kthread+0x12c/0x130 ret_from_fork+0x10/0x18 ---[ end trace afc0dc5ab81a06bf ]--- Not quite sure what triggered that, but we really shouldn't be abusing dma_{map,unmap}_sg() for cache maint. Cc: Stephen Boyd Tested-by: Stephen Boyd Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190630124735.27786-1-robdclark@gmail.com Signed-off-by: Lee Jones --- drivers/gpu/drm/msm/msm_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 644faf3ae93a3..055859095cf01 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -104,7 +104,7 @@ static struct page **get_pages(struct drm_gem_object *obj) * because display controller, GPU, etc. are not coherent: */ if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED)) - dma_map_sg(dev->dev, msm_obj->sgt->sgl, + dma_sync_sg_for_device(dev->dev, msm_obj->sgt->sgl, msm_obj->sgt->nents, DMA_BIDIRECTIONAL); } @@ -120,7 +120,7 @@ static void put_pages(struct drm_gem_object *obj) * because display controller, GPU, etc. are not coherent: */ if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED)) - dma_unmap_sg(obj->dev->dev, msm_obj->sgt->sgl, + dma_sync_sg_for_cpu(obj->dev->dev, msm_obj->sgt->sgl, msm_obj->sgt->nents, DMA_BIDIRECTIONAL); if (msm_obj->sgt) From patchwork Thu Apr 2 19:18:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228217 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC268C2BA12 for ; Thu, 2 Apr 2020 19:18:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9358A20737 for ; Thu, 2 Apr 2020 19:18:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="w2/SBTPH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389469AbgDBTSK (ORCPT ); Thu, 2 Apr 2020 15:18:10 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:44794 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389416AbgDBTSK (ORCPT ); Thu, 2 Apr 2020 15:18:10 -0400 Received: by mail-wr1-f65.google.com with SMTP id m17so5557068wrw.11 for ; Thu, 02 Apr 2020 12:18:08 -0700 (PDT) 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=LhjhO29qP4YDiHKKomduT/iM9G93of5peeh/dmZcMag=; b=w2/SBTPHp43mehiBQoSIc+6yhdCCluyoWJ6Ilenpfv90fnn/TEC0Z/jJwYxshRk7gK NsVHOE4vzBKHz1BpS8ZROlOdTZoJIDuK+0roUCjOPdBCvwcCDf62zW6wGzeEIyikci8B vAYPprdCHmwnPmr3nRfPcWZod8jlz0cD+Oxb8xvYojmhmisjh/yBqInRPEGMp5TxlGPm L2wQyEmsU8pxulkdzuT1IWNvrVvELPnPgmUsnOr/0UuQ0o4OSAUVCShfD3OMl+v2CrJ9 1uU/UrtUcVnB5ivmuZWFnYUInz7leVQzQIumrIU+jYU2CwtDjfdRsANdsjmk1FNvKQt3 X/8w== 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=LhjhO29qP4YDiHKKomduT/iM9G93of5peeh/dmZcMag=; b=dxNegmziEFd/7imX9UiEPl2PGEY6YMic3D6i3U/0wu5OuQGpD2KsH+m9aL5JBm9Esc +BXmkhlb2JaLzqoNz+d16dE20rQrI57ufHK7/vx970EwHxy+a/6oA2LBiwpq1wNCWG/u FxYaOAmKf5Dpo99zks48S1BqyIAlVTyOwyzAQAGN86Go765CiAnureSJX7ng36iaJl+R 7MFzDBToxA/SdBF4bJGAWxdNlZ+izwVOpEy2FDsR9DWg/2Eo5g22ygFqjHeYB/EfMkjr Jd+dXQyLg1YlyVrIdeOMfU+n6NZvwbQuCxmSQBYB448kggI9FpQ84bO8fipgsS8fBRQi Xewg== X-Gm-Message-State: AGi0PuZ2RK94XIadw7OiZHZO5BRfYIzKHkpPuqSL1/2bka71wiaHj511 xGTedVvZAfYstad6XoNzmwn760S1V857MA== X-Google-Smtp-Source: APiQypLpWIv9GJ5WDhSvEAAK8I4NBSQl37AsgIIpkd4KJY9O1DgsODNihCu8bfhdawWJMl8mTff7FA== X-Received: by 2002:adf:f5c8:: with SMTP id k8mr4593899wrp.33.1585855087067; Thu, 02 Apr 2020 12:18:07 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id l10sm8622707wrq.95.2020.04.02.12.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:18:06 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 05/20] drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read() Date: Thu, 2 Apr 2020 20:18:41 +0100 Message-Id: <20200402191856.789622-5-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191856.789622-1-lee.jones@linaro.org> References: <20200402191856.789622-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: Hans Verkuil [ Upstream commit a4c30a4861c54af78c4eb8b7855524c1a96d9f80 ] When parsing the reply of a DP_REMOTE_DPCD_READ DPCD command the result is wrong due to a missing idx increment. This was never noticed since DP_REMOTE_DPCD_READ is currently not used, but if you enable it, then it is all wrong. Signed-off-by: Hans Verkuil Reviewed-by: Lyude Paul Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/e72ddac2-1dc0-100a-d816-9ac98ac009dd@xs4all.nl Signed-off-by: Lee Jones --- drivers/gpu/drm/drm_dp_mst_topology.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 4d0f77f0edad1..6f6a6325b4691 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -431,6 +431,7 @@ static bool drm_dp_sideband_parse_remote_dpcd_read(struct drm_dp_sideband_msg_rx if (idx > raw->curlen) goto fail_len; repmsg->u.remote_dpcd_read_ack.num_bytes = raw->msg[idx]; + idx++; if (idx > raw->curlen) goto fail_len; From patchwork Thu Apr 2 19:18:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228216 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62583C2BA16 for ; Thu, 2 Apr 2020 19:18:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3AC13206F8 for ; Thu, 2 Apr 2020 19:18:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SirPeW88" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389467AbgDBTSL (ORCPT ); Thu, 2 Apr 2020 15:18:11 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:40214 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389416AbgDBTSL (ORCPT ); Thu, 2 Apr 2020 15:18:11 -0400 Received: by mail-wr1-f66.google.com with SMTP id s8so3463378wrt.7 for ; Thu, 02 Apr 2020 12:18:08 -0700 (PDT) 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=/hkstutUKkzAeVkb8A6CMmZCBPtBnLhhXsPrhwYxTuA=; b=SirPeW88Y+RmRS4g5/o4h4SDKotBXDTA2jrWGJfjAKJ0v+2ktQPbdvgZ1MtP3sX03C EFGlikfkKn47NjdZH8MytmYDJdwqTRZHmY4/goaIb5eWYC7eRcbRU99a3mkSKc5LaM0s 6RDWoCazZ1ZgXLL0ZyqJ/qD5/1BCmIOjsm0n33uX569WPRrbOtx8X8RDI9hjX75nCfHA S7vWEnUMuoBYm4QPcr/fcyAkR+AIMCkS1UDCAmB/osMiTPGpCONHXcubjyixNC+oeo1f jyso/67wBp+QDe8SJAun0RiowBSJk0qU4761gWJIs5V9ACm/t7bxv0yNdC4y4TjtxVIV eQjg== 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=/hkstutUKkzAeVkb8A6CMmZCBPtBnLhhXsPrhwYxTuA=; b=coBRROhS2z9w9g1OD5WgMoZg0DiXaVHkKaGX98e1bz86pYTDVbkmcTGLRbyWvdJNRC X8BEMRWScE1utjmYXdlUkk0spsEal62OUxehrRWJOVkOwn7gxdit7F2wG9tBfHiyddDr 50zxVwXq9CzkXTzUyMv0tfQdgdEsf8wjrZx09iTazqCrWWvv6ZaZA4zmWv+IjtFVdj8k CC2yNPtm6bXgufIe/o36gPQQqzWeK07SRGvpnId4ogpwdm2L+xpF+4E+jW/KSBK4g7WT FVwZ/ekIsTloHdSdXz/mAEt+yHiw+cUS1Wa0OE8PVA9gzM/4wlCU8asKRapJfKIX4YPO t6dQ== X-Gm-Message-State: AGi0PubWp05+ZsCs/Q4v18ZT9wdyZrch1YZu7OeTl4Wa5AMVNMNSoHFq XDpwx7LXA/BYSIC9LsBxY5A8JhoHK9QNxw== X-Google-Smtp-Source: APiQypLv29wdtwmz+9Szuj6cHMsXUqk95Z/3tq+mcwH9JIFT0TGbqwnx4WMMeES6U+E6plEnAxNj8A== X-Received: by 2002:a5d:50d1:: with SMTP id f17mr5225942wrt.150.1585855088096; Thu, 02 Apr 2020 12:18:08 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id l10sm8622707wrq.95.2020.04.02.12.18.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:18:07 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 06/20] crypto: talitos - Delete an error message for a failed memory allocation in talitos_edesc_alloc() Date: Thu, 2 Apr 2020 20:18:42 +0100 Message-Id: <20200402191856.789622-6-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191856.789622-1-lee.jones@linaro.org> References: <20200402191856.789622-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: Markus Elfring [ Upstream commit 0108aab1161532c9b62a0d05b8115f4d0b529831 ] Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Christophe Leroy Signed-off-by: Herbert Xu Signed-off-by: Lee Jones --- drivers/crypto/talitos.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 1c8857e7db894..f3d0a33f4ddb4 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -1287,7 +1287,6 @@ static struct talitos_edesc *talitos_edesc_alloc(struct device *dev, if (iv_dma) dma_unmap_single(dev, iv_dma, ivsize, DMA_TO_DEVICE); - dev_err(dev, "could not allocate edescriptor\n"); return ERR_PTR(-ENOMEM); } From patchwork Thu Apr 2 19:18:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228214 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4244AC2BA18 for ; Thu, 2 Apr 2020 19:18:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1507E206F8 for ; Thu, 2 Apr 2020 19:18:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rJfCbCFd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389517AbgDBTSQ (ORCPT ); Thu, 2 Apr 2020 15:18:16 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:37886 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389486AbgDBTSQ (ORCPT ); Thu, 2 Apr 2020 15:18:16 -0400 Received: by mail-wm1-f68.google.com with SMTP id j19so4955565wmi.2 for ; Thu, 02 Apr 2020 12:18:13 -0700 (PDT) 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=3YC6pyybi6G5bn9vYupqc8C2qtwqHiQkVZLXEFbQNI4=; b=rJfCbCFdbFqzecni9aO2BDtQI/fulqzylzjIYsLe7jg9GzHQCwaSRESbfYokU2ifsP k60CYztjeLn9p7XEmdEbGWnCQxITJlCSBUE9FF/+vaQg4OAd8QfwE9830ce5o/LsBpky 9YdxaQJeV7E1eXbza8qhecZpKwUTIcZZHgKFGWuiqYxJWzEajtUi57hsGq6qo5TtP2GD TDxSzJd3lgMNsBWks049EGriDURYyESALxmi44TIdyPN0DdTn6FCSdy/K1nMpmy7s4lX sUuwjBJ03oxdKdm+RUO246duf6/m+RpEKLvs3Y+vfKwQuP1DYwgqqxWhhR4iTS9igzLk UEmA== 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=3YC6pyybi6G5bn9vYupqc8C2qtwqHiQkVZLXEFbQNI4=; b=A4wH8P/x+/bOAN/yBNCJVfJnNk/rZJ76Z1neqqutzYQAxcEQrGeAHsDSIoRLcsIQsR oXjMoUZD0xelUuhv9/83Ye008DojE3vXkrsVp/XGzIN950/+A2QuOer1vDwmnhjOQLKF ut57qPC4X7XUwvxRiSNlR0PbG3KjPwBfLsiys/Yc/O9rq8wB7XPIK3eYmwhzyTQ/NlXN EsslOEmecmiAaFcsiy8lRzxApUje5iD/0/ebh3c5G5XYH9pJCcGFUG29EgF60A8ala+9 AQQ2QAeEAQEOc7PN08QkJF5ljISTRei1x0C2O+vgohx39eLvO/f8Ii8QbGZtajqYcRS2 SPLQ== X-Gm-Message-State: AGi0PuZowejbdeC4gPwBeHRQg+vqj+xL6oI7UKtGUFFcUQjZCFqsazKJ 458LGBYK8ymEfUDYagYKLRbx+bz3PAEcBA== X-Google-Smtp-Source: APiQypLKtQTxLS1KnPE6mLnAevfsv+jhM6jWZgGJ8jmQmQVhhxnJg6D0d1CAmEP/H+azpSa6AhkQAw== X-Received: by 2002:a7b:ce81:: with SMTP id q1mr5093098wmj.156.1585855092580; Thu, 02 Apr 2020 12:18:12 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id l10sm8622707wrq.95.2020.04.02.12.18.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:18:11 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 10/20] serial/sunsu: add missing of_node_put() Date: Thu, 2 Apr 2020 20:18:46 +0100 Message-Id: <20200402191856.789622-10-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191856.789622-1-lee.jones@linaro.org> References: <20200402191856.789622-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: Yangtao Li [ Upstream commit 20d8e8611eb0596047fd4389be7a7203a883b9bf ] of_find_node_by_path() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. This place is not doing this, so fix it. Signed-off-by: Yangtao Li Signed-off-by: Greg Kroah-Hartman Signed-off-by: Lee Jones --- drivers/tty/serial/sunsu.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/sunsu.c b/drivers/tty/serial/sunsu.c index e124d2e88996f..8db64282260fb 100644 --- a/drivers/tty/serial/sunsu.c +++ b/drivers/tty/serial/sunsu.c @@ -1393,22 +1393,32 @@ static inline struct console *SUNSU_CONSOLE(void) static enum su_type su_get_type(struct device_node *dp) { struct device_node *ap = of_find_node_by_path("/aliases"); + enum su_type rc = SU_PORT_PORT; if (ap) { + struct device_node *tmp; const char *keyb = of_get_property(ap, "keyboard", NULL); const char *ms = of_get_property(ap, "mouse", NULL); if (keyb) { - if (dp == of_find_node_by_path(keyb)) - return SU_PORT_KBD; + tmp = of_find_node_by_path(keyb); + if (tmp && dp == tmp){ + rc = SU_PORT_KBD; + goto out; + } } if (ms) { - if (dp == of_find_node_by_path(ms)) - return SU_PORT_MS; + tmp = of_find_node_by_path(ms); + if (tmp && dp == tmp){ + rc = SU_PORT_MS; + goto out; + } } } - return SU_PORT_PORT; +out: + of_node_put(ap); + return rc; } static int su_probe(struct platform_device *op) From patchwork Thu Apr 2 19:18:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228215 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A62EC2BA16 for ; Thu, 2 Apr 2020 19:18:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE106206F8 for ; Thu, 2 Apr 2020 19:18:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="H8xgYwRy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389416AbgDBTSP (ORCPT ); Thu, 2 Apr 2020 15:18:15 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:37886 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389476AbgDBTSP (ORCPT ); Thu, 2 Apr 2020 15:18:15 -0400 Received: by mail-wm1-f66.google.com with SMTP id j19so4955631wmi.2 for ; Thu, 02 Apr 2020 12:18:14 -0700 (PDT) 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=2pZHt+hAsIb+Y7qJYHv626ADWtS8jmmdGfuI//hKgVk=; b=H8xgYwRy0V5ociFSvzK9Ef2e3PbyPsYvRB7DuergysBYp1W08YOpFDTQhsr/9t4NY9 6AoXtDMIm7dBl2RSTmRkFeurCHAqQPgmKgR0Sx4WLxzeMVPviL4efYFkzLvA94bu+DlB veR+k9lb1zUgBGJ9WR2plosZGG0t+FV/3yJxtcwfF2B/O3b8xN9ibtTSKRznU7OFR2Z+ iVc10nibAz6aM2F0FkAeGZzJd1Hb8MCD3ha9Wz0SA3bOVbUe8JR83YWBwX4hF6yVXMHw 4gljvDUvh1hdxhnqYPmmQNT5luyotnAi3VCVB+QpLRleSZPtNbi/Xz/YdfzUwKE8pclK K5ig== 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=2pZHt+hAsIb+Y7qJYHv626ADWtS8jmmdGfuI//hKgVk=; b=evjC9JX2fYAeRnhxZONvCAHo4FADuqavSHwzIrv39R0PSqI57GDaQk85wFqUtvMSwA anPZdzE8v37rJwi+X40tvoewTU+gO2XM+Mm47aQy4XLRganY0I1CmlQ+6PWGrcnFOXtb DIVB7E8u0AF6v7BfQNxkogFSilCf8hXGrU/tNAuDQqlb7TpqonrBOtwnmbEtHa4UJvca 4ArGZzY58QdH3cpwPaJfigSH1BZtx9l9ur79cs9ueai8Ez6eWX6VnG35Sl90NMRJLEkG f1MUyLqjSpa/B5pRPdjE3Z2sEkEyFAU11MdHAiAEIzzPa7ZUY60BlaPVLX6DBt+rg52E YsEg== X-Gm-Message-State: AGi0PubAIBni9TymMbcAGRUz8Db/KHs9pjF11uc8PTeJggP6wo38jB2H fdl9FnkYLTtgqEyQEyiu9nJd4QYj9J4+Bg== X-Google-Smtp-Source: APiQypLqKCRkWUW0vDiZ41xZo/IMnHiltquyUKsEN5/qj3iaTrg3bR/QOYtr2lvkywNg83rYxVlSpw== X-Received: by 2002:a7b:c76d:: with SMTP id x13mr4840397wmk.146.1585855093453; Thu, 02 Apr 2020 12:18:13 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id l10sm8622707wrq.95.2020.04.02.12.18.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:18:12 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 11/20] wil6210: increase firmware ready timeout Date: Thu, 2 Apr 2020 20:18:47 +0100 Message-Id: <20200402191856.789622-11-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191856.789622-1-lee.jones@linaro.org> References: <20200402191856.789622-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: Hamad Kadmany [ Upstream commit 6ccae584014ef7074359eb4151086beef66ecfa9 ] Firmware ready event may take longer than current timeout in some scenarios, for example with multiple RFs connected where each requires an initial calibration. Increase the timeout to support these scenarios. Signed-off-by: Hamad Kadmany Signed-off-by: Maya Erez Signed-off-by: Kalle Valo Signed-off-by: Lee Jones --- drivers/net/wireless/ath/wil6210/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c index f09fafaaaf1a3..c377937aae1c4 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c @@ -741,7 +741,7 @@ static void wil_bl_crash_info(struct wil6210_priv *wil, bool is_err) static int wil_wait_for_fw_ready(struct wil6210_priv *wil) { - ulong to = msecs_to_jiffies(1000); + ulong to = msecs_to_jiffies(2000); ulong left = wait_for_completion_timeout(&wil->wmi_ready, to); if (0 == left) { From patchwork Thu Apr 2 19:18:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228212 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AB2BC2BA19 for ; Thu, 2 Apr 2020 19:18:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3AE89206F8 for ; Thu, 2 Apr 2020 19:18:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="S1vnch1q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389476AbgDBTST (ORCPT ); Thu, 2 Apr 2020 15:18:19 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:53560 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389486AbgDBTST (ORCPT ); Thu, 2 Apr 2020 15:18:19 -0400 Received: by mail-wm1-f66.google.com with SMTP id d77so4652320wmd.3 for ; Thu, 02 Apr 2020 12:18:18 -0700 (PDT) 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=delpOehTXvAM9GwDPbw2EyVrij8m0ovO9xyQACi08O8=; b=S1vnch1qnoOCQTNJLV7KkzNn6KqhjurNHpFMZ/ljGB8TlCVDnDaNMi/8rkPhhf2n8i 7eQhZzauahlvEJ3HAzsSRTcakQw6tvpT1pMWREXhj/E32XaJJky28ncV1uZ1c44sOQkR A3P+7JXoaIIpTb8g5sYja9G9F+MZtRjF5BEdANXQbZKLAZzcXBPzWV2VaaUsWUcnd92i u0VxYX4U3cCOVOyMMYXS1+lg2aVrfnThNwckDDtlnpuPmYEQHlvtKr28i3Dls6+ToaEN jcfBCm7baIvLd8pveWgq12bv0woRAEpY/4clhWGODDSRWZotJgxGjxAZXzwJN+cqoIlN PFPw== 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=delpOehTXvAM9GwDPbw2EyVrij8m0ovO9xyQACi08O8=; b=BxtK1Rntkg9cXfI/13Bs5iyp+stE5EaDNreKjwaOvsKVdj4bbideuyH5111EYBQQIq xLRbdDQUTHkPknXa0ClWyb95hzfm/JlBD97Rjf29/KGFBurrtNudIN9W+oOip5WTm0xs QZKO6wTaGV2JiSSublAMxQiUan4Yr9/+t7d2+guLFzKGsZWWHAgloaz7RqvRDQuBS1oE jVB9hEP4CIOXwgwPyqAEUmfUJgHIRZT09VIuaLaAmZRdEK2rPAoFFdbeKhyRNsG4myQN Kl6A7BxhwBoEIzCWrK5HHmTwG50ClcJVS+8B5QjdUI+BcRx5tWRMclbZsr93jz1DsMxU cW6g== X-Gm-Message-State: AGi0PuYbRnMsdV4f9aPIwsNHJWSUGJdCQs9POxtCm2Z7ugoWgpYS+f+3 vB1gfjGU7UaUQaWaq1Q2fpAuHSbVCzdsjA== X-Google-Smtp-Source: APiQypKrU8seav4wDe1fHeSkl8epicNNtN64zhBb4LJDY0M0+fVrVIWHzUYmZuxwoNB1Y/yloAoHsw== X-Received: by 2002:a7b:c145:: with SMTP id z5mr4838930wmi.55.1585855094593; Thu, 02 Apr 2020 12:18:14 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id l10sm8622707wrq.95.2020.04.02.12.18.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:18:13 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 12/20] wil6210: fix temperature debugfs Date: Thu, 2 Apr 2020 20:18:48 +0100 Message-Id: <20200402191856.789622-12-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191856.789622-1-lee.jones@linaro.org> References: <20200402191856.789622-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: Dedy Lansky [ Upstream commit 6d9eb7ebae3d7e951bc0999235ae7028eb4cae4f ] For negative temperatures, "temp" debugfs is showing wrong values. Use signed types so proper calculations is done for sub zero temperatures. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo Signed-off-by: Lee Jones --- drivers/net/wireless/ath/wil6210/debugfs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c index 97bc186f97282..2da03d69ed42e 100644 --- a/drivers/net/wireless/ath/wil6210/debugfs.c +++ b/drivers/net/wireless/ath/wil6210/debugfs.c @@ -1088,7 +1088,7 @@ static const struct file_operations fops_ssid = { }; /*---------temp------------*/ -static void print_temp(struct seq_file *s, const char *prefix, u32 t) +static void print_temp(struct seq_file *s, const char *prefix, s32 t) { switch (t) { case 0: @@ -1096,7 +1096,8 @@ static void print_temp(struct seq_file *s, const char *prefix, u32 t) seq_printf(s, "%s N/A\n", prefix); break; default: - seq_printf(s, "%s %d.%03d\n", prefix, t / 1000, t % 1000); + seq_printf(s, "%s %s%d.%03d\n", prefix, (t < 0 ? "-" : ""), + abs(t / 1000), abs(t % 1000)); break; } } @@ -1104,7 +1105,7 @@ static void print_temp(struct seq_file *s, const char *prefix, u32 t) static int wil_temp_debugfs_show(struct seq_file *s, void *data) { struct wil6210_priv *wil = s->private; - u32 t_m, t_r; + s32 t_m, t_r; int rc = wmi_get_temperature(wil, &t_m, &t_r); if (rc) { From patchwork Thu Apr 2 19:18:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228213 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05293C2BA16 for ; Thu, 2 Apr 2020 19:18:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C8FEC206F8 for ; Thu, 2 Apr 2020 19:18:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SoVdql2G" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389523AbgDBTSS (ORCPT ); Thu, 2 Apr 2020 15:18:18 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:40408 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389486AbgDBTSS (ORCPT ); Thu, 2 Apr 2020 15:18:18 -0400 Received: by mail-wm1-f67.google.com with SMTP id a81so4929157wmf.5 for ; Thu, 02 Apr 2020 12:18:17 -0700 (PDT) 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=MjyavgGyBdte0j44srlHhXp1P/92pFuLJMScfcP5L5Q=; b=SoVdql2GCrilhMmtlxeG2iPRTLAJDlcL8jXeJffXbOe3DltZgBeyAC9XozaHf6oteS UzHdbHgHJM3UhRyDMXHktBASVeec421QQIVik0DJNq4VjUn733WuvUI1AzT6d+ZSfota gTqR0Lybq/a8+4dYxG6zPMyVgIskXcZBjW++/UXGAW0NUBWLng91CQaF2JU+KeWvOS9x EEAKLpANzapMHZHGTiSnuqbvutSt3I3BaWHReOlnK38maJWDDlHbuGcOyUpsOuHyuRwz e/q1lLUkLOH0w40qtWbpOOUCs03uxT9NbANsPBZUcN+q58QPB+fooq1kUQo8giT/it11 jZCw== 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=MjyavgGyBdte0j44srlHhXp1P/92pFuLJMScfcP5L5Q=; b=V9+QHsxZfegd86R32u1QRkp+5CJGY+zuFrVKs8BcXcCJvbNm776I1et/NkQMvr/r6n jU1f94lx/JiVhyX67e6ZCF98+6/sHQW1F2cYJZopRWhIHwYHrTTPSVrEOhSwHGZo/sGg QXFPMxF/NRJzTiyEoHrp9AskU1I5LphDuH6CRIA0ev+rCm4eHVhzR1ineFHxujZWsXVI sDvAQsXc57hYPVbJPP3xZSpSLE2iRUlLonwkcilLw/zlo54UnYEuQsJz3o6wuMK3XSdK /pbc1wqCq6lQ/dE3Wa1nTaEP8N5lqwHJ9ZG/+nJqRGHA2njLkWoAz+lbKkHGjYHuG3ev vdOA== X-Gm-Message-State: AGi0PuYEIyGnMKMqq0wPT6P+nrCRlkgP+7xm3OGNgFfExufcPqRU57i5 6Nasapd7ZQ2a8R/nNdLInajVm1Uyz+d2xw== X-Google-Smtp-Source: APiQypK77u9vaKasWzqbaIP7EIJlJXoSXCxLj5gRIFzuzAuatCt04AXtzGf/fVrxfVZp4JfohVnqxw== X-Received: by 2002:a05:600c:2c06:: with SMTP id q6mr4962607wmg.42.1585855096183; Thu, 02 Apr 2020 12:18:16 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id l10sm8622707wrq.95.2020.04.02.12.18.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:18:15 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 14/20] wil6210: rate limit wil_rx_refill error Date: Thu, 2 Apr 2020 20:18:50 +0100 Message-Id: <20200402191856.789622-14-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191856.789622-1-lee.jones@linaro.org> References: <20200402191856.789622-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: Dedy Lansky [ Upstream commit 3d6b72729cc2933906de8d2c602ae05e920b2122 ] wil_err inside wil_rx_refill can flood the log buffer. Replace it with wil_err_ratelimited. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo Signed-off-by: Lee Jones --- drivers/net/wireless/ath/wil6210/txrx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index 3bc9bc0efbacc..af436292190b1 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c @@ -538,8 +538,8 @@ static int wil_rx_refill(struct wil6210_priv *wil, int count) v->swtail = next_tail) { rc = wil_vring_alloc_skb(wil, v, v->swtail, headroom); if (unlikely(rc)) { - wil_err(wil, "Error %d in wil_rx_refill[%d]\n", - rc, v->swtail); + wil_err_ratelimited(wil, "Error %d in rx refill[%d]\n", + rc, v->swtail); break; } } From patchwork Thu Apr 2 19:18:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228211 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33B0DC2BA12 for ; Thu, 2 Apr 2020 19:18:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 06ABD206F8 for ; Thu, 2 Apr 2020 19:18:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kCykBnSZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726963AbgDBTSV (ORCPT ); Thu, 2 Apr 2020 15:18:21 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:38514 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389486AbgDBTSV (ORCPT ); Thu, 2 Apr 2020 15:18:21 -0400 Received: by mail-wm1-f67.google.com with SMTP id f6so4957990wmj.3 for ; Thu, 02 Apr 2020 12:18:20 -0700 (PDT) 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=5ViWoK06xQspHTq5fSoOq1VehibGSMcOWc3+p1ggF7w=; b=kCykBnSZeXynX7WMhKEUNnXlNINAJ0Z1S0422jqmxF4a+kR8umpE1acde+/vlKQaOu Hu0cPs+MiWRSvZuhDp0MBPRCfvx/rEcAn5C46kkdDm+D7Ge9YLCpgGy6ihvcg6viykbK z6E11P2ooN6NA5R4HCLqyn0kECzVuabhqRWaHzemfrs8Mo1ZZEeAgxz56NWlb/YeOLFV jworYSczGA9cIqbdGS1YFggoKE7g+91yPTGCvGTMYgS9WGCSBqmwt0Ef9NKLURdC7yMh nQlwCWEqHpLbM/vIdMjdTQzzQwIM3JjfGGsp2Sac69mjU/Bkzr5O3189D64Ir0jHia09 z8+Q== 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=5ViWoK06xQspHTq5fSoOq1VehibGSMcOWc3+p1ggF7w=; b=r0iNzggTNlUpo5xPlFpyUgS+s4zvWe1/PZP5KZhyiaQvFxOWAoT4gaUuEHqmg9Uw1h tO2HCc2TBvqYwc2KqwRxDJWatOs2fM+gya/tVXS0Kqc0pi3PpsUTAxG9xj19IcUFJ0iN wvx288FGcR8Yg0fujcw9c/WQ9zxcjtEu+vyqVIWK3P1g+98jzGLzVeGuI71nI5ctrEfL q8GNu8e9jxAN65xuHq/uqgEeW9nYaLm4LDmCxGRXnNjR8EhdSnthRoVZ7mWaKMDxIonr nCFVxWI85t4dGHZ3FQOanRrV+3g/6rs3Z2j0ChIuzzM8LjwYDj1pl0a5/ta3ENbZn0ai r6WQ== X-Gm-Message-State: AGi0PuZgxGsQa7RXQHAEIp3eU/yvCKeCXexbZs21AxOCwrz9WOMa5TPB VQgNLEkTd/28y0vq0Xhbpa/haLa5idK86w== X-Google-Smtp-Source: APiQypLmPW/Wk8HfoYIq6bi0s5OFg4HBU14ISJnrvM6+ByLpGiic4/uawsHE7K3mqZo6UHaDpuzPtw== X-Received: by 2002:a05:600c:2197:: with SMTP id e23mr4810369wme.90.1585855099042; Thu, 02 Apr 2020 12:18:19 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id l10sm8622707wrq.95.2020.04.02.12.18.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:18:18 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 17/20] of: fix missing kobject init for !SYSFS && OF_DYNAMIC config Date: Thu, 2 Apr 2020 20:18:53 +0100 Message-Id: <20200402191856.789622-17-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191856.789622-1-lee.jones@linaro.org> References: <20200402191856.789622-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: Rob Herring [ Upstream commit bd82bbf38cbe27f2c65660da801900d71bcc5cc8 ] The ref counting is broken for OF_DYNAMIC when sysfs is disabled because the kobject initialization is skipped. Only the properties add/remove/update should be skipped for !SYSFS config. Tested-by: Nicolas Pitre Reviewed-by: Frank Rowand Acked-by: Grant Likely Signed-off-by: Rob Herring Signed-off-by: Lee Jones --- drivers/of/base.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 27783223ca5cd..8adffecd710b8 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -167,9 +167,6 @@ int __of_attach_node_sysfs(struct device_node *np) struct property *pp; int rc; - if (!IS_ENABLED(CONFIG_SYSFS)) - return 0; - if (!of_kset) return 0; From patchwork Thu Apr 2 19:18:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228210 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EF6CC2BA16 for ; Thu, 2 Apr 2020 19:18:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 51F7A20737 for ; Thu, 2 Apr 2020 19:18:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Agq0V/on" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389538AbgDBTSY (ORCPT ); Thu, 2 Apr 2020 15:18:24 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43073 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389536AbgDBTSX (ORCPT ); Thu, 2 Apr 2020 15:18:23 -0400 Received: by mail-wr1-f66.google.com with SMTP id 91so3659897wri.10 for ; Thu, 02 Apr 2020 12:18:22 -0700 (PDT) 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=ejsyYkV67my8PwTROUOSfaRKUGUd6Fd+i+j/6EoUNmA=; b=Agq0V/onx7aTzVHzQFUtOL3Dun4mQrB2HFHMNc9sVjpar5koE7Ku2CFeBJWMNwRi+Y ind8Z6cS8ot8mIQO/HjWO4Bmi9FC8qLqiSbpzjCitHVgk3GIB4rMqtkyliDleBj2dlaa 3slTB/9IUf5scJGwKdlfBG6g52ItpDTQcm6RP67SwNIMKueDdFmxzynkZMokk+cF8WtU rGf/70I++ZLgTF4NLcxOexnsgfthQ+to4SV6Ev0zwgK4B6u1bUXvK4rhf5K8VsxhKX+h vG5RIYRT/bifgkOq/HJ0D8kVyVnJKlWshpxMLkjYs+w/QPDwkXsiuVuk2b2TLxwZJICW dYOQ== 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=ejsyYkV67my8PwTROUOSfaRKUGUd6Fd+i+j/6EoUNmA=; b=D8jdnOHV55TN4muDL8USmVyqpZSrgvLkuToBF3xiHySVGSDPgIPKUD/T31qBCKpp9c LdCAaAGr/BEByiZgqDlIKkQndBgCVX9E+7IdE+LieBxO7N1m+S0g8THIdgXirdRlShr0 K4GV3XuvBrQD8UCs6IS3S3Tqh5XBPYkt3VhyogbJ6U/z9oDAPPbwzcy7aBBREQ/pMf5P bAplruWkKFbXSFdzZ5GF5Ckemqn+vtvfWY3JgO0PADeC1K9vlfBeBiRokNw+CNVBG2ai N46yMSehAsyZzU0IaZrcAJbgKo9Od2ocCY+bVQUQuOBIR59faSuIZp/6NkHOGH0051ke PWGA== X-Gm-Message-State: AGi0PuYiBFvX24ZJfrGhipXyRkxwNdq0PrcBEJltF3RzR0JLlf27DoMu gfiVB/TvTLAZKU9lO9ddvx/mKZFYFazzNw== X-Google-Smtp-Source: APiQypI1VhxURYSkdNtMzXezh3T2RtxhlihS8FALwO8pivlMwlgpX8ISs58IOFRqxhhau6QSNW5G+w== X-Received: by 2002:a05:6000:a:: with SMTP id h10mr5270394wrx.226.1585855101572; Thu, 02 Apr 2020 12:18:21 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id l10sm8622707wrq.95.2020.04.02.12.18.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:18:20 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.4 19/20] mm/vmalloc.c: move 'area->pages' after if statement Date: Thu, 2 Apr 2020 20:18:55 +0100 Message-Id: <20200402191856.789622-19-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191856.789622-1-lee.jones@linaro.org> References: <20200402191856.789622-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: Austin Kim [ Upstream commit 7ea362427c170061b8822dd41bafaa72b3bcb9ad ] If !area->pages statement is true where memory allocation fails, area is freed. In this case 'area->pages = pages' should not executed. So move 'area->pages = pages' after if statement. [akpm@linux-foundation.org: give area->pages the same treatment] Link: http://lkml.kernel.org/r/20190830035716.GA190684@LGEARND20B15 Signed-off-by: Austin Kim Acked-by: Michal Hocko Reviewed-by: Andrew Morton Cc: Uladzislau Rezki (Sony) Cc: Roman Gushchin Cc: Roman Penyaev Cc: Rick Edgecombe Cc: Mike Rapoport Cc: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Lee Jones --- mm/vmalloc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index d118e59a2bef5..21d292e45599f 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1593,7 +1593,6 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, nr_pages = get_vm_area_size(area) >> PAGE_SHIFT; array_size = (nr_pages * sizeof(struct page *)); - area->nr_pages = nr_pages; /* Please note that the recursion is strictly bounded. */ if (array_size > PAGE_SIZE) { pages = __vmalloc_node(array_size, 1, nested_gfp|__GFP_HIGHMEM, @@ -1602,13 +1601,16 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, } else { pages = kmalloc_node(array_size, nested_gfp, node); } - area->pages = pages; - if (!area->pages) { + + if (!pages) { remove_vm_area(area->addr); kfree(area); return NULL; } + area->pages = pages; + area->nr_pages = nr_pages; + for (i = 0; i < area->nr_pages; i++) { struct page *page;