From patchwork Thu Mar 12 15:59:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 11434745 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 6F9B1161F for ; Thu, 12 Mar 2020 15:59:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A018206B7 for ; Thu, 12 Mar 2020 15:59:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727192AbgCLP7X (ORCPT ); Thu, 12 Mar 2020 11:59:23 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:57512 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727228AbgCLP7X (ORCPT ); Thu, 12 Mar 2020 11:59:23 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1jCQEz-004nuk-Bv; Thu, 12 Mar 2020 16:59:21 +0100 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 1/3] backports: add linux/units.h Date: Thu, 12 Mar 2020 16:59:11 +0100 Message-Id: <20200312165913.e9a97c70de23.Idb983599e482232ae3cfc3328e837e8a9bf1af7a@changeid> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg We can just copy this. Signed-off-by: Johannes Berg --- copy-list | 1 + copy-list.intel | 1 + 2 files changed, 2 insertions(+) diff --git a/copy-list b/copy-list index 328e92d0fde5..ba10a0bf4b3a 100644 --- a/copy-list +++ b/copy-list @@ -23,6 +23,7 @@ include/linux/crc32poly.h include/linux/bitfield.h include/linux/average.h include/linux/overflow.h +include/linux/units.h # crypto_memneq crypto/memneq.c -> compat/memneq.c diff --git a/copy-list.intel b/copy-list.intel index ee944edaaefb..28b6bc87ddfe 100644 --- a/copy-list.intel +++ b/copy-list.intel @@ -21,6 +21,7 @@ scripts/spelling.txt -> intc-scripts/spelling.txt include/linux/bitfield.h include/linux/average.h include/linux/overflow.h +include/linux/units.h # crypto_memneq crypto/memneq.c -> compat/memneq.c From patchwork Thu Mar 12 15:59:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 11434743 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 514016CA for ; Thu, 12 Mar 2020 15:59:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A020206B7 for ; Thu, 12 Mar 2020 15:59:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726385AbgCLP7X (ORCPT ); Thu, 12 Mar 2020 11:59:23 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:57508 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727192AbgCLP7X (ORCPT ); Thu, 12 Mar 2020 11:59:23 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1jCQEz-004nuk-LR; Thu, 12 Mar 2020 16:59:21 +0100 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 2/3] backports: skbuff: add skb_list_walk_safe() and skb_mark_not_on_list() Date: Thu, 12 Mar 2020 16:59:12 +0100 Message-Id: <20200312165913.0915e5af7240.I35d006756fc2f08463616f8717f02d20ac80153d@changeid> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200312165913.e9a97c70de23.Idb983599e482232ae3cfc3328e837e8a9bf1af7a@changeid> References: <20200312165913.e9a97c70de23.Idb983599e482232ae3cfc3328e837e8a9bf1af7a@changeid> MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/skbuff.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h index 8af34146432e..3b63ce76a0b5 100644 --- a/backport/backport-include/linux/skbuff.h +++ b/backport/backport-include/linux/skbuff.h @@ -380,6 +380,11 @@ static inline struct sk_buff *__skb_peek(const struct sk_buff_head *list_) { return list_->next; } + +static inline void skb_mark_not_on_list(struct sk_buff *skb) +{ + skb->next = NULL; +} #endif #if LINUX_VERSION_IS_LESS(4,11,0) @@ -408,4 +413,10 @@ static inline void nf_reset_ct(struct sk_buff *skb) } #endif +#ifndef skb_list_walk_safe +#define skb_list_walk_safe(first, skb, next_skb) \ + for ((skb) = (first), (next_skb) = (skb) ? (skb)->next : NULL; (skb); \ + (skb) = (next_skb), (next_skb) = (skb) ? (skb)->next : NULL) +#endif + #endif /* __BACKPORT_SKBUFF_H */ From patchwork Thu Mar 12 15:59:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 11434747 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 C731216B1 for ; Thu, 12 Mar 2020 15:59:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B1A9C206CD for ; Thu, 12 Mar 2020 15:59:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727228AbgCLP7Y (ORCPT ); Thu, 12 Mar 2020 11:59:24 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:57516 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727240AbgCLP7Y (ORCPT ); Thu, 12 Mar 2020 11:59:24 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1jCQEz-004nuk-UJ; Thu, 12 Mar 2020 16:59:22 +0100 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 3/3] backports: netlink: fix nla_validate_nested() Date: Thu, 12 Mar 2020 16:59:13 +0100 Message-Id: <20200312165913.14bfeceb4e2e.I026c8a13b9f070ccccbf29547d1289c362782881@changeid> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200312165913.e9a97c70de23.Idb983599e482232ae3cfc3328e837e8a9bf1af7a@changeid> References: <20200312165913.e9a97c70de23.Idb983599e482232ae3cfc3328e837e8a9bf1af7a@changeid> MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg I had accidentally named this nl80211_validate_nested(), and it got renamed in 5.6. Signed-off-by: Johannes Berg --- backport/backport-include/net/netlink.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backport/backport-include/net/netlink.h b/backport/backport-include/net/netlink.h index bc24adfb4d63..675e43fc4e31 100644 --- a/backport/backport-include/net/netlink.h +++ b/backport/backport-include/net/netlink.h @@ -266,17 +266,17 @@ nla_validate_nested_deprecated(const struct nlattr *start, int maxtype, } #endif /* < 5.2 */ -#if LINUX_VERSION_IS_LESS(5,3,0) -#define nl80211_validate_nested LINUX_BACKPORT(nl80211_validate_nested) +#if LINUX_VERSION_IS_LESS(5,6,0) +#define nla_validate_nested LINUX_BACKPORT(nla_validate_nested) static inline int -nl80211_validate_nested(const struct nlattr *start, int maxtype, - const struct nla_policy *policy, - struct netlink_ext_ack *extack) +nla_validate_nested(const struct nlattr *start, int maxtype, + const struct nla_policy *policy, + struct netlink_ext_ack *extack) { return __nla_validate_nested(start, maxtype, policy, NL_VALIDATE_STRICT, extack); } -#endif /* < 5.3 */ +#endif /* < 5.6 */ #if LINUX_VERSION_IS_LESS(5,1,0) #undef NLA_POLICY_NESTED