Skip to content

Commit f2ce106

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix some potentially uninitialized variables and use-after-free in kvaser_usb can drier, from Jimmy Assarsson. 2) Fix leaks in qed driver, from Denis Bolotin. 3) Socket leak in l2tp, from Xin Long. 4) RSS context allocation fix in bnxt_en from Michael Chan. 5) Fix cxgb4 build errors, from Ganesh Goudar. 6) Route leaks in ipv6 when removing exceptions, from Xin Long. 7) Memory leak in IDR allocation handling of act_pedit, from Davide Caratti. 8) Use-after-free of bridge vlan stats, from Nikolay Aleksandrov. 9) When MTU is locked, do not force DF bit on ipv4 tunnels. From Sabrina Dubroca. 10) When NAPI cached skb is reused, we must set it to the proper initial state which includes skb->pkt_type. From Eric Dumazet. 11) Lockdep and non-linear SKB handling fix in tipc from Jon Maloy. 12) Set RX queue properly in various tuntap receive paths, from Matthew Cover. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (61 commits) tuntap: fix multiqueue rx ipv6: Fix PMTU updates for UDP/raw sockets in presence of VRF tipc: don't assume linear buffer when reading ancillary data tipc: fix lockdep warning when reinitilaizing sockets net-gro: reset skb->pkt_type in napi_reuse_skb() tc-testing: tdc.py: Guard against lack of returncode in executed command tc-testing: tdc.py: ignore errors when decoding stdout/stderr ip_tunnel: don't force DF when MTU is locked MAINTAINERS: Add entry for CAKE qdisc net: bridge: fix vlan stats use-after-free on destruction socket: do a generic_file_splice_read when proto_ops has no splice_read net: phy: mdio-gpio: Fix working over slow can_sleep GPIOs Revert "net: phy: mdio-gpio: Fix working over slow can_sleep GPIOs" net: phy: mdio-gpio: Fix working over slow can_sleep GPIOs net/sched: act_pedit: fix memory leak when IDR allocation fails net: lantiq: Fix returned value in case of error in 'xrx200_probe()' ipv6: fix a dst leak when removing its exception net: mvneta: Don't advertise 2.5G modes drivers/net/ethernet/qlogic/qed/qed_rdma.h: fix typo net/mlx4: Fix UBSAN warning of signed integer overflow ...
2 parents 9ff0119 + 8ebebcb commit f2ce106

File tree

58 files changed

+539
-233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+539
-233
lines changed

Documentation/devicetree/bindings/net/can/holt_hi311x.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Example:
1717
reg = <1>;
1818
clocks = <&clk32m>;
1919
interrupt-parent = <&gpio4>;
20-
interrupts = <13 IRQ_TYPE_EDGE_RISING>;
20+
interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
2121
vdd-supply = <&reg5v0>;
2222
xceiver-supply = <&reg5v0>;
2323
};

Documentation/devicetree/bindings/net/can/rcar_can.txt

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Required properties:
55
- compatible: "renesas,can-r8a7743" if CAN controller is a part of R8A7743 SoC.
66
"renesas,can-r8a7744" if CAN controller is a part of R8A7744 SoC.
77
"renesas,can-r8a7745" if CAN controller is a part of R8A7745 SoC.
8+
"renesas,can-r8a774a1" if CAN controller is a part of R8A774A1 SoC.
89
"renesas,can-r8a7778" if CAN controller is a part of R8A7778 SoC.
910
"renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
1011
"renesas,can-r8a7790" if CAN controller is a part of R8A7790 SoC.
@@ -14,26 +15,32 @@ Required properties:
1415
"renesas,can-r8a7794" if CAN controller is a part of R8A7794 SoC.
1516
"renesas,can-r8a7795" if CAN controller is a part of R8A7795 SoC.
1617
"renesas,can-r8a7796" if CAN controller is a part of R8A7796 SoC.
18+
"renesas,can-r8a77965" if CAN controller is a part of R8A77965 SoC.
1719
"renesas,rcar-gen1-can" for a generic R-Car Gen1 compatible device.
1820
"renesas,rcar-gen2-can" for a generic R-Car Gen2 or RZ/G1
1921
compatible device.
20-
"renesas,rcar-gen3-can" for a generic R-Car Gen3 compatible device.
22+
"renesas,rcar-gen3-can" for a generic R-Car Gen3 or RZ/G2
23+
compatible device.
2124
When compatible with the generic version, nodes must list the
2225
SoC-specific version corresponding to the platform first
2326
followed by the generic version.
2427

2528
- reg: physical base address and size of the R-Car CAN register map.
2629
- interrupts: interrupt specifier for the sole interrupt.
27-
- clocks: phandles and clock specifiers for 3 CAN clock inputs.
28-
- clock-names: 3 clock input name strings: "clkp1", "clkp2", "can_clk".
30+
- clocks: phandles and clock specifiers for 2 CAN clock inputs for RZ/G2
31+
devices.
32+
phandles and clock specifiers for 3 CAN clock inputs for every other
33+
SoC.
34+
- clock-names: 2 clock input name strings for RZ/G2: "clkp1", "can_clk".
35+
3 clock input name strings for every other SoC: "clkp1", "clkp2",
36+
"can_clk".
2937
- pinctrl-0: pin control group to be used for this controller.
3038
- pinctrl-names: must be "default".
3139

32-
Required properties for "renesas,can-r8a7795" and "renesas,can-r8a7796"
33-
compatible:
34-
In R8A7795 and R8A7796 SoCs, "clkp2" can be CANFD clock. This is a div6 clock
35-
and can be used by both CAN and CAN FD controller at the same time. It needs to
36-
be scaled to maximum frequency if any of these controllers use it. This is done
40+
Required properties for R8A7795, R8A7796 and R8A77965:
41+
For the denoted SoCs, "clkp2" can be CANFD clock. This is a div6 clock and can
42+
be used by both CAN and CAN FD controller at the same time. It needs to be
43+
scaled to maximum frequency if any of these controllers use it. This is done
3744
using the below properties:
3845

3946
- assigned-clocks: phandle of clkp2(CANFD) clock.
@@ -42,8 +49,9 @@ using the below properties:
4249
Optional properties:
4350
- renesas,can-clock-select: R-Car CAN Clock Source Select. Valid values are:
4451
<0x0> (default) : Peripheral clock (clkp1)
45-
<0x1> : Peripheral clock (clkp2)
46-
<0x3> : Externally input clock
52+
<0x1> : Peripheral clock (clkp2) (not supported by
53+
RZ/G2 devices)
54+
<0x3> : External input clock
4755

4856
Example
4957
-------

Documentation/networking/rxrpc.txt

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,18 +1056,23 @@ The kernel interface functions are as follows:
10561056

10571057
u32 rxrpc_kernel_check_life(struct socket *sock,
10581058
struct rxrpc_call *call);
1059+
void rxrpc_kernel_probe_life(struct socket *sock,
1060+
struct rxrpc_call *call);
10591061

1060-
This returns a number that is updated when ACKs are received from the peer
1061-
(notably including PING RESPONSE ACKs which we can elicit by sending PING
1062-
ACKs to see if the call still exists on the server). The caller should
1063-
compare the numbers of two calls to see if the call is still alive after
1064-
waiting for a suitable interval.
1062+
The first function returns a number that is updated when ACKs are received
1063+
from the peer (notably including PING RESPONSE ACKs which we can elicit by
1064+
sending PING ACKs to see if the call still exists on the server). The
1065+
caller should compare the numbers of two calls to see if the call is still
1066+
alive after waiting for a suitable interval.
10651067

10661068
This allows the caller to work out if the server is still contactable and
10671069
if the call is still alive on the server whilst waiting for the server to
10681070
process a client operation.
10691071

1070-
This function may transmit a PING ACK.
1072+
The second function causes a ping ACK to be transmitted to try to provoke
1073+
the peer into responding, which would then cause the value returned by the
1074+
first function to change. Note that this must be called in TASK_RUNNING
1075+
state.
10711076

10721077
(*) Get reply timestamp.
10731078

MAINTAINERS

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ F: include/linux/mfd/altera-a10sr.h
717717
F: include/dt-bindings/reset/altr,rst-mgr-a10sr.h
718718

719719
ALTERA TRIPLE SPEED ETHERNET DRIVER
720-
M: Vince Bridgers <vbridger@opensource.altera.com>
720+
M: Thor Thayer <thor.thayer@linux.intel.com>
721721
L: netdev@vger.kernel.org
722722
L: nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
723723
S: Maintained
@@ -3276,6 +3276,12 @@ F: include/uapi/linux/caif/
32763276
F: include/net/caif/
32773277
F: net/caif/
32783278

3279+
CAKE QDISC
3280+
M: Toke Høiland-Jørgensen <toke@toke.dk>
3281+
L: cake@lists.bufferbloat.net (moderated for non-subscribers)
3282+
S: Maintained
3283+
F: net/sched/sch_cake.c
3284+
32793285
CALGARY x86-64 IOMMU
32803286
M: Muli Ben-Yehuda <mulix@mulix.org>
32813287
M: Jon Mason <jdmason@kudzu.us>

drivers/net/can/dev.c

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,34 @@ void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
477477
}
478478
EXPORT_SYMBOL_GPL(can_put_echo_skb);
479479

480+
struct sk_buff *__can_get_echo_skb(struct net_device *dev, unsigned int idx, u8 *len_ptr)
481+
{
482+
struct can_priv *priv = netdev_priv(dev);
483+
struct sk_buff *skb = priv->echo_skb[idx];
484+
struct canfd_frame *cf;
485+
486+
if (idx >= priv->echo_skb_max) {
487+
netdev_err(dev, "%s: BUG! Trying to access can_priv::echo_skb out of bounds (%u/max %u)\n",
488+
__func__, idx, priv->echo_skb_max);
489+
return NULL;
490+
}
491+
492+
if (!skb) {
493+
netdev_err(dev, "%s: BUG! Trying to echo non existing skb: can_priv::echo_skb[%u]\n",
494+
__func__, idx);
495+
return NULL;
496+
}
497+
498+
/* Using "struct canfd_frame::len" for the frame
499+
* length is supported on both CAN and CANFD frames.
500+
*/
501+
cf = (struct canfd_frame *)skb->data;
502+
*len_ptr = cf->len;
503+
priv->echo_skb[idx] = NULL;
504+
505+
return skb;
506+
}
507+
480508
/*
481509
* Get the skb from the stack and loop it back locally
482510
*
@@ -486,22 +514,16 @@ EXPORT_SYMBOL_GPL(can_put_echo_skb);
486514
*/
487515
unsigned int can_get_echo_skb(struct net_device *dev, unsigned int idx)
488516
{
489-
struct can_priv *priv = netdev_priv(dev);
490-
491-
BUG_ON(idx >= priv->echo_skb_max);
492-
493-
if (priv->echo_skb[idx]) {
494-
struct sk_buff *skb = priv->echo_skb[idx];
495-
struct can_frame *cf = (struct can_frame *)skb->data;
496-
u8 dlc = cf->can_dlc;
517+
struct sk_buff *skb;
518+
u8 len;
497519

498-
netif_rx(priv->echo_skb[idx]);
499-
priv->echo_skb[idx] = NULL;
520+
skb = __can_get_echo_skb(dev, idx, &len);
521+
if (!skb)
522+
return 0;
500523

501-
return dlc;
502-
}
524+
netif_rx(skb);
503525

504-
return 0;
526+
return len;
505527
}
506528
EXPORT_SYMBOL_GPL(can_get_echo_skb);
507529

0 commit comments

Comments
 (0)