From: "Linus Lüssing" <linus.luessing@web.de>
To: Sven Eckelmann <sven.eckelmann@gmx.de>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Always synchronize rcu's on module shutdown
Date: Mon, 6 Sep 2010 14:37:45 +0200 [thread overview]
Message-ID: <20100906123745.GB13669@Sellars> (raw)
In-Reply-To: <201009061407.59606.sven.eckelmann@gmx.de>
> So I would ack the patch with a minor change in the commit message. So instead
> of
>
> > During the module shutdown procedure in batman_exit(), a rcu callback is
> > being scheduled (batman_exit -> hardif_remove_interfaces ->
> > hardif_remove_interfae -> call_rcu). However, when the kernel unloads
> > the module, the rcu callback might not have been executed yet, resulting
> > in a "unable to handle kernel paging request" in __rcu_process_callback
> > afterwards, causing the kernel to freeze.
> > Therefore, we should always flush all rcu callback functions scheduled
> > during the shutdown procedure.
>
> something like
>
> > During the module shutdown procedure in batman_exit(), a rcu callback is
> > being scheduled (batman_exit -> hardif_remove_interfaces ->
> > hardif_remove_interfae -> call_rcu). However, when the kernel unloads
> > the module, the rcu callback might not have been executed yet, resulting
> > in a "unable to handle kernel paging request" in __rcu_process_callback
> > afterwards, causing the kernel to freeze.
>
> > The synchronize_net and synchronize_rcu in mesh_free are currently
> > called before the call_rcu in hardif_remove_interface and have no real
> > effect on it.
>
> > Therefore, we should always flush all rcu callback functions scheduled
> > during the shutdown procedure using synchronize_net. The call to
> > synchronize_rcu can be omitted because synchronize_net already calls it.
Yep, sounds good :). Thanks for reviewing and the info about
synchronize_net.
Cheers, Linus
>
> thanks,
> Sven
next prev parent reply other threads:[~2010-09-06 12:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-05 23:29 [B.A.T.M.A.N.] [PATCH] batman-adv: Always synchronize rcu's on module shutdown Linus Lüssing
2010-09-06 7:30 ` Sven Eckelmann
2010-09-06 10:09 ` Linus Lüssing
2010-09-06 12:07 ` Sven Eckelmann
2010-09-06 12:37 ` Linus Lüssing [this message]
2010-09-06 12:45 ` [B.A.T.M.A.N.] [PATCHv2] " Sven Eckelmann
2010-09-06 14:09 ` Marek Lindner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100906123745.GB13669@Sellars \
--to=linus.luessing@web.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=sven.eckelmann@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox