Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp73901pxb; Tue, 2 Mar 2021 19:41:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVJVl5+I+9rHuPL6H3BPEcdlidNkK9z4cgYP24ctzrzqJAmC2FJ88W+XHYauvinXwzGuqm X-Received: by 2002:a17:907:788e:: with SMTP id ku14mr24463975ejc.17.1614742861376; Tue, 02 Mar 2021 19:41:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614742861; cv=none; d=google.com; s=arc-20160816; b=GgSeBxYDWad+QzbHNFbK0jwIGsZPnHehTOoA9E9mpyRaXX74JF8x0E4kqew9ktI6Nd J+e7AV9SU/L5Tc5OZzvHlx8kOEKbNYMqCDyyJifAc20N+S1oEMlHOUNx5VT6LnDMrCwU 1GNz0gf14kKJPFCU5UEvIkpBDXBVf1jOlPwcIKzVdhah+jD7C8/503730WqH+qyVbloM lnw81FYRtuMJLu+L1ATC2PJ6lfQVY8NTnsqIPxx8qNWdYncD6twAW4C2S24fvFxUNSIN biSlOpw0nMtYl8/rOmGKiXOouarGtvM1Wtq7+tVnP2vNfNnQoENfFdSWEr3TTFB//89e /SJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=XcR/dzHVgKkCRGIsBLxsPv1g4tIUIXKwFlYY1CUcxQw=; b=i0xKK1hY+qeaSvcS/h3Y9Nm7tNNQxILBt/ShcFrozpw2Oy/gNH8JxZeiJC/bfYMDjT cAb8RuCygzXdtbs6OlNGtNefelvUogGvF9Z7jHxMG37Ffqe4LexBTZ/5k3rZgUY3T9ag AI/OMSKI8s+HfmropxW/5G/uESLstDfaLRi2qaFvgpAuWnx/bzcIAZNopXJonRsCdDMs hwCfC0Op83OOkOBwBRkzp/eqaWBjgFK/UM/XZHBm+jJmUGMwVbA/VaBAvXkXMwvJaomm tfSVB9C+c3AKib/iDu6VQ+NL7En5NZstn5ai9ePeXUgA0OWEE3rZ+P32uICCJkFLHz/8 wiKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mcd+5Ms0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e3si15173626ejm.395.2021.03.02.19.40.39; Tue, 02 Mar 2021 19:41:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@linaro.org header.s=google header.b=mcd+5Ms0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S236070AbhCAN7y (ORCPT + 99 others); Mon, 1 Mar 2021 08:59:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236064AbhCAN7w (ORCPT ); Mon, 1 Mar 2021 08:59:52 -0500 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3D72C061756 for ; Mon, 1 Mar 2021 05:59:11 -0800 (PST) Received: by mail-lj1-x22f.google.com with SMTP id r25so18509792ljk.11 for ; Mon, 01 Mar 2021 05:59:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XcR/dzHVgKkCRGIsBLxsPv1g4tIUIXKwFlYY1CUcxQw=; b=mcd+5Ms0K5O8lJfp+Hg3iiZK5GFnAcw5smpc5fYLfIDm2zwAkiBkL9cqO6YvU+Aaj9 knpvZIeLv0NImoj/9CH6n7VLCasnSF7P6PiA2+OPqoGicmxFpv96j4WwVpG5r6V8erqi NDNBjlPg1TAG8NLVBP6F41NcwCH/HiW/88sWLxF/1mKWmQSH337Z5QDul2fQ1AvAGzow j1YRFNWiehgRJvlzc/03LGn3wL3smM5UTuMN/TiU6BA23c7L3yD3D7fRT2O7XHfibsSw jYFmq749oEuVU34DmDpez0xplb9IRHwVaSI3N2QvWz3Zjjmx5ERO8fCzrHGhn8rN7ICw HGqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XcR/dzHVgKkCRGIsBLxsPv1g4tIUIXKwFlYY1CUcxQw=; b=dxbaNz25CShDY+HtEG57IYOKWRgbJggtuSHYfIaRl/mbhccuoxLhiVjxr9GkubarHh RkWzXvbzwMX5t/ErgqT4UuC1E81z1oNn11uxgV47Hl4gRKbTu8hfewQvtDajwjJMU9XS c+ksgFzx2XcJeOTFKuiBKgwHWZ5MoOtU5TJF2wGlOtNvJke8puAoqJuxRCXKu9hIsrDJ VlTKfhodIuH1ma5aeV9r5RNkGFIxxdA8swGI3gi1/hKayvj9NXOQG5JGBUKXVYsFmY3e UxgZn5J7W6Bw7BPPTAP4gvE0WKEzBV/J1t41iQFLwYol9aIbEW1ZO+xqiE5cZhhIEy0B Nyow== X-Gm-Message-State: AOAM532wwMTeZxv6BQ4V4k87K74KQy0G91oEOZmTPL98T1hNG+dKTf9e AYr0npxg7KwgE+WocxV/E3eV9rP4KdTX8yDSk4CqV8rgV+8= X-Received: by 2002:a2e:9754:: with SMTP id f20mr7052483ljj.200.1614607150550; Mon, 01 Mar 2021 05:59:10 -0800 (PST) MIME-Version: 1.0 References: <20210228170823.1488-1-dqfext@gmail.com> In-Reply-To: <20210228170823.1488-1-dqfext@gmail.com> From: Linus Walleij Date: Mon, 1 Mar 2021 14:58:59 +0100 Message-ID: Subject: Re: [PATCH net] net: dsa: tag_rtl4_a: fix egress tags To: DENG Qingfang Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , netdev , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 28, 2021 at 6:08 PM DENG Qingfang wrote: > Commit 86dd9868b878 has several issues, but was accepted too soon > before anyone could take a look. > > - Double free. dsa_slave_xmit() will free the skb if the xmit function > returns NULL, but the skb is already freed by eth_skb_pad(). Use > __skb_put_padto() to avoid that. > - Unnecessary allocation. It has been done by DSA core since commit > a3b0b6479700. > - A u16 pointer points to skb data. It should be __be16 for network > byte order. > - Typo in comments. "numer" -> "number". > > Fixes: 86dd9868b878 ("net: dsa: tag_rtl4_a: Support also egress tags") > Signed-off-by: DENG Qingfang Ooops I send patches before properly going through the mailbox. Oh well things like that happen. David: ignore my patches to the same tagger and apply this instead! Reviewed-by: Linus Walleij Yours, Linus Walleij