Re: [PATCH v3 0/3] kernel/notifier.c: avoid duplicate registration

2019-09-09 Thread Xiaoming Ni
On 2019/7/17 19:15, Vasily Averin wrote: > On 7/16/19 5:07 PM, Xiaoming Ni wrote: >> On 2019/7/16 18:20, Vasily Averin wrote: >>> On 7/16/19 5:00 AM, Xiaoming Ni wrote: On 2019/7/15 13:38, Vasily Averin wrote: > On 7/14/19 5:45 AM, Xiaoming Ni wrote: >> On 2019/7/12 22:07, gre...@lin

Re: [PATCH v3 0/3] kernel/notifier.c: avoid duplicate registration

2019-07-17 Thread Vasily Averin
On 7/16/19 5:07 PM, Xiaoming Ni wrote: > On 2019/7/16 18:20, Vasily Averin wrote: >> On 7/16/19 5:00 AM, Xiaoming Ni wrote: >>> On 2019/7/15 13:38, Vasily Averin wrote: On 7/14/19 5:45 AM, Xiaoming Ni wrote: > On 2019/7/12 22:07, gre...@linuxfoundation.org wrote: >> On Fri, Jul 12, 201

Re: [PATCH v3 0/3] kernel/notifier.c: avoid duplicate registration

2019-07-16 Thread Xiaoming Ni
On 2019/7/16 18:20, Vasily Averin wrote: > On 7/16/19 5:00 AM, Xiaoming Ni wrote: >> On 2019/7/15 13:38, Vasily Averin wrote: >>> On 7/14/19 5:45 AM, Xiaoming Ni wrote: On 2019/7/12 22:07, gre...@linuxfoundation.org wrote: > On Fri, Jul 12, 2019 at 09:11:57PM +0800, Xiaoming Ni wrote: >

Re: [PATCH v3 0/3] kernel/notifier.c: avoid duplicate registration

2019-07-16 Thread Vasily Averin
On 7/16/19 5:00 AM, Xiaoming Ni wrote: > On 2019/7/15 13:38, Vasily Averin wrote: >> On 7/14/19 5:45 AM, Xiaoming Ni wrote: >>> On 2019/7/12 22:07, gre...@linuxfoundation.org wrote: On Fri, Jul 12, 2019 at 09:11:57PM +0800, Xiaoming Ni wrote: > On 2019/7/11 21:57, Vasily Averin wrote:

Re: [PATCH v3 0/3] kernel/notifier.c: avoid duplicate registration

2019-07-15 Thread Xiaoming Ni
On 2019/7/15 13:38, Vasily Averin wrote: > On 7/14/19 5:45 AM, Xiaoming Ni wrote: >> On 2019/7/12 22:07, gre...@linuxfoundation.org wrote: >>> On Fri, Jul 12, 2019 at 09:11:57PM +0800, Xiaoming Ni wrote: On 2019/7/11 21:57, Vasily Averin wrote: > On 7/11/19 4:55 AM, Nixiaoming wrote: >

Re: [PATCH v3 0/3] kernel/notifier.c: avoid duplicate registration

2019-07-14 Thread Vasily Averin
On 7/14/19 5:45 AM, Xiaoming Ni wrote: > On 2019/7/12 22:07, gre...@linuxfoundation.org wrote: >> On Fri, Jul 12, 2019 at 09:11:57PM +0800, Xiaoming Ni wrote: >>> On 2019/7/11 21:57, Vasily Averin wrote: On 7/11/19 4:55 AM, Nixiaoming wrote: > On Wed, July 10, 2019 1:49 PM Vasily Averin wr

Re: [PATCH v3 0/3] kernel/notifier.c: avoid duplicate registration

2019-07-13 Thread Xiaoming Ni
On 2019/7/12 22:07, gre...@linuxfoundation.org wrote: > On Fri, Jul 12, 2019 at 09:11:57PM +0800, Xiaoming Ni wrote: >> On 2019/7/11 21:57, Vasily Averin wrote: >>> On 7/11/19 4:55 AM, Nixiaoming wrote: On Wed, July 10, 2019 1:49 PM Vasily Averin wrote: > On 7/10/19 6:09 AM, Xiaoming Ni wr

Re: [PATCH v3 0/3] kernel/notifier.c: avoid duplicate registration

2019-07-12 Thread gre...@linuxfoundation.org
On Fri, Jul 12, 2019 at 09:11:57PM +0800, Xiaoming Ni wrote: > On 2019/7/11 21:57, Vasily Averin wrote: > > On 7/11/19 4:55 AM, Nixiaoming wrote: > >> On Wed, July 10, 2019 1:49 PM Vasily Averin wrote: > >>> On 7/10/19 6:09 AM, Xiaoming Ni wrote: > Registering the same notifier to a hook repea

Re: [PATCH v3 0/3] kernel/notifier.c: avoid duplicate registration

2019-07-12 Thread Xiaoming Ni
On 2019/7/11 21:57, Vasily Averin wrote: > On 7/11/19 4:55 AM, Nixiaoming wrote: >> On Wed, July 10, 2019 1:49 PM Vasily Averin wrote: >>> On 7/10/19 6:09 AM, Xiaoming Ni wrote: Registering the same notifier to a hook repeatedly can cause the hook list to form a ring or lose other members

Re: [PATCH v3 0/3] kernel/notifier.c: avoid duplicate registration

2019-07-11 Thread Vasily Averin
On 7/11/19 4:55 AM, Nixiaoming wrote: > On Wed, July 10, 2019 1:49 PM Vasily Averin wrote: >> On 7/10/19 6:09 AM, Xiaoming Ni wrote: >>> Registering the same notifier to a hook repeatedly can cause the hook >>> list to form a ring or lose other members of the list. >> >> I think is not enough to _p

RE: [PATCH v3 0/3] kernel/notifier.c: avoid duplicate registration

2019-07-10 Thread Nixiaoming
On Wed, July 10, 2019 1:49 PM Vasily Averin wrote: >On 7/10/19 6:09 AM, Xiaoming Ni wrote: >> Registering the same notifier to a hook repeatedly can cause the hook >> list to form a ring or lose other members of the list. > >I think is not enough to _prevent_ 2nd register attempt, >it's enough to d

RE: [PATCH v3 0/3] kernel/notifier.c: avoid duplicate registration

2019-07-10 Thread Nixiaoming
On Wed, July 10, 2019 1:56 PM Greg KH wrote: >On Wed, Jul 10, 2019 at 11:09:07AM +0800, Xiaoming Ni wrote: >> Registering the same notifier to a hook repeatedly can cause the hook >> list to form a ring or lose other members of the list. > >Then don't do that :) > Duplicate registration is checked

Re: [PATCH v3 0/3] kernel/notifier.c: avoid duplicate registration

2019-07-09 Thread Greg KH
On Wed, Jul 10, 2019 at 11:09:07AM +0800, Xiaoming Ni wrote: > Registering the same notifier to a hook repeatedly can cause the hook > list to form a ring or lose other members of the list. Then don't do that :) Is there any in-kernel users that do do this? If so, please just fix them. thanks,

Re: [PATCH v3 0/3] kernel/notifier.c: avoid duplicate registration

2019-07-09 Thread Vasily Averin
On 7/10/19 6:09 AM, Xiaoming Ni wrote: > Registering the same notifier to a hook repeatedly can cause the hook > list to form a ring or lose other members of the list. I think is not enough to _prevent_ 2nd register attempt, it's enough to detect just attempt and generate warning to mark host in b

[PATCH v3 0/3] kernel/notifier.c: avoid duplicate registration

2019-07-09 Thread Xiaoming Ni
Registering the same notifier to a hook repeatedly can cause the hook list to form a ring or lose other members of the list. case1: An infinite loop in notifier_chain_register() can cause soft lockup atomic_notifier_chain_register(&test_notifier_list, &test1); atomic_notifier_chain