From patchwork Sun Sep 23 17:45:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10611839 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0D8EC15E8 for ; Sun, 23 Sep 2018 17:45:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2B6829F90 for ; Sun, 23 Sep 2018 17:45:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E711D29FAC; Sun, 23 Sep 2018 17:45:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FB7229F90 for ; Sun, 23 Sep 2018 17:45:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbeIWXoC (ORCPT ); Sun, 23 Sep 2018 19:44:02 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:40936 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbeIWXoC (ORCPT ); Sun, 23 Sep 2018 19:44:02 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 9B4C44127C; Sun, 23 Sep 2018 19:45:46 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id KSwyBhr-cdrN; Sun, 23 Sep 2018 19:45:45 +0200 (CEST) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, john@phrozen.org, Hauke Mehrtens Subject: [PATCH 07/10] patches: make mt76 use skb_pad() instead of __skb_pad() Date: Sun, 23 Sep 2018 19:45:32 +0200 Message-Id: <20180923174535.16198-8-hauke@hauke-m.de> In-Reply-To: <20180923174535.16198-1-hauke@hauke-m.de> References: <20180923174535.16198-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP __skb_pad() was only added with kernel 4.13. The free_on_error parameter of __skb_pad() is set to constant true, which is also the setting used by skb_pad() so it should be save to use skb_pad() instead. This patch should be added to the mainline Linux kernel. Signed-off-by: Hauke Mehrtens --- patches/0090-use-skb_pad.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 patches/0090-use-skb_pad.patch diff --git a/patches/0090-use-skb_pad.patch b/patches/0090-use-skb_pad.patch new file mode 100644 index 00000000..086328c1 --- /dev/null +++ b/patches/0090-use-skb_pad.patch @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/mediatek/mt76/usb.c ++++ b/drivers/net/wireless/mediatek/mt76/usb.c +@@ -535,7 +535,7 @@ int mt76u_skb_dma_info(struct sk_buff *s + } + + if (unlikely(pad)) { +- if (__skb_pad(last, pad, true)) ++ if (skb_pad(last, pad)) + return -ENOMEM; + __skb_put(last, pad); + }