Skip to content

Commit 4bc8719

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Verify lengths of keys provided by the user is AF_KEY, from Kevin Easton. 2) Add device ID for BCM89610 PHY. Thanks to Bhadram Varka. 3) Add Spectre guards to some ATM code, courtesy of Gustavo A. R. Silva. 4) Fix infinite loop in NSH protocol code. To Eric Dumazet we are most grateful for this fix. 5) Line up /proc/net/netlink headers properly. This fix from YU Bo, we do appreciate. 6) Use after free in TLS code. Once again we are blessed by the honorable Eric Dumazet with this fix. 7) Fix regression in TLS code causing stalls on partial TLS records. This fix is bestowed upon us by Andrew Tomt. 8) Deal with too small MTUs properly in LLC code, another great gift from Eric Dumazet. 9) Handle cached route flushing properly wrt. MTU locking in ipv4, to Hangbin Liu we give thanks for this. 10) Fix regression in SO_BINDTODEVIC handling wrt. UDP socket demux. Paolo Abeni, he gave us this. 11) Range check coalescing parameters in mlx4 driver, thank you Moshe Shemesh. 12) Some ipv6 ICMP error handling fixes in rxrpc, from our good brother David Howells. 13) Fix kexec on mlx5 by freeing IRQs in shutdown path. Daniel Juergens, you're the best! 14) Don't send bonding RLB updates to invalid MAC addresses. Debabrata Benerjee saved us! 15) Uh oh, we were leaking in udp_sendmsg and ping_v4_sendmsg. The ship is now water tight, thanks to Andrey Ignatov. 16) IPSEC memory leak in ixgbe from Colin Ian King, man we've got holes everywhere! 17) Fix error path in tcf_proto_create, Jiri Pirko what would we do without you! * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (92 commits) net sched actions: fix refcnt leak in skbmod net: sched: fix error path in tcf_proto_create() when modules are not configured net sched actions: fix invalid pointer dereferencing if skbedit flags missing ixgbe: fix memory leak on ipsec allocation ixgbevf: fix ixgbevf_xmit_frame()'s return type ixgbe: return error on unsupported SFP module when resetting ice: Set rq_last_status when cleaning rq ipv4: fix memory leaks in udp_sendmsg, ping_v4_sendmsg mlxsw: core: Fix an error handling path in 'mlxsw_core_bus_device_register()' bonding: send learning packets for vlans on slave bonding: do not allow rlb updates to invalid mac net/mlx5e: Err if asked to offload TC match on frag being first net/mlx5: E-Switch, Include VF RDMA stats in vport statistics net/mlx5: Free IRQs in shutdown path rxrpc: Trace UDP transmission failure rxrpc: Add a tracepoint to log ICMP/ICMP6 and error messages rxrpc: Fix the min security level for kernel calls rxrpc: Fix error reception on AF_INET6 sockets rxrpc: Fix missing start of call timeout qed: fix spelling mistake: "taskelt" -> "tasklet" ...
2 parents a1f45ef + a52956d commit 4bc8719

File tree

106 files changed

+714
-291
lines changed

Some content is hidden

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

106 files changed

+714
-291
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Required properties:
55
- compatible: Must contain one or more of the following:
66
- "renesas,rcar-gen3-canfd" for R-Car Gen3 compatible controller.
77
- "renesas,r8a7795-canfd" for R8A7795 (R-Car H3) compatible controller.
8-
- "renesas,r8a7796-canfd" for R8A7796 (R-Car M3) compatible controller.
8+
- "renesas,r8a7796-canfd" for R8A7796 (R-Car M3-W) compatible controller.
9+
- "renesas,r8a77970-canfd" for R8A77970 (R-Car V3M) compatible controller.
10+
- "renesas,r8a77980-canfd" for R8A77980 (R-Car V3H) compatible controller.
911

1012
When compatible with the generic version, nodes must list the
1113
SoC-specific version corresponding to the platform first, followed by the

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ Maintainers List (try to look for most precise areas first)
137137
-----------------------------------
138138

139139
3C59X NETWORK DRIVER
140-
M: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
140+
M: Steffen Klassert <klassert@kernel.org>
141141
142-
S: Maintained
142+
S: Odd Fixes
143143
F: Documentation/networking/vortex.txt
144144
F: drivers/net/ethernet/3com/3c59x.c
145145

arch/arm/boot/dts/imx35.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@
303303
};
304304

305305
can1: can@53fe4000 {
306-
compatible = "fsl,imx35-flexcan";
306+
compatible = "fsl,imx35-flexcan", "fsl,imx25-flexcan";
307307
reg = <0x53fe4000 0x1000>;
308308
clocks = <&clks 33>, <&clks 33>;
309309
clock-names = "ipg", "per";
@@ -312,7 +312,7 @@
312312
};
313313

314314
can2: can@53fe8000 {
315-
compatible = "fsl,imx35-flexcan";
315+
compatible = "fsl,imx35-flexcan", "fsl,imx25-flexcan";
316316
reg = <0x53fe8000 0x1000>;
317317
clocks = <&clks 34>, <&clks 34>;
318318
clock-names = "ipg", "per";

arch/arm/boot/dts/imx53.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@
551551
};
552552

553553
can1: can@53fc8000 {
554-
compatible = "fsl,imx53-flexcan";
554+
compatible = "fsl,imx53-flexcan", "fsl,imx25-flexcan";
555555
reg = <0x53fc8000 0x4000>;
556556
interrupts = <82>;
557557
clocks = <&clks IMX5_CLK_CAN1_IPG_GATE>,
@@ -561,7 +561,7 @@
561561
};
562562

563563
can2: can@53fcc000 {
564-
compatible = "fsl,imx53-flexcan";
564+
compatible = "fsl,imx53-flexcan", "fsl,imx25-flexcan";
565565
reg = <0x53fcc000 0x4000>;
566566
interrupts = <83>;
567567
clocks = <&clks IMX5_CLK_CAN2_IPG_GATE>,

drivers/atm/firestream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static char *res_strings[] = {
191191
"reserved 37",
192192
"reserved 38",
193193
"reserved 39",
194-
"reseverd 40",
194+
"reserved 40",
195195
"reserved 41",
196196
"reserved 42",
197197
"reserved 43",

drivers/atm/zatm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <asm/io.h>
2929
#include <linux/atomic.h>
3030
#include <linux/uaccess.h>
31+
#include <linux/nospec.h>
3132

3233
#include "uPD98401.h"
3334
#include "uPD98402.h"
@@ -1458,6 +1459,8 @@ static int zatm_ioctl(struct atm_dev *dev,unsigned int cmd,void __user *arg)
14581459
return -EFAULT;
14591460
if (pool < 0 || pool > ZATM_LAST_POOL)
14601461
return -EINVAL;
1462+
pool = array_index_nospec(pool,
1463+
ZATM_LAST_POOL + 1);
14611464
spin_lock_irqsave(&zatm_dev->lock, flags);
14621465
info = zatm_dev->pool_info[pool];
14631466
if (cmd == ZATM_GETPOOLZ) {

drivers/bluetooth/btusb.c

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ static const struct usb_device_id blacklist_table[] = {
231231
{ USB_DEVICE(0x0930, 0x0227), .driver_info = BTUSB_ATH3012 },
232232
{ USB_DEVICE(0x0b05, 0x17d0), .driver_info = BTUSB_ATH3012 },
233233
{ USB_DEVICE(0x0cf3, 0x0036), .driver_info = BTUSB_ATH3012 },
234+
{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
234235
{ USB_DEVICE(0x0cf3, 0x3008), .driver_info = BTUSB_ATH3012 },
235236
{ USB_DEVICE(0x0cf3, 0x311d), .driver_info = BTUSB_ATH3012 },
236237
{ USB_DEVICE(0x0cf3, 0x311e), .driver_info = BTUSB_ATH3012 },
@@ -263,7 +264,6 @@ static const struct usb_device_id blacklist_table[] = {
263264
{ USB_DEVICE(0x0489, 0xe03c), .driver_info = BTUSB_ATH3012 },
264265

265266
/* QCA ROME chipset */
266-
{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_QCA_ROME },
267267
{ USB_DEVICE(0x0cf3, 0xe007), .driver_info = BTUSB_QCA_ROME },
268268
{ USB_DEVICE(0x0cf3, 0xe009), .driver_info = BTUSB_QCA_ROME },
269269
{ USB_DEVICE(0x0cf3, 0xe010), .driver_info = BTUSB_QCA_ROME },
@@ -399,6 +399,13 @@ static const struct dmi_system_id btusb_needs_reset_resume_table[] = {
399399
DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 3060"),
400400
},
401401
},
402+
{
403+
/* Dell XPS 9360 (QCA ROME device 0cf3:e300) */
404+
.matches = {
405+
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
406+
DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9360"),
407+
},
408+
},
402409
{}
403410
};
404411

@@ -2852,6 +2859,12 @@ static int btusb_config_oob_wake(struct hci_dev *hdev)
28522859
}
28532860
#endif
28542861

2862+
static void btusb_check_needs_reset_resume(struct usb_interface *intf)
2863+
{
2864+
if (dmi_check_system(btusb_needs_reset_resume_table))
2865+
interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
2866+
}
2867+
28552868
static int btusb_probe(struct usb_interface *intf,
28562869
const struct usb_device_id *id)
28572870
{
@@ -2974,9 +2987,6 @@ static int btusb_probe(struct usb_interface *intf,
29742987
hdev->send = btusb_send_frame;
29752988
hdev->notify = btusb_notify;
29762989

2977-
if (dmi_check_system(btusb_needs_reset_resume_table))
2978-
interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
2979-
29802990
#ifdef CONFIG_PM
29812991
err = btusb_config_oob_wake(hdev);
29822992
if (err)
@@ -3064,6 +3074,7 @@ static int btusb_probe(struct usb_interface *intf,
30643074
data->setup_on_usb = btusb_setup_qca;
30653075
hdev->set_bdaddr = btusb_set_bdaddr_ath3012;
30663076
set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
3077+
btusb_check_needs_reset_resume(intf);
30673078
}
30683079

30693080
#ifdef CONFIG_BT_HCIBTUSB_RTL

drivers/net/bonding/bond_alb.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ static void rlb_update_client(struct rlb_client_info *client_info)
450450
{
451451
int i;
452452

453-
if (!client_info->slave)
453+
if (!client_info->slave || !is_valid_ether_addr(client_info->mac_dst))
454454
return;
455455

456456
for (i = 0; i < RLB_ARP_BURST_SIZE; i++) {
@@ -943,6 +943,10 @@ static void alb_send_lp_vid(struct slave *slave, u8 mac_addr[],
943943
skb->priority = TC_PRIO_CONTROL;
944944
skb->dev = slave->dev;
945945

946+
netdev_dbg(slave->bond->dev,
947+
"Send learning packet: dev %s mac %pM vlan %d\n",
948+
slave->dev->name, mac_addr, vid);
949+
946950
if (vid)
947951
__vlan_hwaccel_put_tag(skb, vlan_proto, vid);
948952

@@ -965,14 +969,13 @@ static int alb_upper_dev_walk(struct net_device *upper, void *_data)
965969
u8 *mac_addr = data->mac_addr;
966970
struct bond_vlan_tag *tags;
967971

968-
if (is_vlan_dev(upper) && vlan_get_encap_level(upper) == 0) {
969-
if (strict_match &&
970-
ether_addr_equal_64bits(mac_addr,
971-
upper->dev_addr)) {
972+
if (is_vlan_dev(upper) &&
973+
bond->nest_level == vlan_get_encap_level(upper) - 1) {
974+
if (upper->addr_assign_type == NET_ADDR_STOLEN) {
972975
alb_send_lp_vid(slave, mac_addr,
973976
vlan_dev_vlan_proto(upper),
974977
vlan_dev_vlan_id(upper));
975-
} else if (!strict_match) {
978+
} else {
976979
alb_send_lp_vid(slave, upper->dev_addr,
977980
vlan_dev_vlan_proto(upper),
978981
vlan_dev_vlan_id(upper));

drivers/net/bonding/bond_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,6 +1738,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
17381738
if (bond_mode_uses_xmit_hash(bond))
17391739
bond_update_slave_arr(bond, NULL);
17401740

1741+
bond->nest_level = dev_get_nest_level(bond_dev);
1742+
17411743
netdev_info(bond_dev, "Enslaving %s as %s interface with %s link\n",
17421744
slave_dev->name,
17431745
bond_is_active_slave(new_slave) ? "an active" : "a backup",

drivers/net/can/dev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ void can_bus_off(struct net_device *dev)
605605
{
606606
struct can_priv *priv = netdev_priv(dev);
607607

608-
netdev_dbg(dev, "bus-off\n");
608+
netdev_info(dev, "bus-off\n");
609609

610610
netif_carrier_off(dev);
611611

drivers/net/can/flexcan.c

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@
200200
#define FLEXCAN_QUIRK_DISABLE_MECR BIT(4) /* Disable Memory error detection */
201201
#define FLEXCAN_QUIRK_USE_OFF_TIMESTAMP BIT(5) /* Use timestamp based offloading */
202202
#define FLEXCAN_QUIRK_BROKEN_PERR_STATE BIT(6) /* No interrupt for error passive */
203+
#define FLEXCAN_QUIRK_DEFAULT_BIG_ENDIAN BIT(7) /* default to BE register access */
203204

204205
/* Structure of the message buffer */
205206
struct flexcan_mb {
@@ -287,6 +288,12 @@ struct flexcan_priv {
287288
};
288289

289290
static const struct flexcan_devtype_data fsl_p1010_devtype_data = {
291+
.quirks = FLEXCAN_QUIRK_BROKEN_WERR_STATE |
292+
FLEXCAN_QUIRK_BROKEN_PERR_STATE |
293+
FLEXCAN_QUIRK_DEFAULT_BIG_ENDIAN,
294+
};
295+
296+
static const struct flexcan_devtype_data fsl_imx25_devtype_data = {
290297
.quirks = FLEXCAN_QUIRK_BROKEN_WERR_STATE |
291298
FLEXCAN_QUIRK_BROKEN_PERR_STATE,
292299
};
@@ -1251,9 +1258,9 @@ static void unregister_flexcandev(struct net_device *dev)
12511258
static const struct of_device_id flexcan_of_match[] = {
12521259
{ .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, },
12531260
{ .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, },
1254-
{ .compatible = "fsl,imx53-flexcan", .data = &fsl_p1010_devtype_data, },
1255-
{ .compatible = "fsl,imx35-flexcan", .data = &fsl_p1010_devtype_data, },
1256-
{ .compatible = "fsl,imx25-flexcan", .data = &fsl_p1010_devtype_data, },
1261+
{ .compatible = "fsl,imx53-flexcan", .data = &fsl_imx25_devtype_data, },
1262+
{ .compatible = "fsl,imx35-flexcan", .data = &fsl_imx25_devtype_data, },
1263+
{ .compatible = "fsl,imx25-flexcan", .data = &fsl_imx25_devtype_data, },
12571264
{ .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, },
12581265
{ .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, },
12591266
{ .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, },
@@ -1337,18 +1344,13 @@ static int flexcan_probe(struct platform_device *pdev)
13371344

13381345
priv = netdev_priv(dev);
13391346

1340-
if (of_property_read_bool(pdev->dev.of_node, "big-endian")) {
1347+
if (of_property_read_bool(pdev->dev.of_node, "big-endian") ||
1348+
devtype_data->quirks & FLEXCAN_QUIRK_DEFAULT_BIG_ENDIAN) {
13411349
priv->read = flexcan_read_be;
13421350
priv->write = flexcan_write_be;
13431351
} else {
1344-
if (of_device_is_compatible(pdev->dev.of_node,
1345-
"fsl,p1010-flexcan")) {
1346-
priv->read = flexcan_read_be;
1347-
priv->write = flexcan_write_be;
1348-
} else {
1349-
priv->read = flexcan_read_le;
1350-
priv->write = flexcan_write_le;
1351-
}
1352+
priv->read = flexcan_read_le;
1353+
priv->write = flexcan_write_le;
13521354
}
13531355

13541356
priv->can.clock.freq = clock_freq;

drivers/net/can/spi/hi311x.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
#define HI3110_STAT_BUSOFF BIT(2)
9292
#define HI3110_STAT_ERRP BIT(3)
9393
#define HI3110_STAT_ERRW BIT(4)
94+
#define HI3110_STAT_TXMTY BIT(7)
9495

9596
#define HI3110_BTR0_SJW_SHIFT 6
9697
#define HI3110_BTR0_BRP_SHIFT 0
@@ -427,8 +428,10 @@ static int hi3110_get_berr_counter(const struct net_device *net,
427428
struct hi3110_priv *priv = netdev_priv(net);
428429
struct spi_device *spi = priv->spi;
429430

431+
mutex_lock(&priv->hi3110_lock);
430432
bec->txerr = hi3110_read(spi, HI3110_READ_TEC);
431433
bec->rxerr = hi3110_read(spi, HI3110_READ_REC);
434+
mutex_unlock(&priv->hi3110_lock);
432435

433436
return 0;
434437
}
@@ -735,10 +738,7 @@ static irqreturn_t hi3110_can_ist(int irq, void *dev_id)
735738
}
736739
}
737740

738-
if (intf == 0)
739-
break;
740-
741-
if (intf & HI3110_INT_TXCPLT) {
741+
if (priv->tx_len && statf & HI3110_STAT_TXMTY) {
742742
net->stats.tx_packets++;
743743
net->stats.tx_bytes += priv->tx_len - 1;
744744
can_led_event(net, CAN_LED_EVENT_TX);
@@ -748,6 +748,9 @@ static irqreturn_t hi3110_can_ist(int irq, void *dev_id)
748748
}
749749
netif_wake_queue(net);
750750
}
751+
752+
if (intf == 0)
753+
break;
751754
}
752755
mutex_unlock(&priv->hi3110_lock);
753756
return IRQ_HANDLED;

drivers/net/can/usb/kvaser_usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ static void kvaser_usb_rx_can_msg(const struct kvaser_usb *dev,
11791179

11801180
skb = alloc_can_skb(priv->netdev, &cf);
11811181
if (!skb) {
1182-
stats->tx_dropped++;
1182+
stats->rx_dropped++;
11831183
return;
11841184
}
11851185

0 commit comments

Comments
 (0)