From patchwork Fri Mar 20 23:39:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11450575 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3056514B4 for ; Fri, 20 Mar 2020 23:40:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0687220714 for ; Fri, 20 Mar 2020 23:40:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726955AbgCTXkO (ORCPT ); Fri, 20 Mar 2020 19:40:14 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:48154 "EHLO mout-p-202.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726773AbgCTXkO (ORCPT ); Fri, 20 Mar 2020 19:40:14 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 48kgHb6612zQlFd; Sat, 21 Mar 2020 00:40:11 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id 3IHGigg657r4; Sat, 21 Mar 2020 00:40:08 +0100 (CET) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 1/8] backports: patches: Refresh against kernel 5.5.10 Date: Sat, 21 Mar 2020 00:39:43 +0100 Message-Id: <20200320233950.32257-2-hauke@hauke-m.de> In-Reply-To: <20200320233950.32257-1-hauke@hauke-m.de> References: <20200320233950.32257-1-hauke@hauke-m.de> MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org Signed-off-by: Hauke Mehrtens --- ...2-disable-dump-adjust-on-old-kernels.patch | 4 +-- .../include_net_cfg80211.patch | 2 +- .../net_wireless_core.patch | 2 +- .../0013-fix-makefile-includes/rtw88.patch | 28 ++++++------------- .../net_wireless_nl80211.patch | 2 +- patches/0022-define-tracing/wil6210.patch | 2 +- patches/0024-led-blink-api/mac80211.patch | 2 +- patches/0025-usb-sg/usbnet.patch | 2 +- patches/0028-select_queue/mwifiex.patch | 2 +- patches/0028-select_queue/rtl8723bs.patch | 2 +- patches/0053-possible_net_t.patch | 2 +- patches/0055-name_assign_type/brcmfmac.patch | 2 +- patches/0069-iwlwifi-pd-string-fix.patch | 2 +- patches/0077-genl-ro-after-init/hwsim.patch | 2 +- patches/0077-genl-ro-after-init/nl80211.patch | 2 +- patches/0085-iwlwifi-pci-device-removal.patch | 4 +-- patches/0090-remove-GRO_CONSUMED.patch | 2 +- patches/lib-refcount.patch | 10 +++---- 18 files changed, 32 insertions(+), 42 deletions(-) diff --git a/patches/0002-disable-dump-adjust-on-old-kernels.patch b/patches/0002-disable-dump-adjust-on-old-kernels.patch index 04103f35..3d752359 100644 --- a/patches/0002-disable-dump-adjust-on-old-kernels.patch +++ b/patches/0002-disable-dump-adjust-on-old-kernels.patch @@ -28,7 +28,7 @@ Date: Fri Mar 1 14:03:49 2013 +0100 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -2542,6 +2542,7 @@ static int nl80211_dump_wiphy(struct sk_ +@@ -2549,6 +2549,7 @@ static int nl80211_dump_wiphy(struct sk_ cb->nlh->nlmsg_seq, NLM_F_MULTI, state); if (ret < 0) { @@ -36,7 +36,7 @@ Date: Fri Mar 1 14:03:49 2013 +0100 /* * If sending the wiphy data didn't fit (ENOBUFS * or EMSGSIZE returned), this SKB is still -@@ -2563,6 +2564,7 @@ static int nl80211_dump_wiphy(struct sk_ +@@ -2570,6 +2571,7 @@ static int nl80211_dump_wiphy(struct sk_ rtnl_unlock(); return 1; } diff --git a/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch b/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch index ab2b79ff..11c50887 100644 --- a/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch +++ b/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch @@ -1,6 +1,6 @@ --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -4536,6 +4536,9 @@ struct cfg80211_pmsr_capabilities { +@@ -4552,6 +4552,9 @@ struct cfg80211_pmsr_capabilities { struct wiphy { /* assign these fields before you register the wiphy */ diff --git a/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch b/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch index c5d8ddf9..6b14d347 100644 --- a/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch +++ b/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch @@ -11,7 +11,7 @@ device_initialize(&rdev->wiphy.dev); rdev->wiphy.dev.class = &ieee80211_class; rdev->wiphy.dev.platform_data = rdev; -@@ -1295,6 +1291,15 @@ static int cfg80211_netdev_notifier_call +@@ -1296,6 +1292,15 @@ static int cfg80211_netdev_notifier_call } wdev->netdev = dev; #ifdef CONFIG_CFG80211_WEXT diff --git a/patches/0013-fix-makefile-includes/rtw88.patch b/patches/0013-fix-makefile-includes/rtw88.patch index 10bb1780..4e2ea808 100644 --- a/patches/0013-fix-makefile-includes/rtw88.patch +++ b/patches/0013-fix-makefile-includes/rtw88.patch @@ -1,40 +1,30 @@ --- a/drivers/net/wireless/realtek/rtw88/main.c +++ b/drivers/net/wireless/realtek/rtw88/main.c -@@ -13,6 +13,7 @@ - #include "reg.h" - #include "efuse.h" +@@ -15,6 +15,7 @@ + #include "tx.h" #include "debug.h" + #include "bf.h" +#include - static bool rtw_fw_support_lps; - unsigned int rtw_debug_mask; + unsigned int rtw_fw_lps_deep_mode; + EXPORT_SYMBOL(rtw_fw_lps_deep_mode); --- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c -@@ -13,6 +13,7 @@ - #include "mac.h" +@@ -14,6 +14,7 @@ #include "reg.h" #include "debug.h" + #include "bf.h" +#include static void rtw8822b_config_trx_mode(struct rtw_dev *rtwdev, u8 tx_path, u8 rx_path, bool is_tx2_path); --- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c -@@ -14,6 +14,7 @@ - #include "reg.h" +@@ -15,6 +15,7 @@ #include "debug.h" #include "util.h" + #include "bf.h" +#include static void rtw8822c_config_trx_mode(struct rtw_dev *rtwdev, u8 tx_path, u8 rx_path, bool is_tx2_path); ---- a/drivers/net/wireless/realtek/rtw88/pci.c -+++ b/drivers/net/wireless/realtek/rtw88/pci.c -@@ -10,6 +10,7 @@ - #include "rx.h" - #include "fw.h" - #include "debug.h" -+#include - - static bool rtw_disable_msi; - module_param_named(disable_msi, rtw_disable_msi, bool, 0644); diff --git a/patches/0014-netlink_seq/net_wireless_nl80211.patch b/patches/0014-netlink_seq/net_wireless_nl80211.patch index 8b7c33b0..28416330 100644 --- a/patches/0014-netlink_seq/net_wireless_nl80211.patch +++ b/patches/0014-netlink_seq/net_wireless_nl80211.patch @@ -1,6 +1,6 @@ --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -8765,7 +8765,9 @@ static int nl80211_dump_scan(struct sk_b +@@ -8780,7 +8780,9 @@ static int nl80211_dump_scan(struct sk_b if (start == 0) cfg80211_bss_expire(rdev); diff --git a/patches/0022-define-tracing/wil6210.patch b/patches/0022-define-tracing/wil6210.patch index 2e51beb1..a1093d16 100644 --- a/patches/0022-define-tracing/wil6210.patch +++ b/patches/0022-define-tracing/wil6210.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/wil6210/trace.c +++ b/drivers/net/wireless/ath/wil6210/trace.c -@@ -15,6 +15,9 @@ +@@ -4,6 +4,9 @@ */ #include diff --git a/patches/0024-led-blink-api/mac80211.patch b/patches/0024-led-blink-api/mac80211.patch index 39fb6f0c..99b78d0c 100644 --- a/patches/0024-led-blink-api/mac80211.patch +++ b/patches/0024-led-blink-api/mac80211.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1306,6 +1306,7 @@ struct ieee80211_local { +@@ -1310,6 +1310,7 @@ struct ieee80211_local { struct mutex chanctx_mtx; #ifdef CONFIG_MAC80211_LEDS diff --git a/patches/0025-usb-sg/usbnet.patch b/patches/0025-usb-sg/usbnet.patch index 30cce14f..47f49b5c 100644 --- a/patches/0025-usb-sg/usbnet.patch +++ b/patches/0025-usb-sg/usbnet.patch @@ -61,7 +61,7 @@ /* fall through */ case rx_cleanup: usb_free_urb (entry->urb); -@@ -1896,7 +1914,9 @@ int usbnet_resume (struct usb_interface +@@ -1903,7 +1921,9 @@ int usbnet_resume (struct usb_interface retval = usb_submit_urb(res, GFP_ATOMIC); if (retval < 0) { dev_kfree_skb_any(skb); diff --git a/patches/0028-select_queue/mwifiex.patch b/patches/0028-select_queue/mwifiex.patch index 0b4e9838..ffcb4cbb 100644 --- a/patches/0028-select_queue/mwifiex.patch +++ b/patches/0028-select_queue/mwifiex.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/marvell/mwifiex/main.c +++ b/drivers/net/wireless/marvell/mwifiex/main.c -@@ -1276,9 +1276,28 @@ static struct net_device_stats *mwifiex_ +@@ -1277,9 +1277,28 @@ static struct net_device_stats *mwifiex_ return &priv->stats; } diff --git a/patches/0028-select_queue/rtl8723bs.patch b/patches/0028-select_queue/rtl8723bs.patch index 94524bc0..962c0cc9 100644 --- a/patches/0028-select_queue/rtl8723bs.patch +++ b/patches/0028-select_queue/rtl8723bs.patch @@ -1,6 +1,6 @@ --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c -@@ -395,8 +395,18 @@ static unsigned int rtw_classify8021d(st +@@ -375,8 +375,18 @@ static unsigned int rtw_classify8021d(st } diff --git a/patches/0053-possible_net_t.patch b/patches/0053-possible_net_t.patch index 85e6c24c..596aa90d 100644 --- a/patches/0053-possible_net_t.patch +++ b/patches/0053-possible_net_t.patch @@ -2,7 +2,7 @@ diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 04e5785..a251da1 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -4685,12 +4685,12 @@ struct wiphy { +@@ -4701,12 +4701,12 @@ struct wiphy { static inline struct net *wiphy_net(struct wiphy *wiphy) { diff --git a/patches/0055-name_assign_type/brcmfmac.patch b/patches/0055-name_assign_type/brcmfmac.patch index c242a44a..c9619b1c 100644 --- a/patches/0055-name_assign_type/brcmfmac.patch +++ b/patches/0055-name_assign_type/brcmfmac.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c -@@ -2219,7 +2219,9 @@ struct wireless_dev *brcmf_p2p_add_vif(s +@@ -2220,7 +2220,9 @@ struct wireless_dev *brcmf_p2p_add_vif(s } strncpy(ifp->ndev->name, name, sizeof(ifp->ndev->name) - 1); diff --git a/patches/0069-iwlwifi-pd-string-fix.patch b/patches/0069-iwlwifi-pd-string-fix.patch index 563fcbd7..f4580157 100644 --- a/patches/0069-iwlwifi-pd-string-fix.patch +++ b/patches/0069-iwlwifi-pd-string-fix.patch @@ -60,7 +60,7 @@ mvm->debugfs_dir, buf); --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c -@@ -2081,6 +2081,12 @@ void iwl_mvm_dbgfs_register(struct iwl_m +@@ -2085,6 +2085,12 @@ void iwl_mvm_dbgfs_register(struct iwl_m * Create a symlink with mac80211. It will be removed when mac80211 * exists (before the opmode exists which removes the target.) */ diff --git a/patches/0077-genl-ro-after-init/hwsim.patch b/patches/0077-genl-ro-after-init/hwsim.patch index 5a485060..f3f46e5a 100644 --- a/patches/0077-genl-ro-after-init/hwsim.patch +++ b/patches/0077-genl-ro-after-init/hwsim.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c -@@ -3765,7 +3765,7 @@ static const struct genl_ops hwsim_ops[] +@@ -3790,7 +3790,7 @@ static const struct genl_ops hwsim_ops[] }, }; diff --git a/patches/0077-genl-ro-after-init/nl80211.patch b/patches/0077-genl-ro-after-init/nl80211.patch index eee2ee3c..e4071840 100644 --- a/patches/0077-genl-ro-after-init/nl80211.patch +++ b/patches/0077-genl-ro-after-init/nl80211.patch @@ -1,6 +1,6 @@ --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -14750,7 +14750,7 @@ static const struct genl_ops nl80211_ops +@@ -14768,7 +14768,7 @@ static const struct genl_ops nl80211_ops }, }; diff --git a/patches/0085-iwlwifi-pci-device-removal.patch b/patches/0085-iwlwifi-pci-device-removal.patch index f858fe99..08627746 100644 --- a/patches/0085-iwlwifi-pci-device-removal.patch +++ b/patches/0085-iwlwifi-pci-device-removal.patch @@ -2,7 +2,7 @@ diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wirel index f74281508197..3b11bd68f261 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c -@@ -1998,6 +1998,9 @@ static void iwl_trans_pcie_removal_wk(st +@@ -2024,6 +2024,9 @@ static void iwl_trans_pcie_removal_wk(st struct iwl_trans_pcie_removal *removal = container_of(wk, struct iwl_trans_pcie_removal, work); struct pci_dev *pdev = removal->pdev; @@ -12,7 +12,7 @@ index f74281508197..3b11bd68f261 100644 static char *prop[] = {"EVENT=INACCESSIBLE", NULL}; dev_err(&pdev->dev, "Device gone - attempting removal\n"); -@@ -2006,6 +2009,7 @@ static void iwl_trans_pcie_removal_wk(st +@@ -2032,6 +2035,7 @@ static void iwl_trans_pcie_removal_wk(st pci_dev_put(pdev); pci_stop_and_remove_bus_device(pdev); pci_unlock_rescan_remove(); diff --git a/patches/0090-remove-GRO_CONSUMED.patch b/patches/0090-remove-GRO_CONSUMED.patch index b2abfa96..ea0e1ea7 100644 --- a/patches/0090-remove-GRO_CONSUMED.patch +++ b/patches/0090-remove-GRO_CONSUMED.patch @@ -4,7 +4,7 @@ older kernel versions. --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c -@@ -924,7 +924,9 @@ void wil_netif_rx(struct sk_buff *skb, s +@@ -913,7 +913,9 @@ void wil_netif_rx(struct sk_buff *skb, s [GRO_HELD] = "GRO_HELD", [GRO_NORMAL] = "GRO_NORMAL", [GRO_DROP] = "GRO_DROP", diff --git a/patches/lib-refcount.patch b/patches/lib-refcount.patch index 0f63ec6a..f375e1a2 100644 --- a/patches/lib-refcount.patch +++ b/patches/lib-refcount.patch @@ -2,15 +2,15 @@ diff --git a/compat/lib-refcount.c b/compat/lib-refcount.c index 5d0582a..8d108f9 100644 --- a/compat/lib-refcount.c +++ b/compat/lib-refcount.c -@@ -42,6 +42,7 @@ +@@ -7,6 +7,7 @@ #include #include #include +#include - /** - * refcount_add_not_zero_checked - add a value to a refcount unless it is 0 -@@ -153,6 +153,8 @@ bool refcount_dec_and_lock(refcount_t *r, spinlock_t *lock) + #define REFCOUNT_WARN(str) WARN_ONCE(1, "refcount_t: " str ".\n") + +@@ -152,6 +153,8 @@ bool refcount_dec_and_lock(refcount_t *r return false; } @@ -19,7 +19,7 @@ index 5d0582a..8d108f9 100644 return true; } EXPORT_SYMBOL(refcount_dec_and_lock); -@@ -182,6 +184,8 @@ bool refcount_dec_and_lock_irqsave(refcount_t *r, spinlock_t *lock, +@@ -181,6 +184,8 @@ bool refcount_dec_and_lock_irqsave(refco return false; } From patchwork Fri Mar 20 23:39:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11450579 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9D08A1894 for ; Fri, 20 Mar 2020 23:40:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8676D20752 for ; Fri, 20 Mar 2020 23:40:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726897AbgCTXkP (ORCPT ); Fri, 20 Mar 2020 19:40:15 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:48168 "EHLO mout-p-202.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726867AbgCTXkP (ORCPT ); Fri, 20 Mar 2020 19:40:15 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 48kgHc1kDMzQlFf; Sat, 21 Mar 2020 00:40:12 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter06.heinlein-hosting.de (spamfilter06.heinlein-hosting.de [80.241.56.125]) (amavisd-new, port 10030) with ESMTP id LreqJcfaWfIa; Sat, 21 Mar 2020 00:40:09 +0100 (CET) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 2/8] backports: fs.h: Add compat_ptr_ioctl() Date: Sat, 21 Mar 2020 00:39:44 +0100 Message-Id: <20200320233950.32257-3-hauke@hauke-m.de> In-Reply-To: <20200320233950.32257-1-hauke@hauke-m.de> References: <20200320233950.32257-1-hauke@hauke-m.de> MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org compat_ptr_ioctl() was added in upstream commit 2952db0fd51b ("compat_ioctl: add compat_ptr_ioctl()") and is now used by the cdc-wdm driver. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/fs.h | 10 +++++++ backport/compat/Makefile | 1 + backport/compat/backport-5.5.c | 41 ++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 backport/compat/backport-5.5.c diff --git a/backport/backport-include/linux/fs.h b/backport/backport-include/linux/fs.h index 6e4d4a53..9854290a 100644 --- a/backport/backport-include/linux/fs.h +++ b/backport/backport-include/linux/fs.h @@ -49,4 +49,14 @@ static inline struct inode *file_inode(struct file *f) extern loff_t no_seek_end_llseek(struct file *, loff_t, int); #endif /* < 4.5 && >= 3.2 */ +#if LINUX_VERSION_IS_LESS(5,5,0) +#ifdef CONFIG_COMPAT +#define compat_ptr_ioctl LINUX_BACKPORT(compat_ptr_ioctl) +extern long compat_ptr_ioctl(struct file *file, unsigned int cmd, + unsigned long arg); +#else +#define compat_ptr_ioctl NULL +#endif +#endif /* < 5.5 */ + #endif /* _COMPAT_LINUX_FS_H */ diff --git a/backport/compat/Makefile b/backport/compat/Makefile index e92e3120..6f1b0a89 100644 --- a/backport/compat/Makefile +++ b/backport/compat/Makefile @@ -38,6 +38,7 @@ compat-$(CPTCFG_KERNEL_4_8) += backport-4.8.o compat-$(CPTCFG_KERNEL_4_10) += backport-4.10.o compat-$(CPTCFG_KERNEL_4_18) += backport-4.18.o compat-$(CPTCFG_KERNEL_5_2) += backport-5.2.o backport-genetlink.o +compat-$(CPTCFG_KERNEL_5_5) += backport-5.5.o compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/verify.o compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/pkcs7.asn1.o diff --git a/backport/compat/backport-5.5.c b/backport/compat/backport-5.5.c new file mode 100644 index 00000000..6f46be9d --- /dev/null +++ b/backport/compat/backport-5.5.c @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include +#include +#include +#include +#include + +#ifdef CONFIG_COMPAT +/** + * compat_ptr_ioctl - generic implementation of .compat_ioctl file operation + * + * This is not normally called as a function, but instead set in struct + * file_operations as + * + * .compat_ioctl = compat_ptr_ioctl, + * + * On most architectures, the compat_ptr_ioctl() just passes all arguments + * to the corresponding ->ioctl handler. The exception is arch/s390, where + * compat_ptr() clears the top bit of a 32-bit pointer value, so user space + * pointers to the second 2GB alias the first 2GB, as is the case for + * native 32-bit s390 user space. + * + * The compat_ptr_ioctl() function must therefore be used only with ioctl + * functions that either ignore the argument or pass a pointer to a + * compatible data type. + * + * If any ioctl command handled by fops->unlocked_ioctl passes a plain + * integer instead of a pointer, or any of the passed data types + * is incompatible between 32-bit and 64-bit architectures, a proper + * handler is required instead of compat_ptr_ioctl. + */ +long compat_ptr_ioctl(struct file *file, unsigned int cmd, unsigned long arg) +{ + if (!file->f_op->unlocked_ioctl) + return -ENOIOCTLCMD; + + return file->f_op->unlocked_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); +} +EXPORT_SYMBOL(compat_ptr_ioctl); +#endif From patchwork Fri Mar 20 23:39:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11450573 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7424314B4 for ; Fri, 20 Mar 2020 23:40:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 519DB20752 for ; Fri, 20 Mar 2020 23:40:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726935AbgCTXkO (ORCPT ); Fri, 20 Mar 2020 19:40:14 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:45568 "EHLO mout-p-102.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726880AbgCTXkN (ORCPT ); Fri, 20 Mar 2020 19:40:13 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 48kgHc4RhKzKmNY; Sat, 21 Mar 2020 00:40:12 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id H9vkHJPTzdq8; Sat, 21 Mar 2020 00:40:10 +0100 (CET) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 3/8] backports: stddef.h: Add sizeof_field() Date: Sat, 21 Mar 2020 00:39:45 +0100 Message-Id: <20200320233950.32257-4-hauke@hauke-m.de> In-Reply-To: <20200320233950.32257-1-hauke@hauke-m.de> References: <20200320233950.32257-1-hauke@hauke-m.de> MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org This backports sizeof_field() from upstream Linux commit 4229a470175b ("stddef.h: Introduce sizeof_field()"). This is now used by multiple drivers. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/stddef.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/backport/backport-include/linux/stddef.h b/backport/backport-include/linux/stddef.h index 2c836b00..a6cdc67d 100644 --- a/backport/backport-include/linux/stddef.h +++ b/backport/backport-include/linux/stddef.h @@ -2,6 +2,16 @@ #define __BACKPORT_LINUX_STDDEF_H #include_next +#ifndef sizeof_field +/** + * sizeof_field(TYPE, MEMBER) + * + * @TYPE: The structure containing the field of interest + * @MEMBER: The field to return the size of + */ +#define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER)) +#endif + #ifndef offsetofend /** * offsetofend(TYPE, MEMBER) @@ -10,7 +20,7 @@ * @MEMBER: The member within the structure to get the end offset of */ #define offsetofend(TYPE, MEMBER) \ - (offsetof(TYPE, MEMBER) + sizeof(((TYPE *)0)->MEMBER)) + (offsetof(TYPE, MEMBER) + sizeof_field(TYPE, MEMBER)) #endif #endif /* __BACKPORT_LINUX_STDDEF_H */ From patchwork Fri Mar 20 23:39:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11450577 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5074692A for ; Fri, 20 Mar 2020 23:40:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A1A720753 for ; Fri, 20 Mar 2020 23:40:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726773AbgCTXkO (ORCPT ); Fri, 20 Mar 2020 19:40:14 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:48178 "EHLO mout-p-202.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726897AbgCTXkO (ORCPT ); Fri, 20 Mar 2020 19:40:14 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 48kgHc6JT8zQlFp; Sat, 21 Mar 2020 00:40:12 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id vISkvpUZ8xyH; Sat, 21 Mar 2020 00:40:10 +0100 (CET) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 4/8] backports: Make qtnfmac depend on kernel 5.1 or later Date: Sat, 21 Mar 2020 00:39:46 +0100 Message-Id: <20200320233950.32257-5-hauke@hauke-m.de> In-Reply-To: <20200320233950.32257-1-hauke@hauke-m.de> References: <20200320233950.32257-1-hauke@hauke-m.de> MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org The qtnfmac driver now uses the .ndo_get_port_parent_id ndo callback which was added in kernel 5.1. Instead of backporting this part just make the driver depend on a kernel version which supports this callback. Signed-off-by: Hauke Mehrtens --- dependencies | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dependencies b/dependencies index 02d46ca3..47558470 100644 --- a/dependencies +++ b/dependencies @@ -24,8 +24,9 @@ AIRO_CS 3.9 # pci_error_handlers->reset_notify is missing MWIFIEX_PCIE 3.16 -# needs pcie_get_mps() -QTNFMAC_PCIE 3.13 +# needs .ndo_get_port_parent_id +QTNFMAC 5.1 +QTNFMAC_PCIE 5.1 # needs pm_system_wakeup() which can't reall be # backported properly From patchwork Fri Mar 20 23:39:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11450581 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6A82C92A for ; Fri, 20 Mar 2020 23:40:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4726920752 for ; Fri, 20 Mar 2020 23:40:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726980AbgCTXkP (ORCPT ); Fri, 20 Mar 2020 19:40:15 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:45576 "EHLO mout-p-102.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726880AbgCTXkP (ORCPT ); Fri, 20 Mar 2020 19:40:15 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 48kgHf0JJXzKmVl; Sat, 21 Mar 2020 00:40:14 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id M9-7meaZHrgt; Sat, 21 Mar 2020 00:40:11 +0100 (CET) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 5/8] backports: rcupdate.h: Add rcu_swap_protected() Date: Sat, 21 Mar 2020 00:39:47 +0100 Message-Id: <20200320233950.32257-6-hauke@hauke-m.de> In-Reply-To: <20200320233950.32257-1-hauke@hauke-m.de> References: <20200320233950.32257-1-hauke@hauke-m.de> MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org Backport rcu_swap_protected() from upstream Linux commit 26e3e3cb0560 ("scsi: rcu: Introduce rcu_swap_protected()"). This is used by the mt76 driver. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/rcupdate.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/backport/backport-include/linux/rcupdate.h b/backport/backport-include/linux/rcupdate.h index cec4b3e8..db501007 100644 --- a/backport/backport-include/linux/rcupdate.h +++ b/backport/backport-include/linux/rcupdate.h @@ -59,4 +59,22 @@ rcu_head_after_call_rcu(struct rcu_head *rhp, rcu_callback_t f) } #endif /* < 4.20 */ +#ifndef rcu_swap_protected +/** + * rcu_swap_protected() - swap an RCU and a regular pointer + * @rcu_ptr: RCU pointer + * @ptr: regular pointer + * @c: the conditions under which the dereference will take place + * + * Perform swap(@rcu_ptr, @ptr) where @rcu_ptr is an RCU-annotated pointer and + * @c is the argument that is passed to the rcu_dereference_protected() call + * used to read that pointer. + */ +#define rcu_swap_protected(rcu_ptr, ptr, c) do { \ + typeof(ptr) __tmp = rcu_dereference_protected((rcu_ptr), (c)); \ + rcu_assign_pointer((rcu_ptr), (ptr)); \ + (ptr) = __tmp; \ +} while (0) +#endif + #endif /* __BACKPORT_LINUX_RCUPDATE_H */ From patchwork Fri Mar 20 23:39:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11450585 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E54E31894 for ; Fri, 20 Mar 2020 23:40:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE0FF20753 for ; Fri, 20 Mar 2020 23:40:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726867AbgCTXkQ (ORCPT ); Fri, 20 Mar 2020 19:40:16 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:45588 "EHLO mout-p-102.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726976AbgCTXkQ (ORCPT ); Fri, 20 Mar 2020 19:40:16 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 48kgHf4DPGzKmNY; Sat, 21 Mar 2020 00:40:14 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id oe6cnk7cGRlt; Sat, 21 Mar 2020 00:40:11 +0100 (CET) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 6/8] backports: netdevice.h: Add return value to napi_complete() Date: Sat, 21 Mar 2020 00:39:48 +0100 Message-Id: <20200320233950.32257-7-hauke@hauke-m.de> In-Reply-To: <20200320233950.32257-1-hauke@hauke-m.de> References: <20200320233950.32257-1-hauke@hauke-m.de> MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org mt76 checks the return value of napi_complete() now, add the same handling as already done for napi_complete_done(). Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/netdevice.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index 76b57e4d..a71ed590 100644 --- a/backport/backport-include/linux/netdevice.h +++ b/backport/backport-include/linux/netdevice.h @@ -302,7 +302,13 @@ static inline bool backport_napi_complete_done(struct napi_struct *n, int work_d #endif /* < 3.19 */ return true; } + +static inline bool backport_napi_complete(struct napi_struct *n) +{ + return backport_napi_complete_done(n, 0); +} #define napi_complete_done LINUX_BACKPORT(napi_complete_done) +#define napi_complete LINUX_BACKPORT(napi_complete) #endif /* < 4.10 */ #if LINUX_VERSION_IS_LESS(4,5,0) From patchwork Fri Mar 20 23:39:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11450583 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C34731864 for ; Fri, 20 Mar 2020 23:40:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A2C6B20752 for ; Fri, 20 Mar 2020 23:40:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726880AbgCTXkQ (ORCPT ); Fri, 20 Mar 2020 19:40:16 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]:8216 "EHLO mout-p-103.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726867AbgCTXkQ (ORCPT ); Fri, 20 Mar 2020 19:40:16 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 48kgHf4R8czKmTh; Sat, 21 Mar 2020 00:40:14 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id ebEqFekY5bVm; Sat, 21 Mar 2020 00:40:12 +0100 (CET) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 7/8] backports: Do not build BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION on < 3.13 Date: Sat, 21 Mar 2020 00:39:49 +0100 Message-Id: <20200320233950.32257-8-hauke@hauke-m.de> In-Reply-To: <20200320233950.32257-1-hauke@hauke-m.de> References: <20200320233950.32257-1-hauke@hauke-m.de> MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org SYSTEM_DATA_VERIFICATION now uses hash_algo_name() which was added in kernel 3.13. Just do not build this on older kernel versions. Signed-off-by: Hauke Mehrtens --- backport/compat/Kconfig | 1 + dependencies | 3 +++ 2 files changed, 4 insertions(+) diff --git a/backport/compat/Kconfig b/backport/compat/Kconfig index 3af729a3..41b50a6b 100644 --- a/backport/compat/Kconfig +++ b/backport/compat/Kconfig @@ -150,6 +150,7 @@ config BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION bool default y if BPAUTO_SYSTEM_DATA_VERIFICATION depends on KERNEL_4_7 || !SYSTEM_DATA_VERIFICATION + depends on !KERNEL_3_13 select BPAUTO_ASN1_DECODER select BPAUTO_PUBLIC_KEY select BPAUTO_PKCS7 diff --git a/dependencies b/dependencies index 47558470..cb6741c7 100644 --- a/dependencies +++ b/dependencies @@ -89,3 +89,6 @@ R8188EU 3.14 # depends on crypto_sync_skcipher() AIRO 4.20 AIRO_CS 4.20 + +# needs BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION +CFG80211_REQUIRE_SIGNED_REGDB 3_13 From patchwork Fri Mar 20 23:39:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11450587 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 14C7892A for ; Fri, 20 Mar 2020 23:40:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F228A20752 for ; Fri, 20 Mar 2020 23:40:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726976AbgCTXkR (ORCPT ); Fri, 20 Mar 2020 19:40:17 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]:28572 "EHLO mout-p-101.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726738AbgCTXkR (ORCPT ); Fri, 20 Mar 2020 19:40:17 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 48kgHg3s2czKmVC; Sat, 21 Mar 2020 00:40:15 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter06.heinlein-hosting.de (spamfilter06.heinlein-hosting.de [80.241.56.125]) (amavisd-new, port 10030) with ESMTP id xDzGN6CQ5RMw; Sat, 21 Mar 2020 00:40:12 +0100 (CET) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 8/8] backports: page_ref.h: Exclude page_ref_count() on kernel >= 4.4.216 Date: Sat, 21 Mar 2020 00:39:50 +0100 Message-Id: <20200320233950.32257-9-hauke@hauke-m.de> In-Reply-To: <20200320233950.32257-1-hauke@hauke-m.de> References: <20200320233950.32257-1-hauke@hauke-m.de> MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org page_ref_count() was backported to kernel version 4.4.216, do not add it in backports for this kernel version any more. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/page_ref.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backport/backport-include/linux/page_ref.h b/backport/backport-include/linux/page_ref.h index e45734ec..12fd86c9 100644 --- a/backport/backport-include/linux/page_ref.h +++ b/backport/backport-include/linux/page_ref.h @@ -9,10 +9,12 @@ static inline void page_ref_inc(struct page *page) atomic_inc(&page->_count); } +#if !LINUX_VERSION_IN_RANGE(4,4,216, 4,5,0) static inline int page_ref_count(struct page *page) { return atomic_read(&page->_count); } +#endif /* 4.4.216 <= x < 4.5 */ static inline int page_ref_sub_and_test(struct page *page, int nr) {