Re: [PATCH iproute2 v2] bridge: add batch command support

2015-10-12 Thread Christophe Gouault
2015-10-11 23:03 GMT+02:00 Roopa Prabhu : > From: Wilson Kok > > This patch adds support to batch bridge commands. > Follows ip batch code. > > Signed-off-by: Wilson Kok > Signed-off-by: Roopa Prabhu

[PATCH v2] mISDN: use kstrdup() in dsp_pipeline_build

2015-10-12 Thread Geliang Tang
Use kstrdup instead of strlen-kmalloc-strcpy. Remove unneeded NULL test, it will be tested inside kstrdup. Remove 0 length string test, it has been tested in the caller of dsp_pipeline_build. Signed-off-by: Geliang Tang --- Changes in v2: - Remove unneeded NULL test. ---

Re: [net-next PATCH] driver: net: cpsw: add no_bd_ram dt parsing

2015-10-12 Thread Mugunthan V N
On Friday 09 October 2015 03:36 PM, Mugunthan V N wrote: > cpdma is capable of placing the dma descriptors in ddr using > dma_alloc_coherent() when the internal bd ram size is not enough. > To utilize this feature pass the DT parameter "no_bd_ram" and > increase bd_ram_size and number of rx

[PATCH 2/5] be2net: release mcc-lock in a failure case in be_cmd_notify_wait()

2015-10-12 Thread Sathya Perla
From: Suresh Reddy The mcc/mbox lock is not being released when be_cmd_copy() returns an error. Signed-off-by: Suresh Reddy Signed-off-by: Sathya Perla --- drivers/net/ethernet/emulex/benet/be_cmds.c | 7

[PATCH 4/5] be2net: set pci_func_num while issuing GET_PROFILE_CONFIG cmd

2015-10-12 Thread Sathya Perla
From: Somnath Kotur The FW requires the pf_num field in the cmd hdr to be set for it to return the specific function's descriptors in the GET_PROFILE_CONFIG cmd. If not set, the FW returns the descriptors of all the functions on the device. If the first descriptor is

[PATCH 3/5] be2net: pad skb to meet minimum TX pkt size in BE3

2015-10-12 Thread Sathya Perla
From: Suresh Reddy On BE3 chips in SRIOV configs, the TX path stalls when a packet less than 32B is received from the host. A workaround to pad such packets already exists for the Skyhawk and Lancer chips. Use the same workaround for BE3 chips too. Signed-off-by:

[PATCH 5/5] be2net: remove vlan promisc capability from VF's profile descriptors

2015-10-12 Thread Sathya Perla
From: Kalesh AP The commit 435452aa8847 ("Prevent VFs from enabling VLAN promiscuous mode") fixed the PF driver to not include the VLAN promisc capability while provisioning the interface for a VF. But the fix did not remove this capability from the profile

[PATCH 0/5] be2net: patch set

2015-10-12 Thread Sathya Perla
Patch 1 fixes a FW image compatibility check in the driver that prevents certain FW images from being flashed on BE3 (not BE3-R) adapters. Patch 2 fixes a spin_lock not being released in a failure case in be_cmd_notify_wait(). Patch 3 includes a workaround to pad packets that are only 32b long

[PATCH 1/5] be2net: fix BE3-R FW download compatibility check

2015-10-12 Thread Sathya Perla
From: Kalesh AP In the BE3 FW image, unlike Skyhawk's, the "asic_type_rev" field doesn't track the asic_rev of chip it is compatible with. When asic_type_rev is 0 the image is compatible only with pre-BE3-R chips (asic_rev < 0x10). Fix the current compatibility

Re: [4.1.3-rt8] [report][cpuhotplug] BUG: spinlock bad magic on CPU#0, sh/137

2015-10-12 Thread Thomas Gleixner
On Fri, 9 Oct 2015, Grygorii Strashko wrote: > I can constantly see below error report with 4.1 RT-kernel on TI ARM dra7-evm > if I'm trying to unplug cpu1: > > [ 57.737589] CPU1: shutdown > [ 57.767537] BUG: spinlock bad magic on CPU#0, sh/137 > [ 57.767546] lock: 0xee994730, .magic:

RE: e1000e: hard system lockup on Linux 4.2

2015-10-12 Thread Avargil, Raanan
Hi Jason, Your analysis is correct. The issue was initially reported by Valdis Kletnieks (valdis.kletni...@vt.edu) http://lists.osuosl.org/pipermail/intel-wired-lan/Week-of-Mon-20150615/000992.html Commit 37b12910dd11d9ab969f2c310dc9160b7f3e3405 fixes the lockup issue, and according to my last

[PATCH v2 2/2] net/fsl_pq_mdio: fix computed address for the TBI register

2015-10-12 Thread Gerlando Falauto
commit afae5ad78b342f401c28b0bb1adb3cd494cb125a "net/fsl_pq_mdio: streamline probing of MDIO nodes" added support for different types of MDIO devices: 1) Gianfar MDIO nodes that only map the MII registers 2) Gianfar MDIO nodes that map the full MDIO register set 3) eTSEC2 MDIO nodes (which map

[PATCH v2 1/2] net/fsl_pq_mdio: check TBI address for consistency with mapped range

2015-10-12 Thread Gerlando Falauto
When configuring the MDIO subsystem it is also necessary to configure the TBI register. Make sure the TBI is contained within the mapped register range in order to: a) make sure the address is computed correctly b) make users aware that we're actually accessing that register In case of error,

Issue with /proc/sys/net/ipv4/tcp_mem

2015-10-12 Thread wangyufen
Hi, I tried on linux-4.1: linux:~# cat /proc/sys/net/ipv4/tcp_mem 8388608 1258291216777216 linux:~# echo 1234 >/proc/sys/net/ipv4/tcp_mem -bash: echo: write error: Invalid argument linux:~# cat /proc/sys/net/ipv4/tcp_mem 12341258291216777216

[RFC PATCH 0/2] bpf: enable/disable events stored in PERF_EVENT_ARRAY maps trace data output when perf sampling

2015-10-12 Thread Kaixu Xia
In some scenarios we don't want to output trace data when perf sampling in order to reduce overhead. For example, perf can be run as daemon to dump trace data when necessary, such as the system performance goes down. This patchset adds the helpers bpf_perf_event_sample_enable/disable() to

Re: [PATCH v2] sunrpc: fix waitqueue_active without memory barrier in sunrpc

2015-10-12 Thread Kosuke Tatsukawa
J. Bruce Fields wrote: > On Fri, Oct 09, 2015 at 06:29:44AM +, Kosuke Tatsukawa wrote: >> Neil Brown wrote: >> > Kosuke Tatsukawa writes: >> > >> >> There are several places in net/sunrpc/svcsock.c which calls >> >> waitqueue_active() without calling a memory barrier.

Use-after-free in ep_remove_wait_queue

2015-10-12 Thread Dmitry Vyukov
Hello, The following program causes use-after-in kernel: // autogenerated by syzkaller (http://github.com/google/syzkaller) #include #include #include int main() { long r0 = syscall(SYS_mmap, 0x20001000ul, 0x1000ul, 0x3ul, 0x32ul, 0xul, 0x0ul); long r1 =

[RFC PATCH 1/2] perf: Add the flag sample_disable not to output data on samples

2015-10-12 Thread Kaixu Xia
In some scenarios we don't want to output trace data when sampling to reduce overhead. This patch adds the flag sample_disable to implement this function. By setting this flag and integrating with ebpf, we can control the data output process and get the samples we are most interested in.

[RFC PATCH 2/2] bpf: Implement bpf_perf_event_sample_enable/disable() helpers

2015-10-12 Thread Kaixu Xia
The functions bpf_perf_event_sample_enable/disable() can set the flag sample_disable to enable/disable output trace data on samples. Signed-off-by: Kaixu Xia --- include/linux/bpf.h | 2 ++ include/uapi/linux/bpf.h | 2 ++ kernel/bpf/verifier.c| 4 +++-

GPF in rt6_uncached_list_flush_dev

2015-10-12 Thread Dmitry Vyukov
Hello, The following program causes episodic crashes: // autogenerated by syzkaller (http://github.com/google/syzkaller) #include #define CLONE_NEWNET 0x4000 int main(void) { unshare(CLONE_NEWNET); } On commit dd36d7393d6310b0c1adefb22fba79c3cf8a577c

Re: [PATCH 4/9] net/can: can_dropped_invalid_skb can be boolean

2015-10-12 Thread Marc Kleine-Budde
On 10/09/2015 04:25 PM, Yaowei Bai wrote: >> Yaowei, feel free to send the CAN patch as part of your series directly >> to David. > > OK, i'll do that and sorry for disturbing you. :) Putting me on Cc was 100% correct, but IMHO no need to split up the series when David can apply it in one go.

Infinite loop in ip6_fragment

2015-10-12 Thread Dmitry Vyukov
Hello, The following program causes infinite loop in ip6_fragment function: // autogenerated by syzkaller (http://github.com/google/syzkaller) #include #include #include int main() { long r0 = syscall(SYS_socket, 0xaul, 0x3ul, 0x53cul); long r1 = syscall(SYS_mmap,

Re: [patch net-next 0/7] switchdev: change locking

2015-10-12 Thread Jiri Pirko
Sun, Oct 11, 2015 at 05:21:04PM CEST, j...@resnulli.us wrote: >From: Jiri Pirko > >This is something which I'm currently struggling with. >Callers of attr_set and obj_add/del often hold not only RTNL, but also >spinlock (bridge). So in that case, the driver implementing the op

Re: switchdev and VLAN ranges

2015-10-12 Thread Nikolay Aleksandrov
On 10/12/2015 07:14 AM, Scott Feldman wrote: > On Sun, Oct 11, 2015 at 5:13 PM, Nikolay Aleksandrov > wrote: >> On 10/12/2015 12:41 AM, Vivien Didelot wrote: >>> On Oct. Sunday 11 (41) 09:12 AM, Jiri Pirko wrote: Sat, Oct 10, 2015 at 12:36:26PM CEST,

Re: [PATCH nf-next 1/2] ipvs: Remove possibly unused variable from ip_vs_out

2015-10-12 Thread Pablo Neira Ayuso
On Wed, Oct 07, 2015 at 04:58:47PM +0300, Sergei Shtylyov wrote: > Hello. > > On 10/7/2015 8:23 AM, Simon Horman wrote: > > >From: David Ahern > > > >Eric's net namespace changes in 1b75097dd7a26 leaves net unreferenced if > >CONFIG_IP_VS_IPV6 is not enabled: > > >

Re: [PATCH v2] bridge/netfilter: avoid unused label warning

2015-10-12 Thread Pablo Neira Ayuso
On Thu, Oct 08, 2015 at 02:51:05PM +0200, Nikolay Aleksandrov wrote: > On 10/08/2015 02:30 PM, Arnd Bergmann wrote: > > With the ARM mini2440_defconfig, the bridge netfilter code gets > > built with both CONFIG_NF_DEFRAG_IPV4 and CONFIG_NF_DEFRAG_IPV6 > > disabled, which leads to a harmless gcc

[PATCH net] ipv6: Don't call with rt6_uncached_list_flush_dev

2015-10-12 Thread Eric W. Biederman
As originally written rt6_uncached_list_flush_dev makes no sense when called with dev == NULL as it attempts to flush all uncached routes regardless of network namespace when dev == NULL. Which is simply incorrect behavior. Furthermore at the point rt6_ifdown is called with dev == NULL no more

[PATCH net-next v5] net: ipv6: Make address flushing on ifdown optional

2015-10-12 Thread David Ahern
Currently, all ipv6 addresses are flushed when the interface is configured down, including global, static addresses: $ ip -6 addr add dev eth1 2000:11:1:1::1/64 $ ip addr show dev eth1 3: eth1: mtu 1500 qdisc noop state DOWN group default qlen 1000

Re: [PATCH net-next 0/3] net: Pass net into defragmentation

2015-10-12 Thread Nicolas Dichtel
Le 09/10/2015 20:42, Eric W. Biederman a écrit : This is the next installment of my work to pass struct net through the output path so the code does not need to guess how to figure out which network namespace it is in, and ultimately routes can have output devices in another network namespace.

Re: [PATCH 0/2] atm: iphase: Fix misleading indention and return -ENOMEM on error

2015-10-12 Thread Charles (Chas) Williams
On Sat, 2015-10-10 at 21:47 +0200, Tillmann Heidsieck wrote: > this series fixes two of them. The if(); warning would require > restructuring the code to a larger extend. Beyond this there remains a > whooping number of > 2k checkpatch.pl warnings and errors each. Those > can be grouped into ...

Re: [PATCH v4] net/bonding: send arp in interval if no active slave

2015-10-12 Thread Jarod Wilson
Jay Vosburgh wrote: Jarod Wilson wrote: Jarod Wilson wrote: ... As Andy already stated I'm not a fan of such workarounds either but it's necessary sometimes so if this is going to be actually considered then a few things need to be fixed. Please make this a proper bonding

Re: Issue with /proc/sys/net/ipv4/tcp_mem

2015-10-12 Thread Eric W. Biederman
wangyufen writes: > Hi, > > I tried on linux-4.1: > linux:~# cat /proc/sys/net/ipv4/tcp_mem > 8388608 1258291216777216 > linux:~# echo 1234 >/proc/sys/net/ipv4/tcp_mem > -bash: echo: write error: Invalid argument > linux:~# cat

[patch net-next v3 3/7] switchdev: allow caller to explicitly request attr_set as deferred

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko Caller should know if he can call attr_set directly (when holding RTNL) or if he has to defer the att_set processing for later. This also allows drivers to sleep inside attr_set and report operation status back to switchdev core. Switchdev core then warns if

[patch net-next v3 1/7] switchdev: assert rtnl in switchdev_port_obj_del

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko RTNL mutex needs to be held for this function. Safe usage of netdev_for_each_lower_dev requires that. Signed-off-by: Jiri Pirko --- net/switchdev/switchdev.c | 4 1 file changed, 4 insertions(+) diff --git

[patch net-next v3 0/7] switchdev: change locking

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko This is something which I'm currently struggling with. Callers of attr_set and obj_add/del often hold not only RTNL, but also spinlock (bridge). So in that case, the driver implementing the op cannot sleep. The way rocker is dealing with this now is just to

[patch net-next v3 6/7] bridge: defer switchdev fdb del call in fdb_del_external_learn

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko Since spinlock is held here, defer the switchdev operation. Signed-off-by: Jiri Pirko --- net/bridge/br_fdb.c | 5 - net/bridge/br_if.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/net/bridge/br_fdb.c

[patch net-next v3 7/7] rocker: remove nowait from switchdev callbacks.

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko No need to avoid sleeping in switchdev callbacks now, as the switchdev core allows it. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/rocker/rocker.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[patch net-next v3 4/7] switchdev: remove pointers from switchdev objects

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko When object is used in deferred work, we cannot use pointers in switchdev object structures because the memory they point at may be already used by someone else. So rather do local copy of the value. Signed-off-by: Jiri Pirko ---

[patch net-next v3 5/7] switchdev: introduce possibility to defer obj_add/del

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko Similar to the attr usecase, the caller knows if he is holding RTNL and is in atomic section. So let the called to decide the correct call variant. This allows drivers to sleep inside their ops and wait for hw to get the operation status. Then the status is

[patch net-next v3 2/7] switchdev: introduce switchdev workqueue

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko This is going to be used for deferred operations. Signed-off-by: Jiri Pirko --- include/net/switchdev.h | 5 + net/switchdev/switchdev.c | 20 2 files changed, 25 insertions(+) diff --git

Re: [patch net-next v3 0/7] switchdev: change locking

2015-10-12 Thread Jiri Pirko
Damn, wrong branch, please ignore, will send v4 shortly. Mon, Oct 12, 2015 at 05:45:43PM CEST, j...@resnulli.us wrote: >From: Jiri Pirko > >This is something which I'm currently struggling with. >Callers of attr_set and obj_add/del often hold not only RTNL, but also >spinlock

Re: [PATCH] ip neigh: Add support for filtering dumps by master device

2015-10-12 Thread Stephen Hemminger
On Fri, 2 Oct 2015 09:42:27 -0700 David Ahern wrote: > Add support for filtering neighbor dumps by master device. Kernel side > support provided by commit 21fdd092acc7. Since the feature is not > available in older kernels the user is given a warning message if the >

Re: [PATCH iproute2 -next] m_bpf: don't require default opcode on ebpf actions

2015-10-12 Thread Stephen Hemminger
On Thu, 8 Oct 2015 15:22:05 +0200 Daniel Borkmann wrote: > After the patch, the most minimal command to load an eBPF action > for late binding with auto index selection through tc is: > > tc actions add action bpf obj prog.o > > We already set TC_ACT_PIPE in tc as

[PATCH net-next] bridge: fix gc_timer mod/del race condition

2015-10-12 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov commit c62987bbd8a1 ("bridge: push bridge setting ageing_time down to switchdev") introduced a timer race condition because the gc_timer can get rearmed after it's supposedly stopped and flushed in br_dev_delete() leading to a use of freed

Re: GPF in rt6_uncached_list_flush_dev

2015-10-12 Thread Eric W. Biederman
Eric Dumazet writes: > On Mon, 2015-10-12 at 11:34 +0200, Dmitry Vyukov wrote: >> Hello, >> >> The following program causes episodic crashes: >> >> // autogenerated by syzkaller (http://github.com/google/syzkaller) >> #include >> #define CLONE_NEWNET 0x4000 >> int

Re: [PATCH iproute2 v2] bridge: add batch command support

2015-10-12 Thread Stephen Hemminger
On Sun, 11 Oct 2015 14:03:03 -0700 Roopa Prabhu wrote: > From: Wilson Kok > > This patch adds support to batch bridge commands. > Follows ip batch code. > > Signed-off-by: Wilson Kok > Signed-off-by: Roopa Prabhu

Re: [PATCH net-next] iproute2: document -timestamp option

2015-10-12 Thread Stephen Hemminger
On Tue, 6 Oct 2015 14:16:29 -0700 Roopa Prabhu wrote: > From: Satish Ashok > > This patch documents bridge and ip -timestamp option > > Signed-off-by: Satish Ashok Applied, required some defuzzing. -- To

Re: [PATCH] ip neigh: Add ifindex to request when filtering dumps by device

2015-10-12 Thread Stephen Hemminger
On Wed, 7 Oct 2015 10:23:24 -0700 David Ahern wrote: > Add ifindex to dump request when filtering by device. If the kernel > supports it adding the index to the request limits the amount of data > the kernel pushes to userpsace. > > The feature exists in userspace

Re: [PATCH iproute2 -next] f_bpf: allow for optional classid and add flags

2015-10-12 Thread Stephen Hemminger
On Fri, 25 Sep 2015 12:32:41 +0200 Daniel Borkmann wrote: > When having optional classid, most minimal command can be sth > like: > > tc filter add dev foo parent X: bpf obj prog.o > > Therefore, adapt the code so that a next argument will not be > enforced as the case

Re: [iproute PATCH 0/3] improve MACVLAN/MACVTAP support

2015-10-12 Thread Stephen Hemminger
On Fri, 25 Sep 2015 14:09:48 +0200 Phil Sutter wrote: > While implementing support for MACVLAN_FLAG_NOPROMISC, I realized how similar > iplink_macvlan.c and iplink_macvtap.c are and that the main differences (apart > from substituting "macvlan" for "macvtap") were fixes and

Re: [PATCH net-next v2 1/2] hisilicon net: removes the once HANDEL_TX_MSG macro

2015-10-12 Thread Joe Perches
On Mon, 2015-10-12 at 13:59 +0200, Arnd Bergmann wrote: > On Monday 12 October 2015 11:23:44 huangdaode wrote: > > + s += sprintf(s, > > + "\t\ttx_ring on > > %p:%u,%u,%u,%u,%u,%llu,%llu\n", > > +

[PATCH net-next 4/4] bridge: vlan: combine (br|nbp)_vlan_flush into one

2015-10-12 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov As Ido Schimmel pointed out the vlan_vid_del() loop in nbp_vlan_flush is unnecessary (and is actually a remnant of the old vlan code) so we can remove it and combine both br/nbp vlan_flush functions into one. Signed-off-by: Nikolay

[PATCH net-next 2/4] bridge: vlan: use rcu for vlan_list traversal in br_fill_ifinfo

2015-10-12 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov br_fill_ifinfo is called by br_ifinfo_notify which can be called from many contexts with different locks held, sometimes it relies upon bridge's spinlock only which is a problem for the vlan code, so use explicitly rcu for that to avoid

[PATCH net-next 0/4] bridge: vlan: cleanups & fixes (part 3)

2015-10-12 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Hi, Patch 01 converts the vlgrp member to use rcu as it was already used in a similar way so better to make it official and use all the available RCU instrumentation. Patch 02 fixes a bug where the vlan_list can be traversed without rtnl or

[PATCH net-next 3/4] bridge: vlan: break vlan_flush in two phases to keep old order

2015-10-12 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Ido Schimmel reported a problem with switchdev devices because of the order change of del_nbp operations, more specifically the move of nbp_vlan_flush() which deletes all vlans and frees vlgrp after the rx_handler has been unregistered. So

Re: [PATCH net] tcp: change type of alive from int to bool

2015-10-12 Thread David Miller
From: Richard Sailer Date: Fri, 9 Oct 2015 02:41:37 +0200 > The alive parameter of tcp_orphan_retries, indicates > whether the connection is assumed alive or not. > In the function and all places calling it is used as a boolean value. > > Therefore this changes the

Re: [PATCH net-next v3 0/4] switchdev: push bridge ageing_time attribute down

2015-10-12 Thread David Miller
From: sfel...@gmail.com Date: Thu, 8 Oct 2015 19:23:16 -0700 > From: Scott Feldman > > Push bridge-level attributes down to switchdev drivers. This patchset > adds the infrastructure and then pushes, as an example, ageing_time attribute > down from bridge to switchdev

Re: Use-after-free in ep_remove_wait_queue

2015-10-12 Thread Eric Dumazet
On Mon, 2015-10-12 at 14:02 +0200, Michal Kubecek wrote: > Probably the issue discussed in > > http://thread.gmane.org/gmane.linux.kernel/2057497/ > > and previous related threads. > Same issue, but Dmitry apparently did not trust me. -- To unsubscribe from this list: send the line

Re: [PATCH] pcnet32: fix a logic error with pci_set_dma_mask

2015-10-12 Thread David Miller
From: Geliang Tang Date: Fri, 9 Oct 2015 03:45:39 -0700 > pcnet32 can't work on my machine recently. It says "architecture > does not support 32bit PCI busmaster DMA". There is a logic error > in it: pci_set_dma_mask() return 0 means return successfully. > > Signed-off-by:

Re: [PATCH net-next v3] bridge: allow adding of fdb entries pointing to the bridge device

2015-10-12 Thread David Miller
From: Roopa Prabhu Date: Thu, 8 Oct 2015 10:38:52 -0700 > From: Roopa Prabhu > > This patch enables adding of fdb entries pointing to the bridge device. > This can be used to propagate mac address of vlan interfaces > configured on top of

Re: [RFC PATCH 1/2] perf: Add the flag sample_disable not to output data on samples

2015-10-12 Thread Peter Zijlstra
On Mon, Oct 12, 2015 at 09:02:42AM +, Kaixu Xia wrote: > --- a/include/linux/perf_event.h > +++ b/include/linux/perf_event.h > @@ -483,6 +483,8 @@ struct perf_event { > perf_overflow_handler_t overflow_handler; > void*overflow_handler_context; >

Re: Use-after-free in ep_remove_wait_queue

2015-10-12 Thread Michal Kubecek
On Mon, Oct 12, 2015 at 01:07:55PM +0200, Dmitry Vyukov wrote: > Hello, > > The following program causes use-after-in kernel: > ... > long r0 = syscall(SYS_mmap, 0x20001000ul, 0x1000ul, 0x3ul, > 0x32ul, 0xul, 0x0ul); > long r1 = syscall(SYS_mmap, 0x2000ul,

Re: [PATCH net-next 1/1] sfc: replace spinlocks with bit ops for busy poll locking

2015-10-12 Thread David Miller
From: Shradha Shah Date: Fri, 9 Oct 2015 10:18:56 +0100 > static void efx_remove_port(struct efx_nic *efx); > -static void efx_init_napi_channel(struct efx_channel *channel); > +static int efx_init_napi_channel(struct efx_channel *channel); The changes to modify the call

Re: GPF in rt6_uncached_list_flush_dev

2015-10-12 Thread Eric Dumazet
On Mon, 2015-10-12 at 11:34 +0200, Dmitry Vyukov wrote: > Hello, > > The following program causes episodic crashes: > > // autogenerated by syzkaller (http://github.com/google/syzkaller) > #include > #define CLONE_NEWNET 0x4000 > int main(void) > { > unshare(CLONE_NEWNET); > } > >

Re: [PATCH v4 0/3] net: unix: fix use-after-free

2015-10-12 Thread Rainer Weikusat
David Miller writes: > From: Jason Baron > Date: Fri, 9 Oct 2015 00:15:59 -0400 > >> These patches are against mainline, I can re-base to net-next, please >> let me know. >> >> They have been tested against: https://lkml.org/lkml/2015/9/13/195, >> which

Re: Use-after-free in ep_remove_wait_queue

2015-10-12 Thread Dmitry Vyukov
On Mon, Oct 12, 2015 at 2:14 PM, Eric Dumazet wrote: > On Mon, 2015-10-12 at 14:02 +0200, Michal Kubecek wrote: > >> Probably the issue discussed in >> >> http://thread.gmane.org/gmane.linux.kernel/2057497/ >> >> and previous related threads. >> > > Same issue, but

Re: [PATCH net-next 1/1] sfc: fully reset if MC_REBOOT event received without warm_boot_count increment

2015-10-12 Thread David Miller
From: Shradha Shah Date: Fri, 9 Oct 2015 10:40:35 +0100 > From: Daniel Pieczko > > On EF10, MC_CMD_VPORT_RECONFIGURE can cause a CODE_MC_REBOOT event > to be sent to a function without incrementing the (adapter-wide) > warm_boot_count. In this

[PATCH net-next] switchdev: enforce no pvid flag in vlan ranges

2015-10-12 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov We shouldn't allow BRIDGE_VLAN_INFO_PVID flag in VLAN ranges. Signed-off-by: Nikolay Aleksandrov --- net/switchdev/switchdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/switchdev/switchdev.c

[patch net-next v2 1/7] switchdev: introduce switchdev workqueue

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko This is going to be used for deferred operations. Signed-off-by: Jiri Pirko --- include/net/switchdev.h | 5 + net/switchdev/switchdev.c | 19 +++ 2 files changed, 24 insertions(+) diff --git

[PATCH net-next 1/4] bridge: vlan: use proper rcu for the vlgrp member

2015-10-12 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov The bridge and port's vlgrp member is already used in RCU way, currently we rely on the fact that it cannot disappear while the port exists but that is error-prone and we might miss places with improper locking (either RCU or RTNL must be

Re: [PATCH net-next v2 1/2] hisilicon net: removes the once HANDEL_TX_MSG macro

2015-10-12 Thread Arnd Bergmann
On Monday 12 October 2015 11:38:24 huangdaode wrote: > On 2015/10/12 11:24, Joe Perches wrote: > > Hello Huang. > > > > On Mon, 2015-10-12 at 11:23 +0800, huangdaode wrote: > >> This patch changes the code style to make the code more simple. > >> also removes the once used HNADEL_TX_MSG macro,

Re: [RFC PATCH 1/2] perf: Add the flag sample_disable not to output data on samples

2015-10-12 Thread Peter Zijlstra
On Mon, Oct 12, 2015 at 08:05:20PM +0800, Wangnan (F) wrote: > > > On 2015/10/12 20:02, Peter Zijlstra wrote: > >On Mon, Oct 12, 2015 at 09:02:42AM +, Kaixu Xia wrote: > >>--- a/include/linux/perf_event.h > >>+++ b/include/linux/perf_event.h > >>@@ -483,6 +483,8 @@ struct perf_event { > >>

[patch net-next v2 4/7] switchdev: introduce possibility to defer obj_add/del

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko Similar to the attr usecase, the caller knows if he is holding RTNL and is in atomic section. So let the called to decide the correct call variant. This allows drivers to sleep inside their ops and wait for hw to get the operation status. Then the status is

[patch net-next v2 2/7] switchdev: allow caller to explicitly request attr_set as deferred

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko Caller should know if he can call attr_set directly (when holding RTNL) or if he has to defer the att_set processing for later. This also allows drivers to sleep inside attr_set and report operation status back to switchdev core. Switchdev core then warns if

[patch net-next v2 5/7] bridge: defer switchdev fdb del call in fdb_del_external_learn

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko Since spinlock is held here, defer the switchdev operation. Signed-off-by: Jiri Pirko --- net/bridge/br_fdb.c | 5 - net/bridge/br_if.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/net/bridge/br_fdb.c

[patch net-next v2 6/7] rocker: remove nowait from switchdev callbacks.

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko No need to avoid sleeping in switchdev callbacks now, as the switchdev core allows it. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/rocker/rocker.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[patch net-next v2 7/7] switchdev: assert rtnl mutex when going over lower netdevs

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko netdev_for_each_lower_dev has to be called with rtnl mutex held. So better enforce it in switchdev functions. Signed-off-by: Jiri Pirko --- net/switchdev/switchdev.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-)

[patch net-next v2 3/7] switchdev: remove pointers from switchdev objects

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko When object is used in deferred work, we cannot use pointers in switchdev object structures because the memory they point at may be already used by someone else. So rather do local copy of the value. Signed-off-by: Jiri Pirko ---

[patch net-next v2 0/7] switchdev: change locking

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko This is something which I'm currently struggling with. Callers of attr_set and obj_add/del often hold not only RTNL, but also spinlock (bridge). So in that case, the driver implementing the op cannot sleep. The way rocker is dealing with this now is just to

Re: [PATCH net-next v2 1/2] hisilicon net: removes the once HANDEL_TX_MSG macro

2015-10-12 Thread Arnd Bergmann
On Monday 12 October 2015 11:23:44 huangdaode wrote: > + s += sprintf(s, > + "\t\ttx_ring on > %p:%u,%u,%u,%u,%u,%llu,%llu\n", > + h->qs[i]->tx_ring.io_base, > +

Re: [RFC PATCH 1/2] perf: Add the flag sample_disable not to output data on samples

2015-10-12 Thread Wangnan (F)
On 2015/10/12 20:02, Peter Zijlstra wrote: On Mon, Oct 12, 2015 at 09:02:42AM +, Kaixu Xia wrote: --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -483,6 +483,8 @@ struct perf_event { perf_overflow_handler_t overflow_handler; void

Re: [PATCH net-next] switchdev: enforce no pvid flag in vlan ranges

2015-10-12 Thread Jiri Pirko
Mon, Oct 12, 2015 at 02:01:39PM CEST, ra...@blackwall.org wrote: >From: Nikolay Aleksandrov > >We shouldn't allow BRIDGE_VLAN_INFO_PVID flag in VLAN ranges. > >Signed-off-by: Nikolay Aleksandrov Acked-by: Jiri Pirko

Re: [PATCH net-next] switchdev: enforce no pvid flag in vlan ranges

2015-10-12 Thread Elad Raz
> On Oct 12, 2015, at 3:01 PM, Nikolay Aleksandrov wrote: > > From: Nikolay Aleksandrov > > We shouldn't allow BRIDGE_VLAN_INFO_PVID flag in VLAN ranges. > > Signed-off-by: Nikolay Aleksandrov > --- >

[PATCH net] switchdev: check if the vlan id is in the proper vlan range

2015-10-12 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov VLANs 0 and 4095 are reserved and shouldn't be used, add checks to switchdev similar to the bridge. Also make sure ids above 4095 cannot be passed either. Fixes: 47f8328bb1a4 ("switchdev: add new switchdev bridge setlink") Signed-off-by:

Re: [PATCH v4 0/3] net: unix: fix use-after-free

2015-10-12 Thread Eric Dumazet
On Mon, 2015-10-12 at 13:54 +0100, Rainer Weikusat wrote: > David Miller writes: > > From: Jason Baron > > Date: Fri, 9 Oct 2015 00:15:59 -0400 > > > >> These patches are against mainline, I can re-base to net-next, please > >> let me know. > >> > >>

Re: [patch net-next v2 4/7] switchdev: introduce possibility to defer obj_add/del

2015-10-12 Thread Jiri Pirko
Mon, Oct 12, 2015 at 04:34:25PM CEST, niko...@cumulusnetworks.com wrote: >On 10/12/2015 03:15 PM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Similar to the attr usecase, the caller knows if he is holding RTNL and is >> in atomic section. So let the called to decide the

Re: [patch net-next v2 4/7] switchdev: introduce possibility to defer obj_add/del

2015-10-12 Thread Nikolay Aleksandrov
On 10/12/2015 04:34 PM, Nikolay Aleksandrov wrote: > On 10/12/2015 03:15 PM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Similar to the attr usecase, the caller knows if he is holding RTNL and is >> in atomic section. So let the called to decide the correct call variant. >> >>

Re: [patch net-next v2 4/7] switchdev: introduce possibility to defer obj_add/del

2015-10-12 Thread Nikolay Aleksandrov
On 10/12/2015 04:44 PM, Jiri Pirko wrote: > Mon, Oct 12, 2015 at 04:34:25PM CEST, niko...@cumulusnetworks.com wrote: >> On 10/12/2015 03:15 PM, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> Similar to the attr usecase, the caller knows if he is holding RTNL and is >>> in

Re: [patch net-next v2 4/7] switchdev: introduce possibility to defer obj_add/del

2015-10-12 Thread Nikolay Aleksandrov
On 10/12/2015 03:15 PM, Jiri Pirko wrote: > From: Jiri Pirko > > Similar to the attr usecase, the caller knows if he is holding RTNL and is > in atomic section. So let the called to decide the correct call variant. > > This allows drivers to sleep inside their ops and wait

Re: [patch net-next v2 4/7] switchdev: introduce possibility to defer obj_add/del

2015-10-12 Thread Jiri Pirko
Mon, Oct 12, 2015 at 04:42:12PM CEST, niko...@cumulusnetworks.com wrote: >On 10/12/2015 04:34 PM, Nikolay Aleksandrov wrote: >> On 10/12/2015 03:15 PM, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> Similar to the attr usecase, the caller knows if he is holding RTNL and is >>>

Re: [PATCH net-next V15 2/3] Check for vlan ethernet types for 8021.q or 802.1ad

2015-10-12 Thread Sergei Shtylyov
Hello. On 10/11/2015 2:40 AM, Thomas F Herbert wrote: Signed-off-by: Thomas F Herbert --- include/linux/if_vlan.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 67ce5bd..88d1be4 100644

Re: [PATCH 18/23] spear13xx_pcie_gadget: use per-attribute show and store methods

2015-10-12 Thread Felipe Balbi
Christoph Hellwig writes: > On Fri, Oct 09, 2015 at 04:05:17PM -0500, Felipe Balbi wrote: >> Pratyush Anand writes: >> >> > On Sat, Oct 3, 2015 at 7:02 PM, Christoph Hellwig wrote: >> >> Signed-off-by: Christoph Hellwig >> > >>

Re: [RFC PATCH 1/2] perf: Add the flag sample_disable not to output data on samples

2015-10-12 Thread kbuild test robot
/20151012-170616 config: m68k-allyesconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree

[PATCH v2 net] raw: increment correct SNMP counters for ICMP messages

2015-10-12 Thread Ben Cartwright-Cox
Sending ICMP packets with raw sockets ends up in the SNMP counters logging the type as the first byte of the IPv4 header rather than the ICMP header. This is fixed by adding the IP Header Length to the casting into a icmphdr struct. Signed-off-by: Ben Cartwright-Cox Acked-by:

Re: "ss -p" segfaults (updated to 4.2)

2015-10-12 Thread Stephen Hemminger
Applied, and did some editing on commit msg -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH net-next 3/4] bridge: vlan: break vlan_flush in two phases to keep old order

2015-10-12 Thread Nikolay Aleksandrov
On 10/12/2015 07:39 PM, Ido Schimmel wrote: > Mon, Oct 12, 2015 at 02:41:08PM IDT, ra...@blackwall.org wrote: >> From: Nikolay Aleksandrov >> > Hi, > >> Ido Schimmel reported a problem with switchdev devices because of the >> order change of del_nbp operations, more

Re: Issue with /proc/sys/net/ipv4/tcp_mem

2015-10-12 Thread Eric W. Biederman
wangyufen writes: > Hi, > > I tried on linux-4.1: > linux:~# cat /proc/sys/net/ipv4/tcp_mem > 8388608 1258291216777216 > linux:~# echo 1234 >/proc/sys/net/ipv4/tcp_mem > -bash: echo: write error: Invalid argument > linux:~# cat

Re: [PATCH net-next] switchdev: enforce no pvid flag in vlan ranges

2015-10-12 Thread Vivien Didelot
Hi guys, On Oct. Monday 12 (42) 02:01 PM, Nikolay Aleksandrov wrote: > From: Nikolay Aleksandrov > > We shouldn't allow BRIDGE_VLAN_INFO_PVID flag in VLAN ranges. > > Signed-off-by: Nikolay Aleksandrov > --- >

[patch net-next v4 1/7] switchdev: introduce switchdev workqueue

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko This is going to be used for deferred operations. Signed-off-by: Jiri Pirko --- include/net/switchdev.h | 5 + net/switchdev/switchdev.c | 19 +++ 2 files changed, 24 insertions(+) diff --git

[patch net-next v4 0/7] switchdev: change locking

2015-10-12 Thread Jiri Pirko
From: Jiri Pirko This is something which I'm currently struggling with. Callers of attr_set and obj_add/del often hold not only RTNL, but also spinlock (bridge). So in that case, the driver implementing the op cannot sleep. The way rocker is dealing with this now is just to

  1   2   3   >