Re: [PATCH net] bpf: fix bpf_prog_get_info_by_fd to dump correct xlated_prog_len

2017-07-29 Thread David Miller
From: Daniel Borkmann Date: Fri, 28 Jul 2017 17:05:25 +0200 > bpf_prog_size(prog->len) is not the correct length we want to dump > back to user space. The code in bpf_prog_get_info_by_fd() uses this > to copy prog->insnsi to user space, but bpf_prog_size(prog->len) also > includes the size of str

Re: [PATCH net] mcs7780: Silence uninitialized variable warning

2017-07-29 Thread David Miller
From: Dan Carpenter Date: Fri, 28 Jul 2017 17:45:11 +0300 > - __u16 rval; > + __u16 rval = -1; Fixing a bogus warning by assigning a signed constant to an unsigned variable doesn't really make me all that happy. I don't think I'll apply this, sorry.

Re: [PATCH net] tcp: avoid bogus gcc-7 array-bounds warning

2017-07-29 Thread David Miller
From: Arnd Bergmann Date: Fri, 28 Jul 2017 16:41:37 +0200 > When using CONFIG_UBSAN_SANITIZE_ALL, the TCP code produces a > false-positive warning: > > net/ipv4/tcp_output.c: In function 'tcp_connect': > net/ipv4/tcp_output.c:2207:40: error: array subscript is below array bounds > [-Werror=arra

Re: [PATCH net] Revert "vhost: cache used event for better performance"

2017-07-29 Thread K. Den
On Wed, 2017-07-26 at 19:08 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 26, 2017 at 09:37:15PM +0800, Jason Wang wrote: > > > > > > On 2017年07月26日 21:18, Jason Wang wrote: > > > > > > > > > On 2017年07月26日 20:57, Michael S. Tsirkin wrote: > > > > On Wed, Jul 26, 2017 at 04:03:17PM +0800, Jaso

Re: [PATCH net-next v2 0/3] ethtool: support for forward error correction mode setting on a link

2017-07-29 Thread David Miller
From: Roopa Prabhu Date: Thu, 27 Jul 2017 16:47:25 -0700 > From: Roopa Prabhu > > Forward Error Correction (FEC) modes i.e Base-R > and Reed-Solomon modes are introduced in 25G/40G/100G standards > for providing good BER at high speeds. Various networking devices > which support 25G/40G/100G pr

Re: [RFC net-next 0/6] tcp: remove prequeue and header prediction

2017-07-29 Thread Neal Cardwell
On Thu, Jul 27, 2017 at 7:31 PM, Florian Westphal wrote: > This RFC removes tcp prequeueing and header prediction support. > > After a hallway discussion with Eric Dumazet some > maybe-not-so-useful-anymore TCP stack features came up, HP and > Prequeue among these. > > So this RFC proposes to axe

[PATCH net-next 2/6] tcp: reindent two spots after prequeue removal

2017-07-29 Thread Florian Westphal
These two branches are now always true, remove the conditional. objdiff shows no changes. Signed-off-by: Florian Westphal --- net/ipv4/tcp_input.c | 50 +++--- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/net/ipv4/tcp_input.c b/net/i

[PATCH net-next 5/6] tcp: remove CA_ACK_SLOWPATH

2017-07-29 Thread Florian Westphal
re-indent tcp_ack, and remove CA_ACK_SLOWPATH; it is always set now. Signed-off-by: Florian Westphal --- include/net/tcp.h | 5 ++--- net/ipv4/tcp_input.c| 35 --- net/ipv4/tcp_westwood.c | 31 --- 3 files changed, 22 inserti

[PATCH net-next 4/6] tcp: remove header prediction

2017-07-29 Thread Florian Westphal
Like prequeue, I am not sure this is overly useful nowadays. If we receive a train of packets, GRO will aggregate them if the headers are the same (HP predates GRO by several years) so we don't get a per-packet benefit, only a per-aggregated-packet one. Signed-off-by: Florian Westphal --- inclu

[PATCH net-next 1/6] tcp: remove prequeue support

2017-07-29 Thread Florian Westphal
prequeue is a tcp receive optimization that moves part of rx processing from bh to process context. This only works if the socket being processed belongs to a process that is blocked in recv on that socket. In practice, this doesn't happen anymore that often because nowadays servers tend to use a

[PATCH net-next 6/6] tcp: remove unused mib counters

2017-07-29 Thread Florian Westphal
was used by tcp prequeue and header prediction. TCPFORWARDRETRANS use was removed in january. Signed-off-by: Florian Westphal --- include/uapi/linux/snmp.h | 9 - net/ipv4/proc.c | 9 - 2 files changed, 18 deletions(-) diff --git a/include/uapi/linux/snmp.h b/include/u

[net-next 0/6] tcp: remove prequeue and header prediction

2017-07-29 Thread Florian Westphal
During a hallway discussion with Eric Dumazet at Netdev 1.2 in Tokyo some maybe-not-so-useful-anymore TCP stack features came up, among these header prediction and prequeueing. In brief, TCP prequeue assumes a single-process-blocking-read design, which is not that common anymore. The most frequent

[PATCH net-next 3/6] tcp: remove low_latency sysctl

2017-07-29 Thread Florian Westphal
Was only checked by the removed prequeue code. Signed-off-by: Florian Westphal --- Documentation/networking/ip-sysctl.txt | 7 +-- include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 3 +++ net/ipv4/tcp_ipv4.c| 2 -- 4 files changed, 4 i

Re: [PATCH net v2] MAINTAINERS: Add more files to the PHY LIBRARY section

2017-07-29 Thread Joe Perches
On Fri, 2017-07-28 at 17:43 -0700, Florian Fainelli wrote: > Include missing files that are provided by, used, or directly maintained > within the PHY LIBRARY, this include uapi header, header files used by > Device Tree code etc. > > Signed-off-by: Florian Fainelli > --- > Changes in v2: > > -

Re: [RFC PATCH v1] net: ethernet: nb8800: Reset HW block in ndo_open

2017-07-29 Thread Mason
On 29/07/2017 22:15, Florian Fainelli wrote: > On 07/29/2017 05:44 AM, Mason wrote: > >> We tested 4 switches, and DHCP failed on 3 of them. >> Disabling pause frames "fixed" that. > > OK, so it is this problem that you reported about before? The "Ethernet flow control / pause frames" issue is s

Re: pull-request: wireless-drivers-next 2017-07-28

2017-07-29 Thread David Miller
From: Kalle Valo Date: Fri, 28 Jul 2017 14:05:59 + > Kalle Valo writes: > >> Hi Dave, >> >> here's a pull request for net, more info the signed tag below. Please >> let me know if there are any problems. >> >> Kalle >> >> The following changes since commit d755cbc26e8295ae8e5d30425364e093b4

Re: [PATCH net-next v3 0/7] netvsc: minor fixes and optimization

2017-07-29 Thread David Miller
From: Stephen Hemminger Date: Fri, 28 Jul 2017 08:59:40 -0700 > This is a subset of earlier submission with a few more fixes > found during testing. The are two small optimizations, one is to > better manage the receive completion ring, and the other is removing > one unneeded level of indirectio

Re: [PATCH] net: tc35815: fix spelling mistake: "Intterrupt" -> "Interrupt"

2017-07-29 Thread David Miller
From: Colin King Date: Thu, 27 Jul 2017 23:15:09 +0100 > From: Colin Ian King > > Trivial fix to spelling mistake in printk message > > Signed-off-by: Colin Ian King Applied.

Re: [RFC net-next 0/6] tcp: remove prequeue and header prediction

2017-07-29 Thread David Miller
From: Florian Westphal Date: Fri, 28 Jul 2017 01:31:11 +0200 > This RFC removes tcp prequeueing and header prediction support. > > After a hallway discussion with Eric Dumazet some > maybe-not-so-useful-anymore TCP stack features came up, HP and > Prequeue among these. > > So this RFC proposes

Re: [PATCH net-next] liquidio: bump up driver version to match newer NIC firmware

2017-07-29 Thread David Miller
From: Felix Manlunas Date: Thu, 27 Jul 2017 12:32:28 -0700 > Bump up driver version to match newer NIC firmware. Also update > nic_rx_stats (a struct common to host driver and firmware) by adding a new > field: fw_total_fwd_bytes. > > Signed-off-by: Felix Manlunas > Signed-off-by: Raghu Vatsa

Fw: [Bug 196529] New: NULL pointer deref in networking

2017-07-29 Thread Stephen Hemminger
Begin forwarded message: Date: Sat, 29 Jul 2017 01:52:42 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 196529] New: NULL pointer deref in networking https://bugzilla.kernel.org/show_bug.cgi?id=196529 Bug ID: 196529 Summary:

Re: [PATCH net] bpf: don't indicate success when copy_from_user fails

2017-07-29 Thread David Miller
From: Daniel Borkmann Date: Thu, 27 Jul 2017 21:02:46 +0200 > err in bpf_prog_get_info_by_fd() still holds 0 at that time from prior > check_uarg_tail_zero() check. Explicitly return -EFAULT instead, so > user space can be notified of buggy behavior. > > Fixes: 1e2709769086 ("bpf: Add BPF_OBJ_GE

Re: [PATCH 1/1] netfilter: constify nf_conntrack_l3/4proto parameters

2017-07-29 Thread Florian Westphal
Julia Lawall wrote: > > I think we can indeed constify these completely after making > > 'nla_size' set at compile time. > > > > I'll send a simple attempt to make it so for l3proto soon. > > There is another issue with respect to nf_ct_l3proto_unregister. This > calls nf_ct_iterate_destroy with

Re: [PATCH net] udp6: fix socket leak on early demux

2017-07-29 Thread David Miller
From: Paolo Abeni Date: Thu, 27 Jul 2017 14:45:09 +0200 > When an early demuxed packet reaches __udp6_lib_lookup_skb(), the > sk reference is retrieved and used, but the relevant reference > count is leaked and the socket destructor is never called. > Beyond leaking the sk memory, if there are pe

Re: [PATCH] net: thunderx: Fix BGX transmit stall due to underflow

2017-07-29 Thread David Miller
From: sunil.kovv...@gmail.com Date: Thu, 27 Jul 2017 12:53:04 +0530 > From: Sunil Goutham > > For SGMII/RGMII/QSGMII interfaces when physical link goes down > while traffic is high is resulting in underflow condition being set > on that specific BGX's LMAC. Which assets a backpresure and VNIC st

Re: [PATCH net-next] bnxt_re: add MAY_USE_DEVLINK dependency

2017-07-29 Thread David Miller
From: Sathya Perla Date: Thu, 27 Jul 2017 06:29:51 -0400 > bnxt_en depends on MAY_USE_DEVLINK; this is used to force bnxt_en > to be =m when DEVLINK is =m. > > Now, bnxt_re selects bnxt_en. Unless bnxt_re also explicitly calls > out dependency on MAY_USE_DEVLINK, Kconfig does not force bnxt_re >

Re: [PATCH V2 net] Revert "vhost: cache used event for better performance"

2017-07-29 Thread David Miller
From: Jason Wang Date: Thu, 27 Jul 2017 11:22:05 +0800 > This reverts commit 809ecb9bca6a9424ccd392d67e368160f8b76c92. Since it > was reported to break vhost_net. We want to cache used event and use > it to check for notification. The assumption was that guest won't move > the event idx back, but

Re: [PATCH] bpf: testing: fix devmap tests

2017-07-29 Thread David Miller
From: John Fastabend Date: Wed, 26 Jul 2017 17:35:41 -0700 > On 07/26/2017 05:32 PM, John Fastabend wrote: >> Apparently through one of my revisions of the initial patches >> series I lost the devmap test. We can add more testing later but >> for now lets fix the simple one we have. >> >> Fixes:

Re: [PATCH 0/6] net: moxa: Fix style issues

2017-07-29 Thread David Miller
From: SZ Lin Date: Sat, 29 Jul 2017 18:42:33 +0800 > This patch set fixs the WARNINGs found by the checkpatch.pl tool Series applied, thanks.

Re: [PATCH v3 net-next 1/4] tcp: ULP infrastructure

2017-07-29 Thread Tom Herbert
On Fri, Jun 16, 2017 at 5:14 PM, Christoph Paasch wrote: > Hello, > > On 14/06/17 - 11:37:14, Dave Watson wrote: >> Add the infrustructure for attaching Upper Layer Protocols (ULPs) over TCP >> sockets. Based on a similar infrastructure in tcp_cong. The idea is that any >> ULP can add its own log

Re: [PATCH 1/1] netfilter: constify nf_conntrack_l3/4proto parameters

2017-07-29 Thread Julia Lawall
On Sat, 29 Jul 2017, Florian Westphal wrote: > Julia Lawall wrote: > > When a nf_conntrack_l3/4proto parameter is not on the left hand side > > of an assignment, its address is not taken, and it is not passed to a > > function that may modify its fields, then it can be declared as const. > > >

Re: [RFC PATCH v1] net: ethernet: nb8800: Reset HW block in ndo_open

2017-07-29 Thread Florian Fainelli
On 07/29/2017 05:44 AM, Mason wrote: > On 29/07/2017 14:05, Måns Rullgård wrote: > >> Mason writes: >> >>> I'll take this opportunity to change flow control to >>> off by default (it breaks several 100 Mbps switches). >> >> I was told to have it on by default. This is what most other drivers >>

Re: [PATCH v3 net-next 1/4] tcp: ULP infrastructure

2017-07-29 Thread Tom Herbert
On Wed, Jun 14, 2017 at 11:37 AM, Dave Watson wrote: > Add the infrustructure for attaching Upper Layer Protocols (ULPs) over TCP > sockets. Based on a similar infrastructure in tcp_cong. The idea is that any > ULP can add its own logic by changing the TCP proto_ops structure to its own > methods

Re: [PATCH 1/1] netfilter: constify nf_conntrack_l3/4proto parameters

2017-07-29 Thread Florian Westphal
Julia Lawall wrote: > When a nf_conntrack_l3/4proto parameter is not on the left hand side > of an assignment, its address is not taken, and it is not passed to a > function that may modify its fields, then it can be declared as const. > > This change is useful from a documentation point of view,

Re: [PATCH] net: ethernet: stmmac: properly set PS bit in MII configurations during reset

2017-07-29 Thread Thomas Petazzoni
Hello Giuseppe, On Wed, 28 Jun 2017 16:40:51 +0200, Giuseppe CAVALLARO wrote: > I do not want to change a critical reset function shared among > different platforms where > this problem has never met but you are right that we have to find a > way to proceed in order > to finalize your work. Let m

[PATCH 0/1] constify nf_conntrack_l3/4proto parameters

2017-07-29 Thread Julia Lawall
When a nf_conntrack_l3/4proto parameter is not on the left hand side of an assignment, its address is not taken, and it is not passed to a function that may modify its fields, then it can be declared as const. This change is useful from a documentation point of view, and can possibly facilitate ma

[PATCH 1/1] netfilter: constify nf_conntrack_l3/4proto parameters

2017-07-29 Thread Julia Lawall
When a nf_conntrack_l3/4proto parameter is not on the left hand side of an assignment, its address is not taken, and it is not passed to a function that may modify its fields, then it can be declared as const. This change is useful from a documentation point of view, and can possibly facilitate ma

[PATCH] mv643xx_eth: fix of_irq_to_resource() error check

2017-07-29 Thread Sergei Shtylyov
of_irq_to_resource() has recently been fixed to return negative error #'s along with 0 in case of failure, however the Marvell MV643xx Ethernet driver still only regards 0 as invalid IRQ -- fix it up. Fixes: 7a4228bbff76 ("of: irq: use of_irq_get() in of_irq_to_resource()") Signed-off-by: Serge

Re: [pull request][net V2 00/14] Mellanox, mlx5 fixes 2017-07-27

2017-07-29 Thread David Miller
From: Saeed Mahameed Date: Thu, 27 Jul 2017 16:56:03 +0300 > This series contains some misc fixes to the mlx5 driver. > > Please pull and let me know if there's any problem. > > V1->V2: > - removed redundant braces > > for -stable: ... > I hope this is not too much, but most of the patches d

Re: [Patch net v2] net: check dev->addr_len for dev_set_mac_address()

2017-07-29 Thread David Miller
From: Cong Wang Date: Wed, 26 Jul 2017 15:22:06 -0700 > Historically, dev_ifsioc() uses struct sockaddr as mac > address definition, this is why dev_set_mac_address() > accepts a struct sockaddr pointer as input but now we > have various types of mac addresse whose lengths > are up to MAX_ADDR_LE

Re: [Patch net v2] team: use a larger struct for mac address

2017-07-29 Thread David Miller
From: Cong Wang Date: Wed, 26 Jul 2017 15:22:07 -0700 > IPv6 tunnels use sizeof(struct in6_addr) as dev->addr_len, > but in many places especially bonding, we use struct sockaddr > to copy and set mac addr, this could lead to stack out-of-bounds > access. > > Fix it by using a larger address sto

Re: [PATCH net-next 00/10] net/smc: get rid of unsafe_global_rkey

2017-07-29 Thread David Miller
From: Ursula Braun Date: Fri, 28 Jul 2017 13:56:12 +0200 > The smc code uses the unsafe_global_rkey, exposing all memory for > remote reads and writes once a connection is established. > Here is now a patch series to get rid of unsafe_global_rkey usage. > Main idea is to switch to SG-logic and se

[PATCH] net-next: stmmac: dwmac-sun8i: fix of_table.cocci warnings

2017-07-29 Thread Julia Lawall
b.com/0day-ci/linux/commits/Corentin-Labbe/dt-bindings-net-add-compatible-for-internal-sun8i-h3-sun8i-v3s-PHYs/20170729-174950 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next dwmac-sun8i.c |1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/stmi

Re: [RFC PATCH v1 5/5] wave: Added basic version of TCP Wave

2017-07-29 Thread Stephen Hemminger
On Fri, 28 Jul 2017 21:59:19 +0200 Natale Patriciello wrote: > + > +#define WAVE_DEBUG 1 > + > +#ifdef WAVE_DEBUG > + #define DBG(msg ...) printk(KERN_DEBUG "WAVE_DEBUG: " msg) > +#else > + static inline void DBG(const char *msg, ...) { } > +#endif > + Don't reinvent your own debug macro

Re: [PATCH] ss: Enclose IPv6 address in brackets

2017-07-29 Thread Stephen Hemminger
On Sat, 29 Jul 2017 14:29:10 +0200 Florian Lehner wrote: > This patch adds support for RFC2732 IPv6 address format with brackets > for the tool ss. So output for ss changes from > 2a00:1450:400a:804::200e:443 to [2a00:1450:400a:804::200e]:443 for IPv6 > addresses with attached port number. > > S

Re: [RFC PATCH v1] net: ethernet: nb8800: Reset HW block in ndo_open

2017-07-29 Thread Florian Fainelli
On 07/29/2017 05:02 AM, Mason wrote: > On 29/07/2017 13:24, Måns Rullgård wrote: > >> Until you figure out why it's getting stuck, we can't be sure >> it isn't caused by something that could trigger at any time. > Would you take a look at it, if I can reproduce on tango4? > > I have identified a

Re: [PATCH net] ipv6: no need to return rt->dst.error if it is not null entry.

2017-07-29 Thread David Ahern
On 7/28/17 1:52 PM, Roopa Prabhu wrote: > On Fri, Jul 28, 2017 at 10:39 AM, David Ahern wrote: >> IPv4 does not have the notion of null_entry or prohibit route entries >> which makes IPv4 and IPv6 inconsistent - something we really need to be >> avoiding from a user experience. >> >> We have the f

Re: [PATCH V3 net-next] TLP: Don't reschedule PTO when there's one outstanding TLP retransmission

2017-07-29 Thread Neal Cardwell
On Fri, Jul 28, 2017 at 9:39 PM, maowenan wrote: > [Mao Wenan]ok, We have reproduced this issue with packetdrill yesterday, > there is no the same issue when TLP send new data packet, RTO will be fired > and > retransmit packet. That's great to hear that you were able to reproduce this with pack

Re: [RFC PATCH v1] net: ethernet: nb8800: Reset HW block in ndo_open

2017-07-29 Thread Måns Rullgård
Mason writes: > On 29/07/2017 14:05, Måns Rullgård wrote: > >> Mason writes: >> >>> I'll take this opportunity to change flow control to >>> off by default (it breaks several 100 Mbps switches). >> >> I was told to have it on by default. This is what most other drivers >> do too. If you have

Re: [RFC PATCH v1] net: ethernet: nb8800: Reset HW block in ndo_open

2017-07-29 Thread Mason
On 29/07/2017 14:05, Måns Rullgård wrote: > Mason writes: > >> I'll take this opportunity to change flow control to >> off by default (it breaks several 100 Mbps switches). > > I was told to have it on by default. This is what most other drivers > do too. If you have faulty switches, that's yo

[PATCH] ss: Enclose IPv6 address in brackets

2017-07-29 Thread Florian Lehner
This patch adds support for RFC2732 IPv6 address format with brackets for the tool ss. So output for ss changes from 2a00:1450:400a:804::200e:443 to [2a00:1450:400a:804::200e]:443 for IPv6 addresses with attached port number. Signed-off-by: Lehner Florian --- misc/ss.c | 6 +- 1 file changed

Re: [RFC PATCH v1] net: ethernet: nb8800: Reset HW block in ndo_open

2017-07-29 Thread Måns Rullgård
Mason writes: > On 29/07/2017 13:24, Måns Rullgård wrote: > >> Until you figure out why it's getting stuck, we can't be sure >> it isn't caused by something that could trigger at any time. > Would you take a look at it, if I can reproduce on tango4? > > I have identified a 100% reproducible flaw.

Re: [RFC PATCH v1] net: ethernet: nb8800: Reset HW block in ndo_open

2017-07-29 Thread Mason
On 29/07/2017 13:24, Måns Rullgård wrote: > Until you figure out why it's getting stuck, we can't be sure > it isn't caused by something that could trigger at any time. Would you take a look at it, if I can reproduce on tango4? I have identified a 100% reproducible flaw. I have proposed a work-ar

Re: [RFC PATCH v1] net: ethernet: nb8800: Reset HW block in ndo_open

2017-07-29 Thread Måns Rullgård
Mason writes: > On 28/07/2017 20:56, Måns Rullgård wrote: > >> Marc Gonzalez writes: >> >>> On 28/07/2017 18:17, Måns Rullgård wrote: >>> Marc Gonzalez wrote: > ndo_stop breaks RX in a way that ndo_open is unable to undo. Please elaborate. Why can't it be fixed in a less

Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-29 Thread Jamal Hadi Salim
On 17-07-29 03:19 AM, Jiri Pirko wrote: That is what the code I wrote above do. And I think that your code does not (if you don't assume that allowed flags are always starting from the least significant bit) Ok, here's how it looks now.. I still have to move things around in the other patches

[PATCH 0/6] net: moxa: Fix style issues

2017-07-29 Thread SZ Lin
This patch set fixs the WARNINGs found by the checkpatch.pl tool SZ Lin (6): net: moxa: Remove braces from single-line body net: moxa: Prefer 'unsigned int' to bare use of 'unsigned' net: moxa: Fix comparison to NULL could be written with ! net: moxa: Remove extra space after a cast net:

[PATCH 5/6] net: moxa: Fix for typo in comment to function moxart_mac_setup_desc_ring()

2017-07-29 Thread SZ Lin
Signed-off-by: SZ Lin --- drivers/net/ethernet/moxa/moxart_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c index 31e179a651ae..2e4effa9fe45 100644 --- a/drivers/net/ethernet/moxa/moxar

[PATCH 6/6] net: moxa: Add spaces preferred around that '{+,-}'

2017-07-29 Thread SZ Lin
This patch fixes all checkpatch occurences of "CHECK: spaces preferred around that '{+,-}' (ctx:VxV)" in moxart_ether code. Signed-off-by: SZ Lin --- drivers/net/ethernet/moxa/moxart_ether.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/moxa/mox

[PATCH 3/6] net: moxa: Fix comparison to NULL could be written with !

2017-07-29 Thread SZ Lin
Fixed coding style for null comparisons in moxart_ether driver to be more consistent with the rest of the kernel coding style Signed-off-by: SZ Lin --- drivers/net/ethernet/moxa/moxart_ether.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/moxa/moxar

[PATCH 4/6] net: moxa: Remove extra space after a cast

2017-07-29 Thread SZ Lin
No space is necessary after a cast This warning is found using checkpatch.pl Signed-off-by: SZ Lin --- drivers/net/ethernet/moxa/moxart_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c

[PATCH 2/6] net: moxa: Prefer 'unsigned int' to bare use of 'unsigned'

2017-07-29 Thread SZ Lin
Use 'unsigned int' instead of 'unsigned' This warning is found using checkpatch.pl Signed-off-by: SZ Lin --- drivers/net/ethernet/moxa/moxart_ether.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxa

[PATCH 1/6] net: moxa: Remove braces from single-line body

2017-07-29 Thread SZ Lin
Remove unnecessary braces from single-line if statement This warning is found using checkpatch.pl Signed-off-by: SZ Lin --- drivers/net/ethernet/moxa/moxart_ether.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ether

Re: [PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Julia Lawall
On Sat, 29 Jul 2017, Florian Westphal wrote: > Julia Lawall wrote: > > On Sat, 29 Jul 2017, Florian Westphal wrote: > > > From a quick glance I don't see why we can't e.g. constify > > > nf_conntrack_l3/4_proto too. It is not going to be as simple > > > as just placing const everywhere, but I s

Re: [PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Florian Westphal
Julia Lawall wrote: > On Sat, 29 Jul 2017, Florian Westphal wrote: > > From a quick glance I don't see why we can't e.g. constify > > nf_conntrack_l3/4_proto too. It is not going to be as simple > > as just placing const everywhere, but I see no requirement for > > having these writeable. > > I w

Re: [PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Julia Lawall
On Sat, 29 Jul 2017, Florian Westphal wrote: > Julia Lawall wrote: > > > > > > On Sat, 29 Jul 2017, Florian Westphal wrote: > > > > > Julia Lawall wrote: > > > > The nf_hook_ops structure is only passed as the second argument to > > > > nf_register_net_hook or nf_unregister_net_hook, both of w

Re: [PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Florian Westphal
Julia Lawall wrote: > > > On Sat, 29 Jul 2017, Florian Westphal wrote: > > > Julia Lawall wrote: > > > The nf_hook_ops structure is only passed as the second argument to > > > nf_register_net_hook or nf_unregister_net_hook, both of which are > > > declared as const. Thus the nf_hook_ops struc

Re: [PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Julia Lawall
On Sat, 29 Jul 2017, Florian Westphal wrote: > Julia Lawall wrote: > > The nf_hook_ops structure is only passed as the second argument to > > nf_register_net_hook or nf_unregister_net_hook, both of which are > > declared as const. Thus the nf_hook_ops structure itself can be > > const. > > Rig

Re: [PATCH net] ipv4: fib: Fix NULL pointer deref during fib_sync_down_dev()

2017-07-29 Thread Michał Mirosław
On Fri, Jul 28, 2017 at 11:27:44PM +0300, Ido Schimmel wrote: > Michał reported a NULL pointer deref during fib_sync_down_dev() when > unregistering a netdevice. The problem is that we don't check for > 'in_dev' being NULL, which can happen in very specific cases. > > Usually routes are flushed up

Re: [PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Florian Westphal
Julia Lawall wrote: > The nf_hook_ops structure is only passed as the second argument to > nf_register_net_hook or nf_unregister_net_hook, both of which are > declared as const. Thus the nf_hook_ops structure itself can be > const. Right, also see http://patchwork.ozlabs.org/patch/793767/ This

Re: [PATCH net] bpf: fix bpf_prog_get_info_by_fd to dump correct xlated_prog_len

2017-07-29 Thread Martin KaFai Lau
On Fri, Jul 28, 2017 at 11:05 PM, Daniel Borkmann wrote: > bpf_prog_size(prog->len) is not the correct length we want to dump > back to user space. The code in bpf_prog_get_info_by_fd() uses this > to copy prog->insnsi to user space, but bpf_prog_size(prog->len) also > includes the size of struct

Re: [PATCH net] bpf: don't indicate success when copy_from_user fails

2017-07-29 Thread Martin KaFai Lau
On Fri, Jul 28, 2017 at 3:02 AM, Daniel Borkmann wrote: > err in bpf_prog_get_info_by_fd() still holds 0 at that time from prior > check_uarg_tail_zero() check. Explicitly return -EFAULT instead, so > user space can be notified of buggy behavior. Thanks for fixing it. (I am on PTO and cannot use m

Re: [B.A.T.M.A.N.] [PATCH][V2] batman-adv: fix various spelling mistakes

2017-07-29 Thread Sven Eckelmann
On Montag, 26. Juni 2017 11:26:44 CEST Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistakes in batadv_dbg debug messages and > also in a comment and ensure comment line is not wider than 80 > characters > > "ourselve" -> "ourselves" > "surpressed" -> "suppressed" > "trou

Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-29 Thread Jiri Pirko
Sat, Jul 29, 2017 at 12:10:20AM CEST, j...@mojatatu.com wrote: >On 17-07-28 11:45 AM, Jiri Pirko wrote: >> Fri, Jul 28, 2017 at 05:08:10PM CEST, j...@mojatatu.com wrote: >> > On 17-07-28 10:52 AM, Jamal Hadi Salim wrote: >> > > On 17-07-28 10:12 AM, Jiri Pirko wrote: > > >> > /*disallow inv

[PATCH 2/2] netfilter: ipt_CLUSTERIP: constify nf_hook_ops structures

2017-07-29 Thread Julia Lawall
The nf_hook_ops structure is only passed as the second argument to nf_register_net_hook or nf_unregister_net_hook, both of which are declared as const. Thus the nf_hook_ops structure itself can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position

[PATCH 1/2] decnet: dn_rtmsg: constify nf_hook_ops structures

2017-07-29 Thread Julia Lawall
The nf_hook_ops structure is only passed as the second argument to nf_register_net_hook or nf_unregister_net_hook, both of which are declared as const. Thus the nf_hook_ops structure itself can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position

[PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Julia Lawall
The nf_hook_ops structure is only passed as the second argument to nf_register_net_hook or nf_unregister_net_hook, both of which are declared as const. Thus the nf_hook_ops structure itself can be const. Done with the help of Coccinelle. --- net/decnet/netfilter/dn_rtmsg.c|2 +- net/ip