[PATCH] ethernet: (niu) fix missing checks of niu_pci_eeprom_read

2018-12-24 Thread Kangjie Lu
niu_pci_eeprom_read() may fail, so we should check its return value before using the read data. Signed-off-by: Kangjie Lu --- drivers/net/ethernet/sun/niu.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/ni

[PATCH] ethernet: (80003es2lan) fix missing checks for return value of reg write

2018-12-24 Thread Kangjie Lu
e1000_write_kmrn_reg_80003es2lan() may fail. The fix checks its return value and returns with its error code if it fails. Signed-off-by: Kangjie Lu --- drivers/net/ethernet/intel/e1000e/80003es2lan.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/

Re: [PATCH] bpf: fix missing checks of the return value of check_reg_arg

2018-12-24 Thread Alexei Starovoitov
On Tue, Dec 25, 2018 at 01:17:10AM -0600, Kangjie Lu wrote: > check_reg_arg() may fail. This fix inserts checks for its return value. > If check_reg_arg() fails, issues an error message. > > Signed-off-by: Kangjie Lu > --- > kernel/bpf/verifier.c | 15 --- > 1 file changed, 12 insert

[PATCH] bpf: fix missing checks of the return value of check_reg_arg

2018-12-24 Thread Kangjie Lu
check_reg_arg() may fail. This fix inserts checks for its return value. If check_reg_arg() fails, issues an error message. Signed-off-by: Kangjie Lu --- kernel/bpf/verifier.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/v

Re: [PATCH net] net: dccp: fix kernel crash on module load

2018-12-24 Thread David Miller
From: Peter Oskolkov Date: Mon, 24 Dec 2018 12:57:17 -0800 > Patch eedbbb0d98b2 "net: dccp: initialize (addr,port) ..." > added calling to inet_hashinfo2_init() from dccp_init(). > > However, inet_hashinfo2_init() is marked as __init(), and > thus the kernel panics when dccp is loaded as module.

Re: rfc: bool structure members (was Re: [PATCH V3] net/mlx4: Get rid of page operation after dma_alloc_coherent)

2018-12-24 Thread Jason Gunthorpe
On Sun, Dec 23, 2018 at 06:42:20PM +0200, Gal Pressman wrote: > On 22-Dec-18 01:52, Jason Gunthorpe wrote: > > On Thu, Dec 20, 2018 at 09:12:43PM -0800, Joe Perches wrote: > >> Care to submit a coding_style.rst patch or > >> improve the one below this? > > > > I took yours and revised it a little

Re: [PATCH][V2] drivers/net: appletalk/cops: remove redundant if statement and mask

2018-12-24 Thread David Miller
From: Colin King Date: Mon, 24 Dec 2018 19:41:46 + > From: Colin Ian King > > The two different assignments for pkt_len are actually the same and > so the if statement is redundant and can be removed. Masking a u8 > return value from inb() with 0xFF is also redundant and can also be > emov

Re: [PATCH v2] bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw

2018-12-24 Thread David Miller
From: Ivan Mironov Date: Mon, 24 Dec 2018 20:13:05 +0500 > This happened when I tried to boot normal Fedora 29 system with latest > available kernel (from fedora rawhide, plus some unrelated custom > patches): ... > After some investigation I figured out that recently added cleanup code > tries

Re: [PATCH] net/net_namespace: Check the return value of register_pernet_subsys()

2018-12-24 Thread David Miller
From: Aditya Pakki Date: Sun, 23 Dec 2018 19:42:38 -0600 > In net_ns_init(), register_pernet_subsys() could fail while registering > network namespace subsystems. The fix checks the return value and > sends a panic() on failure. > > Signed-off-by: Aditya Pakki Applied.

Re: [PATCH] net/netlink_compat: Fix a missing check of nla_parse_nested

2018-12-24 Thread David Miller
From: Aditya Pakki Date: Sun, 23 Dec 2018 18:54:53 -0600 > In tipc_nl_compat_sk_dump(), if nla_parse_nested() fails, it could return > an error. To be consistent with other invocations of the function call, > on error, the fix passes the return value upstream. > > Signed-off-by: Aditya Pakki A

Re: [BUG] net: sungem: device driver frees DMA memory with wrong function

2018-12-24 Thread David Miller
From: Corentin Labbe Date: Sun, 23 Dec 2018 20:38:21 +0100 > During a boot on a qemu machine, I hit the following problem: ... > After some pr_info, I found that the function triggering this is the > pci_unmap_page() in gem_tx(). > So clearly this WARNING() is strange since it says "unmapped as

Re: [PATCH net] ieee802154: lowpan_header_create check must check daddr

2018-12-24 Thread David Miller
From: Willem de Bruijn Date: Sun, 23 Dec 2018 12:52:18 -0500 > From: Willem de Bruijn > > Packet sockets may call dev_header_parse with NULL daddr. Make > lowpan_header_ops.create fail. > > Fixes: 87a93e4eceb4 ("ieee802154: change needed headroom/tailroom") > Signed-off-by: Willem de Bruijn

Re: [PATCH net] net: phy: fix phy_init_hw fixup handling

2018-12-24 Thread David Miller
From: Heiner Kallweit Date: Sun, 23 Dec 2018 15:00:26 +0100 > Currently we return immediately if callback config_init isn't defined. > This prevents the fixups from being executed. I see no dependency > between fixups and config_init, therefore change the function to > run the fixups also if conf

Re: [PATCH] net/mlx5e: fix semicolon.cocci warnings

2018-12-24 Thread David Miller
From: kbuild test robot Date: Sat, 22 Dec 2018 20:02:16 +0800 > From: kbuild test robot > > drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:1339:57-58: Unneeded > semicolon > > > Remove unneeded semicolon. > > Generated by: scripts/coccinelle/misc/semicolon.cocci > > Fixes: 4c8fb2986d44

Re: [PATCH] iptunnel: Set tun_flags in the iptunnel_metadata_reply from src

2018-12-24 Thread David Miller
From: we...@ucloud.cn Date: Sun, 23 Dec 2018 16:18:39 +0800 > From: wenxu > > ip l add tun type gretap external > ip r a 10.0.0.2 encap ip id 1000 dst 172.168.0.2 key dev tun > ip a a 10.0.0.1/24 dev tun > > The peer arp request to 10.0.0.1 with tunnel_id, but the arp reply > only set the tun_i

Re: [PATCH] dt-bindings: net: dsa: ksz9477: fix indentation for switch spi bindings

2018-12-24 Thread David Miller
From: Sergio Paracuellos Date: Sat, 22 Dec 2018 08:39:09 +0100 > Switch bindings for spi managed mode are using spaces instead of tabs. > Fix them to get a file with a proper kernel indentation style. > > Signed-off-by: Sergio Paracuellos This doesn't apply to any of my trees so I'm going to a

Re: rfc: bool structure members (was Re: [PATCH V3] net/mlx4: Get rid of page operation after dma_alloc_coherent)

2018-12-24 Thread Jason Gunthorpe
On Sun, Dec 23, 2018 at 04:53:12PM +, Al Viro wrote: > On Sun, Dec 23, 2018 at 06:42:20PM +0200, Gal Pressman wrote: > > > -17) Don't re-invent the kernel macros > > > +17) Using bool > > > +-- > > > + > > > +The Linux kernel uses the C11 standard for the bool type. bool values > >

[PATCH] net: chelsio: Add a missing check on cudg_get_buffer

2018-12-24 Thread Aditya Pakki
cudbg_collect_hw_sched() could fail when the function cudg_get_buffer() returns an error. The fix adds a check to the latter function returning error on failure Signed-off-by: Aditya Pakki --- drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 4 1 file changed, 4 insertions(+) diff --git a/

Re: [net] eedbbb0d98: RIP:inet_hashinfo2_init

2018-12-24 Thread Peter Oskolkov
A fix sent to netdev: https://patchwork.ozlabs.org/patch/1018304/ On Mon, Dec 24, 2018 at 5:01 AM kernel test robot wrote: > > > FYI, we noticed the following commit (built with gcc-7): > > commit: eedbbb0d98b2a89250a8bb83d9c71b77881e5247 ("net: dccp: initialize > (addr,port) listening hashtable

[PATCH net] net: dccp: fix kernel crash on module load

2018-12-24 Thread Peter Oskolkov
Patch eedbbb0d98b2 "net: dccp: initialize (addr,port) ..." added calling to inet_hashinfo2_init() from dccp_init(). However, inet_hashinfo2_init() is marked as __init(), and thus the kernel panics when dccp is loaded as module. Removing __init() tag from inet_hashinfo2_init() is not feasible becau

[PATCH][V2] drivers/net: appletalk/cops: remove redundant if statement and mask

2018-12-24 Thread Colin King
From: Colin Ian King The two different assignments for pkt_len are actually the same and so the if statement is redundant and can be removed. Masking a u8 return value from inb() with 0xFF is also redundant and can also be emoved. Similarly, the two different outb calls are identical as the mas

Re: [PATCH net-next 0/3] vhost: accelerate metadata access through vmap()

2018-12-24 Thread Michael S. Tsirkin
On Mon, Dec 24, 2018 at 04:44:14PM +0800, Jason Wang wrote: > > On 2018/12/17 上午3:57, Michael S. Tsirkin wrote: > > On Sat, Dec 15, 2018 at 11:43:08AM -0800, David Miller wrote: > > > From: Jason Wang > > > Date: Fri, 14 Dec 2018 12:29:54 +0800 > > > > > > > On 2018/12/14 上午4:12, Michael S. Tsir

Re: [B.A.T.M.A.N.] [PATCH] batman-adv/main: Fix check on return value of rtnl_link_register

2018-12-24 Thread Sven Eckelmann
On Monday, 24 December 2018 18.49.26 CET Aditya Pakki wrote: > rtnl_link_register() may fail and can impact registering the device. > The fix checks the return value and pushes the error upstream. Regarding the commit message - what is "batman-adv/main"? Shouldn't this be "batman-adv: "? And the

Re: [B.A.T.M.A.N.] [PATCH] batman-adv/main: Fix check on return value of rtnl_link_register

2018-12-24 Thread Sven Eckelmann
On Monday, 24 December 2018 18.49.26 CET Aditya Pakki wrote: [...] > diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c > index 69c0d85bceb3..e0007f242823 100644 > --- a/net/batman-adv/main.c > +++ b/net/batman-adv/main.c > @@ -109,7 +109,10 @@ static int __init batadv_init(void) > ba

Re: [PATCH net-next 0/3] vhost: accelerate metadata access through vmap()

2018-12-24 Thread Michael S. Tsirkin
On Mon, Dec 24, 2018 at 04:32:39PM +0800, Jason Wang wrote: > > On 2018/12/14 下午8:33, Michael S. Tsirkin wrote: > > On Fri, Dec 14, 2018 at 11:42:18AM +0800, Jason Wang wrote: > > > On 2018/12/13 下午11:27, Michael S. Tsirkin wrote: > > > > On Thu, Dec 13, 2018 at 06:10:19PM +0800, Jason Wang wrote:

Re: [PATCH] drivers/net: appletalk/cops: remove redundant if statement and mask

2018-12-24 Thread Colin Ian King
On 24/12/2018 18:08, David Miller wrote: > From: Colin King > Date: Sat, 22 Dec 2018 16:58:41 + > >> @@ -777,10 +777,7 @@ static void cops_rx(struct net_device *dev) >> } >> >> /* Get response length. */ >> -if(lp->board==DAYNA) >> -pkt_len = inb(ioaddr) &

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-24 Thread Michael S. Tsirkin
On Mon, Dec 24, 2018 at 03:53:16PM +0800, Jason Wang wrote: > > On 2018/12/14 下午8:36, Michael S. Tsirkin wrote: > > On Fri, Dec 14, 2018 at 11:57:35AM +0800, Jason Wang wrote: > > > On 2018/12/13 下午11:44, Michael S. Tsirkin wrote: > > > > On Thu, Dec 13, 2018 at 06:10:22PM +0800, Jason Wang wrote:

Re: [PATCH] drivers/net: appletalk/cops: remove redundant if statement and mask

2018-12-24 Thread David Miller
From: Colin King Date: Sat, 22 Dec 2018 16:58:41 + > @@ -777,10 +777,7 @@ static void cops_rx(struct net_device *dev) > } > > /* Get response length. */ > - if(lp->board==DAYNA) > - pkt_len = inb(ioaddr) & 0xFF; > - else > - pkt_len = inb(io

Re: [PATCH] net/mlx5e: fix semicolon.cocci warnings

2018-12-24 Thread David Miller
From: Leon Romanovsky Date: Sun, 23 Dec 2018 09:06:13 +0200 > Can you please apply this small fix? Sure, I (eventually) will. I'm just trying to figure out a few procedural issues with handling the early net-next pull request before I start tossing more changes on top. Thanks!

Re: [PATCH net-next] staging: octeon: fix build failure with XFRM enabled

2018-12-24 Thread David Miller
From: Florian Westphal Date: Fri, 21 Dec 2018 21:57:26 +0100 > skb->sp doesn't exist anymore in the next-next tree, so mips defconfig > no longer builds. Use helper instead to reset the secpath. > > Not even compile tested. > > Cc: Greg Kroah-Hartman > Reported-by: Guenter Roeck > Fixes: 416

[PATCH] batman-adv/main: Fix check on return value of rtnl_link_register

2018-12-24 Thread Aditya Pakki
rtnl_link_register() may fail and can impact registering the device. The fix checks the return value and pushes the error upstream. Signed-off-by: Aditya Pakki --- net/batman-adv/main.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/batman-adv/main.c b/net/batman-adv

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-24 Thread Michael S. Tsirkin
On Mon, Dec 24, 2018 at 11:43:31AM +0800, Jason Wang wrote: > > On 2018/12/14 下午9:20, Michael S. Tsirkin wrote: > > On Fri, Dec 14, 2018 at 10:43:03AM +0800, Jason Wang wrote: > > > On 2018/12/13 下午10:31, Michael S. Tsirkin wrote: > > > > > Just to make sure I understand this. It looks to me we sh

[PATCH] ipv6/route: Add a missing check on proc_dointvec

2018-12-24 Thread Aditya Pakki
While flushing the cache via ipv6_sysctl_rtcache_flush(), the call to proc_dointvec() may fail. The fix adds a check that returns the error, on failure. Signed-off-by: Aditya Pakki --- net/ipv6/route.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/ipv6/route.c b/n

RE: [EXT] [PATCH v2] bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw

2018-12-24 Thread Sudarsana Reddy Kalluru
-Original Message- From: Ivan Mironov [mailto:mironov.i...@gmail.com] Sent: 24 December 2018 20:43 To: netdev@vger.kernel.org Cc: Ariel Elior ; Sudarsana Kalluru ; everest-linux...@cavium.com; David S. Miller ; linux-ker...@vger.kernel.org; Sudarsana Reddy Kalluru ; Ivan Mironov Subj

Re: [PATCH v5 6/6] net: lorawan: List LORAWAN in menuconfig

2018-12-24 Thread Alexander Aring
Hi, On Tue, Dec 18, 2018 at 02:50:58PM +0100, Xue Liu wrote: > Hello Andreas, > > On Mon, 17 Dec 2018 at 15:19, Andreas Färber wrote: > > > > Hello Xue Liu, > > > > Am 17.12.18 um 09:50 schrieb Xue Liu: > > > I have a question about the architecture of your module. AFAIK LoRaWAN > > > is already

Re: [PATCH 1/3] treewide: remove explicit rules for *offsets.s

2018-12-24 Thread Masahiro Yamada
On Sun, Dec 23, 2018 at 7:32 PM Masahiro Yamada wrote: > > These explicit rules are unneeded because scripts/Makefile.build > provides a pattern rule to create %.s from %.c > > Signed-off-by: Masahiro Yamada > --- Series, applied to linux-kbuild. > Kbuild | 9 +---

general protection fault in xfrm_policy_insert_list

2018-12-24 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:ce28bb445388 Merge git://git.kernel.org/pub/scm/linux/kern.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=17803ac340 kernel config: https://syzkaller.appspot.com/x/.config?x=67a2081147a23142 da

Re: [PATCH net] ieee802154: lowpan_header_create check must check daddr

2018-12-24 Thread Alexander Aring
On Sun, Dec 23, 2018 at 07:45:08PM -0500, Willem de Bruijn wrote: ... > > I had some questions when I was digging AF_PACKET code. So the UAPI > > limitation of AF_PACKET has a sockaddr_t of 8 bytes. > > Do you mean the size of sll_addr in struct sockaddr_ll? > yes. > It is possible to pass larg

Re: [EXT] [PATCH v1] bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw

2018-12-24 Thread Ivan Mironov
On Mon, 2018-12-24 at 14:26 +, Sudarsana Reddy Kalluru wrote: > Thanks a lot for root-causing the issue and the patch. > Another (simpler) way to address this would be to invoke > bnx2x_del_all_vlans() only for the newer chips, e.g., > + if (!CHIP_IS_E1(bp)) { > /* Remove all curr

[PATCH v2] bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw

2018-12-24 Thread Ivan Mironov
This happened when I tried to boot normal Fedora 29 system with latest available kernel (from fedora rawhide, plus some unrelated custom patches): BUG: unable to handle kernel NULL pointer dereference at PGD 0 P4D 0 Oops: 0010 [#1] SMP PTI CPU: 6 P

RE: [EXT] [PATCH v1] bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw

2018-12-24 Thread Sudarsana Reddy Kalluru
-Original Message- From: Ivan Mironov [mailto:mironov.i...@gmail.com] Sent: 24 December 2018 17:26 To: netdev@vger.kernel.org Cc: Ariel Elior ; Sudarsana Kalluru ; everest-linux...@cavium.com; David S. Miller ; linux-ker...@vger.kernel.org; Ivan Mironov Subject: [EXT] [PATCH v1] bnx2

[PATCH v1] bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw

2018-12-24 Thread Ivan Mironov
This happened when I tried to boot normal Fedora 29 system with latest available kernel (from fedora rawhide, plus some unrelated custom patches): BUG: unable to handle kernel NULL pointer dereference at PGD 0 P4D 0 Oops: 0010 [#1] SMP PTI CPU: 6 P

[PATCH net] net: phy: replace preliminary fix for PHY driver sometimes not binding to the device

2018-12-24 Thread Heiner Kallweit
phy_device_create() uses request_module() to load the PHY driver module based on the PHY ID of the device. There is some timing issue which sometimes prevents the PHY driver to bind to the device. In such cases the genphy driver is used what can cause problems if genphy isn't compatible with the re

net/rose: GPF in rose_route_frame

2018-12-24 Thread Dmitry Vyukov
Hi, Rose device crashes kernel after several seconds after up'ping. I am doing just: # ip link set dev rose0 address 11:22:33:44:55 # ip link set dev rose0 up Then after ~15 seconds or so: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access gene

Re: [PATCH v2] net: mvneta: add basic XDP_DROP support

2018-12-24 Thread Luka Perkov
Hi Jesper, On Sat, Dec 22, 2018 at 11:52:54AM +0100, Jesper Dangaard Brouer wrote: > On Fri, 21 Dec 2018 14:22:23 +0100 > Domagoj Pintaric wrote: > > > Add initial mvneta XDP support for hardware buffer management enabled > > devices only. > > Hi Domagoj, > > I would really appreciate if we co

Re: [PATCH] net/net_namespace: Check the return value of register_pernet_subsys()

2018-12-24 Thread Kirill Tkhai
On 24.12.2018 04:42, Aditya Pakki wrote: > In net_ns_init(), register_pernet_subsys() could fail while registering > network namespace subsystems. The fix checks the return value and > sends a panic() on failure. > > Signed-off-by: Aditya Pakki Reviewed-by: Kirill Tkhai > --- > net/core/net_n

[PATCH iproute2] iprule: Add tun_id filed in the selector

2018-12-24 Thread wenxu
From: wenxu ip rule add from all iif gretap tun_id 2000 lookup 200 Signed-off-by: wenxu --- ip/iprule.c| 33 + man/man8/ip-rule.8 | 4 +++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/ip/iprule.c b/ip/iprule.c index 0f8fc6d..d28f151 1

Re: [PATCH net-next 0/3] vhost: accelerate metadata access through vmap()

2018-12-24 Thread Jason Wang
On 2018/12/17 上午3:57, Michael S. Tsirkin wrote: On Sat, Dec 15, 2018 at 11:43:08AM -0800, David Miller wrote: From: Jason Wang Date: Fri, 14 Dec 2018 12:29:54 +0800 On 2018/12/14 上午4:12, Michael S. Tsirkin wrote: On Thu, Dec 13, 2018 at 06:10:19PM +0800, Jason Wang wrote: Hi: This series

RE: [RFC] AF_PACKET transport_offset fix

2018-12-24 Thread Maxim Mikityanskiy
Thanks for the feedback! > This sounds good to me. > > With the caveat that we have to make sure that no path depends on the > transport header always being set, and that this change in > skb_probe_transport_header does not cause unintended side effects > for the other users (tun/tap/xen). But I e

Re: [PATCH net-next 0/3] vhost: accelerate metadata access through vmap()

2018-12-24 Thread Jason Wang
On 2018/12/14 下午8:33, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 11:42:18AM +0800, Jason Wang wrote: On 2018/12/13 下午11:27, Michael S. Tsirkin wrote: On Thu, Dec 13, 2018 at 06:10:19PM +0800, Jason Wang wrote: Hi: This series tries to access virtqueue metadata through kernel virtual

Re: [PATCH] bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw

2018-12-24 Thread Ivan Mironov
4.20 release is affected too. On Sun, 2018-12-23 at 20:29 +0500, Ivan Mironov wrote: > This happened when I tried to boot normal Fedora 29 system with latest > available kernel (from fedora rawhide, plus some unrelated custom > patches): > > BUG: unable to handle kernel NULL pointer derefer