Re: [PATCH] cosa: use msecs_to_jiffies for conversions

2015-06-07 Thread David Miller
From: Nicholas Mc Guire Date: Sun, 7 Jun 2015 10:25:58 +0200 > for the dscc4 case Im not sure - that seems to have gone in in 2.4 > and that had HZ configurable. The cosa case was checked > again 2.2.26 (no config HZ) and the timeout there was 30 -> 300ms. > > I think that this is consistent wi

Re: [PATCH V2] wan: dscc4: use msecs_to_jiffies for conversions

2015-06-07 Thread David Miller
From: Nicholas Mc Guire Date: Sun, 7 Jun 2015 12:35:46 +0200 > API compliance scanning with coccinelle flagged: > ./drivers/net/wan/dscc4.c:1036:1-33: > WARNING: timeout (10) seems HZ dependent > ./drivers/net/wan/dscc4.c:554:2-34: > WARNING: timeout (10) seems HZ dependent > ./d

Re: [PATCH] fib_trie: coding style: Use pointer after check

2015-06-07 Thread David Miller
From: Firo Yang Date: Mon, 8 Jun 2015 11:54:51 +0800 > As Alexander Duyck pointed out that: > struct tnode { > ... > struct key_vector kv[1]; > } > The kv[1] member of struct tnode is an arry that refernced by > a null pointer will not crash the system, like this: > struct tnode

Re: "ip netns create" hangs forever, spamming console with "unregister_netdevice: waiting for lo to become free"

2015-06-07 Thread Joe Stringer
On 26 May 2015 at 11:56, Zack Weinberg wrote: > On Tue, May 26, 2015 at 12:21 PM, Zack Weinberg wrote: >> I have an application that makes heavy use of network namespaces, >> creating and destroying them on the fly during operation. With 100% >> reproducibility, the first invocation of "ip netns

[PATCH] fib_trie: coding style: Use pointer after check

2015-06-07 Thread Firo Yang
As Alexander Duyck pointed out that: struct tnode { ... struct key_vector kv[1]; } The kv[1] member of struct tnode is an arry that refernced by a null pointer will not crash the system, like this: struct tnode *p = NULL; struct key_vector *kv = p->kv; As such p->kv doesn't actually

Re: [PATCH net-next] net/mlx5_core: Fix static checker warnings around system guid query flow

2015-06-07 Thread David Miller
From: Or Gerlitz Date: Sun, 7 Jun 2015 15:44:23 +0300 > From: Majd Dibbiny > > Fix static checker warnings in the flow of system guid query. > > Fixes: 707c4602cda6 ('net/mlx5_core: Add new query HCA vport commands') > Signed-off-by: Majd Dibbiny > Signed-off-by: Or Gerlitz Applied, thanks

Re: [PATCH v2] b44: call netif_napi_del()

2015-06-07 Thread David Miller
From: Hauke Mehrtens Date: Sun, 7 Jun 2015 14:11:48 +0200 > When the driver gets unregistered a call to netif_napi_del() was > missing, this all was also missing in the error paths of > b44_init_one(). > > Signed-off-by: Hauke Mehrtens > --- > > changes since v1: > * netif_napi_del() is now

Re: [PATCH net v2] bridge: disable softirqs around br_fdb_update to avoid lockup

2015-06-07 Thread David Miller
From: Nikolay Aleksandrov Date: Sat, 6 Jun 2015 06:49:00 -0700 > br_fdb_update() can be called in process context in the following way: > br_fdb_add() -> __br_fdb_add() -> br_fdb_update() (if NTF_USE flag is set) > so we need to disable softirqs because there are softirq users of the > hash_lock

Re: [PATCH] isdn/hisax: Convert use of __constant_cpu_to_le16 to cpu_to_le16

2015-06-07 Thread David Miller
From: Vaishali Thakkar Date: Sat, 6 Jun 2015 06:44:00 +0530 > In big endian cases, macro cpu_to_le16 unfolds to __swab16 which > provides special case for constants. In little endian cases, > __constant_cpu_to_le16 and cpu_to_le16 expand directly to the > same expression. So, replace __constant_c

Re: [PATCH net] mpls: fix possible use after free of device

2015-06-07 Thread David Miller
From: Robert Shearman Date: Fri, 5 Jun 2015 18:54:45 +0100 > The mpls device is used in an RCU read context without a lock being > held. As the memory is freed without waiting for the RCU grace period > to elapse, the freed memory could still be in use. > > Address this by using kfree_rcu to fre

Re: [PATCH] ethernet: micrel: use time_is_before_eq_jiffies

2015-06-07 Thread David Miller
From: Antonio Murdaca Date: Fri, 5 Jun 2015 18:58:38 +0200 > use time_is_before_eq_jiffies macro for time comparison > > Signed-off-by: Antonio Murdaca Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org M

Re: [PATCH] net: moxa: fix TX overrun memory leak

2015-06-07 Thread David Miller
From: Jonas Jensen Date: Fri, 5 Jun 2015 15:46:18 +0200 > desc = priv->tx_desc_base + (TX_REG_DESC_SIZE * tx_head); > > - spin_lock_irq(&priv->txlock); > + if (CIRC_SPACE(tx_head, tx_tail, TX_DESC_NUM) == 0) { > + priv->stats.tx_dropped++; > + goto out_unl

Re: [PATCH net] be2net: Replace dma/pci_alloc_coherent() calls with dma_zalloc_coherent()

2015-06-07 Thread David Miller
From: Sriharsha Basavapatna Date: Fri, 5 Jun 2015 15:33:59 +0530 > There are several places in the driver (all in control paths) where > coherent dma memory is being allocated using either dma_alloc_coherent() > or the deprecated pci_alloc_consistent(). All these calls should be > changed to use

Re: [PATCH net-next 1/1] net: fec: ptp: correct the ENET_ATCOR value

2015-06-07 Thread David Miller
From: Fugang Duan Date: Fri, 5 Jun 2015 17:22:08 +0800 > From: Fugang Duan > > The current driver adjust freq formula is: > fe * diff = ppb * pc > Note: > fe: ENET ref clock frequency in Hz > diff = inc_corr - inc: difference between default increment and correction > increment > ppb: pa

Re: [PATCH net] bridge: use _bh spinlock variant for br_fdb_update to avoid lockup

2015-06-07 Thread David Miller
From: Nikolay Aleksandrov Date: Fri, 5 Jun 2015 00:52:57 -0700 > From: Wilson Kok > > br_fdb_update() can be called in process context in the following way: > br_fdb_add() -> __br_fdb_add() -> br_fdb_update() (if NTF_USE flag is set) > so we need to use spin_lock_bh because there are softirq u

Re: [PATCH] net: ll_temac: Remove sparse warnings

2015-06-07 Thread David Miller
From: Michal Simek Date: Fri, 5 Jun 2015 10:49:17 +0200 > Remove sparse warnings: > drivers/net/ethernet/xilinx/ll_temac_main.c:65:16: warning: cast removes > address space of expression > drivers/net/ethernet/xilinx/ll_temac_main.c:70:9: warning: cast removes > address space of expression > dri

Re: [PATCH net-next] tcp: get_cookie_sock() consolidation

2015-06-07 Thread David Miller
From: Eric Dumazet Date: Thu, 04 Jun 2015 18:30:43 -0700 > From: Eric Dumazet > > IPv4 and IPv6 share same implementation of get_cookie_sock(), > and there is no point inlining it. > > We add tcp_ prefix to the common helper name and export it. > > Signed-off-by: Eric Dumazet Applied, thank

Re: [PATCH net-next] net: bcmgenet: improve TX timeout

2015-06-07 Thread David Miller
From: Florian Fainelli Date: Thu, 4 Jun 2015 16:15:50 -0700 > Dump useful ring statistics along with interrupt status, software > maintained pointers and hardware registers to help troubleshoot TX queue > stalls. > > When a timeout occurs, disable TX NAPI for the rings, dump their states > whil

Re: [PATCH] net: dsa: mv88e6xxx: Fix deadlock by double lock

2015-06-07 Thread David Miller
From: Andrew Lunn Date: Fri, 5 Jun 2015 01:10:09 +0200 > ethtool -S on a DSA interface can deadlock for some switches because > the same lock is taken twice. Use the register read function which > expects the lock to be already held. > > Signed-off-by: Andrew Lunn > Fixes: 31888234b736 ("net:

Re: [PATCH] fib_trie: Fix potential null pointer dereference

2015-06-07 Thread Alexander Duyck
On 06/07/2015 06:23 AM, Julia Lawall wrote: I think that many people would make the same mistake when looking at the code. The change doesn't seem to hurt anything? Actually, yes. But it does imporve nothing but coding style. I think Alexander's code style make function more compact is also a g

Re: [PATCH] fib_trie: Fix potential null pointer dereference

2015-06-07 Thread Firo Yang
On Sun, Jun 07, 2015 at 03:23:57PM +0200, Julia Lawall wrote: >> >I think that many people would make the same mistake when looking at the >> >code. The change doesn't seem to hurt anything? >> Actually, yes. But it does imporve nothing but coding style. >> I think Alexander's code style make func

Re: [PATCH] fib_trie: Fix potential null pointer dereference

2015-06-07 Thread Julia Lawall
> >I think that many people would make the same mistake when looking at the > >code. The change doesn't seem to hurt anything? > Actually, yes. But it does imporve nothing but coding style. > I think Alexander's code style make function more compact is also a > good code style. So, just keep it or

Re: [PATCH] fib_trie: Fix potential null pointer dereference

2015-06-07 Thread Firo Yang
On Sun, Jun 07, 2015 at 08:36:45AM +0200, Julia Lawall wrote: > > >On Sun, 7 Jun 2015, Firo Yang wrote: > >> On Sat, Jun 06, 2015 at 05:05:04AM -0700, Eric Dumazet wrote: >> >On Sat, 2015-06-06 at 19:35 +0800, Firo Yang wrote: >> >> A smatch warning. >> >> When kmem_cache_alloc() failed to alloc me

[PATCH net-next] net/mlx5_core: Fix static checker warnings around system guid query flow

2015-06-07 Thread Or Gerlitz
From: Majd Dibbiny Fix static checker warnings in the flow of system guid query. Fixes: 707c4602cda6 ('net/mlx5_core: Add new query HCA vport commands') Signed-off-by: Majd Dibbiny Signed-off-by: Or Gerlitz --- drivers/net/ethernet/mellanox/mlx5/core/fw.c|3 ++- drivers/net/ethernet/m

[PATCH v2] b44: call netif_napi_del()

2015-06-07 Thread Hauke Mehrtens
When the driver gets unregistered a call to netif_napi_del() was missing, this all was also missing in the error paths of b44_init_one(). Signed-off-by: Hauke Mehrtens --- changes since v1: * netif_napi_del() is now also called in b44_init_one() error paths. drivers/net/ethernet/broadcom/b44.

Re: [RFC PATCH 03/13] xen-netback: implement TX persistent grants

2015-06-07 Thread Wei Liu
On Wed, Jun 03, 2015 at 05:07:59PM +, Joao Martins wrote: [...] > > > > How much harder would it be to ref-count inflight grants? Would that > > simplify or perplex things? I'm just asking, not suggesting you should > > choose ref-counting over current scheme. > > > > In principle I favour si

[PATCH V2] wan: dscc4: use msecs_to_jiffies for conversions

2015-06-07 Thread Nicholas Mc Guire
API compliance scanning with coccinelle flagged: ./drivers/net/wan/dscc4.c:1036:1-33: WARNING: timeout (10) seems HZ dependent ./drivers/net/wan/dscc4.c:554:2-34: WARNING: timeout (10) seems HZ dependent ./drivers/net/wan/dscc4.c:599:2-34: WARNING: timeout (10) seems HZ depe

Re: [PATCH v2 net-next 1/2] bpf: make programs see skb->data == L2 for ingress and egress

2015-06-07 Thread David Miller
From: Alexei Starovoitov Date: Thu, 4 Jun 2015 10:11:53 -0700 > eBPF programs attached to ingress and egress qdiscs see inconsistent > skb->data. > For ingress L2 header is already pulled, whereas for egress it's present. > This is known to program writers which are currently forced to use > BP

Re: [PATCH v2 net-next 2/2] bpf: allow programs to write to certain skb fields

2015-06-07 Thread David Miller
From: Alexei Starovoitov Date: Thu, 4 Jun 2015 10:11:54 -0700 > allow programs read/write skb->mark, tc_index fields and > ((struct qdisc_skb_cb *)cb)->data. > > mark and tc_index are generically useful in TC. > cb[0]-cb[4] are primarily used to pass arguments from one > program to another call

Re: [PATCH v3 1/2] net/xen-netfront: Correct printf format in xennet_get_responses

2015-06-07 Thread David Miller
From: Julien Grall Date: Thu, 4 Jun 2015 16:35:13 +0100 > rx->status is an int16_t, print it using %d rather than %u in order to > have a meaningful value when the field is negative. > > Also use %d rather than %x for rx->offset. > > Signed-off-by: Julien Grall > Reviewed-by: David Vrabel > C

Re: [PATCH net-next] tcp: remove redundant checks II

2015-06-07 Thread David Miller
From: Eric Dumazet Date: Thu, 04 Jun 2015 08:01:12 -0700 > From: Eric Dumazet > > For same reasons than in commit 12e25e1041d0 ("tcp: remove redundant > checks"), we can remove redundant checks done for timewait sockets. > > Signed-off-by: Eric Dumazet Applied, thanks Eric. -- To unsubscribe

Re: [PATCH] wan: dscc4: use msecs_to_jiffies for conversions

2015-06-07 Thread Francois Romieu
David Miller : [...] > Whoever wrote these things probably wanted whatever this amounts > to when HZ=100, so that is the only valid transformation you can > make to fix this up here. It's linux kernel illiterate style from 13 years ago but I commented dscc4_pci_reset. wait_ack_cec and xpr_ack ar

Re: [PATCH] wan: dscc4: use msecs_to_jiffies for conversions

2015-06-07 Thread Nicholas Mc Guire
On Sun, 07 Jun 2015, David Miller wrote: > From: Nicholas Mc Guire > Date: Sat, 6 Jun 2015 10:41:06 +0200 > > > API compliance scanning with coccinelle flagged: > > ./drivers/net/wan/dscc4.c:1036:1-33: > > WARNING: timeout (10) seems HZ dependent > > ./drivers/net/wan/dscc4.c:554:2-34:

Re: [PATCH] cosa: use msecs_to_jiffies for conversions

2015-06-07 Thread Nicholas Mc Guire
On Sun, 07 Jun 2015, David Miller wrote: > From: Nicholas Mc Guire > Date: Sat, 6 Jun 2015 09:51:51 +0200 > > > @@ -517,7 +517,7 @@ static int cosa_probe(int base, int irq, int dma) > > */ > > set_current_state(TASK_INTERRUPTIBLE); > > cosa_putstatus(cosa, S

Re: [PATCH] fddi: print an address with %p format specifier rather than %x

2015-06-07 Thread David Miller
From: Colin King Date: Fri, 5 Jun 2015 19:19:11 +0100 > From: Colin Ian King > > The debug is printing the struct smt_header * address using > the %x format specifier. Fix it to use %p instead. > > Signed-off-by: Colin Ian King Applied, thanks. -- To unsubscribe from this list: send the lin

Re: [PATCH net] amd-xgbe: Use disable_irq_nosync from within timer function

2015-06-07 Thread David Miller
From: Tom Lendacky Date: Fri, 5 Jun 2015 16:02:26 -0500 > Since the Tx timer function runs in softirq context the driver needs > to call disable_irq_nosync instead of a disable_irq. > > Reported-by: Josh Stone > Signed-off-by: Tom Lendacky Applied, thanks Tom. -- To unsubscribe from this list

Re: [PATCH] ssb: fix handling of ssb_pmu_get_alp_clock()

2015-06-07 Thread Michael Büsch
On Sun, 7 Jun 2015 01:52:51 +0200 Hauke Mehrtens wrote: > Dan Carpenter reported missing brackets which resulted in reading a > wrong crystalfreq value. I also noticed that the result of this > function is ignored. > > Reported-By: Dan Carpenter > Signed-off-by: Hauke Mehrtens > --- > driver

Re: [PATCH] cosa: use msecs_to_jiffies for conversions

2015-06-07 Thread David Miller
From: Nicholas Mc Guire Date: Sat, 6 Jun 2015 09:51:51 +0200 > @@ -517,7 +517,7 @@ static int cosa_probe(int base, int irq, int dma) >*/ > set_current_state(TASK_INTERRUPTIBLE); > cosa_putstatus(cosa, SR_TX_INT_ENA); > - schedule_timeout(30

Re: [PATCH] wan: dscc4: fix build warning Wunused-but-set-variable

2015-06-07 Thread David Miller
From: Nicholas Mc Guire Date: Sat, 6 Jun 2015 10:41:17 +0200 > Fix: > drivers/net/wan/dscc4.c: In function 'dscc4_open': > drivers/net/wan/dscc4.c:1049:25: warning: variable 'ppriv' set but not used > [-Wunused-but-set-variable] > > This has been in there unused since 1da177e4c3f (Linux-2.6.12-

Re: [PATCH] wan: dscc4: use msecs_to_jiffies for conversions

2015-06-07 Thread David Miller
From: Nicholas Mc Guire Date: Sat, 6 Jun 2015 10:41:06 +0200 > API compliance scanning with coccinelle flagged: > ./drivers/net/wan/dscc4.c:1036:1-33: > WARNING: timeout (10) seems HZ dependent > ./drivers/net/wan/dscc4.c:554:2-34: > WARNING: timeout (10) seems HZ dependent > ./d

Re: [PATCH] rhashtable: add missing import

2015-06-07 Thread David Miller
From: Hauke Mehrtens Date: Sat, 6 Jun 2015 22:07:23 +0200 > rhashtable uses EXPORT_SYMBOL_GPL() without importing linux/export.h > directly it is only imported indirectly through some other includes. > > Signed-off-by: Hauke Mehrtens Applied, thanks. -- To unsubscribe from this list: send the

Re: [PATCH] b44: call netif_napi_del()

2015-06-07 Thread David Miller
From: Hauke Mehrtens Date: Sat, 6 Jun 2015 23:22:46 +0200 > When the driver gets unregistered a call to netif_napi_del() was > missing. > > Signed-off-by: Hauke Mehrtens This patch is incomplete. All of that failure paths in b44_init_one() after the netif_napi_add() call have the same exact

Re: [v2 PATCH 5/13] crypto: testmgr - Switch to new AEAD interface

2015-06-07 Thread Herbert Xu
On Fri, Jun 05, 2015 at 03:10:00PM -0700, Tadeusz Struk wrote: > > Yes, assuming that one is using req->assoclen not only req->assoc ;) You're quite right. I found two more drivers that need to be fixed before this goes mainline. > When do you expect the assoc will be removed? It will be remov