Re: [PATCH v3] net: sched: tapr: prevent cycle_time == 0 in parse_taprio_schedule

2021-04-16 Thread Du Cheng
Le Fri, Apr 16, 2021 at 10:14:52AM -0700, Cong Wang a écrit : > On Thu, Apr 15, 2021 at 4:17 PM Du Cheng wrote: > > diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c > > index 8287894541e3..abd6b176383c 100644 > > --- a/net/sched/sch_taprio.c > > +

[PATCH v4] net: sched: tapr: prevent cycle_time == 0 in parse_taprio_schedule

2021-04-16 Thread Du Cheng
ler: https://syzkaller.appspot.com/bug?extid=d50710fd0873a9c6b40c Reported-by: syzbot+d50710fd0873a9c6b...@syzkaller.appspotmail.com Signed-off-by: Du Cheng --- changelog v1: Discussion https://lore.kernel.org/netdev/YHfwUmFODUHx8G5W@carbon/T/ v2: fix typo https://lore.kernel.org/netdev/202104150759

Re: [PATCH v2] net: sched: tapr: remove WARN_ON() in taprio_get_start_time()

2021-04-15 Thread Du Cheng
Le Thu, Apr 15, 2021 at 08:02:45PM +0200, Eric Dumazet a écrit : > > > On 4/15/21 9:59 AM, Du Cheng wrote: > > There is a reproducible sequence from the userland that will trigger a > > WARN_ON() > > condition in taprio_get_start_time, which causes kernel to pani

[PATCH v3] net: sched: tapr: prevent cycle_time == 0 in parse_taprio_schedule

2021-04-15 Thread Du Cheng
syzkaller: https://syzkaller.appspot.com/bug?extid=d50710fd0873a9c6b40c Reported-by: syzbot+d50710fd0873a9c6b...@syzkaller.appspotmail.com Signed-off-by: Du Cheng --- changelog v1: Discussion https://lore.kernel.org/netdev/YHfwUmFODUHx8G5W@carbon/T/ v2: fix typo https://lore.kernel.

[PATCH v2] net: sched: tapr: remove WARN_ON() in taprio_get_start_time

2021-04-15 Thread Du Cheng
syzkaller: https://syzkaller.appspot.com/bug?extid=d50710fd0873a9c6b40c Reported-by: syzbot+d50710fd0873a9c6b...@syzkaller.appspotmail.com Signed-off-by: Du Cheng --- changelog: v1: Discussion https://lore.kernel.org/netdev/YHfwUmFODUHx8G5W@carbon/T/ v2: fix typo net/sched/sch_taprio.c | 2

[PATCH v2] net: sched: tapr: remove WARN_ON() in taprio_get_start_time()

2021-04-15 Thread Du Cheng
syzkaller: https://syzkaller.appspot.com/bug?extid=d50710fd0873a9c6b40c Reported-by: syzbot+d50710fd0873a9c6b...@syzkaller.appspotmail.com Signed-off-by: Du Cheng --- Detailed explanation: In net/sched/sched_taprio.c:999 The condition WARN_ON(!cycle) will be triggered if cycle == 0. Value of cycle

Re: [PATCH] net: sched: tapr: remove WARN_ON() in taprio_get_start_time()

2021-04-15 Thread Du Cheng
Le Thu, Apr 15, 2021 at 08:56:09AM +0200, Eric Dumazet a écrit : > > > On 4/15/21 8:39 AM, Du Cheng wrote: > > There is a reproducible sequence from the userland that will trigger a > > WARN_ON() > > condition in taprio_get_start_time, which causes kernel to pani

[PATCH] net: sched: tapr: remove WARN_ON() in taprio_get_start_time()

2021-04-14 Thread Du Cheng
syzkaller: https://syzkaller.appspot.com/bug?extid=d50710fd0873a9c6b40c Reported-by: syzbot+d50710fd0873a9c6b...@syzkaller.appspotmail.com Signed-off-by: Du Cheng --- Detailed explanation: In net/sched/sched_taprio.c:999 The condition WARN_ON(!cycle) will be triggered if cycle == 0. Value of cycle

Re: [PATCH v2] net:qrtr: fix atomic idr allocation in qrtr_port_assign()

2021-03-29 Thread Du Cheng
> > > On Sat, Mar 27, 2021 at 10:25:20PM +0800, Du Cheng wrote: > > > > > On Sat, Mar 27, 2021 at 03:12:14PM +0100, Greg Kroah-Hartman wrote: > > > > > > Adding the xarray maintainer... > > > > > > > > > > > > On Sat, Ma

Re: [PATCH v2] net:qrtr: fix atomic idr allocation in qrtr_port_assign()

2021-03-27 Thread Du Cheng
On Sat, Mar 27, 2021 at 03:12:14PM +0100, Greg Kroah-Hartman wrote: > Adding the xarray maintainer... > > On Sat, Mar 27, 2021 at 10:07:02PM +0800, Du Cheng wrote: > > add idr_preload() and idr_preload_end() around idr_alloc_u32(GFP_ATOMIC) > > due to internal use of per

[PATCH v2] net:qrtr: fix atomic idr allocation in qrtr_port_assign()

2021-03-27 Thread Du Cheng
ec59e770685e3dc...@syzkaller.appspotmail.com Signed-off-by: Du Cheng --- changelog v1: change to GFP_KERNEL for idr_alloc_u32() but might sleep v2: revert to GFP_ATOMIC but add preemption disable/enable protection net/qrtr/qrtr.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/qrtr/qrtr.c b/net/qr

Re: [PATCH] net:qrtr: fix allocator flag of idr_alloc_u32() in qrtr_port_assign()

2021-03-26 Thread Du Cheng
On Fri, Mar 26, 2021 at 10:31:57AM +0100, Greg Kroah-Hartman wrote: > On Fri, Mar 26, 2021 at 11:33:45AM +0800, Du Cheng wrote: > > change the allocator flag of idr_alloc_u32 from GFP_ATOMIC to > > GFP_KERNEL, as GFP_ATOMIC caused BUG: "using smp_processor_id() in > > p

[PATCH] net:qrtr: fix allocator flag of idr_alloc_u32() in qrtr_port_assign()

2021-03-25 Thread Du Cheng
change the allocator flag of idr_alloc_u32 from GFP_ATOMIC to GFP_KERNEL, as GFP_ATOMIC caused BUG: "using smp_processor_id() in preemptible" as reported by syzkaller. Reported-by: syzbot+3eec59e770685e3dc...@syzkaller.appspotmail.com Signed-off-by: Du Cheng --- Hi David & Jakub,

[PATCH v5] staging: qlge: fix comment style in qlge_main.c

2021-02-16 Thread Du Cheng
fix the closing of a one-line block comment, marked incorrect by scripts/checkpatch.pl. Signed-off-by: Du Cheng --- changes v5: - improve description changes v4: - move "changes" after triple-tiret changes v3: - add SUBSYSTEM in subject line - add explanation to past version of

[PATCH v4] staging: qlge: fix comment style in qlge_main.c

2021-02-16 Thread Du Cheng
align * in block comments on each line This series of patches is for Task 10 of the Eudyptula Challenge Signed-off-by: Du Cheng --- changes v4: - move "changes" after triple-tiret changes v3: - add SUBSYSTEM in subject line - add explanation to past version of this patch changes

[PATCH v3] staging: fix coding style in driver/staging/qlge/qlge_main.c

2021-02-16 Thread Du Cheng
align * in block comments on each line changes v3: - add SUBSYSTEM in subject line - add explanation to past version of this patch changes v2: - move closing of comment to the same line changes v1: - align * in block comments Signed-off-by: Du Cheng --- drivers/staging/qlge/qlge_main.c | 3

[PATCH v2] fix coding style in driver/staging/qlge/qlge_main.c

2021-02-15 Thread Du Cheng
align * in block comments on each line Signed-off-by: Du Cheng --- drivers/staging/qlge/qlge_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index 5516be3af898..2682a0e474bd 100644 --- a/drivers

[PATCH] fix coding style in driver/staging/qlge/qlge_main.c

2021-02-15 Thread Du Cheng
align * in block comments on each line Signed-off-by: Du Cheng --- drivers/staging/qlge/qlge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index 5516be3af898..bfd7217f3953 100644 --- a/drivers