Message ID | 20190214124910.1753-4-linus.walleij@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1324219jaa; Thu, 14 Feb 2019 04:49:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IbXjMPkuRyBdaCb3+Ilf8YfXzVClxN5YHjWfBDJlnbFSZoII15nxb4sMy2BE94dmVHd7UBK X-Received: by 2002:a17:902:280b:: with SMTP id e11mr3947514plb.269.1550148580995; Thu, 14 Feb 2019 04:49:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550148580; cv=none; d=google.com; s=arc-20160816; b=kzcVK9HD/77Rac08owc1b9QAmXpWNtEYoKhcHhaBPWM3mVuZmKkaldk/7YrJ68Ayt2 1PCA1eLW4CxPqTDCnCGF46ZGEhihdFB9rRFVihRo5mcrJR/NtjUaXKWeM5iiRyoDrq/Z 3V3QvV2YYxbGc/iyCjC8LZ2Sv+gzD4KqG4wkCmLp5C1KjcVXiOtB4AQp03AOKplQBaRT dpj4hTUzk5bfr3OIyldm9HvC2XuVvMdNQ6ZpUAurXBBAStSOl5NSeXhhKunAvEKvQav1 wciq4E5EGw3zw/tERigBMiidnOwTYnK8nYUqDYQ1WsOdM5h7lR96gJ+p71tUb3uAr6UG 3iiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HKPhEwlGOqFhzkRm115h8rO7RDajDFokqQWEPzK+1Ho=; b=aIKYhVcVsqgAb9hRAzHHQsNjLGIMXnV1Vawm7gHCs8VX54295OFtGBZIHXzpoZOKCM +GeAtL7xmzl/ha1jgfRbj3cGqWdwrHy1CtgBplMcBqpHcAHmI2sJs5YUn8+iHrKTFve4 J7oU8KYWNxLeGhjq3+p0Z2/6ColQBEq0/BnJzem6v6eqsYeyJzdiRjMKRhjbGpqDSi41 um0pO2sz+jp9UCf3kwMpBc0RvhTi9TcxL3SDivOlwm1IePOC/aOpPuqgXZsEWWmhb68W PL+0SrtmgH5P9UgZKFvpqBU5vuWFKadt2U/PrgtR6Dv4zIuj5nlfh/D0vm22lE2YlkON qi2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="DCEqtc/l"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <stable-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g26si2310745pfi.184.2019.02.14.04.49.40; Thu, 14 Feb 2019 04:49:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="DCEqtc/l"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438527AbfBNMtk (ORCPT <rfc822;dave.long@linaro.org> + 15 others); Thu, 14 Feb 2019 07:49:40 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:44698 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727958AbfBNMtk (ORCPT <rfc822;stable@vger.kernel.org>); Thu, 14 Feb 2019 07:49:40 -0500 Received: by mail-lj1-f193.google.com with SMTP id q128so5088115ljb.11 for <stable@vger.kernel.org>; Thu, 14 Feb 2019 04:49:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HKPhEwlGOqFhzkRm115h8rO7RDajDFokqQWEPzK+1Ho=; b=DCEqtc/lmk6N97wQQtOfkNN5RdC44kkt98/g7JpkiCniQkYgs/hOpE4Qk9IUJNRq7I V3wGKnG13FT7YXPlS5kKizj7Yw+uhJeF/OK3cQzEzu7/aujeT5wYX7zVST54kK0Fwn1R qnZgcPmI50pYK067NjX48BNMDnVN/+S4kKiS4zw4fPHQJRhrXK5C+dgYX5XRIQIzERPr +akt46/vhw7iAukyTnBUTTMe4a6teZ+i2oHqbIElvL5NOhWSUmhuN7mHq7uyR2GC0kiK CLTbgYHpj9ZjJfbCXPuQ5O62WFN38jAc6KDc/WYLGequbdtn00lnCKdp/qegj+7J6whR ba2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HKPhEwlGOqFhzkRm115h8rO7RDajDFokqQWEPzK+1Ho=; b=uYcMMCBplpID6z99q7L1A3PHMBvxl5hBs2gh6BXOHSgdFKxoAqyGdkb+T97hen11Tt 1w0UZmwpqfMNw4zbXpdeZ+47Uw80B5uzOC1xGK0is/yjiBB/WvaoN9dqbhjn+N6c6GKC BKmgjNnI9i2w8GwzCDlqC299eX/Hjh2Wt+fLu1QyzBlAztomZtADcewR+Mc/8An5urRY Bc0Pyu44fF4Uxr6HnNUpE8sYg4baJwMY00yWkgfEgm9VXeOuOq6NGkt3/N/2WsXEEDKc DwWxqepuE+/DyBQQWwXHJKuPwVBI0oIgSkQUQrAXy6LNwDPiWzjmLVb13mOEmlZ8O8kg M8zw== X-Gm-Message-State: AHQUAubOVnsUBOv3gRsGPHpwUYPaW+gf1XIS5QHTL0ys2v6bavovz/3C 9uLi2IxLVjq84HpS16ToYATv0g== X-Received: by 2002:a2e:9457:: with SMTP id o23-v6mr2307627ljh.7.1550148578073; Thu, 14 Feb 2019 04:49:38 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id r7-v6sm410853ljg.85.2019.02.14.04.49.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Feb 2019 04:49:36 -0800 (PST) From: Linus Walleij <linus.walleij@linaro.org> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, openwrt-devel@lists.openwrt.org Cc: "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Liping Zhang <zlpnobody@gmail.com>, John Youn <johnyoun@synopsys.com>, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= <rafal@milecki.pl>, James Hughes <james.hughes@raspberrypi.org>, Felix Fietkau <nbd@nbd.name>, Matthew Garrett <mjg59@srcf.ucam.org> Subject: [PATCH 3/8 v2] ch9200: use skb_cow_head() to deal with cloned skbs Date: Thu, 14 Feb 2019 13:49:05 +0100 Message-Id: <20190214124910.1753-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190214124910.1753-1-linus.walleij@linaro.org> References: <20190214124910.1753-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
Stable material from OpenWrt for v4.9.y
|
expand
|
diff --git a/drivers/net/usb/ch9200.c b/drivers/net/usb/ch9200.c index 8a40202c0a17..c4f1c363e24b 100644 --- a/drivers/net/usb/ch9200.c +++ b/drivers/net/usb/ch9200.c @@ -254,14 +254,9 @@ static struct sk_buff *ch9200_tx_fixup(struct usbnet *dev, struct sk_buff *skb, tx_overhead = 0x40; len = skb->len; - if (skb_headroom(skb) < tx_overhead) { - struct sk_buff *skb2; - - skb2 = skb_copy_expand(skb, tx_overhead, 0, flags); + if (skb_cow_head(skb, tx_overhead)) { dev_kfree_skb_any(skb); - skb = skb2; - if (!skb) - return NULL; + return NULL; } __skb_push(skb, tx_overhead);