From patchwork Sun Dec 29 17:21:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182551 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5458234ild; Sun, 29 Dec 2019 09:43:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzMAEf9YRqQ0r3fcMgYKkxJd+Dov4pg+xz6N8otwpo0lMcrdPUHR9KoSZ4DM71s6NpNSdPB X-Received: by 2002:a9d:1c95:: with SMTP id l21mr60038415ota.271.1577641439590; Sun, 29 Dec 2019 09:43:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577641439; cv=none; d=google.com; s=arc-20160816; b=vAughpyMlE4+pRQXaZ2n8witUs8+qqQysRaHwbYKy1Y0Yt7VVkWid5X140qVKpcrJP a8vjjxM89yxlYelLIWa9aR0k8ccd5t5HonW+ZmXkCa4O28hSLc4sJIUng4pg6JkAoPBi 3qGzwrgOJJPKUx/NEbVrSyt4NAPGcj+5MzLHRmA/jhMpJyMJZMazaIeLO+d3awm3y8R8 uoDrgAiYqHYnWKLK6tOMMs9YZFtbHKMxLFmarbfeZ0zWJTr6Ay7TfF7C1zQpF8SNz6Vb MpDYFFy1PMVngOmQLl0PJw01uJ/6i5TblQu6BQTTBGJUyIgm8PaOYwlExEtO/UzhlcZ1 n7Vw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Et9CsXdzHMeCT7mCFMz6/rTs0areHsCxvptJUH7rYRA=; b=WEDhmYjYmgvw6sRvAm84acszowJ+ObXgG0RcnJRTV+XetJD9RIyl4FRPYET5d4RI2N 2Z29qwKWMC8HRee9zNcRHJEHqtrLBCqvQdhiRaSkqmns5jYrJWQeh21B2dFVVRNjqodl KZL9Bt1Rl8J/IDl0XZdurAGts8mM5uWvypwNt9m3ld+prI0wulKwbeR1NdCDZf5x4kz3 IPAat7VrWXH/WNDV3a2/AI59wtzugVs9gvtTwEOgP69vJdxDyWczdZENHNqjpTmiaZh4 GywfHF3uod2EnlFBqc3uuq6m8vwbcka4dhSjrPF7Za1WWKTOWZTuumiqRu/lLpYxFV0j ibPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f7lGd58J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t23si21855864otk.304.2019.12.29.09.43.59; Sun, 29 Dec 2019 09:43:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f7lGd58J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730590AbfL2Rn6 (ORCPT + 27 others); Sun, 29 Dec 2019 12:43:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:51664 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730567AbfL2Rny (ORCPT ); Sun, 29 Dec 2019 12:43:54 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 69805206DB; Sun, 29 Dec 2019 17:43:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641432; bh=V3+NHjsZK12w+f54PUHvuEZcTt4VLM0wwAGwxvBFGgo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f7lGd58J08080jszeHhI6o0EFVICyNvkLaMqWmnYnvKD8tEJwzMZeXeFd9a+bf82U d2gI8J/0KmoDuGdLwu5V0PvDW+qanP5Q7SufS23d+SwjFOESnpfbB7vk+RCs/MWLlr t47jCUMWsTCrcL32gQmjtGDEsgERp08l6kMNjoJ8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ivan Khoronzhuk , Grygorii Strashko , "David S. Miller" Subject: [PATCH 5.4 024/434] net: ethernet: ti: davinci_cpdma: fix warning "device driver frees DMA memory with different size" Date: Sun, 29 Dec 2019 18:21:17 +0100 Message-Id: <20191229172703.713659060@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Grygorii Strashko [ Upstream commit 8a2b22203f8596729c54eba221b4044351bfe167 ] The TI CPSW(s) driver produces warning with DMA API debug options enabled: WARNING: CPU: 0 PID: 1033 at kernel/dma/debug.c:1025 check_unmap+0x4a8/0x968 DMA-API: cpsw 48484000.ethernet: device driver frees DMA memory with different size [device address=0x00000000abc6aa02] [map size=64 bytes] [unmap size=42 bytes] CPU: 0 PID: 1033 Comm: ping Not tainted 5.3.0-dirty #41 Hardware name: Generic DRA72X (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xd8/0x110) [] (dump_stack) from [] (__warn+0xe0/0x10c) [] (__warn) from [] (warn_slowpath_fmt+0x44/0x6c) [] (warn_slowpath_fmt) from [] (check_unmap+0x4a8/0x968) [] (check_unmap) from [] (debug_dma_unmap_page+0x80/0x90) [] (debug_dma_unmap_page) from [] (__cpdma_chan_free+0x114/0x16c) [] (__cpdma_chan_free) from [] (__cpdma_chan_process+0x158/0x17c) [] (__cpdma_chan_process) from [] (cpdma_chan_process+0x3c/0x5c) [] (cpdma_chan_process) from [] (cpsw_tx_mq_poll+0x48/0x94) [] (cpsw_tx_mq_poll) from [] (net_rx_action+0x108/0x4e4) [] (net_rx_action) from [] (__do_softirq+0xec/0x598) [] (__do_softirq) from [] (do_softirq.part.4+0x68/0x74) [] (do_softirq.part.4) from [] (__local_bh_enable_ip+0x124/0x17c) [] (__local_bh_enable_ip) from [] (ip_finish_output2+0x294/0xb7c) [] (ip_finish_output2) from [] (ip_output+0x210/0x364) [] (ip_output) from [] (ip_send_skb+0x1c/0xf8) [] (ip_send_skb) from [] (raw_sendmsg+0x9a8/0xc74) [] (raw_sendmsg) from [] (sock_sendmsg+0x14/0x24) [] (sock_sendmsg) from [] (__sys_sendto+0xbc/0x100) [] (__sys_sendto) from [] (__sys_trace_return+0x0/0x14) Exception stack(0xea9a7fa8 to 0xea9a7ff0) ... The reason is that cpdma_chan_submit_si() now stores original buffer length (sw_len) in CPDMA descriptor instead of adjusted buffer length (hw_len) used to map the buffer. Hence, fix an issue by passing correct buffer length in CPDMA descriptor. Cc: Ivan Khoronzhuk Fixes: 6670acacd59e ("net: ethernet: ti: davinci_cpdma: add dma mapped submit") Signed-off-by: Grygorii Strashko Reviewed-by: Ivan Khoronzhuk Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/ti/davinci_cpdma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/drivers/net/ethernet/ti/davinci_cpdma.c +++ b/drivers/net/ethernet/ti/davinci_cpdma.c @@ -1018,7 +1018,6 @@ static int cpdma_chan_submit_si(struct s struct cpdma_chan *chan = si->chan; struct cpdma_ctlr *ctlr = chan->ctlr; int len = si->len; - int swlen = len; struct cpdma_desc __iomem *desc; dma_addr_t buffer; u32 mode; @@ -1046,7 +1045,6 @@ static int cpdma_chan_submit_si(struct s if (si->data_dma) { buffer = si->data_dma; dma_sync_single_for_device(ctlr->dev, buffer, len, chan->dir); - swlen |= CPDMA_DMA_EXT_MAP; } else { buffer = dma_map_single(ctlr->dev, si->data_virt, len, chan->dir); ret = dma_mapping_error(ctlr->dev, buffer); @@ -1065,7 +1063,8 @@ static int cpdma_chan_submit_si(struct s writel_relaxed(mode | len, &desc->hw_mode); writel_relaxed((uintptr_t)si->token, &desc->sw_token); writel_relaxed(buffer, &desc->sw_buffer); - writel_relaxed(swlen, &desc->sw_len); + writel_relaxed(si->data_dma ? len | CPDMA_DMA_EXT_MAP : len, + &desc->sw_len); desc_read(desc, sw_len); __cpdma_chan_submit(chan, desc); From patchwork Sun Dec 29 17:22:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182576 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5480085ild; Sun, 29 Dec 2019 10:09:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzSfogwyODinsqYDUIWDFYMJqvmaaAHxHc8kZsKIIYXlhAYSPr6KBZAf2U7LdLxtI7WTMGT X-Received: by 2002:a9d:6b12:: with SMTP id g18mr67444965otp.211.1577642999293; Sun, 29 Dec 2019 10:09:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577642999; cv=none; d=google.com; s=arc-20160816; b=eiUArvfEmtLu/62OuQlLwpfivKaiJJFflSPJ0eKMQFMW9vBf2f69G1f1YehaXSP6JH FXR0CkFHnk8+mS5yZJjVfqdzBPdQkFj2Xt5kpEir0FFtcBjUhXZVxtt/IcROo4RKXx7+ W9TUGHnHS8bUFUAy7YFMCW/YMhrnaYifojnodt82Rv8cyeE7d2OhaU4jaUnkW2YKm4SL npLumY0v/yYdNJVmprLzjFEhWuEhuuRqoI4AhzJ2V7bvknfEyJ8aBbrwsZ9SEHMSGpNp iPvNolCbhNWbM/AOie5Fg2wbTN/6xbWi9pyo8ZIotdBzB9E7jLREsTnk4laMSydIX1ki ukqw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4mhm375tKOHtAzZSCsWZ1NIzf3tFi4+kaNsf9kXkYoI=; b=s2HCMNLRAyh94vOX0hrNHgIpL0tIwG3gC/J0Oxix/9jeJV7d2+NkY+p97I3qcpEUM0 qWuisp8VRjXvowABfFy7C2c6aCC7myA8baDsyYLyGUao9SXGGNc0VUjd6hA2lLlP9c77 zxqhEvxVADXY6KsWh7vku+AH/m6soOsoSyen3ePmk87vDhwXmmuDutlj28Ez+r65VNmo n6oapohdbJvYBMJLwPmw2nj8D64YPXVZtjAoz/tXMrJ1mI3glsJjjwfr2zabRzujeeJN Zp+2RlKIKRIUODaXpmIKvupUko3TVXHGOR47noCdGBjCdkExRlDunudk3T7oqS6wvSzP WQQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MMeU9ghB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z25si17635481oic.23.2019.12.29.10.09.59; Sun, 29 Dec 2019 10:09:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MMeU9ghB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731827AbfL2SJ6 (ORCPT + 27 others); Sun, 29 Dec 2019 13:09:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:54136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730858AbfL2RpO (ORCPT ); Sun, 29 Dec 2019 12:45:14 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5C91D206DB; Sun, 29 Dec 2019 17:45:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641513; bh=bFNiQNRUnwf7NbQH8R9FB9j32/jBKVRVxDZM5wXzECI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MMeU9ghB37hDMMzq+h2zIeCG2WO75taLM/6vZcJingPdEx0Y0PR+VZsmiEvMdMncl v4zj2iWd2Ilhxtz2MTqJwBYwBQdfDsYd3S9S161R7mH/GcXR0V27yheroYaPo0Dcc6 YftG9R14rf+LzI3FMtWao/1cYb6SCqPlRzlc7OZY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ivan Khoronzhuk , Daniel Borkmann , Song Liu , Sasha Levin Subject: [PATCH 5.4 096/434] selftests/bpf: Correct path to include msg + path Date: Sun, 29 Dec 2019 18:22:29 +0100 Message-Id: <20191229172707.955862688@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ivan Khoronzhuk [ Upstream commit c588146378962786ddeec817f7736a53298a7b01 ] The "path" buf is supposed to contain path + printf msg up to 24 bytes. It will be cut anyway, but compiler generates truncation warns like: " samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c: In function ‘setup_cgroup_environment’: samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:52:34: warning: ‘/cgroup.controllers’ directive output may be truncated writing 19 bytes into a region of size between 1 and 4097 [-Wformat-truncation=] snprintf(path, sizeof(path), "%s/cgroup.controllers", cgroup_path); ^~~~~~~~~~~~~~~~~~~ samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:52:2: note: ‘snprintf’ output between 20 and 4116 bytes into a destination of size 4097 snprintf(path, sizeof(path), "%s/cgroup.controllers", cgroup_path); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:72:34: warning: ‘/cgroup.subtree_control’ directive output may be truncated writing 23 bytes into a region of size between 1 and 4097 [-Wformat-truncation=] snprintf(path, sizeof(path), "%s/cgroup.subtree_control", ^~~~~~~~~~~~~~~~~~~~~~~ cgroup_path); samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:72:2: note: ‘snprintf’ output between 24 and 4120 bytes into a destination of size 4097 snprintf(path, sizeof(path), "%s/cgroup.subtree_control", cgroup_path); " In order to avoid warns, lets decrease buf size for cgroup workdir on 24 bytes with assumption to include also "/cgroup.subtree_control" to the address. The cut will never happen anyway. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20191002120404.26962-3-ivan.khoronzhuk@linaro.org Signed-off-by: Sasha Levin --- tools/testing/selftests/bpf/cgroup_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/tools/testing/selftests/bpf/cgroup_helpers.c b/tools/testing/selftests/bpf/cgroup_helpers.c index e95c33e333a4..b29a73fe64db 100644 --- a/tools/testing/selftests/bpf/cgroup_helpers.c +++ b/tools/testing/selftests/bpf/cgroup_helpers.c @@ -98,7 +98,7 @@ int enable_all_controllers(char *cgroup_path) */ int setup_cgroup_environment(void) { - char cgroup_workdir[PATH_MAX + 1]; + char cgroup_workdir[PATH_MAX - 24]; format_cgroup_path(cgroup_workdir, ""); From patchwork Sun Dec 29 17:22:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182555 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5459640ild; Sun, 29 Dec 2019 09:45:47 -0800 (PST) X-Google-Smtp-Source: APXvYqxwlbCVoEvq6Vnp6eyxmcDFZryFlSRUUzVrAwjaH3V+V0foWaQEcjXbyGmqt3CMo5kYQCgU X-Received: by 2002:a05:6830:1487:: with SMTP id s7mr47244204otq.269.1577641547143; Sun, 29 Dec 2019 09:45:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577641547; cv=none; d=google.com; s=arc-20160816; b=gQxLC5DQ47yDoewcgJmjVRafKKISvb/xvvw0ehmefkns96QXgijuKH3rcai09F1pvW eI/wUDr+HOsC4pjPY89qEpY+aXRcmFFfEoyPxOgC0fKs+Kc8of2Wyu/eRcuCI7a/3koo fgrAT5qTmq6mcQzuum8zAzpvdgH9WzClgwq3c+xlL5MEneTZiabFoAz9v7fnSDfk6JSw J5563b3bjxYqF2YlI093rpt/OIZ2qVJ5m+FyoureM+IcQE1rDzktiKm08AW3BPJznSDp 6x8IIEL8pTLmP9xn5eAa5ouuZZodCJX8udJu/+6jHw/WWr+CcDutmNbJ4r8E00PcN8Xz OhVg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bqILxdGv3MvpKKUqlMmD+2XyJUNECgYnmHm6kpE+o+0=; b=AqGBeMaZZrusTaE4BkKN5igwPPsQ5wRrcJKYbxMrUnyZlaOTzfW/2KZnBLn1yu4Gz9 T4GQ3G53q2EkJThpWc5oy1yWqAIQrh32bPvcnBl5F8dqlGo94DnpISOboHUuiyuCMsX9 V57PGUlbvv6TwCFiqeAp7hfYqV5iJhxJfQQD9zXntYFkyujzdnk6++PwuKu4mIjF4hMc 7n+3zem64b21VpZA1MHdmFmuRDBzZDa+qR3KHMTYkCBqrfF8zRBG2JuCB8BUvM8xQ5CT dopF5SqDV3ZQpzreVokWrHvzb/aN5zMqDnPI7U24LbLD1w3YahDgbV/TgGozDi4W/i3w IIXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FHk8xTuj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 8si20697564ota.266.2019.12.29.09.45.46; Sun, 29 Dec 2019 09:45:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FHk8xTuj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730962AbfL2Rpp (ORCPT + 27 others); Sun, 29 Dec 2019 12:45:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:55006 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730948AbfL2Rpn (ORCPT ); Sun, 29 Dec 2019 12:45:43 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5771F207FF; Sun, 29 Dec 2019 17:45:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641542; bh=E7izfWPlwyhCF3cCpQ1/HKIJmhsp2mzd5B227t/0c1Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FHk8xTuj60y05Xrh055uE67u2pwwylHvWy88f/g9Xv5WUojgoRX9p4n9/cKAeKzYt sUy8dpH9VddB+91NkNombY7AgFltx48xxz8Wa8E7apxxc+HDO1hcPGXwEypjYOTkMB jBMm6Bruwv6OCTtZj6eQs3ZMRsCQKEfOIY5oZxY8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel , Herbert Xu , Sasha Levin Subject: [PATCH 5.4 102/434] crypto: aegis128-neon - use Clang compatible cflags for ARM Date: Sun, 29 Dec 2019 18:22:35 +0100 Message-Id: <20191229172708.377116281@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ard Biesheuvel [ Upstream commit 2eb2d198bd6cd0083a5363ce66272fb34a19928f ] The next version of Clang will start policing compiler command line options, and will reject combinations of -march and -mfpu that it thinks are incompatible. This results in errors like clang-10: warning: ignoring extension 'crypto' because the 'armv7-a' architecture does not support it [-Winvalid-command-line-argument] /tmp/aegis128-neon-inner-5ee428.s: Assembler messages: /tmp/aegis128-neon-inner-5ee428.s:73: Error: selected processor does not support `aese.8 q2,q14' in ARM mode when buiding the SIMD aegis128 code for 32-bit ARM, given that the 'armv7-a' -march argument is considered to be compatible with the ARM crypto extensions. Instead, we should use armv8-a, which does allow the crypto extensions to be enabled. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- crypto/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/crypto/Makefile b/crypto/Makefile index fcb1ee679782..aa740c8492b9 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -93,7 +93,7 @@ obj-$(CONFIG_CRYPTO_AEGIS128) += aegis128.o aegis128-y := aegis128-core.o ifeq ($(ARCH),arm) -CFLAGS_aegis128-neon-inner.o += -ffreestanding -march=armv7-a -mfloat-abi=softfp +CFLAGS_aegis128-neon-inner.o += -ffreestanding -march=armv8-a -mfloat-abi=softfp CFLAGS_aegis128-neon-inner.o += -mfpu=crypto-neon-fp-armv8 aegis128-$(CONFIG_CRYPTO_AEGIS128_SIMD) += aegis128-neon.o aegis128-neon-inner.o endif From patchwork Sun Dec 29 17:22:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182557 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5460152ild; Sun, 29 Dec 2019 09:46:24 -0800 (PST) X-Google-Smtp-Source: APXvYqx2gS1JkdFGliOLB9N30wyffA47XbOcSFEAdg30QhaEuFxK5HgKkFWnH1OawZM4JdWAbvby X-Received: by 2002:a9d:518b:: with SMTP id y11mr66340365otg.349.1577641584258; Sun, 29 Dec 2019 09:46:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577641584; cv=none; d=google.com; s=arc-20160816; b=kT8wa2tCFSFN090sI/1O1FZAEXan2LMZCRhl5mLYd+G5VQ8iam2S6MuPNJBzGG/PXk sDFrdtnvDMyF7OkqYhzzwL5lrRCXfWES7E+6CAApKOTjstZg2joUnPwf04pTnmakr76X LtXBBYTjhXmLsBoksJD1KD95bcl4a0CZ++fE9l6bti+zxdJbhTlbzyjFVtKrF28sY1mg 4480IQky2OXq72zxLo7LOX3EjKOJ2y9avrKSbSE5tyIxVKqUwUtk6vyieWqOLy+zQqlD o1I+yBAw0IPkXOfpUStUXBF42C9RRDt8YkNxjRjaDzeghQJIygGPYwNVNANoOsgijati xalg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Bh5BSbW2we0lVWWUbwHFx62PtQh4ZlkZH1jeG/5nQi0=; b=RBW+ZyyseWF03x5t12QwMxFxVVOzXP3Xam4njXc27XOITO9Kq60iI6kQi82g4EhsRy A1XDsbRZH17dguB7wNeI5A5yApyvRIrbEBLcDuV5Gw6Pjiqp1/1zxE6JeWobY5cOq/nu 4NYhHipdug5wCId7o0l+LjFp5x8Kw03Xl1nJ3UdYdqhHyyHWsRfyUa/5//h8kg5MtIqI iPAOZrfkS3DcePsLOZBC8OVzxyhXMV+PIeEr664N2RIPXIsl7tVrVyslWnG2kI0As/fr XKHXi7UGsj0eKwnZ2RpllH6qFdVOoxz9uAjl9fFmRjteWEbmYDfStPPj4wtTFEq+gAzk LRGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wnZdZOiU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b18si9406078oib.170.2019.12.29.09.46.23; Sun, 29 Dec 2019 09:46:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wnZdZOiU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731061AbfL2RqW (ORCPT + 27 others); Sun, 29 Dec 2019 12:46:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:55928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731047AbfL2RqR (ORCPT ); Sun, 29 Dec 2019 12:46:17 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 262D824670; Sun, 29 Dec 2019 17:46:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641576; bh=hXZmK+bkVoyydZcV2t6icF7qk4k967/iyGDHo0RHLoY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wnZdZOiUoTFUkL/jiNdEa+6ORfKTjZxvfFOiI8bVibpx43aAAe1MnSnN/9l8geAIb qB9mz7RNQyoXef7qs8P0orZCTpxibHPRDtR6X76gia8sA7+B7xSnD/Yd2yW74RIdmQ Q6YHVRIYxHxRhsSxsq1A75545PNGbPcLn51x9zJk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Pascal van Leeuwen , Herbert Xu , Sasha Levin Subject: [PATCH 5.4 123/434] crypto: inside-secure - Fix a maybe-uninitialized warning Date: Sun, 29 Dec 2019 18:22:56 +0100 Message-Id: <20191229172709.865939809@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 74e6bd472b6d9e80ec9972989d8991736fe46c51 ] A previous fixup avoided an unused variable warning but replaced it with a slightly scarier warning: drivers/crypto/inside-secure/safexcel.c:1100:6: error: variable 'irq' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] This is harmless as it is impossible to get into this case, but the compiler has no way of knowing that. Add an explicit error handling case to make it obvious to both compilers and humans reading the source. Fixes: 212ef6f29e5b ("crypto: inside-secure - Fix unused variable warning when CONFIG_PCI=n") Signed-off-by: Arnd Bergmann Acked-by: Pascal van Leeuwen Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/inside-secure/safexcel.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c index 294debd435b6..991a4425f006 100644 --- a/drivers/crypto/inside-secure/safexcel.c +++ b/drivers/crypto/inside-secure/safexcel.c @@ -1120,6 +1120,8 @@ static int safexcel_request_ring_irq(void *pdev, int irqid, irq_name, irq); return irq; } + } else { + return -ENXIO; } ret = devm_request_threaded_irq(dev, irq, handler, From patchwork Sun Dec 29 17:22:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182575 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5479058ild; Sun, 29 Dec 2019 10:08:59 -0800 (PST) X-Google-Smtp-Source: APXvYqxfTxRrJQsjRk/OXY5+YeW27DnEkFkYNBFnZdpQpf9SBJhcxnlHgb4o+7nBpnHi2DK/g185 X-Received: by 2002:a9d:7f11:: with SMTP id j17mr72462690otq.281.1577642939317; Sun, 29 Dec 2019 10:08:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577642939; cv=none; d=google.com; s=arc-20160816; b=d9UUrM9/GxlQoWRLCymyilRmkGJZlTO+dQk78Z6khLrJ5NE0BazLU4Gxp/C5KkbJ0B 9/XXwh1RXucy2zrPHK/BV9UzrGdVz10d9xjfSuKCMc/OmHGM7T0stQbrZ7tVCRGM32qh itW4QT/nvhfYsWUOxKvG/XKYijgk4f/uQgmMtooW326vqogiDv7kvDe4zdNuenJjHBfJ PHQWxml5siHt/2JrJX9USLQ/LYS5zkoAPYyorKUcp5kHTe0vOxl77Df05re7Ynz3Xu71 a0eeADLvrrXKEovLuxu3sdsHuI76S7ptSdxBVUTm/16gLorPqREDGOvmkfkL0zPqaXKh V9Kw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jzyWak/eyZBW5h4nuUxRdgBUeXlBeK+1tDjtdRcUCbc=; b=pKt0MbfK9GpY2MtZgUA8oPYrncKhLuqC4sjF8XFAFbnqb3NcGQ0/BO3MxzjcTs/5NE Wl5qRV68z4tehioa3pQ2X4kGG9OSHX1bUdsUdAKKa4esbTjzaStkkAceJU3AnFtnzx2t IsXBPnHNBIyassVgZlnXNHbRSHBODdBNW+ZpD1/MYZnBaYh7mP5t/huLopuORFCePHsP XKcl+aD7NWBgzDu8KMtyXWxQPAo0ExWAf2/myOZfTRKuewN+NOAlMvhYSkZ1xQ1JFTNK a1PxxtF6gc5iWTE9BjdKe15wVnMCKIBIO8I0TZZaQJZP+/OMrqCT6Q+AsqkC6E9Uv5OC MOnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MID9bwUA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r2si9358694oif.83.2019.12.29.10.08.58; Sun, 29 Dec 2019 10:08:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MID9bwUA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731083AbfL2Rq3 (ORCPT + 27 others); Sun, 29 Dec 2019 12:46:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:56060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731059AbfL2RqW (ORCPT ); Sun, 29 Dec 2019 12:46:22 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 02C45207FD; Sun, 29 Dec 2019 17:46:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641581; bh=7n4dLVhug/MW4tU0tHSU9xP1KOHu9yfjbj2Fml1wVEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MID9bwUAVAHuZiKGFir+8JKd7FnvZBSY1eKWiGhvAktyRinaJ6pnJDz1rjrgvvCfa 3zk3au3HafgKLR5p2azZ5+WdrWCedoxalgA9bcyc7++JRJtTkCG7/1ryKTtQitw+sZ wY76eZSqq0syV7jQ9zD2IbP9oBExzgiLWRP4ICAg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Srinivas Kandagatla , Bjorn Andersson , Sasha Levin Subject: [PATCH 5.4 125/434] misc: fastrpc: fix memory leak from miscdev->name Date: Sun, 29 Dec 2019 18:22:58 +0100 Message-Id: <20191229172710.001573260@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Srinivas Kandagatla [ Upstream commit 2d10d2d170723e9278282458a6704552dcb77eac ] Fix a memory leak in miscdev->name by using devm_variant Orignally reported by kmemleak: [] kmemleak_alloc+0x50/0x84 [] __kmalloc_track_caller+0xe8/0x168 [] kvasprintf+0x78/0x100 [] kasprintf+0x50/0x74 [] fastrpc_rpmsg_probe+0xd8/0x20c [] rpmsg_dev_probe+0xa8/0x148 [] really_probe+0x208/0x248 [] driver_probe_device+0x98/0xc0 [] __device_attach_driver+0x9c/0xac [] bus_for_each_drv+0x60/0x8c [] __device_attach+0x8c/0x100 [] device_initial_probe+0x20/0x28 [] bus_probe_device+0x34/0x7c [] device_add+0x420/0x498 [] device_register+0x24/0x2c Signed-off-by: Srinivas Kandagatla Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20191009144123.24583-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/misc/fastrpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 1b1a794d639d..842f2210dc7e 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -1430,8 +1430,8 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev) return -ENOMEM; data->miscdev.minor = MISC_DYNAMIC_MINOR; - data->miscdev.name = kasprintf(GFP_KERNEL, "fastrpc-%s", - domains[domain_id]); + data->miscdev.name = devm_kasprintf(rdev, GFP_KERNEL, "fastrpc-%s", + domains[domain_id]); data->miscdev.fops = &fastrpc_fops; err = misc_register(&data->miscdev); if (err) From patchwork Sun Dec 29 17:23:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182561 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5462252ild; Sun, 29 Dec 2019 09:49:08 -0800 (PST) X-Google-Smtp-Source: APXvYqzSSCwzfuXIwfNCufH2UbK/VF0ekQGyFzbpykMpSpFiOTb3W25KHPG9yXhAYRLcjVOHPOgV X-Received: by 2002:a05:6830:1f95:: with SMTP id v21mr62639643otr.325.1577641748778; Sun, 29 Dec 2019 09:49:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577641748; cv=none; d=google.com; s=arc-20160816; b=Pq/ESbAN7/5O6+o1pH+4N/a8ETiCo1Dm9EB+t26241MamqrBeUctMzmOACtYtbE7pf VNQcihk9A9yBDUmcBQ81jDJ8hDgBFzL7/6Y+ugX7ymHWj2kOkGcmq8Ukwpyb7gzB1hfX 9UGN1XpVBVBG27nDK2lg9Rq4oYgbS2xxwvljHpQeMlTBQBooIOSiZJ6hF1R71+6Fggzt RXov0pv6p9XsJWUnphKVVlqUPZHjeYAH2nugCXMVh6URF7V9Coo7upAH84DVaGBgD9bs Tx/F4cqAap4UXBk6FDwvDpRWpn9uRnPazeSKNdQ36EcOJ8iJtfZrBxh8vbCaq+RXHYSu dKJA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xAi+BqOXKpc5Vek77lcJVPsvM6EJkpBblplOOyL6jvc=; b=wR1f2IT4tnM7c6OR0rwLwlrzAwlkKXuIZcSw7BJiuKQXMiCEVQjHAiiXPEDvh5+oMC YKZfqixfRsXXHQgZqzmekGAwHPw0OtNYnnbDipP0tfxrzK388hDxiB2VV1BVMZvJz7ri eqdYLrojcp7FQm5oIF8ia276c4xBBYX5qalno27+WzysLP2ewha9Ib7BOQyHOYBDSfbJ mdqSwip0Aw/20zAe9yeOF9dou2F+r+8gobGuEoOIRJEf879wZJxzScwjfLCctY3JHVyx nBMnYIlBe3ZkAI9mHVqKIVMNo5a/DqFVSFUMw0SdRL2x598Qn3wafM6V7oC45xBejUh2 Za/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sds4mOiW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r65si19767770oig.69.2019.12.29.09.49.08; Sun, 29 Dec 2019 09:49:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sds4mOiW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730904AbfL2RtH (ORCPT + 27 others); Sun, 29 Dec 2019 12:49:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:60832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731261AbfL2RtE (ORCPT ); Sun, 29 Dec 2019 12:49:04 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D9073206DB; Sun, 29 Dec 2019 17:49:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641744; bh=mPXe+j/UekjGyeu7KFX+1upusvWLubhG5A9IVZjXqoY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sds4mOiWPaF336M2gcGWHsLqE84s1x1BsEvMmULUHvBKmevJKISXJmAydgT6a93NF BxgX0G4CCMNJkvoH3Cl0tBu9Bb76H9HkCwyfAAjzuyW9lVgGnLB0zsoDQxyGVTveKd v8CGSnHEUwgY6NKK9kWLZ7kV/0BABcxzeHUcxEGY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Marcel Holtmann , Sasha Levin Subject: [PATCH 5.4 152/434] Bluetooth: btusb: avoid unused function warning Date: Sun, 29 Dec 2019 18:23:25 +0100 Message-Id: <20191229172711.854616098@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 42d22098127d6384f789107f59caae87d7520fc4 ] The btusb_rtl_cmd_timeout() function is used inside of an ifdef, leading to a warning when this part is hidden from the compiler: drivers/bluetooth/btusb.c:530:13: error: unused function 'btusb_rtl_cmd_timeout' [-Werror,-Wunused-function] Use an IS_ENABLED() check instead so the compiler can see the code and then discard it silently. Fixes: d7ef0d1e3968 ("Bluetooth: btusb: Use cmd_timeout to reset Realtek device") Signed-off-by: Arnd Bergmann Signed-off-by: Marcel Holtmann Signed-off-by: Sasha Levin --- drivers/bluetooth/btusb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index a9c35ebb30f8..23e606aaaea4 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -3807,8 +3807,8 @@ static int btusb_probe(struct usb_interface *intf, btusb_check_needs_reset_resume(intf); } -#ifdef CONFIG_BT_HCIBTUSB_RTL - if (id->driver_info & BTUSB_REALTEK) { + if (IS_ENABLED(CONFIG_BT_HCIBTUSB_RTL) && + (id->driver_info & BTUSB_REALTEK)) { hdev->setup = btrtl_setup_realtek; hdev->shutdown = btrtl_shutdown_realtek; hdev->cmd_timeout = btusb_rtl_cmd_timeout; @@ -3819,7 +3819,6 @@ static int btusb_probe(struct usb_interface *intf, */ set_bit(BTUSB_WAKEUP_DISABLE, &data->flags); } -#endif if (id->driver_info & BTUSB_AMP) { /* AMP controllers do not support SCO packets */ From patchwork Sun Dec 29 17:23:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182573 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5478004ild; Sun, 29 Dec 2019 10:07:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxr/v8oq/h28O7v0KbDAWZnQoZ1mfYRjG0cljQCFFhc4ijkYiiQ/dh3bMYOou0/ujNLXD/9 X-Received: by 2002:a9d:624e:: with SMTP id i14mr70993143otk.371.1577642869937; Sun, 29 Dec 2019 10:07:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577642869; cv=none; d=google.com; s=arc-20160816; b=oI9Kwpmzwn1bqw1j2roc3QVuh7ZDbMZ347NYsfv+xNhizyhtLNhwdAkabXHKcyzh4b 3s1QltOdDMybhy5tKiR8PpBS886zEVmSMEQyf+BVFQK/qHXZeruhhO1Zd+eBn/ogIp2E MLJ3tK4WIsLcxxBfv/98WDcrXoT3mRruZ/DfipWfD9c5zAuvqqw97IqjnksZWS3LgPaV 6pT0emsK6zkhNcGXK1mULV46HHYOfEGZW3BMZXgYSX9P1ET7+hy7n7XV6+vnFgpxSRwK B3s4zHv4f+Gx5s+EGoJFzzKZT/okKorhlwvceXuM1WRxgsUMvLkOalds39ywhLXuRphG tXig== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=u+lkb5ejHcDN1yY1zrZR+XEVc6Gi8a1qnm9U5XTPirE=; b=OSW9USCilkhx6FSPsZCLAT+Ws3EqvljqUjWn3ZlePWCypnb+RRC/3H4DEVy+OJr/FB UQhEBApwsKTywtfGPovcU0Zxgc7KKN0plgCu1v67gW1c2hJIKc8ud+3taFsxXqPOn0x8 VX1EWfeWQQaMZ4PHjnU3+BC+I6LxnSv2O0GfJ7cA98bDJDQCkcSVjBpODRqBEHMvn9WP blBj50XpRP6N28L0eo3KQN+WDJQEPh736Esz2b1x4Fv1JrXUk3f2PSHlK4CqzNLtM3up 4U4vBvyu59k5Rx2bmKyztdQkqPDXVgCtLcYfoRGE6SwpG+/YRpl9UL2s8eGErx8++k22 SB3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ehgtk1xh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y22si22143636oti.269.2019.12.29.10.07.49; Sun, 29 Dec 2019 10:07:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ehgtk1xh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731363AbfL2Rr4 (ORCPT + 27 others); Sun, 29 Dec 2019 12:47:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:58792 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731019AbfL2Rrx (ORCPT ); Sun, 29 Dec 2019 12:47:53 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 466E4206A4; Sun, 29 Dec 2019 17:47:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641672; bh=mye650C+sF4IBOpYtJXiGOLwPWidUGX5Vqex7cB2FE4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ehgtk1xhbWs2mIBPPX8vkYRnLSwPenGUexSg2P1E/rMWnTKToJ9dijwlCuikZP9e/ CLrmLsSz+q3eAXdGQSBZi0t9etTL9Z/3MwYjM8AlHNcvwzN7R7SLfvGX79YMN++0cC 8Ln0uCHfHMg8lGM3sPkZQTL8ugmvC9wpAiPvF9FY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leo Yan , Adrian Hunter , Alexander Shishkin , Brajeswar Ghosh , Florian Fainelli , Jiri Olsa , Mark Rutland , Michael Petlan , Namhyung Kim , Peter Zijlstra , Song Liu , Souptick Joarder , Will Deacon , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 5.4 163/434] perf tests: Disable bp_signal testing for arm64 Date: Sun, 29 Dec 2019 18:23:36 +0100 Message-Id: <20191229172712.608153205@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leo Yan [ Upstream commit 6a5f3d94cb69a185b921cb92c39888dc31009acb ] As there are several discussions for enabling perf breakpoint signal testing on arm64 platform: arm64 needs to rely on single-step to execute the breakpointed instruction and then reinstall the breakpoint exception handler. But if we hook the breakpoint with a signal, the signal handler will do the stepping rather than the breakpointed instruction, this causes infinite loops as below: Kernel space | Userspace ---------------------------------|-------------------------------- | __test_function() -> hit | breakpoint breakpoint_handler() | `-> user_enable_single_step() | do_signal() | | sig_handler() -> Step one | instruction and | trap to kernel single_step_handler() | `-> reinstall_suspended_bps() | | __test_function() -> hit | breakpoint again and | repeat up flow infinitely As Will Deacon mentioned [1]: "that we require the overflow handler to do the stepping on arm/arm64, which is relied upon by GDB/ptrace. The hw_breakpoint code is a complete disaster so my preference would be to rip out the perf part and just implement something directly in ptrace, but it's a pretty horrible job". Though Will commented this on arm architecture, but the comment also can apply on arm64 architecture. For complete information, I searched online and found a few years back, Wang Nan sent one patch 'arm64: Store breakpoint single step state into pstate' [2]; the patch tried to resolve this issue by avoiding single stepping in signal handler and defer to enable the signal stepping when return to __test_function(). The fixing was not merged due to the concern for missing to handle different usage cases. Based on the info, the most feasible way is to skip Perf breakpoint signal testing for arm64 and this could avoid the duplicate investigation efforts when people see the failure. This patch skips this case on arm64 platform, which is same with arm architecture. [1] https://lkml.org/lkml/2018/11/15/205 [2] https://lkml.org/lkml/2015/12/23/477 Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Brajeswar Ghosh Cc: Florian Fainelli Cc: Jiri Olsa Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Souptick Joarder Cc: Will Deacon Link: http://lore.kernel.org/lkml/20191018085531.6348-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/tests/bp_signal.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) -- 2.20.1 diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c index c1c2c13de254..166f411568a5 100644 --- a/tools/perf/tests/bp_signal.c +++ b/tools/perf/tests/bp_signal.c @@ -49,14 +49,6 @@ asm ( "__test_function:\n" "incq (%rdi)\n" "ret\n"); -#elif defined (__aarch64__) -extern void __test_function(volatile long *ptr); -asm ( - ".globl __test_function\n" - "__test_function:\n" - "str x30, [x0]\n" - "ret\n"); - #else static void __test_function(volatile long *ptr) { @@ -302,10 +294,15 @@ bool test__bp_signal_is_supported(void) * stepping into the SIGIO handler and getting stuck on the * breakpointed instruction. * + * Since arm64 has the same issue with arm for the single-step + * handling, this case also gets suck on the breakpointed + * instruction. + * * Just disable the test for these architectures until these * issues are resolved. */ -#if defined(__powerpc__) || defined(__s390x__) || defined(__arm__) +#if defined(__powerpc__) || defined(__s390x__) || defined(__arm__) || \ + defined(__aarch64__) return false; #else return true; From patchwork Sun Dec 29 17:24:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182562 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5462843ild; Sun, 29 Dec 2019 09:49:57 -0800 (PST) X-Google-Smtp-Source: APXvYqwjp9PpfJtOxxGAUpMlx6XeiVuw3x8mtcBniGt+rEYyixuNjHdN6Sb6E2JuFFzDWjWt1j0R X-Received: by 2002:a9d:4d8d:: with SMTP id u13mr67398366otk.299.1577641797239; Sun, 29 Dec 2019 09:49:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577641797; cv=none; d=google.com; s=arc-20160816; b=J64R1dMvYlChJeaUUn8+9nwghKkEehOU0e9zEz6qTYPAfp4EkPlvCJzyM91BDMpUFF zGU8saMiTz7kc927JFcHnJQRXLiSFDBtHSx+SEK7lqiUP/jjTSuKXnCI8eFoiMlcnrh8 63Rw245JAyI6aFioIiMup0mhygUnm8mA/nSHAFCk2pdtEy7CNiwZqIAxDt9Gycfnr4gq IJ52g7Ub1Om5n8n0RUjhbjLKA9q58PKUsSMfNVAz1jQQytlGyLyKBsue2gwPLKaSt4Gu u4tNXPWWZxo5o2c7vMdquhh22kUU9mH+XouRkKlLkMl4se72EYUxrjcE9Faws4wQZ7VH 9z1g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=W/FD4QHyrj08EY+3jJpJO/OyNmHVm39PxpB0zUb1m1Q=; b=YwIkFa9Xref24vh/SIGG5HSRBCz9lNfGCkDOKE1B3TbNLi5b/lk7ojj8gWcPV4eztK G7CfbHuxe/gbsY+Xs2jPT9jvpaql8ebEy543YpcscO6Xe5wdDJoi5T0aX5PF7YiYP8yx 0pJxDtcZgZfa/A0DdRjI9rzw9lVPllih3Rz2JqlT16iqC/u0vZOQ8tKg+y2nXZpVqjgE 0u9liyXEEU36ELb44cFQsFrUT106GqOHRJUEMAuqP5Wz7ZmC4gJAQHgbcS8DBGWTQkK6 oSyJHgSFM9/eL3N4zMWKd//h3jkR8hEmROtpO1jTjKdQ3NtrujXA74b9AYEcxPMXnh5M HV5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=J6mKdtNS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x137si19515183oif.42.2019.12.29.09.49.57; Sun, 29 Dec 2019 09:49:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=J6mKdtNS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731777AbfL2Rtz (ORCPT + 27 others); Sun, 29 Dec 2019 12:49:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:33900 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731761AbfL2Rtx (ORCPT ); Sun, 29 Dec 2019 12:49:53 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D263320718; Sun, 29 Dec 2019 17:49:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641792; bh=cvAEJuiJThNbmw/zdeNsOBj3VDFRwX3r00EqoPreu/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J6mKdtNSfXItyyIsVjbVvjsWnYN8t43LzhSJz+0OTGt2K5HB8hANUU0N1B+v+KSEO gUdY1dfZQFuFS8rEXHPafU7+T64TTLYW/ebF0eO2Fgvn34ySL9EXvcmR9lUYev1PxL 5tKpPP0TWuKShosTsu/VvSZQTV5JLD4t5VOVRMN4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John Garry , Jens Axboe , Sasha Levin Subject: [PATCH 5.4 213/434] libata: Ensure ata_port probe has completed before detach Date: Sun, 29 Dec 2019 18:24:26 +0100 Message-Id: <20191229172715.977210635@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Garry [ Upstream commit 130f4caf145c3562108b245a576db30b916199d2 ] With CONFIG_DEBUG_TEST_DRIVER_REMOVE set, we may find the following WARN: [ 23.452574] ------------[ cut here ]------------ [ 23.457190] WARNING: CPU: 59 PID: 1 at drivers/ata/libata-core.c:6676 ata_host_detach+0x15c/0x168 [ 23.466047] Modules linked in: [ 23.469092] CPU: 59 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc1-00010-g5b83fd27752b-dirty #296 [ 23.477776] Hardware name: Huawei D06 /D06, BIOS Hisilicon D06 UEFI RC0 - V1.16.01 03/15/2019 [ 23.486286] pstate: a0c00009 (NzCv daif +PAN +UAO) [ 23.491065] pc : ata_host_detach+0x15c/0x168 [ 23.495322] lr : ata_host_detach+0x88/0x168 [ 23.499491] sp : ffff800011cabb50 [ 23.502792] x29: ffff800011cabb50 x28: 0000000000000007 [ 23.508091] x27: ffff80001137f068 x26: ffff8000112c0c28 [ 23.513390] x25: 0000000000003848 x24: ffff0023ea185300 [ 23.518689] x23: 0000000000000001 x22: 00000000000014c0 [ 23.523987] x21: 0000000000013740 x20: ffff0023bdc20000 [ 23.529286] x19: 0000000000000000 x18: 0000000000000004 [ 23.534584] x17: 0000000000000001 x16: 00000000000000f0 [ 23.539883] x15: ffff0023eac13790 x14: ffff0023eb76c408 [ 23.545181] x13: 0000000000000000 x12: ffff0023eac13790 [ 23.550480] x11: ffff0023eb76c228 x10: 0000000000000000 [ 23.555779] x9 : ffff0023eac13798 x8 : 0000000040000000 [ 23.561077] x7 : 0000000000000002 x6 : 0000000000000001 [ 23.566376] x5 : 0000000000000002 x4 : 0000000000000000 [ 23.571674] x3 : ffff0023bf08a0bc x2 : 0000000000000000 [ 23.576972] x1 : 3099674201f72700 x0 : 0000000000400284 [ 23.582272] Call trace: [ 23.584706] ata_host_detach+0x15c/0x168 [ 23.588616] ata_pci_remove_one+0x10/0x18 [ 23.592615] ahci_remove_one+0x20/0x40 [ 23.596356] pci_device_remove+0x3c/0xe0 [ 23.600267] really_probe+0xdc/0x3e0 [ 23.603830] driver_probe_device+0x58/0x100 [ 23.608000] device_driver_attach+0x6c/0x90 [ 23.612169] __driver_attach+0x84/0xc8 [ 23.615908] bus_for_each_dev+0x74/0xc8 [ 23.619730] driver_attach+0x20/0x28 [ 23.623292] bus_add_driver+0x148/0x1f0 [ 23.627115] driver_register+0x60/0x110 [ 23.630938] __pci_register_driver+0x40/0x48 [ 23.635199] ahci_pci_driver_init+0x20/0x28 [ 23.639372] do_one_initcall+0x5c/0x1b0 [ 23.643199] kernel_init_freeable+0x1a4/0x24c [ 23.647546] kernel_init+0x10/0x108 [ 23.651023] ret_from_fork+0x10/0x18 [ 23.654590] ---[ end trace 634a14b675b71c13 ]--- With KASAN also enabled, we may also get many use-after-free reports. The issue is that when CONFIG_DEBUG_TEST_DRIVER_REMOVE is set, we may attempt to detach the ata_port before it has been probed. This is because the ata_ports are async probed, meaning that there is no guarantee that the ata_port has probed prior to detach. When the ata_port does probe in this scenario, we get all sorts of issues as the detach may have already happened. Fix by ensuring synchronisation with async_synchronize_full(). We could alternatively use the cookie returned from the ata_port probe async_schedule() call, but that means managing the cookie, so more complicated. Signed-off-by: John Garry Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- drivers/ata/libata-core.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.20.1 diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 28c492be0a57..74c9b3032d46 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -6708,6 +6708,9 @@ void ata_host_detach(struct ata_host *host) { int i; + /* Ensure ata_port probe has completed */ + async_synchronize_full(); + for (i = 0; i < host->n_ports; i++) ata_port_detach(host->ports[i]); From patchwork Sun Dec 29 17:24:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182564 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5463822ild; Sun, 29 Dec 2019 09:51:12 -0800 (PST) X-Google-Smtp-Source: APXvYqzttMxVh1HFXiY+gHTo0OZUjbB/ccqtQGY2w1yRTJXX3Y1dPjlQqBSE49Zw5lU+ciJ6HRoD X-Received: by 2002:a9d:798e:: with SMTP id h14mr67534641otm.257.1577641872463; Sun, 29 Dec 2019 09:51:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577641872; cv=none; d=google.com; s=arc-20160816; b=fI6TFF7BbWYg+/CLfSV0kPT1fjWBK14c9qeHbY25BwdfWOAHdMWnVrE5MJOxa0juKr 0J6z+ykSKDaus4cP445OthJmfbbxpy3POBR9YsknZerwIUJv1z6voF7XcqfximRJviG6 QBfi5SMJObR+lbRrx+JqCf95ZN4BpyIuUbH040UWtlIASDb/acT5Yvs1Sd24pYuXBdA3 KbKw4CZ6PMMP5PvHRWWf8crSMBpX6T47MmkEDq0IL23fNrJ5R0J04WKemtf5U/wcDDMo S7C9OqCvikGIPvj7HI/OEe3PMPWtSNVe2OC+mSM4auce6TVi9nAzx3MujOxbi9/wasjf wQOA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/x8EMjiBrlOo5r1CL1aicMpFf4jDPRsS3yOz8cE054Y=; b=riLSITmoZMZowKfsJCjQ6gM4SihvXRSpbV49ql9NA0nhtOIgBCXKUbAXjsiezxxupv LZyB2g7GLhO8PKadpemODWC3P0IVXOb8WFTSSdUzpKtNa1ZIbnCmNFgUVruxVUdURxnw jVx+r76ZvnAyEW2aoPFwDdWxaGwx2mQEatswjeQ32C5Ryx763WwXCd5feBUXvFR9yY0Q eixpCc5dAokTzYp3jsMSSVbmJ0Hr2YSXjBG6eMW8XcayooEvGEtHazfJUybvSyCHKa2H vSnlKYMtIM7bdrDRXMK04ssuUcXhA6SdfdtOcaTkJGIiqccUXIT1HXFhqZ1+5lNqkqoi oloQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cEmJ1rAJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z11si15063565oic.176.2019.12.29.09.51.12; Sun, 29 Dec 2019 09:51:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cEmJ1rAJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732040AbfL2RvL (ORCPT + 27 others); Sun, 29 Dec 2019 12:51:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:36034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732017AbfL2RvF (ORCPT ); Sun, 29 Dec 2019 12:51:05 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CF07B207FD; Sun, 29 Dec 2019 17:51:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641864; bh=kXUYMUazpeA9aa6t8663MGnk4sLrJM9Oq5+Y8rhQ32w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cEmJ1rAJuX4iyLW3pl/uO1BSa8SDl8jQtcr1h4GP4hUKj69vx3JDlyWBtLStCj3Io AdlnhCvmX2HD7rnMZtBxsBsb8bjR/wZGCJ03+4eGYRHgennz/qEvoRgsOReirMMAFI dmkfybNcYbqK53ZZXNYofj78QQ7uszs+ENa1x9Gs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leo Yan , Mathieu Poirier , Alexander Shishkin , Jiri Olsa , Mark Rutland , Namhyung Kim , Peter Zijlstra , Suzuki Poulouse , coresight ml , linux-arm-kernel@lists.infradead.org, Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 5.4 244/434] perf cs-etm: Fix definition of macro TO_CS_QUEUE_NR Date: Sun, 29 Dec 2019 18:24:57 +0100 Message-Id: <20191229172718.090768227@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leo Yan [ Upstream commit 9d604aad4bb022e848dec80d6fe5f73fe87061a2 ] Macro TO_CS_QUEUE_NR definition has a typo, which uses 'trace_id_chan' as its parameter, this doesn't match with its definition body which uses 'trace_chan_id'. So renames the parameter to 'trace_chan_id'. It's luck to have a local variable 'trace_chan_id' in the function cs_etm__setup_queue(), even we wrongly define the macro TO_CS_QUEUE_NR, the local variable 'trace_chan_id' is used rather than the macro's parameter 'trace_id_chan'; so the compiler doesn't complain for this before. After renaming the parameter, it leads to a compiling error due cs_etm__setup_queue() has no variable 'trace_id_chan'. This patch uses the variable 'trace_chan_id' for the macro so that fixes the compiling error. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight ml Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20191021074808.25795-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/util/cs-etm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index 4ba0f871f086..f5f855fff412 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -110,7 +110,7 @@ static int cs_etm__decode_data_block(struct cs_etm_queue *etmq); * encode the etm queue number as the upper 16 bit and the channel as * the lower 16 bit. */ -#define TO_CS_QUEUE_NR(queue_nr, trace_id_chan) \ +#define TO_CS_QUEUE_NR(queue_nr, trace_chan_id) \ (queue_nr << 16 | trace_chan_id) #define TO_QUEUE_NR(cs_queue_nr) (cs_queue_nr >> 16) #define TO_TRACE_CHAN_ID(cs_queue_nr) (cs_queue_nr & 0x0000ffff) @@ -819,7 +819,7 @@ static int cs_etm__setup_queue(struct cs_etm_auxtrace *etm, * Note that packets decoded above are still in the traceID's packet * queue and will be processed in cs_etm__process_queues(). */ - cs_queue_nr = TO_CS_QUEUE_NR(queue_nr, trace_id_chan); + cs_queue_nr = TO_CS_QUEUE_NR(queue_nr, trace_chan_id); ret = auxtrace_heap__add(&etm->heap, cs_queue_nr, timestamp); out: return ret; From patchwork Sun Dec 29 17:25:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182566 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5465273ild; Sun, 29 Dec 2019 09:53:22 -0800 (PST) X-Google-Smtp-Source: APXvYqyYDtfrvwYrRifdEr0jWYIyB6OgB/CGlDgS/GvzR2L+owZyeu5Qk6kgB4I/4tFc1ts2xNtC X-Received: by 2002:a9d:7448:: with SMTP id p8mr56367007otk.96.1577642002016; Sun, 29 Dec 2019 09:53:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577642002; cv=none; d=google.com; s=arc-20160816; b=gvrSUPwkbt9EaigKpo67QU+Evy/J2TSQEdDvvc+QnXOPiE9PuPye3Rqi96CPMsV9Pb t/+Ss3JCtgPJU0AC0CbgPfPq0NzVMTWFrSVQUSlBANVJMvnw8AtN8njysD6IF+XaI+sK l2ObUJgA4XvVfxCyCX2UMhrPEC/5G/x99I2TGdNK3JWXZXMaeuk31//xw4TyKyhRpE+t 6HcQcWQAk4ki1JhXfzYsZjseYGHSmCQQhllFPJZxI5rssUsi0YFnrzw5hGBlO3RBkK48 G3jIi38vG69bBRtsb2Eqoyeebk2wVAk3nLnBODx2HpEr11S37AYbxjhu+eS4kK6oWZM5 gT5g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=55wsPhovc2rkQB9eyvlKsZLY6c2Uow20NhgHTvchkn8=; b=n00Nxa+gYH67mGw1BL9HK2AlDzrIKjm6SWbHnldelnaCZrkOdoM/1Y9Fvfhv6m9t3F u1Gy1b7QVyjcxuALVKxWn6m2/N3I+7BNG/sfMYinrcU8xJ5+bcM1V03wD9P7wR8CQZA4 gX3KkRjgKt0uRRSpH5Jk/R8BF1UMQ196yo612Le4pNkVZuVsNivc6gzixodrevWaIq1u oaYYRhHSDFRd1OqFJq3zc5Xbx17jMgpbnmMDNLdJ6tuTq5URiq3uGP3y8GHMd+1MyA5w x2iisxIUNY2yKEITzLG0CVM2YlO1Bl8GG06+c1cKQ02TKlCqDQd1MiQMwhlLLq76Cugg Pjaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="r/PE5+IS"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t12si21759372otq.53.2019.12.29.09.53.21; Sun, 29 Dec 2019 09:53:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="r/PE5+IS"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732451AbfL2RxT (ORCPT + 27 others); Sun, 29 Dec 2019 12:53:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:40178 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732440AbfL2RxS (ORCPT ); Sun, 29 Dec 2019 12:53:18 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3D217208C4; Sun, 29 Dec 2019 17:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641997; bh=zGS+aqvAvxMzGQtbGteTq1Bu11ZdWToCeo4/By73nVI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r/PE5+ISbURZ+dyOC5f0NA8GLSSdEf7br4qTE0NnVmdcBcBIE37i108/FltGyA1jw fX1Z3gpPaET+EgzzC0HzSDSbTtwSl4YfB+KgebbVPWSxIIR7QT5ZLS1vvQPoQCcEZt XSvuAd9gfXmRc7BVgpIENnEimDUPkCFk0jJ1o7go= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bjorn Andersson , Viresh Kumar , Amit Kucheria , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.4 299/434] cpufreq: Register drivers only after CPU devices have been registered Date: Sun, 29 Dec 2019 18:25:52 +0100 Message-Id: <20191229172721.812455633@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Viresh Kumar [ Upstream commit 46770be0cf94149ca48be87719bda1d951066644 ] The cpufreq core heavily depends on the availability of the struct device for CPUs and if they aren't available at the time cpufreq driver is registered, we will never succeed in making cpufreq work. This happens due to following sequence of events: - cpufreq_register_driver() - subsys_interface_register() - return 0; //successful registration of driver ... at a later point of time - register_cpu(); - device_register(); - bus_probe_device(); - sif->add_dev(); - cpufreq_add_dev(); - get_cpu_device(); //FAILS - per_cpu(cpu_sys_devices, num) = &cpu->dev; //used by get_cpu_device() - return 0; //CPU registered successfully Because the per-cpu variable cpu_sys_devices is set only after the CPU device is regsitered, cpufreq will never be able to get it when cpufreq_add_dev() is called. This patch avoids this failure by making sure device structure of at least CPU0 is available when the cpufreq driver is registered, else return -EPROBE_DEFER. Reported-by: Bjorn Andersson Co-developed-by: Amit Kucheria Signed-off-by: Viresh Kumar Tested-by: Amit Kucheria Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/cpufreq/cpufreq.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.20.1 diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index bc19d6c16aaa..a7db4f22a077 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2634,6 +2634,13 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) if (cpufreq_disabled()) return -ENODEV; + /* + * The cpufreq core depends heavily on the availability of device + * structure, make sure they are available before proceeding further. + */ + if (!get_cpu_device(0)) + return -EPROBE_DEFER; + if (!driver_data || !driver_data->verify || !driver_data->init || !(driver_data->setpolicy || driver_data->target_index || driver_data->target) || From patchwork Sun Dec 29 17:26:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182569 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5467172ild; Sun, 29 Dec 2019 09:56:07 -0800 (PST) X-Google-Smtp-Source: APXvYqw8NWsWIqItJgUS8ntdOOwVIAmXQKzv33an9FagHllOMEOetm9vZ24mDQw+VYAybSHVK0m+ X-Received: by 2002:a05:6830:147:: with SMTP id j7mr70686004otp.44.1577642167132; Sun, 29 Dec 2019 09:56:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577642167; cv=none; d=google.com; s=arc-20160816; b=R+WwNv/S/1NgXoER6n6ofwlZdas9vpjzqtWADNYtRGe0H4fgDv8ovJc27+Ha5QlK+6 gnFz8n9AsQ3D/f2Ydrf77kQO/NXLCpG9KLt1gyTLwKJh5u4igDiLlEJyG7o23XDLcXN5 mDagYyUmscWk9AKrvU2pk5ohws5e0FCdba2kIbeaub6rrUbqVQusfo+ettESNazM8Afz /GtqHkDAPMQWjccN4fYtMsYh94eSwxFBflMZtn718ZFf+X1ccyXcguR3MSeUs9mqK4qP 3xkcV0TDiOkxSFDC2w8K1JUn6SGFJOBZXMNtatlqp9WpKaIcSyg1hBrMfaZs5eSrwlGe F9sw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wSeLO5c06AjN+QDHmTL4Rnp8su9OfUfRHeOKPNYEiHI=; b=hmrQ979C4bMZZe+BmfEfC1BpVTTG8jwQ0SVQph4NLWIRxCq2Iu+7GypPULkKhoFFy5 NVM+wlGI92+d6yQ0K+pBhyqcaWjuruKL3GQ8sKf3ZQsUox4Vy8WrPYwCySWc67qqAGMd hOUFs/P/pggJqQSw5HFcC/Bqs3ZG2rOA8pAVgfu71S0JyvjR3LowKxwzkko522Fk4VQ0 12QWFgUv19b4o5YE7vOJLlVJzUIuofzD35nrJuVVoGLch4gd/BSCXL+pA6m/hGOCi5gu fFaZ/bkdRSNsZ/d/NEjfV7rGaph7KeN2dPK9Sd4ywlqGYXVRRQqJll5weolHXNw5awxn K71g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fCciJXhx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u16si20726136otq.92.2019.12.29.09.56.06; Sun, 29 Dec 2019 09:56:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fCciJXhx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733020AbfL2R4F (ORCPT + 27 others); Sun, 29 Dec 2019 12:56:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:45044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733013AbfL2Rz4 (ORCPT ); Sun, 29 Dec 2019 12:55:56 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 87D3B206DB; Sun, 29 Dec 2019 17:55:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577642156; bh=6w5Mp700T+oUr+mAfo2QJAurvqTx7c9BUWomuOfLvjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fCciJXhxUNzneDOWxEExJRhye+7fD5MrEHctdnYwmQtqeQ8nKtvO6YVcak9RBNNE5 lAQTPixfhKbLv4DvN3LtqPiFNYeD/8ZburVNENz4O8npIfGURSXvuH00BQ9SP4GiZm Lvw9p3qSs5W7EdYxl8WIh7SpyrZRWyo3RGFG8IAk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stephan Gerhold , Linus Walleij , Luis Chamberlain , Sasha Levin Subject: [PATCH 5.4 328/434] firmware_loader: Fix labels with comma for builtin firmware Date: Sun, 29 Dec 2019 18:26:21 +0100 Message-Id: <20191229172723.757283624@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Walleij [ Upstream commit 553671b7685972ca671da5f71cf6414b54376e13 ] Some firmware images contain a comma, such as: EXTRA_FIRMWARE "brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt" as Broadcom firmware simply tags the device tree compatible string at the end of the firmware parameter file. And the compatible string contains a comma. This doesn't play well with gas: drivers/base/firmware_loader/builtin/brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt.gen.S: Assembler messages: drivers/base/firmware_loader/builtin/brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt.gen.S:4: Error: bad instruction `_fw_brcm_brcmfmac4334_sdio_samsung,gt_s7710_txt_bin:' drivers/base/firmware_loader/builtin/brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt.gen.S:9: Error: bad instruction `_fw_brcm_brcmfmac4334_sdio_samsung,gt_s7710_txt_name:' drivers/base/firmware_loader/builtin/brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt.gen.S:15: Error: can't resolve `.rodata' {.rodata section} - `_fw_brcm_brcmfmac4334_sdio_samsung' {*UND* section} make[6]: *** [../scripts/Makefile.build:357: drivers/base/firmware_loader/builtin/brcm/brcmfmac4334-sdio.samsung,gt-s7710.txt.gen.o] Error 1 We need to get rid of the comma from the labels used by the assembly stub generator. Replacing a comma using GNU Make subst requires a helper variable. Cc: Stephan Gerhold Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191115225911.3260-1-linus.walleij@linaro.org Acked-by: Luis Chamberlain Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/base/firmware_loader/builtin/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/base/firmware_loader/builtin/Makefile b/drivers/base/firmware_loader/builtin/Makefile index 37e5ae387400..4a66888e7253 100644 --- a/drivers/base/firmware_loader/builtin/Makefile +++ b/drivers/base/firmware_loader/builtin/Makefile @@ -8,7 +8,8 @@ fwdir := $(addprefix $(srctree)/,$(filter-out /%,$(fwdir)))$(filter /%,$(fwdir)) obj-y := $(addsuffix .gen.o, $(subst $(quote),,$(CONFIG_EXTRA_FIRMWARE))) FWNAME = $(patsubst $(obj)/%.gen.S,%,$@) -FWSTR = $(subst /,_,$(subst .,_,$(subst -,_,$(FWNAME)))) +comma := , +FWSTR = $(subst $(comma),_,$(subst /,_,$(subst .,_,$(subst -,_,$(FWNAME))))) ASM_WORD = $(if $(CONFIG_64BIT),.quad,.long) ASM_ALIGN = $(if $(CONFIG_64BIT),3,2) PROGBITS = $(if $(CONFIG_ARM),%,@)progbits From patchwork Sun Dec 29 17:26:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182567 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5466309ild; Sun, 29 Dec 2019 09:54:56 -0800 (PST) X-Google-Smtp-Source: APXvYqw/4mx0YHi6qyt/29FYs6zpoCCh4W0DBZBYPh4wZULY/QkeFEfs5ZpH/VTh4eiyePhbfbTS X-Received: by 2002:a9d:65cb:: with SMTP id z11mr49122975oth.348.1577642096587; Sun, 29 Dec 2019 09:54:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577642096; cv=none; d=google.com; s=arc-20160816; b=KLwx1/dWeujThU57bsWpA2LTmYnvVidpSycfWfPl32TNe5+BHUH/wjHTHn3wX7EXkm Flb7yU82lTr7ZXaZ5V8zFSfX59Y8dkZ63LsbVWFFr8iFx3dkG6FKBSUZXJt+ETxqYBDN AAW5u3R1jOt2vitd4bNORsdOsrUy3jMAJAHxxhZYE2zvrbxhePpuvvkHuDQ9NgNcSrsY 701MEu9TuFjdYmKB3u/EuHnF+zFUoohGufVHeb1xRQ3izybUgyh7OIwABCTF74obUI9y 09JJDl7ymDIc2ri7graRXAWBoU27Ikt+i8wTcgieCsnxkPcRtK4Dk29J6eYa80Znw5xC 9EJg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pcJvC9AWZgdZW3rU2X4YFU2TtjuQ0Tm9hVCPBuCHyuQ=; b=S2aZdDdXwR7mfukjUSbSL36DsSmDhsMsbTeVhGPVUye3LmKtq4ZesrEtsmgwlbzlgf 5SY4aeK7m8ef7upBP5GHGX6mVzK+fM2yi0vnPjtEInOwquWBVIXiJ4v0peXuCypLdFUO 3oXQT25Cfkqx7rMKT37SFKrMPxxwo/5qYc7wkwDLotFNe2QZiQJjZd85uMFwNobWW2Gf g3pBrfrX2DRwmYCEoLjHcM4CXLsyYPM43Qm88IpX4QVi7CUG0HdGoMAyNYTlC2fBop7t 21ueTmdOg0hUXX/kcHJNov6xapYMOtAkkIHupllXa4Y56DdjtNIYEhbp2MAy9ZBp6vCa 1AOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D+9YLcbi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b1si17310833oiy.9.2019.12.29.09.54.56; Sun, 29 Dec 2019 09:54:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D+9YLcbi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732823AbfL2Ryz (ORCPT + 27 others); Sun, 29 Dec 2019 12:54:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:43076 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732283AbfL2Ryw (ORCPT ); Sun, 29 Dec 2019 12:54:52 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0686720718; Sun, 29 Dec 2019 17:54:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577642091; bh=r4drbKus9o7E4e65lWGg21h6B6VQGYU7jpaonTNlv+U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D+9YLcbi30Sjzwmxn1NJqSlI0u3/MuycboTUNm9pU9eTBSWrW8vhjm7TXp6rFyHLt jQ3seTGmN7cDmAMT4WoIXs0m8tc9Hg4YI/KK/tY/T0FqjBL/PpTBMa8fy4k1hfMCT6 Yd5diClLELPrvNPPEwCbgdVbEgLbVsbTCndDv8uE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shengjiu Wang , Mark Brown , Sasha Levin Subject: [PATCH 5.4 339/434] ASoC: soc-pcm: check symmetry before hw_params Date: Sun, 29 Dec 2019 18:26:32 +0100 Message-Id: <20191229172724.486261658@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shengjiu Wang [ Upstream commit 5cca59516de5df9de6bdecb328dd55fb5bcccb41 ] This reverts commit 957ce0c6b8a1f (ASoC: soc-pcm: check symmetry after hw_params). That commit cause soc_pcm_params_symmetry can't take effect. cpu_dai->rate, cpu_dai->channels and cpu_dai->sample_bits are updated in the middle of soc_pcm_hw_params, so move soc_pcm_params_symmetry to the end of soc_pcm_hw_params is not a good solution, for judgement of symmetry in the function is always true. FIXME: According to the comments of that commit, I think the case described in the commit should disable symmetric_rates in Back-End, rather than changing the position of soc_pcm_params_symmetry. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1573555602-5403-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/soc-pcm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index cdce96a3051b..a6e96cf1d8ff 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -877,6 +877,11 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream, int i, ret = 0; mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); + + ret = soc_pcm_params_symmetry(substream, params); + if (ret) + goto out; + if (rtd->dai_link->ops->hw_params) { ret = rtd->dai_link->ops->hw_params(substream, params); if (ret < 0) { @@ -958,9 +963,6 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream, } component = NULL; - ret = soc_pcm_params_symmetry(substream, params); - if (ret) - goto component_err; out: mutex_unlock(&rtd->card->pcm_mutex); return ret; From patchwork Sun Dec 29 17:26:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182571 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5472499ild; Sun, 29 Dec 2019 10:02:25 -0800 (PST) X-Google-Smtp-Source: APXvYqy52pOhhdNVWIQ+9qWpXPkFpcU3IwF4c1pXUuOrHXgR0zs3aZSxYAXnQ0BNo/a8N4HwrkU0 X-Received: by 2002:a9d:6a41:: with SMTP id h1mr36363154otn.279.1577642545521; Sun, 29 Dec 2019 10:02:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577642545; cv=none; d=google.com; s=arc-20160816; b=TOMPZEk+WFSxm75ZBsD8pYFYLEoGQNaZg1HHLVpmoyjlnVaCH9G3sDuVF1mrCWeSOD RvvI8KkZQUgiZv1THhx8cIuW/4jzpCCJJ46KyLCRIVrYwsGAMN0P8AIYMAyY2IQMPFL/ yMaqnBRbOrkY1mxoAVhRnwp8Zx13p7l9QK8fVkWQcrdSZ8A7GsTQsQlGrtxUbkqHvgN0 yYijbqsAqBG2irD2tZy17LFMwmzgZD/GUbij0Tw/upJ0LONuaK5sJtvKa9OfZ7DOdXo7 SIrBEbi0p8pk9OUuKyb0Vi7ciAgt0TEFHBbiRUW7LnPdrGywIYw1WqDO0wSjl2BR05/2 Ky1Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=S/Ur4gEE+i/EOqRawyYBltLhd4evsvRzwjXNLBtdanU=; b=sGViZv4AEoZCocIy/i2T560twuAtwJv1HS4SUTOz0qauH9lHRlzvW5di1kCKNoO1vD 1go/0NBE/jsvq7xaXa7cLI21VKzvz3j6DuWGrymtmSu2lqMHLDzHyijSgVVBWttkLCyE L5ODT5KdEI+uGcJew4VwLpGbNYPDLiuIkowPfHp1EuvTEHom61Uk3wauuBZtmkoGTJ40 27IWVAalI0cxz6dB5R9me3xDW9A1y0ODq4qkIcgX6+4uiiHf0epZSdzDtWqn8O3qFKJF X5p7X3S623kFTT0HwVtf/IHNKkTB2NU5tDoej7gzPP9Mpf2NSC52caV1OXrWjZAkPrco VwFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="lS9qyxs/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f189si20437427oib.268.2019.12.29.10.02.25; Sun, 29 Dec 2019 10:02:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="lS9qyxs/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732785AbfL2Ry6 (ORCPT + 27 others); Sun, 29 Dec 2019 12:54:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:43140 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732819AbfL2Ryy (ORCPT ); Sun, 29 Dec 2019 12:54:54 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 69566206A4; Sun, 29 Dec 2019 17:54:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577642093; bh=D5Qa4H1nSm2HtH/589Qc/UxvnnTvxuWd8D1wsrs9Is4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lS9qyxs/ZLjqQM+/DCVjefEipReCZjcQNMFrsaLyEVNhjNDzX8oeV5+MCnNcWxTUp 3/R0+/nzptm5WvFj1qajy4WkzOtvuRM9MxRKW3fML/wD1PmQD3cejUJKmtfE3Psx48 ck+MnuSxVutn+9/5HChwvY6k0B4DWuZQLrgCgu58= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Grygorii Strashko , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 340/434] net: ethernet: ti: ale: clean ale tbl on init and intf restart Date: Sun, 29 Dec 2019 18:26:33 +0100 Message-Id: <20191229172724.551875854@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Grygorii Strashko [ Upstream commit 7fe579dfb90fcdf0c7722f33c772d5f0d1bc7cb6 ] Clean CPSW ALE on init and intf restart (up/down) to avoid reading obsolete or garbage entries from ALE table. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/ti/cpsw_ale.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c index 84025dcc78d5..e7c24396933e 100644 --- a/drivers/net/ethernet/ti/cpsw_ale.c +++ b/drivers/net/ethernet/ti/cpsw_ale.c @@ -779,6 +779,7 @@ void cpsw_ale_start(struct cpsw_ale *ale) void cpsw_ale_stop(struct cpsw_ale *ale) { del_timer_sync(&ale->timer); + cpsw_ale_control_set(ale, 0, ALE_CLEAR, 1); cpsw_ale_control_set(ale, 0, ALE_ENABLE, 0); } @@ -862,6 +863,7 @@ struct cpsw_ale *cpsw_ale_create(struct cpsw_ale_params *params) ALE_UNKNOWNVLAN_FORCE_UNTAG_EGRESS; } + cpsw_ale_control_set(ale, 0, ALE_CLEAR, 1); return ale; } From patchwork Sun Dec 29 17:27:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182570 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5471774ild; Sun, 29 Dec 2019 10:01:51 -0800 (PST) X-Google-Smtp-Source: APXvYqw7vZX6HEEvXtp6lclNWrw7CKuipo87q9W+IP/j95AnloLn2O+Qn9tW6SKoKo4gIFqDSnAY X-Received: by 2002:a9d:7357:: with SMTP id l23mr67106096otk.10.1577642511791; Sun, 29 Dec 2019 10:01:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577642511; cv=none; d=google.com; s=arc-20160816; b=Fj5iyzp8KTohvNN3dM4hpUtc4vLtpr60gRms0khi/invmT30K317Uo8HgLGRrx+Zos V0JgCmYw1qBiWlnM40DNx10w+8tzqJXh1qWg53ptpg4pEqzFM6ymwed/h1w2FgvjPMKH tI4Wh6/vArg10n48R8mRdN4QoxuzkRPwzADKNushygnb7KSh1nojqNvKDdnfVOsbgsJP R6UtrrlYawCxlGtnzlS8H8ve4mPPASAcNSPskx1t4t5eTgeFvIkTvtga3m6f5U4Rv7BO qHjH+6Y7J/2nqgePJYi0JrWb9zqwcT3knoqeTaAajnihPcIsy3wfrTX35MbiKHFBQ1JC QFlA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9zvRnCCLV/eptce2k1Mc7/EWOm7nC7DUjQK5piHmzRU=; b=amiJEoO5enFKymJ+u0WuF4/QK4bAyvs5kNGGGJel2BUu/NydKRnnOz/0jiJfpdW6R6 95eMLcj6W2RzOrEsYjCKmu+GDkCdU1sPwe9LMbPUSPJFG4pbZjPcEjdjICk41cSKQZeB DJ9dCDv6JRHz056S3VSoPkwzUKRhxRr+nf5knTYO8C/HQIUrJFgXut85ByFHDoh4/9lu dBBC1rb/FNITOTovCwazHAjIzqfcoQJx0QOLMnrc19aKH07u8hjzIvDlrLDqNfskpxuC 7MIBErNkMdVPEsLEpqwHtASOEdF5txmbWSHncTEQMYhI3L6sNpqNTf5MLC6TxrhiITrC 3jrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hgkquZ31; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n139si20689896oig.121.2019.12.29.10.01.51; Sun, 29 Dec 2019 10:01:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hgkquZ31; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387742AbfL2SBF (ORCPT + 27 others); Sun, 29 Dec 2019 13:01:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:46416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733097AbfL2R4h (ORCPT ); Sun, 29 Dec 2019 12:56:37 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3B0B9222C3; Sun, 29 Dec 2019 17:56:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577642196; bh=rmRl139AxwHsTpMf/zq6Qr0pUL5g6YxMSoOYXSDn98w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hgkquZ316fjiaTl8dAsTrJ1J47BIGAG1M/WNHrfvYuJtLy4JlN3ZbLXNkaPBkO0iO Bkbxh1/b7rLvrM+mpw5GhClWHSM1LLpcp1T0wfigvplFz3S9TV4TDC3U0AInU71OH6 bzROAAcUKb49NMT1aWKlPizs4xkbR0MAKbS8dEV0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bjorn Andersson , Kalle Valo , Sasha Levin Subject: [PATCH 5.4 383/434] ath10k: Revert "ath10k: add cleanup in ath10k_sta_state()" Date: Sun, 29 Dec 2019 18:27:16 +0100 Message-Id: <20191229172727.594657975@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bjorn Andersson [ Upstream commit f4fe2e53349f1072d33c69f484dbf9d77bb8f45a ] This reverts commit 334f5b61a6f29834e881923b98d1e27e5ce9620d. This caused ath10k_snoc on Qualcomm MSM8998, SDM845 and QCS404 platforms to trigger an assert in the firmware: err_qdi.c:456:EF:wlan_process:1:cmnos_thread.c:3900:Asserted in wlan_vdev.c:_wlan_vdev_up:3219 Revert the offending commit for now. Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath10k/mac.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 2.20.1 diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 2b53ea6ca205..36d24ea126a2 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -6551,12 +6551,8 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, spin_unlock_bh(&ar->data_lock); - if (!sta->tdls) { - ath10k_peer_delete(ar, arvif->vdev_id, sta->addr); - ath10k_mac_dec_num_stations(arvif, sta); - kfree(arsta->tx_stats); + if (!sta->tdls) goto exit; - } ret = ath10k_wmi_update_fw_tdls_state(ar, arvif->vdev_id, WMI_TDLS_ENABLE_ACTIVE);