Re: [PATCH] net: ethernet: aquantia: Fix wrong return value

2020-08-03 Thread David Miller
From: Tianjia Zhang Date: Sun, 2 Aug 2020 19:15:37 +0800 > In function hw_atl_a0_hw_multicast_list_set(), when an invalid > request is encountered, a negative error code should be returned. > > Fixes: bab6de8fd180b ("net: ethernet: aquantia: Atlantic A0 and B0 specific > functions") > Cc:

Re: [PATCH] atm: idt77252: avoid accessing the data mapped to streaming DMA

2020-08-03 Thread David Miller
From: Jia-Ju Bai Date: Sun, 2 Aug 2020 17:33:40 +0800 > In queue_skb(), skb->data is mapped to streaming DMA on line 850: > dma_map_single(..., skb->data, ...); > > Then skb->data is accessed on lines 862 and 863: > tbd->word_4 = (skb->data[0] << 24) | (skb->data[1] << 16) | >

Re: [PATCH] atm: eni: avoid accessing the data mapped to streaming DMA

2020-08-03 Thread David Miller
From: Jia-Ju Bai Date: Sun, 2 Aug 2020 17:16:11 +0800 > In do_tx(), skb->data is mapped to streaming DMA on line : > paddr = dma_map_single(...,skb->data,DMA_TO_DEVICE); > > Then skb->data is accessed on line 1153: > (skb->data[3] & 0xf) > > This access may cause data inconsistency

Re: [net-next PATCH] net: phy: mdio-mvusb: select MDIO_DEVRES in Kconfig

2020-08-03 Thread David Miller
From: Bartosz Golaszewski Date: Sun, 2 Aug 2020 09:49:53 +0200 > From: Bartosz Golaszewski > > PHYLIB is not selected by the mvusb driver but it uses mdio devres > helpers. Explicitly select MDIO_DEVRES in this driver's Kconfig entry. > > Reported-by: kernel test robot > Fixes: 1814cff26739

Re: [PATCH net-next v3 2/2] net: dsa: qca8k: Add 802.1q VLAN support

2020-08-03 Thread David Miller
From: Jonathan McDowell Date: Sat, 1 Aug 2020 18:06:46 +0100 > This adds full 802.1q VLAN support to the qca8k, allowing the use of > vlan_filtering and more complicated bridging setups than allowed by > basic port VLAN support. > > Tested with a number of untagged ports with separate VLANs and

Re: [PATCH net-next v3 1/2] net: dsa: qca8k: Add define for port VID

2020-08-03 Thread David Miller
From: Jonathan McDowell Date: Sat, 1 Aug 2020 18:05:54 +0100 > Rather than using a magic value of 1 when configuring the port VIDs add > a QCA8K_PORT_VID_DEF define and use that instead. Also fix up the > bitmask in the process; the top 4 bits are reserved so this wasn't a > problem, but only

Re: [PATCH] via-velocity: Add missing KERN_ where needed

2020-08-03 Thread David Miller
From: Joe Perches Date: Sat, 01 Aug 2020 08:51:03 -0700 > Link status is emitted on multiple lines as it does not use > KERN_CONT. > > Coalesce the multi-part logging into a single line output and > add missing KERN_ to a couple logging calls. > > This also reduces object size. > >

Re: [PATCH] net: Pass NULL to skb_network_protocol() when we don't care about vlan depth

2020-08-03 Thread David Miller
From: linmiaohe Date: Sat, 1 Aug 2020 17:36:05 +0800 > From: Miaohe Lin > > When we don't care about vlan depth, we could pass NULL instead of the > address of a unused local variable to skb_network_protocol() as a param. > > Signed-off-by: Miaohe Lin Applied.

Re: [PATCH] net: Use __skb_pagelen() directly in skb_cow_data()

2020-08-03 Thread David Miller
From: linmiaohe Date: Sat, 1 Aug 2020 17:30:23 +0800 > From: Miaohe Lin > > In fact, skb_pagelen() - skb_headlen() is equal to __skb_pagelen(), use it > directly to avoid unnecessary skb_headlen() call. > > Also fix the CHECK note of checkpatch.pl: > Comparison to NULL could be written

Re: [PATCH] net: qede: use eth_zero_addr() to clear mac address

2020-08-03 Thread David Miller
From: linmiaohe Date: Sat, 1 Aug 2020 17:13:54 +0800 > From: Miaohe Lin > > Use eth_zero_addr() to clear mac address instead of memset(). > > Signed-off-by: Miaohe Lin Applied.

Re: [PATCH] net: qed: use eth_zero_addr() to clear mac address

2020-08-03 Thread David Miller
From: linmiaohe Date: Sat, 1 Aug 2020 17:14:41 +0800 > From: Miaohe Lin > > Use eth_zero_addr() to clear mac address instead of memset(). > > Signed-off-by: Miaohe Lin Applied.

Re: [PATCH] mac80211: use eth_zero_addr() to clear mac address

2020-08-03 Thread David Miller
From: linmiaohe Date: Sat, 1 Aug 2020 17:12:38 +0800 > From: Miaohe Lin > > Use eth_zero_addr() to clear mac address instead of memset(). > > Signed-off-by: Miaohe Lin If you're going to make this change, you should probably convert this macro to use eth_addr_copy() at the same time.

Re: [PATCH net-next] ip_vti: Fix unused variable warning

2020-08-03 Thread David Miller
From: YueHaibing Date: Fri, 31 Jul 2020 14:49:52 +0800 > If CONFIG_INET_XFRM_TUNNEL is set but CONFIG_IPV6 is n, > > net/ipv4/ip_vti.c:493:27: warning: 'vti_ipip6_handler' defined but not used > [-Wunused-variable] > > Signed-off-by: YueHaibing Steffen, please pick this up if you haven't

Re: [PATCH] [net/ethtool] ethnl_set_linkmodes: remove redundant null check

2020-08-03 Thread David Miller
From: Gaurav Singh Date: Fri, 31 Jul 2020 00:58:44 -0400 > info cannot be NULL here since its being accessed earlier > in the function: nlmsg_parse(info->nlhdr...). Remove this > redundant NULL check. > > Signed-off-by: Gaurav Singh Applied, thank you.

Re: [Linux-kernel-mentees] [PATCH net] openvswitch: Prevent kernel-infoleak in ovs_ct_put_key()

2020-08-03 Thread David Miller
From: Peilin Ye Date: Fri, 31 Jul 2020 00:48:38 -0400 > ovs_ct_put_key() is potentially copying uninitialized kernel stack memory > into socket buffers, since the compiler may leave a 3-byte hole at the end > of `struct ovs_key_ct_tuple_ipv4` and `struct ovs_key_ct_tuple_ipv6`. Fix > it by

Re: [PATCH v4 2/2] net: dsa: ocelot: Add support for QinQ Operation

2020-08-03 Thread David Miller
From: hongbo.w...@nxp.com Date: Thu, 30 Jul 2020 18:25:05 +0800 > + if (vlan->proto == ETH_P_8021AD) { > + ocelot->enable_qinq = true; > + ocelot_port->qinq_mode = true; > + } ... > + if (vlan->proto == ETH_P_8021AD) { > + ocelot->enable_qinq =

Re: [GIT] Networking

2020-08-01 Thread David Miller
From: Linus Torvalds Date: Sat, 1 Aug 2020 16:45:49 -0700 > On Sat, Aug 1, 2020 at 2:36 PM David Miller wrote: >> >> git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git > > How is this wrt an rc8 or a final? Nothing scary in there, I think you can safely d

[GIT] Networking

2020-08-01 Thread David Miller
1) Encap offset calculation is incorrect in esp6, from Sabrina Dubroca. 2) Better parameter validation in pfkey_dump(), from Mark Salyzyn. 3) Fix several clang issues on powerpc in selftests, from Tanner Love. 4) cmsghdr_from_user_compat_to_kern() uses the wrong length, from Al Viro. 5)

Re: [PATCH net-next] fib: fix another fib_rules_ops indirect call wrapper problem

2020-08-01 Thread David Miller
From: Brian Vazquez Date: Fri, 31 Jul 2020 20:01:10 -0700 > It turns out that on commit 41d707b7332f ("fib: fix fib_rules_ops > indirect calls wrappers") I forgot to include the case when > CONFIG_IP_MULTIPLE_TABLES is not set. > > Fixes: 41d707b7332f ("fib: fix fib_rules_ops indirect calls

Re: [PATCH net-next] tun: add missing rcu annotation in tun_set_ebpf()

2020-07-31 Thread David Miller
From: Jason Wang Date: Fri, 31 Jul 2020 00:17:20 -0400 > We expecte prog_p to be protected by rcu, so adding the rcu annotation > to fix the following sparse warning: > > drivers/net/tun.c:3003:36: warning: incorrect type in argument 2 (different > address spaces) > drivers/net/tun.c:3003:36:

Re: [Linux-kernel-mentees] [PATCH net] rds: Prevent kernel-infoleak in rds_notify_queue_get()

2020-07-31 Thread David Miller
From: Peilin Ye Date: Thu, 30 Jul 2020 15:20:26 -0400 > rds_notify_queue_get() is potentially copying uninitialized kernel stack > memory to userspace since the compiler may leave a 4-byte hole at the end > of `cmsg`. > > In 2016 we tried to fix this issue by doing `= { 0 };` on `cmsg`, which >

Re: [PATCH][next] net/sched: cls_u32: Use struct_size() helper

2020-07-31 Thread David Miller
From: "Gustavo A. R. Silva" Date: Thu, 30 Jul 2020 11:03:14 -0500 > Make use of the struct_size() helper, in multiple places, instead > of an open-coded version in order to avoid any potential type > mistakes and protect against potential integer overflows. > > Also, remove unnecessary object

Re: [PATCH] net: Pass NULL to skb_network_protocol() when we don't care about vlan depth

2020-07-31 Thread David Miller
From: linmiaohe Date: Thu, 30 Jul 2020 19:02:36 +0800 > From: Miaohe Lin > > When we don't care about vlan depth, we could pass NULL instead of the > address of a unused local variable to skb_network_protocol() as a param. > > Signed-off-by: Miaohe Lin Applied to net-next, thanks.

Re: [PATCH v2] seg6_iptunnel: Refactor seg6_lwt_headroom out of uapi header

2020-07-31 Thread David Miller
From: Ioana-Ruxandra Stancioi Date: Fri, 31 Jul 2020 07:40:32 + > --- a/net/ipv6/seg6_iptunnel.c > +++ b/net/ipv6/seg6_iptunnel.c > @@ -27,6 +27,23 @@ > #include > #endif > > +static inline size_t seg6_lwt_headroom(struct seg6_iptunnel_encap *tuninfo) > +{ Please remove the inline tag

Re: [PATCH net] net: gemini: Fix missing clk_disable_unprepare() in error path of gemini_ethernet_port_probe()

2020-07-30 Thread David Miller
From: Wang Hai Date: Thu, 30 Jul 2020 15:30:00 +0800 > Fix the missing clk_disable_unprepare() before return > from gemini_ethernet_port_probe() in the error handling case. > > Fixes: 4d5ae32f5e1e ("net: ethernet: Add a driver for Gemini gigabit > ethernet") > Reported-by: Hulk Robot >

Re: [PATCH net] net: ll_temac: Use devm_platform_ioremap_resource_byname()

2020-07-30 Thread David Miller
From: Wang Hai Date: Thu, 30 Jul 2020 15:24:19 +0800 > platform_get_resource() may fail and return NULL, so we had better > check its return value to avoid a NULL pointer dereference a bit later > in the code. Fix it to use devm_platform_ioremap_resource_byname() > instead of calling

Re: [PATCH v1 0/3] net: ethernet: use generic power management

2020-07-30 Thread David Miller
From: Vaibhav Gupta Date: Thu, 30 Jul 2020 12:23:33 +0530 > Linux Kernel Mentee: Remove Legacy Power Management. > > The purpose of this patch series is to upgrade power management in net > ethernet > drivers. This has been done by upgrading .suspend() and .resume() callbacks. > > The upgrade

Re: [PATCH -next] bnxt_en: Remove superfluous memset()

2020-07-30 Thread David Miller
From: Li Heng Date: Thu, 30 Jul 2020 14:43:50 +0800 > Fixes coccicheck warning: > > ./drivers/net/ethernet/broadcom/bnxt/bnxt.c:3730:19-37: WARNING: > dma_alloc_coherent use in stats -> hw_stats already zeroes out > memory, so memset is not needed > > dma_alloc_coherent use in status already

Re: [PATCH net-next] liquidio: Replace vmalloc with kmalloc in octeon_register_dispatch_fn()

2020-07-30 Thread David Miller
From: Wang Hai Date: Thu, 30 Jul 2020 14:11:40 +0800 > The size of struct octeon_dispatch is too small, it is better to use > kmalloc instead of vmalloc. > > Suggested-by: Joe Perches > Signed-off-by: Wang Hai Applied, thank you.

Re: [PATCH][next] mlxsw: spectrum_cnt: Use flex_array_size() helper in memcpy()

2020-07-30 Thread David Miller
From: "Gustavo A. R. Silva" Date: Wed, 29 Jul 2020 17:58:03 -0500 > Make use of the flex_array_size() helper to calculate the size of a > flexible array member within an enclosing structure. > > This helper offers defense-in-depth against potential integer > overflows, while at the same time

Re: [PATCH][next] net/sched: act_pedit: Use flex_array_size() helper in memcpy()

2020-07-30 Thread David Miller
From: "Gustavo A. R. Silva" Date: Wed, 29 Jul 2020 22:17:00 -0500 > Make use of the flex_array_size() helper to calculate the size of a > flexible array member within an enclosing structure. > > This helper offers defense-in-depth against potential integer > overflows, while at the same time

Re: [PATCH] atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent

2020-07-30 Thread David Miller
From: Xin Xiong Date: Wed, 29 Jul 2020 21:06:59 +0800 > atmtcp_remove_persistent() invokes atm_dev_lookup(), which returns a > reference of atm_dev with increased refcount or NULL if fails. > > The refcount leaks issues occur in two error handling paths. If > dev_data->persist is zero or

Re: [PATCH v4] net: ethernet: mtk_eth_soc: fix MTU warnings

2020-07-30 Thread David Miller
From: Frank Wunderlich Date: Wed, 29 Jul 2020 10:15:17 +0200 > From: Landen Chao > > in recent kernel versions there are warnings about incorrect MTU size > like these: > > eth0: mtu greater than device maximum > mtk_soc_eth 1b10.ethernet eth0: error -22 setting MTU to include DSA >

Re: [PATCH] net: nixge: fix potential memory leak in nixge_probe()

2020-07-30 Thread David Miller
From: Lu Wei Date: Wed, 29 Jul 2020 11:50:05 +0800 > If some processes in nixge_probe() fail, free_netdev(dev) > needs to be called to aviod a memory leak. > > Fixes: 87ab207981ec ("net: nixge: Separate ctrl and dma resources") > Fixes: abcd3d6fc640 ("net: nixge: Fix error path for obtaining

Re: [PATCH net] rxrpc: Fix race between recvmsg and sendmsg on immediate call failure

2020-07-30 Thread David Miller
From: David Howells Date: Wed, 29 Jul 2020 00:03:56 +0100 > There's a race between rxrpc_sendmsg setting up a call, but then failing to > send anything on it due to an error, and recvmsg() seeing the call > completion occur and trying to return the state to the user. > > An assertion fails in

Re: [PATCH] hv_netvsc: Add validation for untrusted Hyper-V values

2020-07-30 Thread David Miller
From: Andres Beltran Date: Tue, 28 Jul 2020 18:53:21 -0400 > For additional robustness in the face of Hyper-V errors or malicious > behavior, validate all values that originate from packets that Hyper-V > has sent to the guest in the host-to-guest ring buffer. Ensure that > invalid values cannot

Re: [PATCH net] ptp: ptp_clockmatrix: update to support 4.8.7 firmware

2020-07-30 Thread David Miller
From: Date: Tue, 28 Jul 2020 16:00:30 -0400 > From: Min Li > > With 4.8.7 firmware, adjtime can change delta instead of absolute time, > which greately increases snap accuracy. PPS alignment doesn't have to > be set for every single TOD change. Other minor changes includes: > adding more debug

Re: [net-next] seg6: using DSCP of inner IPv4 packets

2020-07-30 Thread David Miller
From: Ahmed Abdelsalam Date: Tue, 28 Jul 2020 12:20:44 + > This patch allows copying the DSCP from inner IPv4 header to the > outer IPv6 header, when doing SRv6 Encapsulation. > > This allows forwarding packet across the SRv6 fabric based on their > original traffic class. > >

Re: [PATCH] MAINTAINERS: Replace Thor Thayer as Altera Triple Speed Ethernet maintainer

2020-07-30 Thread David Miller
From: "Ooi, Joyce" Date: Mon, 27 Jul 2020 17:46:41 +0800 > From: Joyce Ooi > > This patch is to replace Thor Thayer as Altera Triple Speed Ethernet > maintainer as he is moving to a different role. > > Signed-off-by: Joyce Ooi Applied.

Re: [PATCH] net/ipv4: add comment about connect() to INADDR_ANY

2020-07-30 Thread David Miller
From: Konstantin Khlebnikov Date: Sat, 25 Jul 2020 20:22:50 +0300 > Copy comment from net/ipv6/tcp_ipv6.c to help future readers. > > Signed-off-by: Konstantin Khlebnikov This function is used by many lookups, not just connect() so the comment is entirely inapropriate here. I'm not applying

Re: [PATCH net] tcp: Export tcp_write_queue_purge()

2020-07-30 Thread David Miller
From: Florian Fainelli Date: Thu, 30 Jul 2020 14:23:50 -0700 > On 7/30/20 2:16 PM, Eric Dumazet wrote: >> On Thu, Jul 30, 2020 at 2:07 PM Florian Fainelli >> wrote: >> Hmmm which module would need this exactly ? > > None in tree unfortunately, and I doubt it would be published one day. >

Re: [PATCH] net/mlx5e: fix bpf_prog refcnt leaks in mlx5e_alloc_rq

2020-07-29 Thread David Miller
From: Saeed Mahameed Date: Wed, 29 Jul 2020 19:02:15 + > On Wed, 2020-07-29 at 20:33 +0800, Xin Xiong wrote: >> The function invokes bpf_prog_inc(), which increases the refcount of >> a >> bpf_prog object "rq->xdp_prog" if the object isn't NULL. >> >> The refcount leak issues take place in

Re: [PATCH net-next] fib: fix fib_rules_ops indirect calls wrappers

2020-07-29 Thread David Miller
From: Brian Vazquez Date: Wed, 29 Jul 2020 11:10:18 -0700 > This patch fixes: > commit b9aaec8f0be5 ("fib: use indirect call wrappers in the most common > fib_rules_ops") which didn't consider the case when > CONFIG_IPV6_MULTIPLE_TABLES is not set. > > Reported-by: Stephen Rothwell > Fixes:

Re: [PATCH] uapi, seg6_iptunnel: Add missing include in seg6_iptunnel.h

2020-07-29 Thread David Miller
From: Ioana-Ruxandra Stancioi Date: Wed, 29 Jul 2020 10:49:03 + > From: Ioana-Ruxandra Stăncioi > > Include in uapi/linux/seg6_iptunnel.h to fix the > following linux/seg6_iptunnel.h compilation error: > >invalid application of 'sizeof' to incomplete type 'struct ipv6hdr' >

Re: [PATCH net-next v2] net: mvneta: fix comment about phylink_speed_down

2020-07-29 Thread David Miller
From: Jisheng Zhang Date: Wed, 29 Jul 2020 17:49:09 +0800 > mvneta has switched to phylink, so the comment should look > like "We may have called phylink_speed_down before". > > Signed-off-by: Jisheng Zhang > --- > Since v1: > - drop patch2 which tries to avoid link flapping when changing

Re: [PATCH net-nex 2/2] net: mvneta: Don't speed down the PHY when changing mtu

2020-07-28 Thread David Miller
From: Jisheng Zhang Date: Mon, 27 Jul 2020 19:53:14 +0800 > @@ -3651,7 +3651,8 @@ static void mvneta_stop_dev(struct mvneta_port *pp) > > set_bit(__MVNETA_DOWN, >state); > > - if (device_may_wakeup(>dev->dev)) > + if (device_may_wakeup(>dev->dev) && > + pp->pkt_size ==

Re: [PATCH 0/5] net: stmmac: improve WOL

2020-07-28 Thread David Miller
From: Jisheng Zhang Date: Mon, 27 Jul 2020 19:01:07 +0800 > Currently, stmmac driver relies on the HW PMT to support WOL. We want > to support phy based WOL. > > patch1 is a small improvement to disable WAKE_MAGIC for PMT case if > no pmt_magic_frame. > patch2 and patch3 are two prepation

Re: [PATCH V2 net-next] fib: use indirect call wrappers in the most common fib_rules_ops

2020-07-28 Thread David Miller
From: Brian Vazquez Date: Sun, 26 Jul 2020 15:48:16 -0700 > This avoids another inderect call per RX packet which save us around > 20-40 ns. > > Changelog: > > v1 -> v2: > - Move declaraions to fib_rules.h to remove warnings > > Reported-by: kernel test robot > Signed-off-by: Brian Vazquez

Re: [PATCH v2] net: ipv6: fix use-after-free Read in __xfrm6_tunnel_spi_lookup

2020-07-28 Thread David Miller
From: B K Karthik Date: Sun, 26 Jul 2020 08:38:55 +0530 > @@ -103,10 +103,10 @@ static int __xfrm6_tunnel_spi_check(struct net *net, > u32 spi) > { > struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net); > struct xfrm6_tunnel_spi *x6spi; > - int index =

Re: [PATCH] net: ipv6: fix slab-out-of-bounds Read in __xfrm6_tunnel_spi_check

2020-07-28 Thread David Miller
From: B K Karthik Date: Sat, 25 Jul 2020 19:00:31 +0530 > use spi_byaddr instead of spi_byspi ... > diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c > index 25b7ebda2fab..cab7693ccfe3 100644 > --- a/net/ipv6/xfrm6_tunnel.c > +++ b/net/ipv6/xfrm6_tunnel.c > @@ -103,10 +103,10 @@

Re: [PATCH] net: ipv6: fix slab-out-of-bounda Read in xfrm6_tunnel_alloc_spi

2020-07-28 Thread David Miller
From: B K Karthik Date: Sat, 25 Jul 2020 18:15:53 +0530 > fix slab-out-of-bounds Read in xfrm6_tunnel_alloc_spi > by checking for existance of head for the list spi_byspi spi_byspi is an array, therefore as long as xfrm6_tn is not NULL then spi_byspi will also not be NULL.

Re: [PATCH] ipv6: Fix nexthop refcnt leak when creating ipv6 route info

2020-07-28 Thread David Miller
From: Xiyu Yang Date: Sat, 25 Jul 2020 16:02:18 +0800 > ip6_route_info_create() invokes nexthop_get(), which increases the > refcount of the "nh". > > When ip6_route_info_create() returns, local variable "nh" becomes > invalid, so the refcount should be decreased to keep refcount balanced. > >

Re: [PATCH net-next v5 0/2] hinic: add some error messages for debug

2020-07-28 Thread David Miller
From: Luo bin Date: Sat, 25 Jul 2020 15:11:17 +0800 > patch #1: support to handle hw abnormal event > patch #2: improve the error messages when functions return failure and > dump relevant registers in some exception handling processes Series applied, thanks.

Re: [PATCH] net: ethernet: mtk_eth_soc: Always call mtk_gmac0_rgmii_adjust() for mt7623

2020-07-28 Thread David Miller
From: David Woodhouse Date: Thu, 23 Jul 2020 20:07:10 +0100 > From: René van Dorst > > Modify mtk_gmac0_rgmii_adjust() so it can always be called. > mtk_gmac0_rgmii_adjust() sets-up the TRGMII clocks. > > Signed-off-by: René van Dorst > Signed-off-By: David Woodhouse > Tested-by: Frank

Re: [PATCH net 0/3] net: lan78xx: fix NULL deref and memory leak

2020-07-28 Thread David Miller
From: Johan Hovold Date: Tue, 28 Jul 2020 14:10:28 +0200 > The first two patches fix a NULL-pointer dereference at probe that can > be triggered by a malicious device and a small transfer-buffer memory > leak, respectively. > > For another subsystem I would have marked them: > > Cc:

Re: [PATCH] usb: hso: check for return value in hso_serial_common_create()

2020-07-28 Thread David Miller
From: Rustam Kovhaev Date: Mon, 27 Jul 2020 23:42:17 -0700 > in case of an error tty_register_device_attr() returns ERR_PTR(), > add IS_ERR() check > > Reported-and-tested-by: syzbot+67b2bd0e34f952d03...@syzkaller.appspotmail.com > Link:

Re: [PATCH v1] farsync: use generic power management

2020-07-28 Thread David Miller
From: Vaibhav Gupta Date: Tue, 28 Jul 2020 09:58:10 +0530 > The .suspend() and .resume() callbacks are not defined for this driver. > Still, their power management structure follows the legacy framework. To > bring it under the generic framework, simply remove the binding of > callbacks from

Re: [PATCH net 0/5] net: hns3: fixes for -net

2020-07-28 Thread David Miller
From: Huazhong Tan Date: Tue, 28 Jul 2020 10:16:47 +0800 > There are some bugfixes for the HNS3 ethernet driver. patch#1 fixes > a desc filling bug, patch#2 fixes a false TX timeout issue, and > patch#3~#5 fixes some bugs related to VLAN and FD. Series applied, thank you.

Re: [PATCH net] fix a braino in cmsghdr_from_user_compat_to_kern()

2020-07-27 Thread David Miller
From: Al Viro Date: Mon, 27 Jul 2020 19:22:20 +0100 > commit 547ce4cfb34c ("switch cmsghdr_from_user_compat_to_kern() to > copy_from_user()") missed one of the places where ucmlen should've been > replaced with cmsg.cmsg_len, now that we are fetching the entire struct > rather than doing

Re: [PATCH][next] net/mlx5: Use fallthrough pseudo-keyword

2020-07-27 Thread David Miller
From: "Gustavo A. R. Silva" Date: Mon, 27 Jul 2020 13:03:56 -0500 > Replace the existing /* fall through */ comments and its variants with > the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary > fall-through markings when it is the case. > > [1] >

Re: [PATCH][next] net/mlx4: Use fallthrough pseudo-keyword

2020-07-27 Thread David Miller
From: "Gustavo A. R. Silva" Date: Mon, 27 Jul 2020 12:55:26 -0500 > Replace the existing /* fall through */ comments and its variants with > the new pseudo-keyword macro fallthrough[1]. > > [1] >

Re: [PATCH] soc: qmi: allow user to set handle wq to hiprio

2020-07-27 Thread David Miller
From: 王文虎 Date: Mon, 27 Jul 2020 23:03:16 +0800 (GMT+08:00) > Currently the qmi_handle is initialized single threaded and strictly > ordered with the active set to 1. This is pretty simple and safe but > sometimes ineffency. So it is better to allow user to decide whether > a high priority

Re: [PATCH] qed: fix assignment of n_rq_elems to incorrect params field

2020-07-27 Thread David Miller
From: Jason Gunthorpe Date: Mon, 27 Jul 2020 13:17:39 -0300 > On Mon, Jul 27, 2020 at 03:17:12PM +0100, Colin King wrote: >> From: Colin Ian King >> >> Currently n_rq_elems is being assigned to params.elem_size instead of the >> field params.num_elems. Coverity is detecting this as a double

Re: [PATCH] net: tipc: fix general protection fault in tipc_conn_delete_sub

2020-07-27 Thread David Miller
From: kernel test robot Date: Mon, 27 Jul 2020 23:52:50 +0800 > All warnings (new ones prefixed by >>): > >net/tipc/topsrv.c: In function 'tipc_conn_send_to_sock': >>> net/tipc/topsrv.c:259:10: warning: 'return' with a value, in function >>> returning void [-Wreturn-type] > 259 |

Re: [net-next v4 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-07-27 Thread David Miller
From: Vadym Kochan Date: Mon, 27 Jul 2020 15:22:37 +0300 > + /* called by device driver to pass event up to the higher layer */ > + int (*recv_msg)(struct prestera_device *dev, u8 *msg, size_t size); > + > + /* called by higher layer to send request to the firmware */ > + int

Re: [net-next v5 PATCH 0/7] Add PRP driver

2020-07-27 Thread David Miller
From: Murali Karicheri Date: Wed, 22 Jul 2020 10:40:15 -0400 > This series is dependent on the following patches sent out to > netdev list. All (1-3) are already merged to net/master as of > sending this, but not on the net-next master branch. So need > to apply them to net-next before applying

Re: [PATCH net-next] qed: fix the allocation of the chains with an external PBL

2020-07-27 Thread David Miller
From: Alexander Lobakin Date: Mon, 27 Jul 2020 14:51:33 +0300 > Dan reports static checker warning: > > "The patch 9b6ee3cf95d3: "qed: sanitize PBL chains allocation" from Jul > 23, 2020, leads to the following static checker warning: > > drivers/net/ethernet/qlogic/qed/qed_chain.c:299

Re: [PATCH net] mptcp: fix joined subflows with unblocking sk

2020-07-27 Thread David Miller
From: Matthieu Baerts Date: Mon, 27 Jul 2020 12:24:33 +0200 > Unblocking sockets used for outgoing connections were not containing > inet info about the initial connection due to a typo there: the value of > "err" variable is negative in the kernelspace. > > This fixes the creation of

Re: [PATCH] [net/ipv6] ip6_output: Add ipv6_pinfo null check

2020-07-27 Thread David Miller
From: Gaurav Singh Date: Sun, 26 Jul 2020 23:38:10 -0400 > ipv6_pinfo is initlialized by inet6_sk() which returns NULL. > Hence it can cause segmentation fault. Fix this by adding a > NULL check. Please take your time with such changes and actually look at the compiler output, it will warn

Re: [PATCH] net: dev: Add API to check net_dev readiness

2020-07-27 Thread David Miller
From: Andrew Lunn Date: Sun, 26 Jul 2020 21:45:28 +0200 > I also have to wonder why a network device driver is being probed the > subsys_initcall. This makes me wonder how this interface could even be useful. The only way to fix the problem is to change when the device is probed, which would

Re: [PATCH 4/7] net/mlx5: drop unnecessary list_empty

2020-07-27 Thread David Miller
From: Julia Lawall Date: Sun, 26 Jul 2020 12:58:29 +0200 > list_for_each_entry is able to handle an empty list. > The only effect of avoiding the loop is not initializing the > index variable. > Drop list_empty tests in cases where these variables are not > used. > > Note that

Re: [PATCH 2/7] sfc: drop unnecessary list_empty

2020-07-27 Thread David Miller
From: Julia Lawall Date: Sun, 26 Jul 2020 12:58:27 +0200 > list_for_each_safe is able to handle an empty list. > The only effect of avoiding the loop is not initializing the > index variable. > Drop list_empty tests in cases where these variables are not > used. > > The semantic patch that

Re: get rid of the address_space override in setsockopt v2

2020-07-26 Thread David Miller
From: Christoph Hellwig Date: Sun, 26 Jul 2020 09:03:11 +0200 > On Fri, Jul 24, 2020 at 03:43:42PM -0700, David Miller wrote: >> > Changes since v1: >> > - check that users don't pass in kernel addresses >> > - more bpfilter cleanups >> > - cosmetic m

[GIT] Networking

2020-07-24 Thread David Miller
1) Fix RCU locaking in iwlwifi, from Johannes Berg. 2) mt76 can access uninitialized NAPI struct, from Felix Fietkau. 3) Fix race in updating pause settings in bnxt_en, from Vasundhara Volam. 4) Propagate error return properly during unbind failures in ax88172a, from George Kennedy. 5)

Re: [PATCH] drivers/net/wan: lapb: Corrected the usage of skb_cow

2020-07-24 Thread David Miller
From: Xie He Date: Fri, 24 Jul 2020 09:33:47 -0700 > This patch fixed 2 issues with the usage of skb_cow in LAPB drivers > "lapbether" and "hdlc_x25": > > 1) After skb_cow fails, kfree_skb should be called to drop a reference > to the skb. But in both drivers, kfree_skb is not called. > > 2)

Re: [PATCH v2 0/3] net: dsa: mv88e6xxx: port mtu support

2020-07-24 Thread David Miller
From: Chris Packham Date: Fri, 24 Jul 2020 11:21:19 +1200 > This series connects up the mv88e6xxx switches to the dsa infrastructure for > configuring the port MTU. The first patch is also a bug fix which might be a > candiatate for stable. > > I've rebased this series on top of net-next/master

Re: [PATCH] net: cdc_ncm: USB_NET_CDC_NCM selects USB_NET_CDCETHER

2020-07-24 Thread David Miller
From: t...@redhat.com Date: Thu, 23 Jul 2020 07:22:10 -0700 > From: Tom Rix > > A link error > > ld: drivers/net/usb/cdc_ncm.o: > undefined reference to `usbnet_cdc_update_filter' > > usbnet_cdc_update_filter is defined in cdc_ether.c > Building of cdc_ether.o is controlled by

Re: [PATCH 1/2] net: ipa: new notification infrastructure

2020-07-24 Thread David Miller
From: Alex Elder Date: Fri, 24 Jul 2020 13:11:41 -0500 > Use the new SSR notifier infrastructure to request notifications of > modem events, rather than the remoteproc IPA notification system. > The latter was put in place temporarily with the knowledge that the > new mechanism would become

Re: [net-next v2 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

2020-07-24 Thread David Miller
From: Vadym Kochan Date: Fri, 24 Jul 2020 17:19:52 +0300 > +int prestera_dsa_parse(struct prestera_dsa *dsa, const u8 *dsa_buf) > +{ > + u32 *dsa_words = (u32 *)dsa_buf; ... > + words[0] = ntohl((__force __be32)dsa_words[0]); > + words[1] = ntohl((__force __be32)dsa_words[1]); > +

Re: [PATCH][V2] sctp: remove redundant initialization of variable status

2020-07-24 Thread David Miller
From: Colin King Date: Fri, 24 Jul 2020 14:09:19 +0100 > From: Colin Ian King > > The variable status is being initialized with a value that is never read > and it is being updated later with a new value. The initialization is > redundant and can be removed. Also put the variable

Re: [PATCH net-next v4 1/2] hinic: add support to handle hw abnormal event

2020-07-24 Thread David Miller
From: Luo bin Date: Fri, 24 Jul 2020 17:17:31 +0800 > +static int hinic_fw_reporter_dump(struct devlink_health_reporter *reporter, > + struct devlink_fmsg *fmsg, void *priv_ctx, > + struct netlink_ext_ack *extack) > +{ > + int err;

Re: [PATCH v2] xen-netfront: fix potential deadlock in xennet_remove()

2020-07-24 Thread David Miller
ange, > to avoid getting stuck forever in wait_event(). > > Signed-off-by: Andrea Righi > --- > Changes in v2: > - remove all dev_dbg() calls (as suggested by David Miller) Applied, thank you.

Re: [PATCH] octeontx2-af: Fix use of uninitialized pointer bmap

2020-07-24 Thread David Miller
From: Dinghao Liu Date: Fri, 24 Jul 2020 16:06:57 +0800 > If req->ctype does not match any of NIX_AQ_CTYPE_CQ, > NIX_AQ_CTYPE_SQ or NIX_AQ_CTYPE_RQ, pointer bmap will remain > uninitialized and be accessed in test_bit(), which can lead > to kernal crash. This can never happen. > Fix this by

Re: [PATCH 3/3] sparc: Drop unused MAX_PHYSADDR_BITS

2020-07-24 Thread David Miller
From: Arvind Sankar Date: Thu, 23 Jul 2020 19:15:44 -0400 > The macro is not used anywhere, so remove the definition. > > Signed-off-by: Arvind Sankar Acked-by: David S. Miller

Re: get rid of the address_space override in setsockopt v2

2020-07-24 Thread David Miller
From: Christoph Hellwig Date: Thu, 23 Jul 2020 08:08:42 +0200 > setsockopt is the last place in architecture-independ code that still > uses set_fs to force the uaccess routines to operate on kernel pointers. > > This series adds a new sockptr_t type that can contained either a kernel > or user

Re: [net-next v5 PATCH 0/7] Add PRP driver

2020-07-24 Thread David Miller
From: Murali Karicheri Date: Fri, 24 Jul 2020 08:27:01 -0400 > If there are no more comments, can we consider merging this to > net-next? I could re-base and repost if there is any conflict. I can't apply them until I next merge net into net-next, and I don't know exactly when that will happen

Re: [PATCH v8 net-next] net: hyperv: dump TX indirection table to ethtool regs

2020-07-24 Thread David Miller
From: Chi Song Date: Thu, 23 Jul 2020 21:14:26 -0700 > An imbalanced TX indirection table causes netvsc to have low > performance. This table is created and managed during runtime. To help > better diagnose performance issues caused by imbalanced tables, it needs > make TX indirection tables

Re: [PATCH] drivers: isdn: capi: Fix data-race bug

2020-07-23 Thread David Miller
From: madhuparnabhowmi...@gmail.com Date: Wed, 22 Jul 2020 22:53:29 +0530 > From: Madhuparna Bhowmik > > In capi_init(), after register_chrdev() the file operation callbacks > can be called. However capinc_tty_init() is called later. > Since capiminors and capinc_tty_driver are initialized in >

Re: [PATCH] xen-netfront: fix potential deadlock in xennet_remove()

2020-07-23 Thread David Miller
From: Andrea Righi Date: Wed, 22 Jul 2020 08:52:11 +0200 > +static int xennet_remove(struct xenbus_device *dev) > +{ > + struct netfront_info *info = dev_get_drvdata(>dev); > + > + dev_dbg(>dev, "%s\n", dev->nodename); These kinds of debugging messages provide zero context and are so

Re: [PATCH] netlink: add buffer boundary checking

2020-07-23 Thread David Miller
From: Mark Salyzyn Date: Thu, 23 Jul 2020 11:21:32 -0700 > Many of the nla_get_* inlines fail to check attribute's length before > copying the content resulting in possible out-of-boundary accesses. > Adjust the inlines to perform nla_len checking, for the most part > using the nla_memcpy

Re: [PATCH net-next v3 1/2] hinic: add support to handle hw abnormal event

2020-07-23 Thread David Miller
From: Luo bin Date: Thu, 23 Jul 2020 22:40:37 +0800 > +static int hinic_fw_reporter_dump(struct devlink_health_reporter *reporter, > + struct devlink_fmsg *fmsg, void *priv_ctx, > + struct netlink_ext_ack *extack) > +{ > + struct

Re: [PATCH] net/ncsi: use eth_zero_addr() to clear mac address

2020-07-23 Thread David Miller
From: linmiaohe Date: Thu, 23 Jul 2020 19:13:43 +0800 > From: Miaohe Lin > > Use eth_zero_addr() to clear mac address insetad of memset(). > > Signed-off-by: Miaohe Lin Applied.

Re: [PATCH] cxgb4: use eth_zero_addr() to clear mac address

2020-07-23 Thread David Miller
From: linmiaohe Date: Thu, 23 Jul 2020 19:05:00 +0800 > From: Miaohe Lin > > Use eth_zero_addr() to clear mac address insetad of memset(). > > Signed-off-by: Miaohe Lin Applied.

Re: [PATCH v3] cxgb4: add missing release on skb in uld_send()

2020-07-22 Thread David Miller
From: Navid Emamdoost Date: Wed, 22 Jul 2020 21:58:39 -0500 > In the implementation of uld_send(), the skb is consumed on all > execution paths except one. Release skb when returning NET_XMIT_DROP. > > Signed-off-by: Navid Emamdoost Applied, thank you.

Re: [PATCH v2 net-next 00/15] qed, qede: improve chain API and add XDP_REDIRECT support

2020-07-22 Thread David Miller
From: Alexander Lobakin Date: Thu, 23 Jul 2020 01:10:30 +0300 > This series adds missing XDP_REDIRECT case handling in QLogic Everest > Ethernet driver with all necessary prerequisites and ops. > QEDE Tx relies heavily on chain API, so make sure it is in its best > at first. > > v2 (from [1]):

Re: [PATCH v2] cxgb4: add missing release on skb in uld_send()

2020-07-22 Thread David Miller
ing kfree_skb() based on David Miller suggestion. This doesn't apply to any of my networking GIT trees. Please base this on either 'net' or 'net-next' as appropriate, and indicate this in your Subject line f.e. "[PATCH net v2] ..." Thank you.

Re: [PATCH][next] net: qed_hsi.h: Avoid the use of one-element array

2020-07-22 Thread David Miller
From: "Gustavo A. R. Silva" Date: Wed, 22 Jul 2020 13:58:52 -0500 > One-element arrays are being deprecated[1]. Replace the one-element > array with a simple value type '__le32 reserved1'[2], once it seems > this is just a placeholder for alignment. > > [1]

Re: [PATCH][next] bna: bfi.h: Avoid the use of one-element array

2020-07-22 Thread David Miller
From: "Gustavo A. R. Silva" Date: Wed, 22 Jul 2020 13:50:24 -0500 > One-element arrays are being deprecated[1]. Replace the one-element > array with a simple value type 'u8 rsvd'[2], once it seems this is > just a placeholder for alignment. > > [1] https://github.com/KSPP/linux/issues/79 > [2]

Re: [PATCH][next] tg3: Avoid the use of one-element array

2020-07-22 Thread David Miller
From: "Gustavo A. R. Silva" Date: Wed, 22 Jul 2020 13:43:58 -0500 > One-element arrays are being deprecated[1]. Replace the one-element > array with a simple value type 'u32 reserved2'[2], once it seems > this is just a placeholder for alignment. > > [1] https://github.com/KSPP/linux/issues/79

Re: [PATCH][next] ionic: fix memory leak of object 'lid'

2020-07-22 Thread David Miller
From: Colin King Date: Wed, 22 Jul 2020 18:40:03 +0100 > From: Colin Ian King > > Currently when netdev fails to allocate the error return path > fails to free the allocated object 'lid'. Fix this by setting > err to the return error code and jumping to a new label that > performs the kfree

<    2   3   4   5   6   7   8   9   10   11   >