Re: [Question] null pointer risk of kernel workqueue

2017-10-23 Thread Li Bin
on 2017/10/23 22:03, Tejun Heo wrote: >> >> And I think the following patch can solve the bug, right? >> >> diff --git a/kernel/workqueue_internal.h b/kernel/workqueue_internal.h >> index 8635417..650680c 100644 >> --- a/kernel/workqueue_internal.h >> +++ b/kernel/workqueue_internal.h >> @@

Re: [Question] null pointer risk of kernel workqueue

2017-10-23 Thread Li Bin
on 2017/10/23 22:03, Tejun Heo wrote: >> >> And I think the following patch can solve the bug, right? >> >> diff --git a/kernel/workqueue_internal.h b/kernel/workqueue_internal.h >> index 8635417..650680c 100644 >> --- a/kernel/workqueue_internal.h >> +++ b/kernel/workqueue_internal.h >> @@

Re: [Question] null pointer risk of kernel workqueue

2017-10-23 Thread Tejun Heo
Hello, On Mon, Oct 23, 2017 at 09:34:11AM +0800, Li Bin wrote: > > > on 2017/10/21 23:35, Tejun Heo wrote: > > On Fri, Oct 20, 2017 at 02:57:18PM +0800, tanxiaofei wrote: > >> Hi Tejun, > >> > >> Any comments about this? > > > > I think you're confused, or at least can't understand what you're

Re: [Question] null pointer risk of kernel workqueue

2017-10-23 Thread Tejun Heo
Hello, On Mon, Oct 23, 2017 at 09:34:11AM +0800, Li Bin wrote: > > > on 2017/10/21 23:35, Tejun Heo wrote: > > On Fri, Oct 20, 2017 at 02:57:18PM +0800, tanxiaofei wrote: > >> Hi Tejun, > >> > >> Any comments about this? > > > > I think you're confused, or at least can't understand what you're

Re: [Question] null pointer risk of kernel workqueue

2017-10-23 Thread tanxiaofei
Hi Bin, Yes, that's it. thanks. -- tanxiaofei On 2017/10/23 9:34, Li Bin wrote: > > > on 2017/10/21 23:35, Tejun Heo wrote: >> On Fri, Oct 20, 2017 at 02:57:18PM +0800, tanxiaofei wrote: >>> Hi Tejun, >>> >>> Any comments about this? >> >> I think you're confused, or at least can't understand

Re: [Question] null pointer risk of kernel workqueue

2017-10-23 Thread tanxiaofei
Hi Bin, Yes, that's it. thanks. -- tanxiaofei On 2017/10/23 9:34, Li Bin wrote: > > > on 2017/10/21 23:35, Tejun Heo wrote: >> On Fri, Oct 20, 2017 at 02:57:18PM +0800, tanxiaofei wrote: >>> Hi Tejun, >>> >>> Any comments about this? >> >> I think you're confused, or at least can't understand

Re: [Question] null pointer risk of kernel workqueue

2017-10-22 Thread Li Bin
on 2017/10/21 23:35, Tejun Heo wrote: > On Fri, Oct 20, 2017 at 02:57:18PM +0800, tanxiaofei wrote: >> Hi Tejun, >> >> Any comments about this? > > I think you're confused, or at least can't understand what you're > trying to say. Can you create a rero? > Hi Tejun, The case is as following:

Re: [Question] null pointer risk of kernel workqueue

2017-10-22 Thread Li Bin
on 2017/10/21 23:35, Tejun Heo wrote: > On Fri, Oct 20, 2017 at 02:57:18PM +0800, tanxiaofei wrote: >> Hi Tejun, >> >> Any comments about this? > > I think you're confused, or at least can't understand what you're > trying to say. Can you create a rero? > Hi Tejun, The case is as following:

Re: [Question] null pointer risk of kernel workqueue

2017-10-21 Thread Tejun Heo
On Sat, Oct 21, 2017 at 08:35:22AM -0700, Tejun Heo wrote: > On Fri, Oct 20, 2017 at 02:57:18PM +0800, tanxiaofei wrote: > > Hi Tejun, > > > > Any comments about this? > > I think you're confused, or at least can't understand what you're > trying to say. Can you create a rero? Sorry, I meant

Re: [Question] null pointer risk of kernel workqueue

2017-10-21 Thread Tejun Heo
On Sat, Oct 21, 2017 at 08:35:22AM -0700, Tejun Heo wrote: > On Fri, Oct 20, 2017 at 02:57:18PM +0800, tanxiaofei wrote: > > Hi Tejun, > > > > Any comments about this? > > I think you're confused, or at least can't understand what you're > trying to say. Can you create a rero? Sorry, I meant

Re: [Question] null pointer risk of kernel workqueue

2017-10-21 Thread Tejun Heo
On Fri, Oct 20, 2017 at 02:57:18PM +0800, tanxiaofei wrote: > Hi Tejun, > > Any comments about this? I think you're confused, or at least can't understand what you're trying to say. Can you create a rero? Thanks. -- tejun

Re: [Question] null pointer risk of kernel workqueue

2017-10-21 Thread Tejun Heo
On Fri, Oct 20, 2017 at 02:57:18PM +0800, tanxiaofei wrote: > Hi Tejun, > > Any comments about this? I think you're confused, or at least can't understand what you're trying to say. Can you create a rero? Thanks. -- tejun

Re: [Question] null pointer risk of kernel workqueue

2017-10-20 Thread tanxiaofei
Hi Tejun, Any comments about this? Thanks On 2017/9/27 17:17, tanxiaofei wrote: > > > On 2017/9/25 23:25, Tejun Heo wrote: >> Hello, >> >> On Sat, Sep 23, 2017 at 05:04:24PM +0800, tanxiaofei wrote: >>> Hi Tejun & Jiangshan, >>> >>> I find an null pointer risk in the code of workqueue. Here

Re: [Question] null pointer risk of kernel workqueue

2017-10-20 Thread tanxiaofei
Hi Tejun, Any comments about this? Thanks On 2017/9/27 17:17, tanxiaofei wrote: > > > On 2017/9/25 23:25, Tejun Heo wrote: >> Hello, >> >> On Sat, Sep 23, 2017 at 05:04:24PM +0800, tanxiaofei wrote: >>> Hi Tejun & Jiangshan, >>> >>> I find an null pointer risk in the code of workqueue. Here

Re: [Question] null pointer risk of kernel workqueue

2017-09-27 Thread tanxiaofei
On 2017/9/25 23:25, Tejun Heo wrote: > Hello, > > On Sat, Sep 23, 2017 at 05:04:24PM +0800, tanxiaofei wrote: >> Hi Tejun & Jiangshan, >> >> I find an null pointer risk in the code of workqueue. Here is description: >> >> If draining, __queue_work() will call the function is_chained_work() to

Re: [Question] null pointer risk of kernel workqueue

2017-09-27 Thread tanxiaofei
On 2017/9/25 23:25, Tejun Heo wrote: > Hello, > > On Sat, Sep 23, 2017 at 05:04:24PM +0800, tanxiaofei wrote: >> Hi Tejun & Jiangshan, >> >> I find an null pointer risk in the code of workqueue. Here is description: >> >> If draining, __queue_work() will call the function is_chained_work() to

Re: [Question] null pointer risk of kernel workqueue

2017-09-25 Thread Tejun Heo
Hello, On Sat, Sep 23, 2017 at 05:04:24PM +0800, tanxiaofei wrote: > Hi Tejun & Jiangshan, > > I find an null pointer risk in the code of workqueue. Here is description: > > If draining, __queue_work() will call the function is_chained_work() to do > some checks. > In is_chained_work(),

Re: [Question] null pointer risk of kernel workqueue

2017-09-25 Thread Tejun Heo
Hello, On Sat, Sep 23, 2017 at 05:04:24PM +0800, tanxiaofei wrote: > Hi Tejun & Jiangshan, > > I find an null pointer risk in the code of workqueue. Here is description: > > If draining, __queue_work() will call the function is_chained_work() to do > some checks. > In is_chained_work(),

[Question] null pointer risk of kernel workqueue

2017-09-23 Thread tanxiaofei
Hi Tejun & Jiangshan, I find an null pointer risk in the code of workqueue. Here is description: If draining, __queue_work() will call the function is_chained_work() to do some checks. In is_chained_work(), worker->current_pwq is used directly. It should be not safe.

[Question] null pointer risk of kernel workqueue

2017-09-23 Thread tanxiaofei
Hi Tejun & Jiangshan, I find an null pointer risk in the code of workqueue. Here is description: If draining, __queue_work() will call the function is_chained_work() to do some checks. In is_chained_work(), worker->current_pwq is used directly. It should be not safe.