Skip to content

Commit f3ca4c5

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "More fixes in the queue: 1) Netfilter nat can erroneously register the device notifier twice, fix from Florian Westphal. 2) Use after free in nf_tables, from Pablo Neira Ayuso. 3) Parallel update of steering rule fix in mlx5 river, from Eli Britstein. 4) RX processing panic in lan743x, fix from Bryan Whitehead. 5) Use before initialization of TCP_SKB_CB, fix from Christoph Paasch. 6) Fix locking in SRIOV mode of mlx4 driver, from Jack Morgenstein. 7) Fix TX stalls in lan743x due to mishandling of interrupt ACKing modes, from Bryan Whitehead. 8) Fix infoleak in l2tp_ip6_recvmsg(), from Eric Dumazet" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits) pptp: dst_release sk_dst_cache in pptp_sock_destruct MAINTAINERS: GENET & SYSTEMPORT: Add internal Broadcom list l2tp: fix infoleak in l2tp_ip6_recvmsg() net/tls: Inform user space about send buffer availability net_sched: return correct value for *notify* functions lan743x: Fix TX Stall Issue net/mlx4_core: Fix qp mtt size calculation net/mlx4_core: Fix locking in SRIOV mode when switching between events and polling net/mlx4_core: Fix reset flow when in command polling mode mlxsw: minimal: Initialize base_mac mlxsw: core: Prevent duplication during QSFP module initialization net: dwmac-sun8i: fix a missing check of of_get_phy_mode net: sh_eth: fix a missing check of of_get_phy_mode net: 8390: fix potential NULL pointer dereferences net: fujitsu: fix a potential NULL pointer dereference net: qlogic: fix a potential NULL pointer dereference isdn: hfcpci: fix potential NULL pointer dereference Documentation: devicetree: add a new optional property for port mac address net: rocker: fix a potential NULL pointer dereference net: qlge: fix a potential NULL pointer dereference ...
2 parents 31ef489 + 9417d81 commit f3ca4c5

File tree

46 files changed

+427
-213
lines changed

Some content is hidden

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

46 files changed

+427
-213
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ properties, described in binding documents:
7171
Documentation/devicetree/bindings/net/fixed-link.txt
7272
for details.
7373

74+
- local-mac-address : See
75+
Documentation/devicetree/bindings/net/ethernet.txt
76+
for details.
77+
7478
Example
7579

7680
The following example shows three switches on three MDIO busses,
@@ -97,6 +101,7 @@ linked into one DSA cluster.
97101
port@1 {
98102
reg = <1>;
99103
label = "lan1";
104+
local-mac-address = [00 00 00 00 00 00];
100105
};
101106

102107
port@2 {

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3204,6 +3204,7 @@ F: drivers/phy/broadcom/phy-brcm-usb*
32043204
BROADCOM GENET ETHERNET DRIVER
32053205
M: Doug Berger <opendmb@gmail.com>
32063206
M: Florian Fainelli <f.fainelli@gmail.com>
3207+
L: bcm-kernel-feedback-list@broadcom.com
32073208
L: netdev@vger.kernel.org
32083209
S: Supported
32093210
F: drivers/net/ethernet/broadcom/genet/
@@ -3311,6 +3312,7 @@ F: drivers/spi/spi-iproc-qspi.c
33113312

33123313
BROADCOM SYSTEMPORT ETHERNET DRIVER
33133314
M: Florian Fainelli <f.fainelli@gmail.com>
3315+
L: bcm-kernel-feedback-list@broadcom.com
33143316
L: netdev@vger.kernel.org
33153317
S: Supported
33163318
F: drivers/net/ethernet/broadcom/bcmsysport.*

arch/alpha/include/uapi/asm/socket.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#ifndef _UAPI_ASM_SOCKET_H
33
#define _UAPI_ASM_SOCKET_H
44

5+
#include <linux/posix_types.h>
56
#include <asm/sockios.h>
6-
#include <asm/bitsperlong.h>
77

88
/* For setsockopt(2) */
99
/*

arch/mips/include/uapi/asm/socket.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#ifndef _UAPI_ASM_SOCKET_H
1111
#define _UAPI_ASM_SOCKET_H
1212

13+
#include <linux/posix_types.h>
1314
#include <asm/sockios.h>
14-
#include <asm/bitsperlong.h>
1515

1616
/*
1717
* For setsockopt(2)

arch/parisc/include/uapi/asm/socket.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#ifndef _UAPI_ASM_SOCKET_H
33
#define _UAPI_ASM_SOCKET_H
44

5+
#include <linux/posix_types.h>
56
#include <asm/sockios.h>
6-
#include <asm/bitsperlong.h>
77

88
/* For setsockopt(2) */
99
#define SOL_SOCKET 0xffff

arch/sparc/include/uapi/asm/socket.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#ifndef _ASM_SOCKET_H
33
#define _ASM_SOCKET_H
44

5+
#include <linux/posix_types.h>
56
#include <asm/sockios.h>
6-
#include <asm/bitsperlong.h>
77

88
/* For setsockopt(2) */
99
#define SOL_SOCKET 0xffff

drivers/isdn/hardware/mISDN/hfcpci.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2032,10 +2032,19 @@ setup_hw(struct hfc_pci *hc)
20322032
hc->hw.fifos = buffer;
20332033
pci_write_config_dword(hc->pdev, 0x80, hc->hw.dmahandle);
20342034
hc->hw.pci_io = ioremap((ulong) hc->hw.pci_io, 256);
2035+
if (unlikely(!hc->hw.pci_io)) {
2036+
printk(KERN_WARNING
2037+
"HFC-PCI: Error in ioremap for PCI!\n");
2038+
pci_free_consistent(hc->pdev, 0x8000, hc->hw.fifos,
2039+
hc->hw.dmahandle);
2040+
return 1;
2041+
}
2042+
20352043
printk(KERN_INFO
20362044
"HFC-PCI: defined at mem %#lx fifo %#lx(%#lx) IRQ %d HZ %d\n",
20372045
(u_long) hc->hw.pci_io, (u_long) hc->hw.fifos,
20382046
(u_long) hc->hw.dmahandle, hc->irq, HZ);
2047+
20392048
/* enable memory mapped ports, disable busmaster */
20402049
pci_write_config_word(hc->pdev, PCI_COMMAND, PCI_ENA_MEMIO);
20412050
hc->hw.int_m2 = 0;

drivers/net/ethernet/8390/pcnet_cs.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,11 @@ static struct hw_info *get_hwinfo(struct pcmcia_device *link)
289289

290290
virt = ioremap(link->resource[2]->start,
291291
resource_size(link->resource[2]));
292+
if (unlikely(!virt)) {
293+
pcmcia_release_window(link, link->resource[2]);
294+
return NULL;
295+
}
296+
292297
for (i = 0; i < NR_INFO; i++) {
293298
pcmcia_map_mem_page(link, link->resource[2],
294299
hw_info[i].offset & ~(resource_size(link->resource[2])-1));
@@ -1423,6 +1428,11 @@ static int setup_shmem_window(struct pcmcia_device *link, int start_pg,
14231428
/* Try scribbling on the buffer */
14241429
info->base = ioremap(link->resource[3]->start,
14251430
resource_size(link->resource[3]));
1431+
if (unlikely(!info->base)) {
1432+
ret = -ENOMEM;
1433+
goto failed;
1434+
}
1435+
14261436
for (i = 0; i < (TX_PAGES<<8); i += 2)
14271437
__raw_writew((i>>1), info->base+offset+i);
14281438
udelay(100);

drivers/net/ethernet/cavium/liquidio/lio_core.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,11 @@ int liquidio_change_mtu(struct net_device *netdev, int new_mtu)
12111211

12121212
sc = (struct octeon_soft_command *)
12131213
octeon_alloc_soft_command(oct, OCTNET_CMD_SIZE, 16, 0);
1214+
if (!sc) {
1215+
netif_info(lio, rx_err, lio->netdev,
1216+
"Failed to allocate soft command\n");
1217+
return -ENOMEM;
1218+
}
12141219

12151220
ncmd = (union octnet_cmd *)sc->virtdptr;
12161221

@@ -1684,6 +1689,11 @@ int liquidio_set_fec(struct lio *lio, int on_off)
16841689

16851690
sc = octeon_alloc_soft_command(oct, OCTNET_CMD_SIZE,
16861691
sizeof(struct oct_nic_seapi_resp), 0);
1692+
if (!sc) {
1693+
dev_err(&oct->pci_dev->dev,
1694+
"Failed to allocate soft command\n");
1695+
return -ENOMEM;
1696+
}
16871697

16881698
ncmd = sc->virtdptr;
16891699
resp = sc->virtrptr;

drivers/net/ethernet/cavium/liquidio/lio_main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,6 +1192,11 @@ static void send_rx_ctrl_cmd(struct lio *lio, int start_stop)
11921192
sc = (struct octeon_soft_command *)
11931193
octeon_alloc_soft_command(oct, OCTNET_CMD_SIZE,
11941194
16, 0);
1195+
if (!sc) {
1196+
netif_info(lio, rx_err, lio->netdev,
1197+
"Failed to allocate octeon_soft_command\n");
1198+
return;
1199+
}
11951200

11961201
ncmd = (union octnet_cmd *)sc->virtdptr;
11971202

0 commit comments

Comments
 (0)