linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] kernel/notifier.c: intercepting duplicate registrations to avoid infinite loops
@ 2019-09-19  2:58 Xiaoming Ni
  2019-09-19  2:58 ` [PATCH v4 1/3] " Xiaoming Ni
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Xiaoming Ni @ 2019-09-19  2:58 UTC (permalink / raw)
  To: gregkh, akpm, vvs, torvalds, adobriyan, anna.schumaker, arjan,
	bfields, chuck.lever, davem, jlayton, luto, mingo, Nadia.Derbey,
	paulmck, semen.protsenko, stern, tglx, trond.myklebust,
	viresh.kumar
  Cc: stable, dylix.dailei, nixiaoming, yuehaibing, linux-kernel,
	linux-nfs, netdev

Registering the same notifier to a hook repeatedly can cause the hook
list to form a ring or lose other members of the list.
so, need add a check in in notifier_chain_register(),
intercepting duplicate registrations to avoid infinite loops


v1:
* use notifier_chain_cond_register replace notifier_chain_register

v2:
* Add a check in notifier_chain_register() to avoid duplicate registration
* remove notifier_chain_cond_register() to avoid duplicate code 
* remove blocking_notifier_chain_cond_register() to avoid duplicate code

v3:
* Add a cover letter.

v4:
* Add Reviewed-by and adjust the title.

Xiaoming Ni (3):
  kernel/notifier.c: intercepting duplicate registrations to avoid
    infinite loops
  kernel/notifier.c: remove notifier_chain_cond_register()
  kernel/notifier.c: remove blocking_notifier_chain_cond_register()

 include/linux/notifier.h |  4 ----
 kernel/notifier.c        | 41 +++--------------------------------------
 net/sunrpc/rpc_pipe.c    |  2 +-
 3 files changed, 4 insertions(+), 43 deletions(-)

-- 
1.8.5.6


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-09-19 12:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-19  2:58 [PATCH v4 0/3] kernel/notifier.c: intercepting duplicate registrations to avoid infinite loops Xiaoming Ni
2019-09-19  2:58 ` [PATCH v4 1/3] " Xiaoming Ni
2019-09-19  6:36   ` Greg KH
2019-09-19 12:55     ` Xiaoming Ni
2019-09-19  2:58 ` [PATCH v4 2/3] kernel/notifier.c: remove notifier_chain_cond_register() Xiaoming Ni
2019-09-19  2:58 ` [PATCH v4 3/3] kernel/notifier.c: remove blocking_notifier_chain_cond_register() Xiaoming Ni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).