tmp_suning_uos_patched/net/dsa
DENG Qingfang 68277f69a8 net: dsa: tag_rtl4_a: fix egress tags
commit 9eb8bc593a5eed167dac2029abef343854c5ba75 upstream.

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 <dqfext@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-17 17:06:13 +01:00
..
dsa_priv.h net: dsa: Utilize __vlan_find_dev_deep_rcu() 2020-10-02 13:36:07 -07:00
dsa.c net: dsa: Add devlink port regions support to DSA 2020-10-04 14:38:53 -07:00
dsa2.c net: dsa: call teardown method on probe failure 2021-02-17 11:02:28 +01:00
Kconfig net: dsa: tag_rtl4_a: Implement Realtek 4 byte A tag 2020-07-08 15:36:19 -07:00
Makefile net: dsa: tag_rtl4_a: Implement Realtek 4 byte A tag 2020-07-08 15:36:19 -07:00
master.c net: dsa: unbind all switches from tree when DSA master unbinds 2021-01-23 16:04:05 +01:00
port.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
slave.c net: dsa: use new function dev_fetch_sw_netstats 2020-10-13 17:33:49 -07:00
switch.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
tag_8021q.c net: dsa: tag_8021q: add VLANs to the master interface too 2020-09-20 19:01:34 -07:00
tag_ar9331.c net: dsa: tag_ar9331: Make sure there is headroom for tag 2020-02-14 07:34:51 -08:00
tag_brcm.c net: dsa: b53: Set untag_bridge_pvid 2020-10-02 13:36:07 -07:00
tag_dsa.c net: dsa: tag_dsa: use the generic flow dissector procedure 2020-09-26 14:17:59 -07:00
tag_edsa.c net: dsa: tag_edsa: use the generic flow dissector procedure 2020-09-26 14:17:59 -07:00
tag_gswip.c net: dsa: tag_gswip: fix typo in tagger name 2020-01-16 13:58:26 +01:00
tag_ksz.c net: dsa: tag_ksz: KSZ8795 and KSZ9477 also use tail tags 2020-10-19 17:32:50 -07:00
tag_lan9303.c net: dsa: tag_lan9303: Fix __be16 warnings 2020-07-05 15:31:58 -07:00
tag_mtk.c net: dsa: tag_mtk: use the generic flow dissector procedure 2020-09-26 14:17:59 -07:00
tag_ocelot.c net: dsa: tag_ocelot: use VLAN information from tagging header when available 2020-10-11 11:19:04 -07:00
tag_qca.c net: dsa: tag_qca: use the generic flow dissector procedure 2020-09-26 14:17:59 -07:00
tag_rtl4_a.c net: dsa: tag_rtl4_a: fix egress tags 2021-03-17 17:06:13 +01:00
tag_sja1105.c net: dsa: tag_sja1105: use a custom flow dissector procedure 2020-09-26 14:17:59 -07:00
tag_trailer.c net: dsa: point out the tail taggers 2020-09-26 14:17:59 -07:00