Re: tc qdisc command partially broken with patch-4.14.76-77 up to patch-4.14.77-78

2018-10-25 Thread Cong Wang
On Thu, Oct 25, 2018 at 1:14 PM astx wrote: > > tc qdisc command is partially broken after applying patch-4.14.76-77. > Applying patch-4.14.77-78 didn't fix it. > > Test command: >tc qdisc add dev eth0 root handle 1: hfsc default fffd > Kernel answer: >RTNETLINK answers: Numerical result

Re: netconsole warning in 4.19.0-rc7

2018-10-10 Thread Cong Wang
(Cc'ing Dave) On Wed, Oct 10, 2018 at 5:14 AM Meelis Roos wrote: > > Thies 4.19-rc7 on a bunch of test machines and got this warning from one. > It is reproducible and I have not noticed it before. > [...] > [9.914805] WARNING: CPU: 0 PID: 0 at kernel/softirq.c:168 >

Re: KASAN: use-after-free Read in tcf_block_find

2018-09-27 Thread Cong Wang
On Thu, Sep 27, 2018 at 1:11 AM Dmitry Vyukov wrote: > > Would a stack trace for call_rcu be helpful here? I have this idea for > a long time, but never get around to implementing it: > https://bugzilla.kernel.org/show_bug.cgi?id=198437 Yes. Generally speaking, showing backtrace of call_rcu() or

[PATCH] ucma: fix a use-after-free in ucma_resolve_ip()

2018-09-12 Thread Cong Wang
Doug Ledford Cc: Leon Romanovsky Signed-off-by: Cong Wang --- drivers/infiniband/core/ucma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index 5f437d1570fb..21863ddde63e 100644 --- a/drivers/infiniband/core/ucma.c +

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-08-03 Thread Cong Wang
On Wed, Aug 1, 2018 at 10:17 AM wrote: > Yes, in practice what's actually going to happen is that the > runtime_remaining will be put to 1 by distribute, the cfs_rq will be > unthrottled, and then when it runs it will go negative immediately and > hit the negative check in expires, so expires_seq

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-08-03 Thread Cong Wang
On Tue, Jul 31, 2018 at 8:24 PM Xunlei Pang wrote: > > Let's see the unthrottle cases. > 1. for the periodic timer > distribute_cfs_runtime updates the throttled cfs_rq->runtime_expires to > be a new value, so expire_cfs_rq_runtime does nothing because of: > rq_clock(rq_of(cfs_rq)) -

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-31 Thread Cong Wang
On Tue, Jul 31, 2018 at 10:13 AM wrote: > > Xunlei Pang writes: > > > On 7/31/18 1:55 AM, Cong Wang wrote: > >> On Sun, Jul 29, 2018 at 10:29 PM Xunlei Pang > >> wrote: > >>> > >>> Hi Cong, > >>> > >>> On 7

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-30 Thread Cong Wang
On Sun, Jul 29, 2018 at 10:29 PM Xunlei Pang wrote: > > Hi Cong, > > On 7/28/18 8:24 AM, Cong Wang wrote: > > Each time we sync cfs_rq->runtime_expires with cfs_b->runtime_expires, > > we should sync its ->expires_seq too. However it is missing > > f

[PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-27 Thread Cong Wang
Cc: Xunlei Pang Cc: Ben Segall Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Cong Wang --- kernel/sched/fair.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 2f0a0be4d344..910c50db3d74

Re: [PATCH v2] perf/core: fix a possible deadlock scenario

2018-07-25 Thread Cong Wang
On Tue, Jul 24, 2018 at 2:18 AM Peter Zijlstra wrote: > > On Mon, Jul 23, 2018 at 06:44:43PM -0700, Cong Wang wrote: > > On Mon, Jul 23, 2018 at 6:35 PM Cong Wang wrote: > > > > > > Hi, Peter, Andi > > > > > > While reviewing the

Re: [PATCH v2] perf/core: fix a possible deadlock scenario

2018-07-23 Thread Cong Wang
On Mon, Jul 23, 2018 at 6:35 PM Cong Wang wrote: > > Hi, Peter, Andi > > While reviewing the deadlock, I find out it looks like we could have the > following infinite recursion too: > > perf_event_account_interrupt() > __perf_event_account_interrupt() > perf_adjust_

Re: [PATCH v2] perf/core: fix a possible deadlock scenario

2018-07-23 Thread Cong Wang
Hi, Peter, Andi While reviewing the deadlock, I find out it looks like we could have the following infinite recursion too: perf_event_account_interrupt() __perf_event_account_interrupt() perf_adjust_period() event->pmu->stop x86_pmu_stop() x86_pmu.disable() intel_pmu_disable_event()

Re: [PATCH v2] perf/core: fix a possible deadlock scenario

2018-07-23 Thread Cong Wang
On Fri, Jul 20, 2018 at 4:52 AM Peter Zijlstra wrote: > > On Thu, Jul 19, 2018 at 12:12:53PM -0700, Cong Wang wrote: > > hrtimer_cancel() busy-waits for the hrtimer callback to stop, > > pretty much like del_timer_sync(). This creates a possible deadlock > > scenario

[PATCH v2] perf/core: fix a possible deadlock scenario

2018-07-19 Thread Cong Wang
I handler here. Fixes: abd50713944c ("perf: Reimplement frequency driven sampling") Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Linus Torvalds Cc: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Signed-off-by: Cong Wang --- include/linux/perf_event

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-19 Thread Cong Wang
On Thu, Jul 19, 2018 at 9:16 AM David Ahern wrote: > > Chatting with Nikolay about this and he brought up a good corollary - ip > fragmentation. It really is a similar problem in that memory is consumed > as a result of packets received from an external entity. The ipfrag > sysctls are per

Re: [PATCH] perf/core: fix a possible deadlock scenario

2018-07-18 Thread Cong Wang
On Wed, Jul 18, 2018 at 1:19 AM Jiri Olsa wrote: > > On Mon, Jul 16, 2018 at 02:51:01PM -0700, Cong Wang wrote: > > hrtimer_cancel() busy-waits for the hrtimer callback to stop, > > pretty much like del_timer_sync(). This creates a possible deadlock > > scenario where w

[PATCH] perf/core: fix a possible deadlock scenario

2018-07-16 Thread Cong Wang
Cc: Jiri Olsa Cc: Namhyung Kim Cc: Signed-off-by: Cong Wang --- include/linux/perf_event.h | 3 +++ kernel/events/core.c | 43 +++ 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h

Re: [PATCH 2/2] sched/fair: Advance global expiration when period timer is restarted

2018-06-18 Thread Cong Wang
On Mon, Jun 18, 2018 at 2:16 AM, Xunlei Pang wrote: > I noticed the group frequently got throttled even it consumed > low cpu usage, this caused some jitters on the response time > to some of our business containers enabling cpu quota. > > It's very easy to reproduce: > mkdir

Re: [PATCH] infiniband: fix a subtle race condition

2018-06-18 Thread Cong Wang
On Fri, Jun 15, 2018 at 12:08 PM, Jason Gunthorpe wrote: > > The point is, I don't care about the imbalance report. OK, we are not on the same page. Sorry for wasting my time.

Re: [PATCH] infiniband: fix a subtle race condition

2018-06-15 Thread Cong Wang
On Thu, Jun 14, 2018 at 7:57 PM, Jason Gunthorpe wrote: > On Thu, Jun 14, 2018 at 04:14:13PM -0700, Cong Wang wrote: >> On Thu, Jun 14, 2018 at 10:24 AM, Jason Gunthorpe wrote: >> > On Thu, Jun 14, 2018 at 10:03:09AM -0700, Cong Wang wrote: >> >> On Thu, Jun 14, 20

Re: [PATCH] infiniband: fix a subtle race condition

2018-06-14 Thread Cong Wang
On Thu, Jun 14, 2018 at 10:24 AM, Jason Gunthorpe wrote: > On Thu, Jun 14, 2018 at 10:03:09AM -0700, Cong Wang wrote: >> On Thu, Jun 14, 2018 at 7:24 AM, Jason Gunthorpe wrote: >> > >> > This was my brief reaction too, this code path almost certainly has a >> &g

Re: [PATCH] infiniband: fix a subtle race condition

2018-06-14 Thread Cong Wang
On Thu, Jun 14, 2018 at 7:24 AM, Jason Gunthorpe wrote: > > This was my brief reaction too, this code path almost certainly has a > use-after-free, and we should fix the concurrency between the two > places in some correct way.. First of all, why use-after-free could trigger an imbalance unlock?

Re: [PATCH] infiniband: fix a subtle race condition

2018-06-14 Thread Cong Wang
On Thu, Jun 14, 2018 at 12:01 AM, Leon Romanovsky wrote: > On Wed, Jun 13, 2018 at 11:21:54PM -0700, Cong Wang wrote: >> On Wed, Jun 13, 2018 at 10:34 PM, Leon Romanovsky wrote: >> > >> > Hi Cong, >> > >> > If the compiler optimizes the first line (mu

Re: [PATCH] infiniband: fix a subtle race condition

2018-06-14 Thread Cong Wang
On Wed, Jun 13, 2018 at 10:34 PM, Leon Romanovsky wrote: > > Hi Cong, > > If the compiler optimizes the first line (mutex_lock) as you wrote, > it will reuse "f" for the second line (mutex_unlock) too. Nope, check the assembly if you don't trust me, at least my compiler always fetches ctx->file

[PATCH] infiniband: fix a subtle race condition

2018-06-13 Thread Cong Wang
re. Reported-by: syzbot+e5579222b6a3edd96...@syzkaller.appspotmail.com Cc: Doug Ledford Cc: Jason Gunthorpe Signed-off-by: Cong Wang --- drivers/infiniband/core/ucma.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index ec8fb

Re: [PATCH] infiniband: fix a possible use-after-free bug

2018-06-04 Thread Cong Wang
On Mon, Jun 4, 2018 at 9:23 AM, Gi-Oh Kim wrote: > Hi, > > Your patch is reasonable to me. > Can I ask a question for that? > Could it be solved by asymmetric locking as following? Maybe, if you are sure taking file->mut is safe in that place. Can you double check

[PATCH] infiniband: fix a possible use-after-free bug

2018-06-01 Thread Cong Wang
("RDMA/cma: Add multicast communication support") Reported-by: Noam Rathaus Cc: Sean Hefty Cc: Doug Ledford Cc: Jason Gunthorpe Cc: linux-r...@vger.kernel.org Signed-off-by: Cong Wang --- drivers/infiniband/core/ucma.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) dif

Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-25 Thread Cong Wang
On Fri, May 25, 2018 at 1:39 PM, Vlad Buslov <vla...@mellanox.com> wrote: > > On Thu 24 May 2018 at 23:34, Cong Wang <xiyou.wangc...@gmail.com> wrote: >> On Mon, May 14, 2018 at 7:27 AM, Vlad Buslov <vla...@mellanox.com> wrote: >>> Currently, all netli

Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-24 Thread Cong Wang
On Mon, May 14, 2018 at 7:27 AM, Vlad Buslov wrote: > Currently, all netlink protocol handlers for updating rules, actions and > qdiscs are protected with single global rtnl lock which removes any > possibility for parallelism. This patch set is a first step to remove > rtnl

Re: [PATCH 3/3] sched/fair: add tracepoints for cfs throttle

2018-05-24 Thread Cong Wang
On Thu, May 24, 2018 at 12:11 AM, Peter Zijlstra wrote: > > The problem with tracepoints is that they can become ABI and you cannot > change them without breaking tools. This is a crap situation and I'm fed > up with it. Yeah, I once used perf_event_open() to parse the

Re: [PATCH 3/3] sched/fair: add tracepoints for cfs throttle

2018-05-23 Thread Cong Wang
On Wed, May 23, 2018 at 2:09 AM, Peter Zijlstra wrote: > On Mon, May 21, 2018 at 11:35:38PM -0700, Ivan Babrou wrote: >> > + TP_printk("path=%s cpu=%d runtime_remaining=%lld", >> > __get_str(cfs_path), >> > + __entry->cpu, __entry->runtime_remaining) >>

Re: [PATCH net-next v3] net: sched: don't disable bh when accessing action idr

2018-05-23 Thread Cong Wang
en get rid of this spinlock since most of the callers hold RTNL lock, not sure about the dump() path where RTNL might be removed recently. Anyway, Acked-by: Cong Wang <xiyou.wangc...@gmail.com>

Re: [PATCH net-next v2] net: sched: don't disable bh when accessing action idr

2018-05-22 Thread Cong Wang
On Mon, May 21, 2018 at 1:03 PM, Vlad Buslov wrote: > Initial net_device implementation used ingress_lock spinlock to synchronize > ingress path of device. This lock was used in both process and bh context. > In some code paths action map lock was obtained while holding

Re: [PATCH 3/3] sched/fair: add tracepoints for cfs throttle

2018-05-22 Thread Cong Wang
On Mon, May 21, 2018 at 11:35 PM, Ivan Babrou <ibob...@gmail.com> wrote: > > > On Mon, May 21, 2018 at 11:20 PM Cong Wang <xiyou.wangc...@gmail.com> wrote: >> >> + >> + TP_printk("path=%s cpu=%d runtime_remaining=%lld", >> __get_st

[PATCH 2/3] sched/fair: accumulate unused cpu time for CFS throttle

2018-05-22 Thread Cong Wang
braith <efa...@gmx.de> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Ingo Molnar <mi...@kernel.org> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> --- Documentation/scheduler/sched-bwc.txt | 9 + kernel/sched/core.c | 62 +++

[PATCH 1/3] sched/fair: make CFS bandwidth slice per cpu group

2018-05-22 Thread Cong Wang
a <pet...@infradead.org> Cc: Mike Galbraith <efa...@gmx.de> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Ingo Molnar <mi...@kernel.org> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> --- Documentation/scheduler/sched-bwc.txt | 16 kernel

[PATCH 3/3] sched/fair: add tracepoints for cfs throttle

2018-05-22 Thread Cong Wang
Molnar <mi...@kernel.org> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> --- include/trace/events/sched.h | 42 ++ kernel/sched/fair.c | 2 ++ 2 files changed, 44 insertions(+) diff --git a/include/trace/events/sched.h b/include/tra

[PATCH 0/3] sched/fair: improve CFS throttle

2018-05-22 Thread Cong Wang
Cong Wang (3): sched/fair: make CFS bandwidth slice per cpu group sched/fair: accumulate unused cpu time for CFS throttle sched/fair: add tracepoints for cfs throttle Documentation/scheduler/sched-bwc.txt | 25 ++-- include/trace/events/sched.h | 42 + kernel

Re: [PATCH] net: sched: don't disable bh when accessing action idr

2018-05-18 Thread Cong Wang
On Fri, May 18, 2018 at 8:45 AM, Vlad Buslov wrote: > Underlying implementation of action map has changed and doesn't require > disabling bh anymore. Replace all action idr spinlock usage with regular > calls that do not disable bh. Please explain explicitly why it is not

Re: [PATCH net V2] tun: fix use after free for ptr_ring

2018-05-11 Thread Cong Wang
On Thu, May 10, 2018 at 7:49 PM, Jason Wang wrote: > static void __tun_detach(struct tun_file *tfile, bool clean) > { > struct tun_file *ntfile; > @@ -736,7 +727,8 @@ static void __tun_detach(struct tun_file *tfile, bool > clean) >

Re: [PATCH net] tun: fix use after free for ptr_ring

2018-05-10 Thread Cong Wang
On Tue, May 8, 2018 at 11:59 PM, Jason Wang wrote: > We used to initialize ptr_ring during TUNSETIFF, this is because its > size depends on the tx_queue_len of netdevice. And we try to clean it > up when socket were detached from netdevice. A race were spotted when > trying

Re: BUG: spinlock bad magic in tun_do_read

2018-05-08 Thread Cong Wang
On Mon, May 7, 2018 at 11:04 PM, Eric Dumazet <eric.duma...@gmail.com> wrote: > > > On 05/07/2018 10:54 PM, Cong Wang wrote: >> >> Yeah, we should return early before hitting this uninitialized ptr ring... >> Something like: >> >> diff --git a/d

Re: BUG: spinlock bad magic in tun_do_read

2018-05-07 Thread Cong Wang
On Mon, May 7, 2018 at 10:27 PM, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:75bc37fefc44 Linux 4.17-rc4 > git tree: upstream > console output:

[Patch v2] sched/fair: make CFS bandwidth slice per cpu group

2018-05-02 Thread Cong Wang
a <pet...@infradead.org> Cc: Mike Galbraith <efa...@gmx.de> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Ingo Molnar <mi...@kernel.org> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> --- Documentation/scheduler/sched-bwc.txt | 14 +++ kernel

Re: [PATCH] sched/fair: make CFS bandwidth slice per cpu group

2018-05-01 Thread Cong Wang
On Tue, May 1, 2018 at 12:11 AM, Peter Zijlstra <pet...@infradead.org> wrote: > On Mon, Apr 30, 2018 at 01:37:16PM -0700, Cong Wang wrote: >> On Mon, Apr 30, 2018 at 12:42 PM, Peter Zijlstra <pet...@infradead.org> >> wrote: >> > On Mon, Apr 30, 2018

Re: [PATCH] sched/fair: make CFS bandwidth slice per cpu group

2018-04-30 Thread Cong Wang
On Mon, Apr 30, 2018 at 12:42 PM, Peter Zijlstra <pet...@infradead.org> wrote: > On Mon, Apr 30, 2018 at 12:29:25PM -0700, Cong Wang wrote: >> Currently, the sched_cfs_bandwidth_slice_us is a global setting which >> affects all cgroups. Different groups may want d

[PATCH] sched/fair: make CFS bandwidth slice per cpu group

2018-04-30 Thread Cong Wang
a default value, people will have to update each cgroup accordingly to make a global update. Cc: Paul Turner <p...@google.com> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Mike Galbraith <efa...@gmx.de> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Ingo Molnar <mi...@kern

Re: KASAN: null-ptr-deref Read in refcount_inc_not_zero

2018-04-23 Thread Cong Wang
#syz fix: llc: fix NULL pointer deref for SOCK_ZAPPED

Re: linux-next: build failure after merge of the netfilter tree

2018-04-16 Thread Cong Wang
On Mon, Apr 16, 2018 at 4:28 PM, Stephen Rothwell wrote: > Hi all, > > After merging the netfilter tree, today's linux-next build (powerpc > ppc64_defconfig) failed like this: > > net/netfilter/nf_conntrack_extend.c: In function 'nf_ct_ext_ > add': >

Re: Softlockup and Hardlockup sample test module

2018-04-15 Thread Cong Wang
On Sun, Apr 15, 2018 at 12:47 AM, Ivid Suvarna wrote: > Hi All, > > Could you please provide some sample test module for causing a > Softlockup and Hardlockup in latest kernel for SMP for testing > purposes. I assume there are some Kconfigs to be enabled as well for >

Re: possible deadlock in skb_queue_tail

2018-04-03 Thread Cong Wang
On Tue, Apr 3, 2018 at 4:42 AM, Kirill Tkhai wrote: > On 03.04.2018 14:25, Dmitry Vyukov wrote: >> On Tue, Apr 3, 2018 at 11:50 AM, Kirill Tkhai wrote: >>> sk_diag_dump_icons() dumps only sockets in TCP_LISTEN state. >>> TCP_LISTEN state may be

Re: WARNING in refcount_dec

2018-03-28 Thread Cong Wang
(Cc'ing netdev and Willem) On Wed, Mar 28, 2018 at 12:03 PM, Byoungyoung Lee wrote: > Another crash patterns observed: race between (setsockopt$packet_int) > and (bind$packet). > > -- > [ 357.731597] kernel BUG at >

Re: xfs: list corruption in xfs_setup_inode()

2018-03-20 Thread Cong Wang
On Mon, Mar 19, 2018 at 4:39 PM, Dave Chinner <da...@fromorbit.com> wrote: > On Mon, Mar 19, 2018 at 02:37:22PM -0700, Cong Wang wrote: >> On Mon, Oct 30, 2017 at 2:55 PM, Cong Wang <xiyou.wangc...@gmail.com> wrote: >> > Hello, >> > >> > We trigge

Re: xfs: list corruption in xfs_setup_inode()

2018-03-19 Thread Cong Wang
On Mon, Oct 30, 2017 at 2:55 PM, Cong Wang <xiyou.wangc...@gmail.com> wrote: > Hello, > > We triggered a list corruption (double add) warning below on our 4.9 > kernel (the 4.9 kernel we use is based on -stable release, with only a > few unrelated networking backports):

Re: [PATCH 1/1] net: check dev->reg_state before deref of napi netdev_ops

2018-03-12 Thread Cong Wang
On Sun, Mar 11, 2018 at 12:22 PM, Josh Elsasser wrote: > init_dummy_netdev() leaves its netdev_ops pointer zeroed. This leads > to a NULL pointer dereference when sk_busy_loop fires against an iwlwifi > wireless adapter and checks napi->dev->netdev_ops->ndo_busy_poll. > >

Re: WARNING in __proc_create

2018-03-09 Thread Cong Wang
On Fri, Mar 9, 2018 at 3:21 PM, Eric Dumazet <eric.duma...@gmail.com> wrote: > > > On 03/09/2018 03:05 PM, Cong Wang wrote: >> >> >> BTW, the warning itself is all about empty names, so perhaps >> it's better to fix them separately. > > > Huh ? Yo

Re: WARNING in __proc_create

2018-03-09 Thread Cong Wang
On Fri, Mar 9, 2018 at 2:58 PM, Eric Dumazet wrote: > > > On 03/09/2018 02:56 PM, Eric Dumazet wrote: > >> >> I sent a patch a while back, but Pablo/Florian wanted more than that >> simple fix. >> >> We also need to filter special characters like '/' proc_create_data()

Re: WARNING in __proc_create

2018-03-09 Thread Cong Wang
On Fri, Mar 9, 2018 at 1:59 PM, syzbot wrote: > Hello, > > syzbot hit the following crash on net-next commit > 617aebe6a97efa539cc4b8a52adccd89596e6be0 (Sun Feb 4 00:25:42 2018 +) > Merge tag 'usercopy-v4.16-rc1' of >

Re: [PATCH] perf stat: fix cvs output format

2018-03-06 Thread Cong Wang
On Tue, Mar 6, 2018 at 9:53 AM, Andi Kleen wrote: >> Here is the output from your own commit: >> >> 423470,,stalled-cycles-frontend,509102,100.00,65.69,frontend cycles >> idle >> ,,stalled-cycles-backend,0,100.00 >> >> so line 1 has 7 fields, line 2 has 9

Re: [PATCH] perf stat: fix cvs output format

2018-03-06 Thread Cong Wang
On Tue, Mar 6, 2018 at 9:00 AM, Andi Kleen <a...@linux.intel.com> wrote: > On Mon, Mar 05, 2018 at 10:43:53PM -0800, Cong Wang wrote: >> From: Ilya Pronin <ipro...@twitter.com> >> >> When printing stats in CSV mode, perf stat appends extra CSV >> s

[PATCH] perf stat: fix cvs output format

2018-03-05 Thread Cong Wang
ronin <ipro...@twitter.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> --- tools/perf/builtin-stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 98bf9d32f222..54a4c152edb3 100644 --- a/tools/perf/

Re: Long standing kernel warning: perfevents: irq loop stuck!

2018-02-26 Thread Cong Wang
On Fri, Feb 23, 2018 at 4:14 AM, Peter Zijlstra <pet...@infradead.org> wrote: > On Thu, Feb 22, 2018 at 08:59:47PM -0800, Cong Wang wrote: >> Hello, >> >> We keep seeing the following kernel warning from 3.10 kernel to 4.9 >> kernel, it exists for a rather lon

Re: Kernel panic with 4.16-rc1 (and 4.16-rc2) running selftest

2018-02-23 Thread Cong Wang
On Fri, Feb 23, 2018 at 3:27 PM, Cong Wang <xiyou.wangc...@gmail.com> wrote: > On Fri, Feb 23, 2018 at 11:00 AM, Randy Dunlap <rdun...@infradead.org> wrote: >> [adding netdev] >> >> On 02/23/2018 08:05 AM, Khalid Aziz wrote: >>> I am seeing a kernel pan

Re: Kernel panic with 4.16-rc1 (and 4.16-rc2) running selftest

2018-02-23 Thread Cong Wang
On Fri, Feb 23, 2018 at 11:00 AM, Randy Dunlap wrote: > [adding netdev] > > On 02/23/2018 08:05 AM, Khalid Aziz wrote: >> I am seeing a kernel panic with 4.16-rc1 and 4.16-rc2 kernels when running >> selftests >> from tools/testing/selftests. Last messages from selftest

Long standing kernel warning: perfevents: irq loop stuck!

2018-02-22 Thread Cong Wang
Hello, We keep seeing the following kernel warning from 3.10 kernel to 4.9 kernel, it exists for a rather long time. Google search shows there was a patch from Ingo: https://patchwork.kernel.org/patch/6308681/ but it doesn't look like ever merged into mainline... I don't know how it is

Re: KASAN: use-after-free Read in sit_tunnel_xmit

2018-02-15 Thread Cong Wang
On Tue, Feb 13, 2018 at 10:48 AM, Dmitry Vyukov <dvyu...@google.com> wrote: > On Mon, Oct 30, 2017 at 7:41 PM, Cong Wang <xiyou.wangc...@gmail.com> wrote: >> On Mon, Oct 30, 2017 at 8:34 AM, syzbot >> <bot+1aa412fe58f4059538c0204a0f096524e6dce...@syzkaller.appspo

Re: WARNING: proc registration bug in clusterip_tg_check

2018-02-06 Thread Cong Wang
On Tue, Feb 6, 2018 at 6:27 AM, syzbot wrote: > Hello, > > syzbot hit the following crash on net-next commit > 617aebe6a97efa539cc4b8a52adccd89596e6be0 (Sun Feb 4 00:25:42 2018 +) > Merge tag 'usercopy-v4.16-rc1' of >

Re: net: hang in unregister_netdevice: waiting for lo to become free

2018-01-30 Thread Cong Wang
On Tue, Jan 30, 2018 at 4:09 AM, Dmitry Vyukov wrote: > Hello, > > The following program creates a hang in unregister_netdevice. > cleanup_net work hangs there forever periodically printing > "unregister_netdevice: waiting for lo to become free. Usage count = 3" > and creation

[PATCH] kernfs: account kernfs_node_cache as reclaimable

2018-01-26 Thread Cong Wang
rop_caches easily. Mark the slab cache reclaimable. Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: Tejun Heo <t...@kernel.org> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> --- fs/kernfs/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/f

Re: Network interface "stops working"

2018-01-22 Thread Cong Wang
(Please always Cc netdev for networking related bugs.) On Mon, Jan 22, 2018 at 2:02 AM, Turbo Fredriksson wrote: > I just got a new broadband delivered at home. It is "Hyperoptic 1Gbps fiber" > which comes as a ethernet connector at home. I wasn’t around > when they connected

Re: WARNING in xdp_rxq_info_unreg

2018-01-22 Thread Cong Wang
On Mon, Jan 22, 2018 at 11:58 AM, syzbot wrote: > Hello, > > syzbot hit the following crash on net-next commit > ebdd7b491b8a65d65936e07004caabca4a3c94a0 (Sun Jan 21 23:21:31 2018 +) > Merge branch

Re: KASAN: use-after-free Read in tipc_group_is_open

2018-01-16 Thread Cong Wang
On Tue, Jan 16, 2018 at 5:23 AM, Jon Maloy <jon.ma...@ericsson.com> wrote: > > >> -Original Message----- >> From: Cong Wang [mailto:xiyou.wangc...@gmail.com] >> Sent: Monday, January 15, 2018 23:44 >> To: syzbot <syzbot+799dafde028679585...@syzkaller.a

Re: KASAN: use-after-free Read in tipc_group_is_open

2018-01-15 Thread Cong Wang
On Mon, Jan 15, 2018 at 7:58 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 594831a8aba3fd045c3212a3e3bb9788c77b989d > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master > compiler: gcc (GCC) 7.1.1

Re: sctp: memory leak in sctp_endpoint_init

2018-01-10 Thread Cong Wang
On Tue, Jan 9, 2018 at 9:44 AM, 'Dmitry Vyukov' via syzkaller wrote: > Hello, > > syzkaller has hit the following memory leak on 4.15-rc7. > Reproducer is attached. > > unferenced object 0x88007bbaa720 (size 32): > comm "syz-executor4", pid 12479, jiffies

Re: KASAN: use-after-free Read in rb_first_postorder

2018-01-10 Thread Cong Wang
On Tue, Jan 9, 2018 at 2:58 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 61ad64080e039dce99a7f8d89b729bbea995e2f7 > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master > compiler: gcc (GCC) 7.1.1

Re: KASAN: use-after-free Read in tipc_group_size

2018-01-08 Thread Cong Wang
On Mon, Jan 8, 2018 at 6:58 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > b2cd1df66037e7c4697c7e40496bf7e4a5e16a2d > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > compiler: gcc (GCC) 7.1.1

Re: WARNING in sk_stream_kill_queues (2)

2018-01-03 Thread Cong Wang
#syz dup: KASAN: slab-out-of-bounds Write in tcp_v6_syn_recv_sock

Re: KASAN: slab-out-of-bounds Write in tcp_v6_syn_recv_sock

2018-01-03 Thread Cong Wang
On Wed, Jan 3, 2018 at 12:55 PM, Ozgur <oz...@goosey.org> wrote: > > > 03.01.2018, 21:57, "Cong Wang" <xiyou.wangc...@gmail.com>: >> On Tue, Jan 2, 2018 at 3:58 PM, syzbot >> <syzbot+6dc95bddc6976b800...@syzkaller.appspotmail.com> wrote: >&

Re: KASAN: slab-out-of-bounds Write in tcp_v6_syn_recv_sock

2018-01-03 Thread Cong Wang
On Tue, Jan 2, 2018 at 3:58 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 61233580f1f33c50e159c50e24d80ffd2ba2e06b > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > compiler: gcc (GCC) 7.1.1

Re: [PATCH] exit: move exit_task_namespaces() after exit_task_work()

2017-12-15 Thread Cong Wang
On Fri, Dec 15, 2017 at 12:00 AM, Dmitry Vyukov <dvyu...@google.com> wrote: > On Fri, Dec 15, 2017 at 8:35 AM, Dmitry Vyukov <dvyu...@google.com> wrote: >> On Fri, Dec 15, 2017 at 7:56 AM, Eric W. Biederman >> <ebied...@xmission.com> wrote: >>> C

Re: [PATCH] exit: move exit_task_namespaces() after exit_task_work()

2017-12-15 Thread Cong Wang
On Thu, Dec 14, 2017 at 1:08 PM, Al Viro <v...@zeniv.linux.org.uk> wrote: > On Thu, Dec 14, 2017 at 12:17:57PM -0800, Cong Wang wrote: >> syzbot reported we have a use-after-free when mqueue_evict_inode() >> is called on __cleanup_mnt() path, where the ipc ns is already >

[PATCH] exit: move exit_task_namespaces() after exit_task_work()

2017-12-14 Thread Cong Wang
kal...@googlegroups.com> Cc: Ingo Molnar <mi...@kernel.org> Cc: Al Viro <v...@zeniv.linux.org.uk> Cc: Andrew Morton <a...@linux-foundation.org> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: sta...@vger.kernel.org Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> --- ker

Re: KASAN: use-after-free Read in refcount_inc_not_zero

2017-12-14 Thread Cong Wang
On Thu, Dec 14, 2017 at 10:23 AM, syzbot wrote: > syzkaller has found reproducer for the following crash on > 82bcf1def3b5f1251177ad47c44f7e17af039b4b > git://git.cmpxchg.org/linux-mmots.git/master > compiler: gcc (GCC) 7.1.1

Re: [PATCH] libsas: flush pending destruct work in sas_unregister_domain_devices()

2017-12-09 Thread Cong Wang
On Thu, Dec 7, 2017 at 11:54 PM, Jason Yan wrote: > > We have sent a patchset to fix this and to enhance libsas hotplug. > Please refer to https://lkml.org/lkml/2017/9/6/142 > > And I'm going to send a new version soon. Thanks for working on it! Please make sure they will be

Re: kernel BUG at net/core/skbuff.c:LINE! (2)

2017-12-09 Thread Cong Wang
On Fri, Dec 8, 2017 at 12:45 AM, Xin Long wrote: > This isn't a sctp problem, but mld's, seems when lo's mtu became 0, > it allocs a skb without enough space in add_grec(): Shouldn't we just set its min_mtu to ETH_MIN_MTU?

Re: [PATCH] libsas: flush pending destruct work in sas_unregister_domain_devices()

2017-12-07 Thread Cong Wang
On Thu, Dec 7, 2017 at 4:40 PM, Cong Wang <xiyou.wangc...@gmail.com> wrote: > On Thu, Dec 7, 2017 at 2:57 PM, Cong Wang <xiyou.wangc...@gmail.com> wrote: >> On Thu, Dec 7, 2017 at 5:37 AM, John Garry <john.ga...@huawei.com> wrote: >>> On 28/11/2017 17:04

Re: [PATCH] libsas: flush pending destruct work in sas_unregister_domain_devices()

2017-12-07 Thread Cong Wang
On Thu, Dec 7, 2017 at 2:57 PM, Cong Wang <xiyou.wangc...@gmail.com> wrote: > On Thu, Dec 7, 2017 at 5:37 AM, John Garry <john.ga...@huawei.com> wrote: >> On 28/11/2017 17:04, Cong Wang wrote: >>> >>> I don't understand, the only caller of sas_unregister_

Re: [PATCH] libsas: flush pending destruct work in sas_unregister_domain_devices()

2017-12-07 Thread Cong Wang
On Thu, Dec 7, 2017 at 5:37 AM, John Garry <john.ga...@huawei.com> wrote: > On 28/11/2017 17:04, Cong Wang wrote: >> >> I don't understand, the only caller of sas_unregister_domain_devices() >> is sas_deform_port(). >> > > And sas_deform_port() may be calle

Re: general protection fault in __lock_acquire (2)

2017-12-03 Thread Cong Wang
On Sun, Dec 3, 2017 at 4:33 PM, syzbot wrote: > syzkaller has found reproducer for the following crash on > fb7516d42478ebc8e2f00efb76ef96f7b68fd8d3 > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master >

Re: KASAN: use-after-free Read in sock_release

2017-11-29 Thread Cong Wang
(Cc'ing fs people...) On Wed, Nov 29, 2017 at 12:33 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 1d3b78bbc6e983fabb3fbf91b76339bf66e4a12c >

Re: [PATCH] libsas: flush pending destruct work in sas_unregister_domain_devices()

2017-11-28 Thread Cong Wang
On Tue, Nov 28, 2017 at 3:18 AM, John Garry <john.ga...@huawei.com> wrote: > On 28/11/2017 08:20, Johannes Thumshirn wrote: >> >> On Mon, Nov 27, 2017 at 04:24:45PM -0800, Cong Wang wrote: >>> >>> We saw dozens of the following kernel waring: >>> &

Re: [PATCH] libsas: flush pending destruct work in sas_unregister_domain_devices()

2017-11-28 Thread Cong Wang
On Tue, Nov 28, 2017 at 12:20 AM, Johannes Thumshirn <jthumsh...@suse.de> wrote: > On Mon, Nov 27, 2017 at 04:24:45PM -0800, Cong Wang wrote: >> We saw dozens of the following kernel waring: >> >> WARNING: CPU: 0 PID: 705 at fs/sysfs/group.c:224 >> sysfs_remove_

[PATCH] libsas: flush pending destruct work in sas_unregister_domain_devices()

2017-11-27 Thread Cong Wang
ot; <martin.peter...@oracle.com> Cc: linux-s...@vger.kernel.org Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> --- drivers/scsi/libsas/sas_discover.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover

Re: WARNING in xfrm_state_fini

2017-11-27 Thread Cong Wang
On Mon, Nov 27, 2017 at 3:55 AM, Steffen Klassert <steffen.klass...@secunet.com> wrote: > On Tue, Nov 21, 2017 at 06:44:04PM -0800, Cong Wang wrote: >> User-space uses proto==0 as a wildcard, but xfrm_id_proto_match() >> doesn't consider it as a match with IPSEC_PR

Re: WARNING in xfrm_state_fini

2017-11-21 Thread Cong Wang
On Tue, Nov 21, 2017 at 2:00 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > c8a0739b185d11d6e2ca7ad9f5835841d1cfc765 > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > compiler:

Re: kernel_read() changed from v4.13 to v4.14

2017-11-21 Thread Cong Wang
On Tue, Nov 21, 2017 at 1:05 PM, Zytaruk, Kelly wrote: > I noticed that the parameter ordering to kernel_read() changed from Linux > kernel v4.13 to v4.14 when the function was moved into fs/read_write.c from > exec.c > > 4.13.15 - int kernel_read(struct file *file,

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-14 Thread Cong Wang
On Tue, Nov 14, 2017 at 5:53 AM, Kirill Tkhai wrote: > @@ -406,7 +406,7 @@ struct net *copy_net_ns(unsigned long flags, > > get_user_ns(user_ns); > > - rv = mutex_lock_killable(_mutex); > + rv = down_read_killable(_sem); > if (rv < 0) { >

Re: Kernel crash in free_pipe_info()

2017-11-10 Thread Cong Wang
Hi, Simon On Thu, Nov 9, 2017 at 10:07 PM, Simon Brewer wrote: > This looks familiar... > > https://github.com/moby/moby/issues/34472 > > From the bug report: > "In particular, it looks like either docker-containerd or > docker-containerd-shim (the log is cut off) has a pipe

Re: KASAN: use-after-free Read in worker_thread (2)

2017-11-10 Thread Cong Wang
On Wed, Nov 8, 2017 at 5:00 AM, Dmitry Vyukov wrote: > On Wed, Nov 8, 2017 at 1:58 PM, syzbot > > wrote: >> Hello, >> >> syzkaller hit the following crash on >> 7dfaa7bc99498da1c6c4a48bee8d2d5265161a8c >>

Re: linux-next: manual merge of the net-next tree with Linus' tree

2017-11-09 Thread Cong Wang
On Thu, Nov 9, 2017 at 3:31 PM, Stephen Rothwell wrote: > I fixed it up (I think - see below) and can carry the fix as necessary. > This is now fixed as far as linux-next is concerned, but any non trivial > conflicts should be mentioned to your upstream maintainer when your

  1   2   3   4   5   6   7   >