Skip to content

Commit 918fe1b

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Infinite loop in _decode_session6(), from Eric Dumazet. 2) Pass correct argument to nla_strlcpy() in netfilter, also from Eric Dumazet. 3) Out of bounds memory access in ipv6 srh code, from Mathieu Xhonneux. 4) NULL deref in XDP_REDIRECT handling of tun driver, from Toshiaki Makita. 5) Incorrect idr release in cls_flower, from Paul Blakey. 6) Probe error handling fix in davinci_emac, from Dan Carpenter. 7) Memory leak in XPS configuration, from Alexander Duyck. 8) Use after free with cloned sockets in kcm, from Kirill Tkhai. 9) MTU handling fixes fo ip_tunnel and ip6_tunnel, from Nicolas Dichtel. 10) Fix UAPI hole in bpf data structure for 32-bit compat applications, from Daniel Borkmann. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (33 commits) bpf: fix uapi hole for 32 bit compat applications net: usb: cdc_mbim: add flag FLAG_SEND_ZLP ip6_tunnel: remove magic mtu value 0xFFF8 ip_tunnel: restore binding to ifaces with a large mtu net: dsa: b53: Add BCM5389 support kcm: Fix use-after-free caused by clonned sockets net-sysfs: Fix memory leak in XPS configuration ixgbe: fix parsing of TC actions for HW offload net: ethernet: davinci_emac: fix error handling in probe() net/ncsi: Fix array size in dumpit handler cls_flower: Fix incorrect idr release when failing to modify rule net/sonic: Use dma_mapping_error() xfrm Fix potential error pointer dereference in xfrm_bundle_create. vhost_net: flush batched heads before trying to busy polling tun: Fix NULL pointer dereference in XDP redirect be2net: Fix error detection logic for BE3 net: qmi_wwan: Add Netgear Aircard 779S mlxsw: spectrum: Forbid creation of VLAN 1 over port/LAG atm: zatm: fix memcmp casting iwlwifi: pcie: compare with number of IRQs requested for, not number of CPUs ...
2 parents e0255ae + cd075ce commit 918fe1b

File tree

38 files changed

+192
-115
lines changed

38 files changed

+192
-115
lines changed

Documentation/devicetree/bindings/net/dsa/b53.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Required properties:
1010
"brcm,bcm53128"
1111
"brcm,bcm5365"
1212
"brcm,bcm5395"
13+
"brcm,bcm5389"
1314
"brcm,bcm5397"
1415
"brcm,bcm5398"
1516

drivers/atm/zatm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,8 +1151,8 @@ static void eprom_get_byte(struct zatm_dev *zatm_dev, unsigned char *byte,
11511151
}
11521152

11531153

1154-
static unsigned char eprom_try_esi(struct atm_dev *dev, unsigned short cmd,
1155-
int offset, int swap)
1154+
static int eprom_try_esi(struct atm_dev *dev, unsigned short cmd, int offset,
1155+
int swap)
11561156
{
11571157
unsigned char buf[ZEPROM_SIZE];
11581158
struct zatm_dev *zatm_dev;

drivers/net/dsa/b53/b53_common.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,6 +1711,18 @@ static const struct b53_chip_data b53_switch_chips[] = {
17111711
.cpu_port = B53_CPU_PORT_25,
17121712
.duplex_reg = B53_DUPLEX_STAT_FE,
17131713
},
1714+
{
1715+
.chip_id = BCM5389_DEVICE_ID,
1716+
.dev_name = "BCM5389",
1717+
.vlans = 4096,
1718+
.enabled_ports = 0x1f,
1719+
.arl_entries = 4,
1720+
.cpu_port = B53_CPU_PORT,
1721+
.vta_regs = B53_VTA_REGS,
1722+
.duplex_reg = B53_DUPLEX_STAT_GE,
1723+
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
1724+
.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
1725+
},
17141726
{
17151727
.chip_id = BCM5395_DEVICE_ID,
17161728
.dev_name = "BCM5395",
@@ -2034,6 +2046,7 @@ int b53_switch_detect(struct b53_device *dev)
20342046
else
20352047
dev->chip_id = BCM5365_DEVICE_ID;
20362048
break;
2049+
case BCM5389_DEVICE_ID:
20372050
case BCM5395_DEVICE_ID:
20382051
case BCM5397_DEVICE_ID:
20392052
case BCM5398_DEVICE_ID:

drivers/net/dsa/b53/b53_mdio.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ static const struct b53_io_ops b53_mdio_ops = {
285285
#define B53_BRCM_OUI_1 0x0143bc00
286286
#define B53_BRCM_OUI_2 0x03625c00
287287
#define B53_BRCM_OUI_3 0x00406000
288+
#define B53_BRCM_OUI_4 0x01410c00
288289

289290
static int b53_mdio_probe(struct mdio_device *mdiodev)
290291
{
@@ -311,7 +312,8 @@ static int b53_mdio_probe(struct mdio_device *mdiodev)
311312
*/
312313
if ((phy_id & 0xfffffc00) != B53_BRCM_OUI_1 &&
313314
(phy_id & 0xfffffc00) != B53_BRCM_OUI_2 &&
314-
(phy_id & 0xfffffc00) != B53_BRCM_OUI_3) {
315+
(phy_id & 0xfffffc00) != B53_BRCM_OUI_3 &&
316+
(phy_id & 0xfffffc00) != B53_BRCM_OUI_4) {
315317
dev_err(&mdiodev->dev, "Unsupported device: 0x%08x\n", phy_id);
316318
return -ENODEV;
317319
}
@@ -360,6 +362,7 @@ static const struct of_device_id b53_of_match[] = {
360362
{ .compatible = "brcm,bcm53125" },
361363
{ .compatible = "brcm,bcm53128" },
362364
{ .compatible = "brcm,bcm5365" },
365+
{ .compatible = "brcm,bcm5389" },
363366
{ .compatible = "brcm,bcm5395" },
364367
{ .compatible = "brcm,bcm5397" },
365368
{ .compatible = "brcm,bcm5398" },

drivers/net/dsa/b53/b53_priv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ struct b53_io_ops {
4848
enum {
4949
BCM5325_DEVICE_ID = 0x25,
5050
BCM5365_DEVICE_ID = 0x65,
51+
BCM5389_DEVICE_ID = 0x89,
5152
BCM5395_DEVICE_ID = 0x95,
5253
BCM5397_DEVICE_ID = 0x97,
5354
BCM5398_DEVICE_ID = 0x98,

drivers/net/ethernet/emulex/benet/be_main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3309,7 +3309,9 @@ void be_detect_error(struct be_adapter *adapter)
33093309
if ((val & POST_STAGE_FAT_LOG_START)
33103310
!= POST_STAGE_FAT_LOG_START &&
33113311
(val & POST_STAGE_ARMFW_UE)
3312-
!= POST_STAGE_ARMFW_UE)
3312+
!= POST_STAGE_ARMFW_UE &&
3313+
(val & POST_STAGE_RECOVERABLE_ERR)
3314+
!= POST_STAGE_RECOVERABLE_ERR)
33133315
return;
33143316
}
33153317

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9054,7 +9054,6 @@ static int parse_tc_actions(struct ixgbe_adapter *adapter,
90549054
{
90559055
const struct tc_action *a;
90569056
LIST_HEAD(actions);
9057-
int err;
90589057

90599058
if (!tcf_exts_has_actions(exts))
90609059
return -EINVAL;
@@ -9075,11 +9074,11 @@ static int parse_tc_actions(struct ixgbe_adapter *adapter,
90759074

90769075
if (!dev)
90779076
return -EINVAL;
9078-
err = handle_redirect_action(adapter, dev->ifindex, queue,
9079-
action);
9080-
if (err == 0)
9081-
return err;
9077+
return handle_redirect_action(adapter, dev->ifindex,
9078+
queue, action);
90829079
}
9080+
9081+
return -EINVAL;
90839082
}
90849083

90859084
return -EINVAL;

drivers/net/ethernet/mellanox/mlxsw/spectrum.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4433,6 +4433,11 @@ static int mlxsw_sp_netdevice_port_upper_event(struct net_device *lower_dev,
44334433
NL_SET_ERR_MSG_MOD(extack, "Can not put a VLAN on an OVS port");
44344434
return -EINVAL;
44354435
}
4436+
if (is_vlan_dev(upper_dev) &&
4437+
vlan_dev_vlan_id(upper_dev) == 1) {
4438+
NL_SET_ERR_MSG_MOD(extack, "Creating a VLAN device with VID 1 is unsupported: VLAN 1 carries untagged traffic");
4439+
return -EINVAL;
4440+
}
44364441
break;
44374442
case NETDEV_CHANGEUPPER:
44384443
upper_dev = info->upper_dev;

drivers/net/ethernet/natsemi/sonic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static int sonic_open(struct net_device *dev)
8484
for (i = 0; i < SONIC_NUM_RRS; i++) {
8585
dma_addr_t laddr = dma_map_single(lp->device, skb_put(lp->rx_skb[i], SONIC_RBSIZE),
8686
SONIC_RBSIZE, DMA_FROM_DEVICE);
87-
if (!laddr) {
87+
if (dma_mapping_error(lp->device, laddr)) {
8888
while(i > 0) { /* free any that were mapped successfully */
8989
i--;
9090
dma_unmap_single(lp->device, lp->rx_laddr[i], SONIC_RBSIZE, DMA_FROM_DEVICE);

drivers/net/ethernet/socionext/netsec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,8 +1674,8 @@ static int netsec_probe(struct platform_device *pdev)
16741674
if (ret)
16751675
goto unreg_napi;
16761676

1677-
if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)))
1678-
dev_warn(&pdev->dev, "Failed to enable 64-bit DMA\n");
1677+
if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(40)))
1678+
dev_warn(&pdev->dev, "Failed to set DMA mask\n");
16791679

16801680
ret = register_netdev(ndev);
16811681
if (ret) {

0 commit comments

Comments
 (0)