From patchwork Fri Jan 22 14:08:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 369330 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 25A6EC433E0 for ; Fri, 22 Jan 2021 22:20:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E56B323A5B for ; Fri, 22 Jan 2021 22:20:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728454AbhAVTzr (ORCPT ); Fri, 22 Jan 2021 14:55:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:33886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728374AbhAVOJj (ORCPT ); Fri, 22 Jan 2021 09:09:39 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B594023A54; Fri, 22 Jan 2021 14:08:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324539; bh=lLaOvpvgS6SDyENAzMwJY47U32YVg1TR5QijMRK2Oak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n9NogJbfoLUAkhwhR7EjXxJor58EeZVtLLoJr8MF/s1iCHGj/0HWGCY/FL158Yg7t Moc1PcEeTooQh7P5QFNruSrYuQnUHb6jEMm0DApqd9ZgOTkQdCtf5HoIfc6x4k1nBi JJbB5xdK1o7xz6JuqrRpCTE50T5H6WM9RfXd7/pg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaohe Lin , Mike Kravetz , Andrew Morton , Linus Torvalds Subject: [PATCH 4.4 03/31] mm/hugetlb: fix potential missing huge page size info Date: Fri, 22 Jan 2021 15:08:17 +0100 Message-Id: <20210122135732.010605999@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135731.873346566@linuxfoundation.org> References: <20210122135731.873346566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Miaohe Lin commit 0eb98f1588c2cc7a79816d84ab18a55d254f481c upstream. The huge page size is encoded for VM_FAULT_HWPOISON errors only. So if we return VM_FAULT_HWPOISON, huge page size would just be ignored. Link: https://lkml.kernel.org/r/20210107123449.38481-1-linmiaohe@huawei.com Fixes: aa50d3a7aa81 ("Encode huge page size for VM_FAULT_HWPOISON errors") Signed-off-by: Miaohe Lin Reviewed-by: Mike Kravetz Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -3659,7 +3659,7 @@ retry: * So we need to block hugepage fault by PG_hwpoison bit check. */ if (unlikely(PageHWPoison(page))) { - ret = VM_FAULT_HWPOISON | + ret = VM_FAULT_HWPOISON_LARGE | VM_FAULT_SET_HINDEX(hstate_index(h)); goto backout_unlocked; } From patchwork Fri Jan 22 14:08:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 369425 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 BC7BAC433E0 for ; Fri, 22 Jan 2021 14:15:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 80DBD23B27 for ; Fri, 22 Jan 2021 14:15:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728402AbhAVOOu (ORCPT ); Fri, 22 Jan 2021 09:14:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:35842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728356AbhAVON2 (ORCPT ); Fri, 22 Jan 2021 09:13:28 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 780B823A9F; Fri, 22 Jan 2021 14:10:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324614; bh=H31ckD32uFz5u09DVKuu1oHK6MaIgGfh0EAyr2/a5u8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IQivDRSCvdauKFsHXSM5mOME9tsF8yFFRFcfRklckN+CxCq9i7+FgCodNc2B84qGW zeHwNUz5vuFgvpJpSx8CVJk+3o7/Jp25pm3sQABQpoDtUN//o2raXf00XM73az4Ucb tWXY4o7mKcOLB0aL9VR2vOS8cqtu/uOASlZGhQqs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rasmus Villemoes , Jakub Kicinski , Sasha Levin Subject: [PATCH 4.4 06/31] ethernet: ucc_geth: fix definition and size of ucc_geth_tx_global_pram Date: Fri, 22 Jan 2021 15:08:20 +0100 Message-Id: <20210122135732.127125119@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135731.873346566@linuxfoundation.org> References: <20210122135731.873346566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Rasmus Villemoes [ Upstream commit 887078de2a23689e29d6fa1b75d7cbc544c280be ] Table 8-53 in the QUICC Engine Reference manual shows definitions of fields up to a size of 192 bytes, not just 128. But in table 8-111, one does find the text Base Address of the Global Transmitter Parameter RAM Page. [...] The user needs to allocate 128 bytes for this page. The address must be aligned to the page size. I've checked both rev. 7 (11/2015) and rev. 9 (05/2018) of the manual; they both have this inconsistency (and the table numbers are the same). Adding a bit of debug printing, on my board the struct ucc_geth_tx_global_pram is allocated at offset 0x880, while the (opaque) ucc_geth_thread_data_tx gets allocated immediately afterwards, at 0x900. So whatever the engine writes into the thread data overlaps with the tail of the global tx pram (and devmem says that something does get written during a simple ping). I haven't observed any failure that could be attributed to this, but it seems to be the kind of thing that would be extremely hard to debug. So extend the struct definition so that we do allocate 192 bytes. Signed-off-by: Rasmus Villemoes Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/ucc_geth.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/ucc_geth.h b/drivers/net/ethernet/freescale/ucc_geth.h index 75f337163ce3c..1a40a5f11081b 100644 --- a/drivers/net/ethernet/freescale/ucc_geth.h +++ b/drivers/net/ethernet/freescale/ucc_geth.h @@ -580,7 +580,14 @@ struct ucc_geth_tx_global_pram { u32 vtagtable[0x8]; /* 8 4-byte VLAN tags */ u32 tqptr; /* a base pointer to the Tx Queues Memory Region */ - u8 res2[0x80 - 0x74]; + u8 res2[0x78 - 0x74]; + u64 snums_en; + u32 l2l3baseptr; /* top byte consists of a few other bit fields */ + + u16 mtu[8]; + u8 res3[0xa8 - 0x94]; + u32 wrrtablebase; /* top byte is reserved */ + u8 res4[0xc0 - 0xac]; } __packed; /* structure representing Extended Filtering Global Parameters in PRAM */ From patchwork Fri Jan 22 14:08:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 369428 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 BF72CC433E9 for ; Fri, 22 Jan 2021 14:11:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 972A223AC8 for ; Fri, 22 Jan 2021 14:11:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728110AbhAVOLE (ORCPT ); Fri, 22 Jan 2021 09:11:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:34332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728190AbhAVOKT (ORCPT ); Fri, 22 Jan 2021 09:10:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id CB78A23A5E; Fri, 22 Jan 2021 14:09:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324547; bh=0xLiq19uuF+LFA0yw7Rwauxqd1irVWHtnuE67K59/lY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z133FksUKLkAoNSRUMI/UME1nI7iFHxqwaceIJSFVkQNlXP6WReYp3Nqp2ym+DQzL eWdDSRVtUPji/XyBkFB5e9BQU7gDPuMdc9BjwgHcPXV1ADUqVtE4n/m3xMNxLTd7Jv dGRNXxa7P5ygDjAWjMQxD2820or/OxSxdrIH/c7o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Randy Dunlap , Vineet Gupta , linux-snps-arc@lists.infradead.org, Dan Williams , Andrew Morton , Matthew Wilcox , Jan Kara , linux-fsdevel@vger.kernel.org, linux-nvdimm@lists.01.org, Sasha Levin Subject: [PATCH 4.4 07/31] arch/arc: add copy_user_page() to to fix build error on ARC Date: Fri, 22 Jan 2021 15:08:21 +0100 Message-Id: <20210122135732.165180021@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135731.873346566@linuxfoundation.org> References: <20210122135731.873346566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Randy Dunlap [ Upstream commit 8a48c0a3360bf2bf4f40c980d0ec216e770e58ee ] fs/dax.c uses copy_user_page() but ARC does not provide that interface, resulting in a build error. Provide copy_user_page() in . ../fs/dax.c: In function 'copy_cow_page_dax': ../fs/dax.c:702:2: error: implicit declaration of function 'copy_user_page'; did you mean 'copy_to_user_page'? [-Werror=implicit-function-declaration] Reported-by: kernel test robot Signed-off-by: Randy Dunlap Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Cc: Dan Williams #Acked-by: Vineet Gupta # v1 Cc: Andrew Morton Cc: Matthew Wilcox Cc: Jan Kara Cc: linux-fsdevel@vger.kernel.org Cc: linux-nvdimm@lists.01.org #Reviewed-by: Ira Weiny # v2 Signed-off-by: Vineet Gupta Signed-off-by: Sasha Levin --- arch/arc/include/asm/page.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arc/include/asm/page.h b/arch/arc/include/asm/page.h index 8f1145ed0046f..fd2c88ef2e2b8 100644 --- a/arch/arc/include/asm/page.h +++ b/arch/arc/include/asm/page.h @@ -17,6 +17,7 @@ #define free_user_page(page, addr) free_page(addr) #define clear_page(paddr) memset((paddr), 0, PAGE_SIZE) +#define copy_user_page(to, from, vaddr, pg) copy_page(to, from) #define copy_page(to, from) memcpy((to), (from), PAGE_SIZE) struct vm_area_struct; From patchwork Fri Jan 22 14:08:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 368666 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp1808065jam; Fri, 22 Jan 2021 11:57:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTw0CzS65UZKQgi4Eb3s1iCBm4QkcDau5ssObowAJwWrn+5GWZjeGAHebplIyo7+RlDRL1 X-Received: by 2002:a50:9f4d:: with SMTP id b71mr4532011edf.310.1611345472302; Fri, 22 Jan 2021 11:57:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611345472; cv=none; d=google.com; s=arc-20160816; b=JiYohIAICAH3TsLxMRA0ej8JqLxNQALANskeZte0BrDaue1t5TTgfcHzrkudkVA3dd 1nc9GjblHdwcuwOd8we3DLkyRgXS8NRIuHjhT9TXj+DxVeW02EMvueAvmmzWF+opv6OB p44SAp9Dj4xi3FDx0NDN42nS6FHQXDzspEFSRevdkNNz+yiIUuE3yNRXeXUfARbFNPys 5u3liV02kPyiSvdWTKwrTEMtFJdD3dOFjv1x5Oq7qmIMniDpSI6F7kBXIAqaUc6sE/kw KDNAax3qi+5zKB0K89fkznI1fkJZcNs+vtcnfu4ViMDVKIjbVE4ruA6wOhbl4HG20Aty /tOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QrGS2J4RzcXdWWqKw1/kaJ+kc0Yq4hkk+cIyL+6Ghxo=; b=0XC24b3NsPNOacgQm2pCLS2xRMj2iTQxqpNhYCJveUorDNT2gX6jJ/nYUn9VABsVnD 3h1EU3xe8dJXB6xsZwX8yUBXebi0TLbDFajln2jXwJsGNJMPyjhCiQRdwYSYmHZv/OIU kQaSV+xzXgHUk9zh4jKV0N43yiI87tDAcIkp0u1wBm0Ypy7zVIY9+h8u0mg3m7/wtTvJ FGZbkYEmDdOcN4Wn2eXjt7sCCBntwOB8/8x1aBVrpki3f80mOlTxRcRamYrgQKRX+i1D efAfTsPkp34OJ1MacMa/Zd7VGZ3l0EALWCgj7rN2QA5YcJTXpdOLgmKwHvgfUvWfljQM p3cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KW9eEIbp; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si3610227ejb.314.2021.01.22.11.57.52; Fri, 22 Jan 2021 11:57:52 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KW9eEIbp; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730713AbhAVT5m (ORCPT + 13 others); Fri, 22 Jan 2021 14:57:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:34950 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728052AbhAVOLl (ORCPT ); Fri, 22 Jan 2021 09:11:41 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E889B239EF; Fri, 22 Jan 2021 14:09:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324576; bh=K5UVOAFSVMpxnx58cB+TImbkULMojURm5Eon9UXNVrI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KW9eEIbpSd+9QFstRgkZ/U/83R23qB+IqfpqIFHdtNLMsCmfPjbcsOwecuBE3v4dI luVKCMpQiy6jCkFN4bmiH+CRChlwfnOrxcQ0Hh9bf35dsUjpWwzcxxXQimP6BatbEd /Rg5q/gdON5OOxuHySqtCU7h8C4zNJ7mRPsVayc4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 08/31] misdn: dsp: select CONFIG_BITREVERSE Date: Fri, 22 Jan 2021 15:08:22 +0100 Message-Id: <20210122135732.210359401@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135731.873346566@linuxfoundation.org> References: <20210122135731.873346566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit 51049bd903a81307f751babe15a1df8d197884e8 ] Without this, we run into a link error arm-linux-gnueabi-ld: drivers/isdn/mISDN/dsp_audio.o: in function `dsp_audio_generate_law_tables': (.text+0x30c): undefined reference to `byte_rev_table' arm-linux-gnueabi-ld: drivers/isdn/mISDN/dsp_audio.o:(.text+0x5e4): more undefined references to `byte_rev_table' follow Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/isdn/mISDN/Kconfig | 1 + 1 file changed, 1 insertion(+) -- 2.27.0 diff --git a/drivers/isdn/mISDN/Kconfig b/drivers/isdn/mISDN/Kconfig index c0730d5c734d6..fb61181a5c4f7 100644 --- a/drivers/isdn/mISDN/Kconfig +++ b/drivers/isdn/mISDN/Kconfig @@ -12,6 +12,7 @@ if MISDN != n config MISDN_DSP tristate "Digital Audio Processing of transparent data" depends on MISDN + select BITREVERSE help Enable support for digital audio processing capability. From patchwork Fri Jan 22 14:08:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 369333 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 81BA8C43381 for ; Fri, 22 Jan 2021 22:18:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 49A2C23A5B for ; Fri, 22 Jan 2021 22:18:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728882AbhAVT6B (ORCPT ); Fri, 22 Jan 2021 14:58:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:34412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728100AbhAVOMr (ORCPT ); Fri, 22 Jan 2021 09:12:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3FF7823A9C; Fri, 22 Jan 2021 14:09:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324595; bh=bg1MGApZXy1snbKFE985TK9dD1gMRCuiC9DNpBwFJYE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W0iA9lQ/B61ueMY2R9I5webCrQmrtNNRX8SCM1XDCKc/ph/edskeikyLk7w1vDmbA rEaHZKdr44Orq5puA5VKU3yZs5d0BYnK4FM3xncf54faJq00LzFZxlWppr8XuX6vb8 q0IvTNheSFL0xRpEuFXKIYpAtB3sa+g1F5yDZWjU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Ellerman , Andrew Lunn , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 09/31] net: ethernet: fs_enet: Add missing MODULE_LICENSE Date: Fri, 22 Jan 2021 15:08:23 +0100 Message-Id: <20210122135732.251832508@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135731.873346566@linuxfoundation.org> References: <20210122135731.873346566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Michael Ellerman [ Upstream commit 445c6198fe7be03b7d38e66fe8d4b3187bc251d4 ] Since commit 1d6cd3929360 ("modpost: turn missing MODULE_LICENSE() into error") the ppc32_allmodconfig build fails with: ERROR: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/freescale/fs_enet/mii-fec.o ERROR: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/freescale/fs_enet/mii-bitbang.o Add the missing MODULE_LICENSEs to fix the build. Both files include a copyright header indicating they are GPL v2. Signed-off-by: Michael Ellerman Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c | 1 + drivers/net/ethernet/freescale/fs_enet/mii-fec.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c index 68a428de0bc0e..cfae74d8e6590 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c +++ b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c @@ -231,3 +231,4 @@ static struct platform_driver fs_enet_bb_mdio_driver = { }; module_platform_driver(fs_enet_bb_mdio_driver); +MODULE_LICENSE("GPL"); diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c index 2be383e6d2585..3b6232a6a56d6 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c +++ b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c @@ -232,3 +232,4 @@ static struct platform_driver fs_enet_fec_mdio_driver = { }; module_platform_driver(fs_enet_fec_mdio_driver); +MODULE_LICENSE("GPL"); From patchwork Fri Jan 22 14:08:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 368669 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp1808815jam; Fri, 22 Jan 2021 11:59:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFMsHXlaz+PWD/+q/nx7ADa5TXOqWjIMBfBWkGsnYDZ2rgIm3ZvVdi9zAj7oR62/GziDPn X-Received: by 2002:a17:906:97c5:: with SMTP id ef5mr477365ejb.347.1611345550055; Fri, 22 Jan 2021 11:59:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611345550; cv=none; d=google.com; s=arc-20160816; b=GxKjaCl1YCAI33Dp+mD+necJ2/dRe5H+T0sEncW9KNxIplge9Iq1559qWxQQoJHNdB Jkk3RJ0pZr02eQQZI5thOdm0MNgAbV8xHLY/UGeUuhZV9ez5H7NPV648a/AxLOfhM3mW Gq0SJuoznj63pgPy65TnYe2FSBtZO+q85ABJaG7e5fTv5hvSqPipa5V3V+Kh6J5NYPsm 09+sQ1GIRWp6L3BKd0dV4+76bpvUSfFetPuLxD7L3AUr3GgfCx5bMhD+TnN7yhLz+Ify mf8RtQ/Mfs713KzRkgkgue9l3uu4zpIwlMO8+WYMbbn+N4qKggJEtYFLfPbtlXX+UE3G /PyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tHNrQu4j1CpHXLbQlW3CEj7bCROhRPEmIXe3WE3hY7U=; b=dNv5ihFrQV3TY0V4dMmdR6b1tkgxUzZXZhhnJTdFkwiVMieprWazdxnV1vaDy71e7D 1TlitZf/H877QQoxGQ41rUtObjhc0lkSPv3p1EdjMGxTJW4ujboQLMmtCOZBpZf83+u9 EF2OXYQvY7glnxGv8upW9ZxGjdk6LGyq4U+6OFAip0r++5aB4G+3yaxL14Oh0sGo+XGu MegOXeLZuJTvXpW7ADyOITr9vrGlxqQ8PptVkehU7f7PmNUXOWnlun8+nT7351rItPOG HlDxdcDAJ19qpSPvTmfZ9dLpP2PoRrMaX9jt1o45dnw5qi4RcPlN9vhdvrfiIm2DhfuJ iqDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="1uKX/YJ4"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si3610227ejb.314.2021.01.22.11.59.09; Fri, 22 Jan 2021 11:59:10 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="1uKX/YJ4"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730742AbhAVT6n (ORCPT + 13 others); Fri, 22 Jan 2021 14:58:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:35794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728349AbhAVONM (ORCPT ); Fri, 22 Jan 2021 09:13:12 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B08C723A84; Fri, 22 Jan 2021 14:09:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324598; bh=gip9ZyvLhgxAIdzT6+teso3BL+gh4Xupaij8iQDYj40=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1uKX/YJ4hp9wiU5niHuvDs6fjYEDsqIXq/SFQimWda0Lh9UiiwObZw2pcInBIBYsR 7hnAAPpu5Nz29z8UZU/9P6XGwTIrOZXbgXftPWs1bAyurC+hGvfffxyW8JPSNK8GPl vV1SNjHwleNQt6jnfKlJkIDKARpL+7U+VCKH7LJA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Shawn Guo , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.4 10/31] ACPI: scan: add stub acpi_create_platform_device() for !CONFIG_ACPI Date: Fri, 22 Jan 2021 15:08:24 +0100 Message-Id: <20210122135732.287381163@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135731.873346566@linuxfoundation.org> References: <20210122135731.873346566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Shawn Guo [ Upstream commit ee61cfd955a64a58ed35cbcfc54068fcbd486945 ] It adds a stub acpi_create_platform_device() for !CONFIG_ACPI build, so that caller doesn't have to deal with !CONFIG_ACPI build issue. Reported-by: kernel test robot Signed-off-by: Shawn Guo Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- include/linux/acpi.h | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.27.0 diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 0bd0a9ad54556..719fb8b320fdc 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -604,6 +604,13 @@ static inline int acpi_device_modalias(struct device *dev, return -ENODEV; } +static inline struct platform_device * +acpi_create_platform_device(struct acpi_device *adev, + struct property_entry *properties) +{ + return NULL; +} + static inline bool acpi_dma_supported(struct acpi_device *adev) { return false; From patchwork Fri Jan 22 14:08:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 368667 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp1808700jam; Fri, 22 Jan 2021 11:59:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxDsiR0ddxZRfWLKh4Oo/A4OveIIc+nqHyw2T3FAJ4j9+jqXDs+zIWWslISApUGo1ZfQJ9T X-Received: by 2002:a17:906:19c3:: with SMTP id h3mr3972559ejd.429.1611345544422; Fri, 22 Jan 2021 11:59:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611345544; cv=none; d=google.com; s=arc-20160816; b=0xFz+k8UYza2rrKy5dGIg57740ZJUuMz3yYuvEdUcpXJvSXKTQqhW0Nr43Ai+d6AcG FtX+rakrzIqrf0rkgJSby1jUzuX0dSGQLl+07r/+6AcaejZcBANzyxEEcRn8NgA9H3mb +WDZv+PBz1znk1BY3xXl1Hht4iuphhzrAEK2QqYmaxpOauKpMsSYYTWdfecjFlWLv1MV bpy0T1jP2pHcjprKepzAcO/Nmhpco33u3/ZzoWE65jdF+l/gJyZbPBm5jte65usQ6ias 49cYIXVNe+QRilt1D7QfTSR467jsfwY+Oq8bdJHgP7b4R6v5p8hun3+uGjCRNA5sthr2 3ITQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IOWfOvEedUOAuVxMChUMdxk52UmgQ6TSKzEtd4z6aLA=; b=l07W9dCQCmo0f3YqpFHKw2rGJBtWFak/Mspye2eFLeMQPEZhdk3tEF4SpqnYNAiF8s 3PtFNhYFgiCiMeSJxauGt7RHXKBBxevzkW3pQ5Axw9Kp60Yqhe1XFw9w7ePPLEzGnhhd kI+bkD82AEYbMmfdVL4zHGGhVUls6n+5O8fF0ylUUrNKOed2fZtaKGRX497PfsoOFrut 2s3FXnSPZwruHbFlyLLKnDHa42cYGbMYexvK1Ua+4QESJpL39+JZbZxZJSsKBOnez8jy fFULhClJX5B+tmu0dhW3ErLYzCKNu1mYKqdmvFp70BFVq6ltCcfq70jSyWKeiAcwYb2v xKag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XfffkYMe; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si3610227ejb.314.2021.01.22.11.59.04; Fri, 22 Jan 2021 11:59:04 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XfffkYMe; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729253AbhAVT6K (ORCPT + 13 others); Fri, 22 Jan 2021 14:58:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:34616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728324AbhAVOM5 (ORCPT ); Fri, 22 Jan 2021 09:12:57 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 906D723A9A; Fri, 22 Jan 2021 14:10:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324601; bh=i4Nmwe5miPe3Gw6FrnUEcFoxmdlKxZr3pmtpSqvRZP8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XfffkYMehz/DdtKr2j4/QuhgVMzDxF7/Jz811piycTzE2W6A5f5zC1kSs0HI/37rU 2JRbElstU5K8F8PIxofxUv/N2vK46aRzziORZg44Weg22Hr8g6CfUZ4HBJiMyRNUAf 9AOrm2uwqhX2RMalfm3R5JtINtuSV2AJwSFVkSjY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jamie Iles , Arnd Bergmann , Sasha Levin Subject: [PATCH 4.4 11/31] ARM: picoxcell: fix missing interrupt-parent properties Date: Fri, 22 Jan 2021 15:08:25 +0100 Message-Id: <20210122135732.323316556@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135731.873346566@linuxfoundation.org> References: <20210122135731.873346566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit bac717171971176b78c72d15a8b6961764ab197f ] dtc points out that the interrupts for some devices are not parsable: picoxcell-pc3x2.dtsi:45.19-49.5: Warning (interrupts_property): /paxi/gem@30000: Missing interrupt-parent picoxcell-pc3x2.dtsi:51.21-55.5: Warning (interrupts_property): /paxi/dmac@40000: Missing interrupt-parent picoxcell-pc3x2.dtsi:57.21-61.5: Warning (interrupts_property): /paxi/dmac@50000: Missing interrupt-parent picoxcell-pc3x2.dtsi:233.21-237.5: Warning (interrupts_property): /rwid-axi/axi2pico@c0000000: Missing interrupt-parent There are two VIC instances, so it's not clear which one needs to be used. I found the BSP sources that reference VIC0, so use that: https://github.com/r1mikey/meta-picoxcell/blob/master/recipes-kernel/linux/linux-picochip-3.0/0001-picoxcell-support-for-Picochip-picoXcell-SoC.patch Acked-by: Jamie Iles Link: https://lore.kernel.org/r/20201230152010.3914962-1-arnd@kernel.org' Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- arch/arm/boot/dts/picoxcell-pc3x2.dtsi | 4 ++++ 1 file changed, 4 insertions(+) -- 2.27.0 diff --git a/arch/arm/boot/dts/picoxcell-pc3x2.dtsi b/arch/arm/boot/dts/picoxcell-pc3x2.dtsi index 533919e96eaee..f22a6b4363177 100644 --- a/arch/arm/boot/dts/picoxcell-pc3x2.dtsi +++ b/arch/arm/boot/dts/picoxcell-pc3x2.dtsi @@ -54,18 +54,21 @@ emac: gem@30000 { compatible = "cadence,gem"; reg = <0x30000 0x10000>; + interrupt-parent = <&vic0>; interrupts = <31>; }; dmac1: dmac@40000 { compatible = "snps,dw-dmac"; reg = <0x40000 0x10000>; + interrupt-parent = <&vic0>; interrupts = <25>; }; dmac2: dmac@50000 { compatible = "snps,dw-dmac"; reg = <0x50000 0x10000>; + interrupt-parent = <&vic0>; interrupts = <26>; }; @@ -243,6 +246,7 @@ axi2pico@c0000000 { compatible = "picochip,axi2pico-pc3x2"; reg = <0xc0000000 0x10000>; + interrupt-parent = <&vic0>; interrupts = <13 14 15 16 17 18 19 20 21>; }; }; From patchwork Fri Jan 22 14:08:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 369331 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 2529FC433E6 for ; Fri, 22 Jan 2021 22:19:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA77623A5C for ; Fri, 22 Jan 2021 22:19:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730408AbhAVT4T (ORCPT ); Fri, 22 Jan 2021 14:56:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:34410 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728255AbhAVOKZ (ORCPT ); Fri, 22 Jan 2021 09:10:25 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B8C2523A68; Fri, 22 Jan 2021 14:09:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324555; bh=SB8J9olcChwxi0/uJFauBUyLvKbKCQcEBb/seqsizw0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ct3VXwxELCHnUQQmzRhj/s1wpaNmUGc2pY6rcwoskuFoxyTZRIsyRqxhnun+FJLh6 LjNdYk6oRRsdKYVCG1+Or6M0q5WHYDIm/ByiceEN4rGpmWRZqO9dUphUV530Oi8gem k+hPZkbg28OgaLY63/eOtYO/Qh7VogXSzJOHqKuw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Nixdorf , Trond Myklebust Subject: [PATCH 4.4 18/31] net: sunrpc: interpret the return value of kstrtou32 correctly Date: Fri, 22 Jan 2021 15:08:32 +0100 Message-Id: <20210122135732.605503847@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135731.873346566@linuxfoundation.org> References: <20210122135731.873346566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: j.nixdorf@avm.de commit 86b53fbf08f48d353a86a06aef537e78e82ba721 upstream. A return value of 0 means success. This is documented in lib/kstrtox.c. This was found by trying to mount an NFS share from a link-local IPv6 address with the interface specified by its index: mount("[fe80::1%1]:/srv/nfs", "/mnt", "nfs", 0, "nolock,addr=fe80::1%1") Before this commit this failed with EINVAL and also caused the following message in dmesg: [...] NFS: bad IP address specified: addr=fe80::1%1 The syscall using the same address based on the interface name instead of its index succeeds. Credits for this patch go to my colleague Christian Speich, who traced the origin of this bug to this line of code. Signed-off-by: Johannes Nixdorf Fixes: 00cfaa943ec3 ("replace strict_strto calls") Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- net/sunrpc/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/sunrpc/addr.c +++ b/net/sunrpc/addr.c @@ -184,7 +184,7 @@ static int rpc_parse_scope_id(struct net scope_id = dev->ifindex; dev_put(dev); } else { - if (kstrtou32(p, 10, &scope_id) == 0) { + if (kstrtou32(p, 10, &scope_id) != 0) { kfree(p); return 0; } From patchwork Fri Jan 22 14:08:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 369332 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 9B032C433DB for ; Fri, 22 Jan 2021 22:19:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 76A3A23A5B for ; Fri, 22 Jan 2021 22:19:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730535AbhAVT45 (ORCPT ); Fri, 22 Jan 2021 14:56:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:34614 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727869AbhAVOKm (ORCPT ); Fri, 22 Jan 2021 09:10:42 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8EDC923A6A; Fri, 22 Jan 2021 14:09:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324560; bh=KAkjzOBtXldkxQV3S9hnXuJJoDsRFiDiuXFWx2/s5j8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zpc3OG6QTDJRLljuEaNutOX52vvSveaK0Lps83xHFbOh9gkEHCC7zr8UxMmMzXz42 xK6gjJZajbmfHuTRYCaUBsimXjbMBt7YSgsEH1IDBb/fL6B3rNl+N8uQAAxejgzl8n wR4Pf89YT63ds1ZTE8Qc8VvlISnpD3ovIgzNG+pk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Russell King , Arnd Bergmann , Will Deacon , Nathan Chancellor , Nick Desaulniers , Linus Torvalds , Theodore Tso , Florian Weimer , Peter Zijlstra , Catalin Marinas Subject: [PATCH 4.4 20/31] compiler.h: Raise minimum version of GCC to 5.1 for arm64 Date: Fri, 22 Jan 2021 15:08:34 +0100 Message-Id: <20210122135732.683452710@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135731.873346566@linuxfoundation.org> References: <20210122135731.873346566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Will Deacon commit dca5244d2f5b94f1809f0c02a549edf41ccd5493 upstream. GCC versions >= 4.9 and < 5.1 have been shown to emit memory references beyond the stack pointer, resulting in memory corruption if an interrupt is taken after the stack pointer has been adjusted but before the reference has been executed. This leads to subtle, infrequent data corruption such as the EXT4 problems reported by Russell King at the link below. Life is too short for buggy compilers, so raise the minimum GCC version required by arm64 to 5.1. Reported-by: Russell King Suggested-by: Arnd Bergmann Signed-off-by: Will Deacon Tested-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Acked-by: Linus Torvalds Cc: Cc: Theodore Ts'o Cc: Florian Weimer Cc: Peter Zijlstra Cc: Nick Desaulniers Link: https://lore.kernel.org/r/20210105154726.GD1551@shell.armlinux.org.uk Link: https://lore.kernel.org/r/20210112224832.10980-1-will@kernel.org Signed-off-by: Catalin Marinas [will: backport to 4.4.y/4.9.y/4.14.y] Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- include/linux/compiler-gcc.h | 6 ++++++ 1 file changed, 6 insertions(+) --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -145,6 +145,12 @@ #if GCC_VERSION < 30200 # error Sorry, your compiler is too old - please upgrade it. +#elif defined(CONFIG_ARM64) && GCC_VERSION < 50100 +/* + * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293 + * https://lore.kernel.org/r/20210107111841.GN1551@shell.armlinux.org.uk + */ +# error Sorry, your version of GCC is too old - please use 5.1 or newer. #endif #if GCC_VERSION < 30300 From patchwork Fri Jan 22 14:08:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 369359 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 700B0C433E0 for ; Fri, 22 Jan 2021 19:57:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3747123B00 for ; Fri, 22 Jan 2021 19:57:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730558AbhAVT5a (ORCPT ); Fri, 22 Jan 2021 14:57:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:34362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728007AbhAVOLO (ORCPT ); Fri, 22 Jan 2021 09:11:14 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8ED1D23A7C; Fri, 22 Jan 2021 14:09:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324571; bh=ldwoMgTZQm8WXVNZ8e5I0+jYp/z/sOwVzf0fCgPzcLQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t+AECx4FoRpPOQuMNbmDApsHLadxAE1Om0kdCyhO+HNKqbGNSeemhk7CMatEAkRZ2 DL9vepSirIzre4+3Yr3XBUEWKkekqph42HeLDKhVYFKCmJLkyOLenBPtnPo/EKRIls mqxJN6sc3vkkuRkpimS/L6HtE2aHUsTaplwNyRHQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Manish Chopra , Igor Russkikh , Jakub Kicinski Subject: [PATCH 4.4 24/31] netxen_nic: fix MSI/MSI-x interrupts Date: Fri, 22 Jan 2021 15:08:38 +0100 Message-Id: <20210122135732.837593775@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135731.873346566@linuxfoundation.org> References: <20210122135731.873346566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Manish Chopra [ Upstream commit a2bc221b972db91e4be1970e776e98f16aa87904 ] For all PCI functions on the netxen_nic adapter, interrupt mode (INTx or MSI) configuration is dependent on what has been configured by the PCI function zero in the shared interrupt register, as these adapters do not support mixed mode interrupts among the functions of a given adapter. Logic for setting MSI/MSI-x interrupt mode in the shared interrupt register based on PCI function id zero check is not appropriate for all family of netxen adapters, as for some of the netxen family adapters PCI function zero is not really meant to be probed/loaded in the host but rather just act as a management function on the device, which caused all the other PCI functions on the adapter to always use legacy interrupt (INTx) mode instead of choosing MSI/MSI-x interrupt mode. This patch replaces that check with port number so that for all type of adapters driver attempts for MSI/MSI-x interrupt modes. Fixes: b37eb210c076 ("netxen_nic: Avoid mixed mode interrupts") Signed-off-by: Manish Chopra Signed-off-by: Igor Russkikh Link: https://lore.kernel.org/r/20210107101520.6735-1-manishc@marvell.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c @@ -586,11 +586,6 @@ static const struct net_device_ops netxe #endif }; -static inline bool netxen_function_zero(struct pci_dev *pdev) -{ - return (PCI_FUNC(pdev->devfn) == 0) ? true : false; -} - static inline void netxen_set_interrupt_mode(struct netxen_adapter *adapter, u32 mode) { @@ -686,7 +681,7 @@ static int netxen_setup_intr(struct netx netxen_initialize_interrupt_registers(adapter); netxen_set_msix_bit(pdev, 0); - if (netxen_function_zero(pdev)) { + if (adapter->portnum == 0) { if (!netxen_setup_msi_interrupts(adapter, num_msix)) netxen_set_interrupt_mode(adapter, NETXEN_MSI_MODE); else From patchwork Fri Jan 22 14:08:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 369427 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 DD7EDC433DB for ; Fri, 22 Jan 2021 14:14:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A9BE23AA9 for ; Fri, 22 Jan 2021 14:14:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728332AbhAVOM6 (ORCPT ); Fri, 22 Jan 2021 09:12:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:34332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728062AbhAVOLQ (ORCPT ); Fri, 22 Jan 2021 09:11:16 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 48AAB23A7D; Fri, 22 Jan 2021 14:09:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324573; bh=SlH2NzCoujiSem3sba2v272mEhlltaaiVc1Vd3kqLS0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vFi0oEN5xQL905XI2SYGytcVNE8/rR18S75cYVroNb67bkiwRStS/7ui8ckTys6nK osrItJbiSIrYgplWvBt8orTR6KMn39dJlETB4ZZfOrNAF7xepeSNAKP1kwGmPLRkS3 JFPvYUN9CMURFec5GXdhpEJ004RzSWbswnp/H02k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrey Zhizhikin , Jakub Kicinski Subject: [PATCH 4.4 25/31] rndis_host: set proper input size for OID_GEN_PHYSICAL_MEDIUM request Date: Fri, 22 Jan 2021 15:08:39 +0100 Message-Id: <20210122135732.874271091@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135731.873346566@linuxfoundation.org> References: <20210122135731.873346566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Andrey Zhizhikin [ Upstream commit e56b3d94d939f52d46209b9e1b6700c5bfff3123 ] MSFT ActiveSync implementation requires that the size of the response for incoming query is to be provided in the request input length. Failure to set the input size proper results in failed request transfer, where the ActiveSync counterpart reports the NDIS_STATUS_INVALID_LENGTH (0xC0010014L) error. Set the input size for OID_GEN_PHYSICAL_MEDIUM query to the expected size of the response in order for the ActiveSync to properly respond to the request. Fixes: 039ee17d1baa ("rndis_host: Add RNDIS physical medium checking into generic_rndis_bind()") Signed-off-by: Andrey Zhizhikin Link: https://lore.kernel.org/r/20210108095839.3335-1-andrey.zhizhikin@leica-geosystems.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/usb/rndis_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c @@ -398,7 +398,7 @@ generic_rndis_bind(struct usbnet *dev, s reply_len = sizeof *phym; retval = rndis_query(dev, intf, u.buf, RNDIS_OID_GEN_PHYSICAL_MEDIUM, - 0, (void **) &phym, &reply_len); + reply_len, (void **)&phym, &reply_len); if (retval != 0 || !phym) { /* OID is optional so don't fail here. */ phym_unspec = cpu_to_le32(RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED); From patchwork Fri Jan 22 14:08:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 369356 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 967D6C4332E for ; Fri, 22 Jan 2021 19:59:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5E6B623AFC for ; Fri, 22 Jan 2021 19:59:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730723AbhAVT62 (ORCPT ); Fri, 22 Jan 2021 14:58:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:35772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728336AbhAVONF (ORCPT ); Fri, 22 Jan 2021 09:13:05 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8469823A7E; Fri, 22 Jan 2021 14:09:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324582; bh=l4uhUfK/fERdFRPkg3NBFd2pXWcHnquqyXpcbHEmcUo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=chCYmhL016tyaGdlg6sbNO0NZGRGRi9EIQV55lLPlx1paGzaU3rvhH/xMK0riF7Md +0j5fjTDmbwTfN2ScKM+mnFyYraIcSpUJuPqPZdVUO8VWXGoEADtiTjuIJg9n6KrO2 4c65D1oL290l8iuLa/LS2A7pLkEM6cz4GBcjNdKc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Petr Machata , Jakub Kicinski Subject: [PATCH 4.4 27/31] net: dcb: Accept RTM_GETDCB messages carrying set-like DCB commands Date: Fri, 22 Jan 2021 15:08:41 +0100 Message-Id: <20210122135732.952886908@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135731.873346566@linuxfoundation.org> References: <20210122135731.873346566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Petr Machata [ Upstream commit df85bc140a4d6cbaa78d8e9c35154e1a2f0622c7 ] In commit 826f328e2b7e ("net: dcb: Validate netlink message in DCB handler"), Linux started rejecting RTM_GETDCB netlink messages if they contained a set-like DCB_CMD_ command. The reason was that privileges were only verified for RTM_SETDCB messages, but the value that determined the action to be taken is the command, not the message type. And validation of message type against the DCB command was the obvious missing piece. Unfortunately it turns out that mlnx_qos, a somewhat widely deployed tool for configuration of DCB, accesses the DCB set-like APIs through RTM_GETDCB. Therefore do not bounce the discrepancy between message type and command. Instead, in addition to validating privileges based on the actual message type, validate them also based on the expected message type. This closes the loophole of allowing DCB configuration on non-admin accounts, while maintaining backward compatibility. Fixes: 2f90b8657ec9 ("ixgbe: this patch adds support for DCB to the kernel and ixgbe driver") Fixes: 826f328e2b7e ("net: dcb: Validate netlink message in DCB handler") Signed-off-by: Petr Machata Link: https://lore.kernel.org/r/a3edcfda0825f2aa2591801c5232f2bbf2d8a554.1610384801.git.me@pmachata.org Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/dcb/dcbnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/dcb/dcbnl.c +++ b/net/dcb/dcbnl.c @@ -1725,7 +1725,7 @@ static int dcb_doit(struct sk_buff *skb, fn = &reply_funcs[dcb->cmd]; if (!fn->cb) return -EOPNOTSUPP; - if (fn->type != nlh->nlmsg_type) + if (fn->type == RTM_SETDCB && !netlink_capable(skb, CAP_NET_ADMIN)) return -EPERM; if (!tb[DCB_ATTR_IFNAME]) From patchwork Fri Jan 22 14:08:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 369351 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 72CA6C4332B for ; Fri, 22 Jan 2021 19:59:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3DB2C23B00 for ; Fri, 22 Jan 2021 19:59:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729832AbhAVT6Y (ORCPT ); Fri, 22 Jan 2021 14:58:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:35774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728337AbhAVONF (ORCPT ); Fri, 22 Jan 2021 09:13:05 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 637C223A80; Fri, 22 Jan 2021 14:09:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324585; bh=ZtdsmF8+KcRpo8CMfkvTIJMYHxHT8wPSrbX/nKEIwsU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o+CeV9awCwvrw/aYHFh7H6RZA8xf36Ateb72q/UnxG118yiGUTDBeF3koOfe9Zurc 5cac4SIbnlfRLGz468hHll2V1BxlsaLxpYCkaGllL9bHK93Rhx4YB+/YPAYrjWhams VHhIZz3gilu1uJKws5hj7d9Yhf10QSMKfBuWkYMs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolas Dichtel , Jakub Kicinski , syzbot+2393580080a2da190f04@syzkaller.appspotmail.com Subject: [PATCH 4.4 28/31] net: sit: unregister_netdevice on newlinks error path Date: Fri, 22 Jan 2021 15:08:42 +0100 Message-Id: <20210122135732.994572553@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135731.873346566@linuxfoundation.org> References: <20210122135731.873346566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jakub Kicinski [ Upstream commit 47e4bb147a96f1c9b4e7691e7e994e53838bfff8 ] We need to unregister the netdevice if config failed. .ndo_uninit takes care of most of the heavy lifting. This was uncovered by recent commit c269a24ce057 ("net: make free_netdev() more lenient with unregistering devices"). Previously the partially-initialized device would be left in the system. Reported-and-tested-by: syzbot+2393580080a2da190f04@syzkaller.appspotmail.com Fixes: e2f1f072db8d ("sit: allow to configure 6rd tunnels via netlink") Acked-by: Nicolas Dichtel Link: https://lore.kernel.org/r/20210114012947.2515313-1-kuba@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/ipv6/sit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -1584,8 +1584,11 @@ static int ipip6_newlink(struct net *src } #ifdef CONFIG_IPV6_SIT_6RD - if (ipip6_netlink_6rd_parms(data, &ip6rd)) + if (ipip6_netlink_6rd_parms(data, &ip6rd)) { err = ipip6_tunnel_update_6rd(nt, &ip6rd); + if (err < 0) + unregister_netdevice_queue(dev, NULL); + } #endif return err; From patchwork Fri Jan 22 14:08:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 369355 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 AFEF4C4332D for ; Fri, 22 Jan 2021 19:59:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8041F23B00 for ; Fri, 22 Jan 2021 19:59:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730729AbhAVT6b (ORCPT ); Fri, 22 Jan 2021 14:58:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:35776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728338AbhAVONF (ORCPT ); Fri, 22 Jan 2021 09:13:05 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id ADE1623A82; Fri, 22 Jan 2021 14:09:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324593; bh=9bRbA/jQkhFE5WIgUpWAVFL7tJg0TwZ4oyz8ZblzCgY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eF0Sacfpw+wfvlulMqn+krRQpHZ4rjwkHqRHrgzoW09Krxx4d7BOPVAkRym9gjPRJ 9nLzZUk09GJ0X7Ibnr1UALVl5Lh9GoLkDTFavkTGHoa95mChutcRM3kuofWHxkvqmw IGmpvlfWj94CLWdrWwIiiZ7hQ4cKwZueHICdrbA8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Hennerich , Alexandru Ardelean , Mark Brown Subject: [PATCH 4.4 31/31] spi: cadence: cache reference clock rate during probe Date: Fri, 22 Jan 2021 15:08:45 +0100 Message-Id: <20210122135733.110337130@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135731.873346566@linuxfoundation.org> References: <20210122135731.873346566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Michael Hennerich commit 4d163ad79b155c71bf30366dc38f8d2502f78844 upstream. The issue is that using SPI from a callback under the CCF lock will deadlock, since this code uses clk_get_rate(). Fixes: c474b38665463 ("spi: Add driver for Cadence SPI controller") Signed-off-by: Michael Hennerich Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210114154217.51996-1-alexandru.ardelean@analog.com Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-cadence.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/spi/spi-cadence.c +++ b/drivers/spi/spi-cadence.c @@ -116,6 +116,7 @@ struct cdns_spi { void __iomem *regs; struct clk *ref_clk; struct clk *pclk; + unsigned int clk_rate; u32 speed_hz; const u8 *txbuf; u8 *rxbuf; @@ -257,7 +258,7 @@ static void cdns_spi_config_clock_freq(s u32 ctrl_reg, baud_rate_val; unsigned long frequency; - frequency = clk_get_rate(xspi->ref_clk); + frequency = xspi->clk_rate; ctrl_reg = cdns_spi_read(xspi, CDNS_SPI_CR_OFFSET); @@ -557,8 +558,9 @@ static int cdns_spi_probe(struct platfor master->set_cs = cdns_spi_chipselect; master->mode_bits = SPI_CPOL | SPI_CPHA; + xspi->clk_rate = clk_get_rate(xspi->ref_clk); /* Set to default valid value */ - master->max_speed_hz = clk_get_rate(xspi->ref_clk) / 4; + master->max_speed_hz = xspi->clk_rate / 4; xspi->speed_hz = master->max_speed_hz; master->bits_per_word_mask = SPI_BPW_MASK(8);