Re: [PATCH 3/3] net: stmmac: Make 'alloc_dma_[rt]x_desc_resources()' look even closer

2017-07-09 Thread Giuseppe CAVALLARO
On 7/8/2017 9:46 AM, Christophe JAILLET wrote: 'alloc_dma_[rt]x_desc_resources()' functions look very close. Remove a useless initialization and use the same label name for error handling path in order to get them even closer. Signed-off-by: Christophe JAILLET Acked-by: Giuseppe Cavallaro

Re: [PATCH 2/3] net: stmmac: Fix error handling path in 'alloc_dma_tx_desc_resources()'

2017-07-09 Thread Giuseppe CAVALLARO
On 7/8/2017 9:46 AM, Christophe JAILLET wrote: If the first 'kmalloc_array' within the loop fails, we should free what as already been allocated, as done in all other error handling path. Fixes: ce736788e8a9 ("net: stmmac: adding multiple buffers for TX") Signed-off-by: Christophe JAILLET Acke

Re: [PATCH 1/3] net: stmmac: Fix error handling path in 'alloc_dma_rx_desc_resources()'

2017-07-09 Thread Giuseppe CAVALLARO
On 7/8/2017 9:46 AM, Christophe JAILLET wrote: If the first 'kmalloc_array' within the loop fails, we should free what as already been allocated, as done in all other error handling path. Fixes: 54139cf3bb33 ("net: stmmac: adding multiple buffers for rx") Signed-off-by: Christophe JAILLET Ack

[Patch] mqueue: fix netlink sock refcnt and skb refcnt

2017-07-09 Thread Cong Wang
netlink_sendskb() is problematic, it releases sock refcnt silently which could cause troubles we can call it multiple times. info->notify_sock is a good example where we setup once and use it to send netlink skb's for many times. It should not hold or release any refcnt, but needs to rely on netlin

[no subject]

2017-07-09 Thread системы администратор
внимания; Ваши сообщения превысил лимит памяти, который составляет 5 Гб, определенных администратором, который в настоящее время работает на 10.9GB, Вы не сможете отправить или получить новую почту, пока вы повторно не проверить ваш почтовый ящик почты. Чтобы восстановить работоспособность Ваше

[no subject]

2017-07-09 Thread системы администратор
внимания; Ваши сообщения превысил лимит памяти, который составляет 5 Гб, определенных администратором, который в настоящее время работает на 10.9GB, Вы не сможете отправить или получить новую почту, пока вы повторно не проверить ваш почтовый ящик почты. Чтобы восстановить работоспособность Ваше

[PATCH 2/2] ioc3-eth: use netdev_pub instead of handrolling alignment

2017-07-09 Thread Jason A. Donenfeld
It's safer to use the generic library function for this, rather than reinventing it here with hard-coded alignment values. Signed-off-by: Jason A. Donenfeld --- drivers/net/ethernet/sgi/ioc3-eth.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/etherne

[PATCH 1/2] netdevice: add netdev_pub helper function

2017-07-09 Thread Jason A. Donenfeld
Being able to utilize this makes code a lot simpler and cleaner. It's easier in many cases for drivers to pass around their private data structure, while occationally needing to dip into net_device, rather than the other way around, which results in tons of calls to netdev_priv in the top of every

Re: net: Fix inconsistent teardown and release of private netdev state.

2017-07-09 Thread Jason A. Donenfeld
On Sat, Jul 8, 2017 at 12:39 AM, Cong Wang wrote: > On Thu, Jul 6, 2017 at 7:24 AM, Jason A. Donenfeld wrote: >> list_add(&priv->list, &list_of_things); >> >> ret = register_netdevice(); // if ret is < 0, then destruct above is >> automatically called >> >> // RACE WITH L

Re: [PATCH v 1/2] ravb: Add support for r8a7743 SoC

2017-07-09 Thread Rob Herring
On Wed, Jul 05, 2017 at 02:01:50PM +0100, Biju Das wrote: > Add support for Gigabit Ethernet E-MAC on r8a7743 (RZ/G1M) SoC. > Renesas RZ/G1M (R8A7743) SoC Ethernet AVB IP is identical to the R-Car Gen2 > family. For the subject: "dt-bindings: net: ..." > > Signed-off-by: Biju Das > Reviewed-by:

netconsole refcount warning

2017-07-09 Thread Dave Jones
The new refcount debugging code spews this twice during boot on my router.. refcount_t: increment on 0; use-after-free. [ cut here ] WARNING: CPU: 1 PID: 17 at lib/refcount.c:152 refcount_inc+0x2b/0x30 CPU: 1 PID: 17 Comm: ksoftirqd/1 Not tainted 4.12.0-firewall+ #8 task:

Re: [Patch v2] mqueue: fix a use-after-free in sys_mq_notify()

2017-07-09 Thread Linus Torvalds
On Sun, Jul 9, 2017 at 1:19 PM, Cong Wang wrote: > > Setting 'sock' to NULL here should be sufficient to fix it. Thanks. Applied and marked for stable. Linus

Re: [PATCH v10 00/15] Replace PCI pool by DMA pool API

2017-07-09 Thread Doug Ledford
On Thu, 2017-07-06 at 10:12 +0200, Romain Perier wrote: > The current PCI pool API are simple macro functions direct expanded > to > the appropriate dma pool functions. The prototypes are almost the > same > and semantically, they are very similar. I propose to use the DMA > pool > API directly and

Re: [GIT] Networking

2017-07-09 Thread David Miller
From: Sowmini Varadhan Date: Sun, 9 Jul 2017 15:11:31 -0400 > On (07/09/17 11:49), Linus Torvalds wrote: >> >> On Sat, Jul 8, 2017 at 3:36 AM, David Miller wrote: >> > >> > 8) Fix socket leak on accept() in RDS, from Sowmini Varadhan. Also >> >add a WARN_ON() to sock_graft() so other proto

[Patch v2] mqueue: fix a use-after-free in sys_mq_notify()

2017-07-09 Thread Cong Wang
The retry logic for netlink_attachskb() inside sys_mq_notify() is nasty and vulnerable: 1) The sock refcnt is already released when retry is needed 2) The fd is controllable by user-space because we already release the file refcnt so we when retry but the fd has been just closed by user-space

Re: [Patch] mqueue: fix the retry logic for netlink_attachskb()

2017-07-09 Thread Cong Wang
On Sat, Jul 8, 2017 at 11:55 AM, Linus Torvalds wrote: > On Sat, Jul 8, 2017 at 11:04 AM, Cong Wang wrote: >>> >>> Can you confirm that? I don't know where the original report is. >> >> Yes of course, setting 'sock' to NULL before 'goto retry' is sufficient >> to fix it, that is in fact my initia

Re: [PATCH] of_mdio: Fix broken PHY IRQ in case of probe deferral

2017-07-09 Thread Geert Uytterhoeven
Hi Florian, Andrew, On Sun, Jul 9, 2017 at 7:28 PM, Andrew Lunn wrote: >> It sure does fix a real issue, but I am really concerned about the >> inability to test this patch in a configuration where we have multiple >> PHY(s) or MDIO device(s) hanging off the same MDIO bus and one of those >> requ

[PATCH/RFC] dma-mapping: Provide dummy set_dma_ops() for NO_DMA=y

2017-07-09 Thread Geert Uytterhoeven
Adding a dummy for set_dma_ops() allows to compile (sub)drivers that don't actually use the DMA API, but propagate DMA ops configuration to a second driver that may or may not use the DMA API. Of course the second driver does have to depend on HAS_DMA if it uses the DMA API. An example is commit

Re: [GIT] Networking

2017-07-09 Thread Sowmini Varadhan
On (07/09/17 11:49), Linus Torvalds wrote: > > On Sat, Jul 8, 2017 at 3:36 AM, David Miller wrote: > > > > 8) Fix socket leak on accept() in RDS, from Sowmini Varadhan. Also > >add a WARN_ON() to sock_graft() so other protocol stacks don't trip > >over this as well. > > Hmm. This one tr

Re: [GIT] Networking

2017-07-09 Thread Linus Torvalds
On Sat, Jul 8, 2017 at 3:36 AM, David Miller wrote: > > 8) Fix socket leak on accept() in RDS, from Sowmini Varadhan. Also >add a WARN_ON() to sock_graft() so other protocol stacks don't trip >over this as well. Hmm. This one triggers for me on both my desktop and laptop at bootup. Bog-s

Re: [PATCH] of_mdio: Fix broken PHY IRQ in case of probe deferral

2017-07-09 Thread Andrew Lunn
> It sure does fix a real issue, but I am really concerned about the > inability to test this patch in a configuration where we have multiple > PHY(s) or MDIO device(s) hanging off the same MDIO bus and one of those > requesting an EPROBE_DEFER. > > I currently don't have a setup where I could exe

Re: [PATCH] of_mdio: Fix broken PHY IRQ in case of probe deferral

2017-07-09 Thread Florian Fainelli
On 07/02/2017 01:37 PM, Geert Uytterhoeven wrote: > On Tue, Jun 6, 2017 at 11:43 AM, Geert Uytterhoeven > wrote: >> On Tue, May 23, 2017 at 11:36 AM, Geert Uytterhoeven >> wrote: >>> On Fri, May 19, 2017 at 12:21 AM, Florian Fainelli >>> wrote: On 05/18/2017 01:36 PM, Geert Uytterhoeven

Re: [pull request][net 0/7] Mellanox, mlx5 fixes 2017-07-09

2017-07-09 Thread David Miller
From: Saeed Mahameed Date: Sun, 9 Jul 2017 15:49:10 +0300 > This series includes fixes to mlx5 driver: > - Compilation warnings and issues introduced on v4.12 > - Add Makefile to each mlx5 subdir to allow individual file compilation > - Initialize CEE's getpermhwaddr address buffer to 0xff

Re: [PATCH net-next RFC 08/12] net: dsa: Remove support for bypass bridge port attributes/vlan set

2017-07-09 Thread Arkadi Sharshevsky
On 07/07/2017 12:36 AM, Florian Fainelli wrote: > On 07/06/2017 04:00 AM, Arkadi Sharshevsky wrote: >> >> >> On 07/05/2017 10:45 PM, Florian Fainelli wrote: >>> On 07/05/2017 08:36 AM, Arkadi Sharshevsky wrote: The bridge port attributes/vlan for DSA devices should be set only from brid

Re: [RFC PATCH 03/12] xdp: add bpf_redirect helper function

2017-07-09 Thread Saeed Mahameed
On 7/7/2017 8:35 PM, John Fastabend wrote: This adds support for a bpf_redirect helper function to the XDP infrastructure. For now this only supports redirecting to the egress path of a port. In order to support drivers handling a xdp_buff natively this patches uses a new ndo operation ndo_xdp

Re: [PATCH net-next RFC 04/12] net: dsa: Add ordered workqueue

2017-07-09 Thread Arkadi Sharshevsky
On 07/06/2017 09:45 PM, Vivien Didelot wrote: > Hi Arkadi, > > Florian Fainelli writes: > >> On 07/05/2017 08:36 AM, Arkadi Sharshevsky wrote: >>> This workqueue will be used for FDB add/del processing. It should >>> be destroyed after all devices unregistered successfully. >>> >>> Signed-off-

[net 3/7] net/mlx5: FPGA, make mlx5_fpga_device_brb static

2017-07-09 Thread Saeed Mahameed
From: Ilan Tayari Fix warning when building with -Wall: drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c:105:5: warning: symbol 'mlx5_fpga_device_brb' was not declared. Should it be static? Fixes: c43051d72a8d ("net/mlx5: FPGA, Add SBU bypass and reset flows") Reported-by: Or Gerlitz Signed

[net 5/7] net/mlx5: Build wq.o even if MLX5_CORE_EN is not selected

2017-07-09 Thread Saeed Mahameed
From: Ilan Tayari Both the ethernet and FPGA portions of MLX5 now require the wq functions, and we get a link error when CONFIG_MLX5_CORE_EN is disabled: drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.o: In function `mlx5_fpga_conn_create_cq': conn.c:(.text+0x10b3): undefined reference to `m

[net 1/7] net/mlx5: Add missing include in lib/gid.c

2017-07-09 Thread Saeed Mahameed
From: Ilan Tayari Fix warnings when building with -Wall: drivers/net/ethernet/mellanox/mlx5/core/lib/gid.c:38:6: warning: symbol 'mlx5_init_reserved_gids' was not declared. Should it be static? drivers/net/ethernet/mellanox/mlx5/core/lib/gid.c:47:6: warning: symbol 'mlx5_cleanup_reserved_gids'

[net 7/7] net/mlx5e: Initialize CEE's getpermhwaddr address buffer to 0xff

2017-07-09 Thread Saeed Mahameed
From: Huy Nguyen Latest change in open-lldp code uses bytes 6-11 of perm_addr buffer as the Ethernet source address for the host TLV packet. Since our driver does not fill these bytes, they stay at zero and the open-lldp code ends up sending the TLV packet with zero source address and the switch

[net 4/7] net/mlx5: FPGA, Fix datatype mismatch

2017-07-09 Thread Saeed Mahameed
From: Ilan Tayari Fix warnings when building with -Wall: drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c:313:36: warning: cast to restricted __be32 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c:314:37: warning: cast to restricted __be32 Fixes: bebb23e6cb02 ("net/mlx5: Accel, Add IP

[net 2/7] net/mlx5: IPSec, Fix 64-bit division on 32-bit builds

2017-07-09 Thread Saeed Mahameed
From: Ilan Tayari Fix warnings when building 386 kernel: >> ERROR: "__udivdi3" [drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko] >> undefined! Fixes: 2ac9cfe78223 ("net/mlx5e: IPSec, Add Innova IPSec offload TX data path") Reported-by: kbuild test robot Signed-off-by: Ilan Tayari Signed-

[pull request][net 0/7] Mellanox, mlx5 fixes 2017-07-09

2017-07-09 Thread Saeed Mahameed
Hi Dave, This series includes fixes to mlx5 driver: - Compilation warnings and issues introduced on v4.12 - Add Makefile to each mlx5 subdir to allow individual file compilation - Initialize CEE's getpermhwaddr address buffer to 0xff Please pull and let me know if there's any problem. For

[net 6/7] net/mlx5: Add Makefiles for subdirectories

2017-07-09 Thread Saeed Mahameed
From: Ilan Tayari Currently it is not possible to build just one .o file inside a subdirectory, because the subdirectories lack a Makefile. Add a Makefile to the mlx5 subdirectories. Fixes: e29341fb3a5b ("net/mlx5: FPGA, Add basic support for Innova") Signed-off-by: Ilan Tayari Reported-by: Da

[PATCH] NFC: fix device-allocation error return

2017-07-09 Thread Johan Hovold
A recent change fixing NFC device allocation itself introduced an error-handling bug by returning an error pointer in case device-id allocation failed. This is clearly broken as the callers still expected NULL to be returned on errors as detected by Dan's static checker. Fix this up by returning N

[PATCH net] qed: Fix printk option passed when printing ipv6 addresses

2017-07-09 Thread Michal Kalderon
The option "h" (host order ) exists for ipv4 only. Remove the h when printing ipv6 addresses. Lead to the following smatch warning: drivers/net/ethernet/qlogic/qed/qed_iwarp.c:585 qed_iwarp_print_tcp_ramrod() warn: '%pI6' can only be followed by c drivers/net/ethernet/qlogic/qed/qed_iwarp.c:1521