public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Marek Lindner <lindner_marek@yahoo.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Subject: Re: [B.A.T.M.A.N.] [PATCHv3] batman-adv: postpone sysfs removal when unregistering
Date: Sat, 12 Jan 2013 18:53:25 +0800	[thread overview]
Message-ID: <201301121853.25901.lindner_marek@yahoo.de> (raw)
In-Reply-To: <1357895991-2865-1-git-send-email-siwu@hrz.tu-chemnitz.de>

On Friday, January 11, 2013 17:19:51 Simon Wunderlich wrote:
> When processing the unregister notify for a hard interface, removing
> the sysfs files may lead to a circular deadlock (rtnl mutex <->
> s_active).
> 
> To overcome this problem, postpone the sysfs removal in a worker.
> 
> Reported-by: Sasha Levin <sasha.levin@oracle.com>
> Reported-by: Sven Eckelmann <sven@narfation.org>
> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
> ---
> Changes from PATCHv2:
>  * kerneldoc for functions
> 
> Changes from PATCHv1:
>  * INIT_WORK() in respective struct initialization functions
>  * kerneldoc
> 
> Changes from RFCv1:
>  * use work_struct properly, instead of delayed_work
>  * postpone for softifs as well as for hardifs
> 
> Postponing the sysfs removal for the hardif unregister is easier than
> other alternatives involving deferring. This should bring us to the
> same level to the bridge code, which also messes with sysfs in the
> notifier processing function, and uses rtnl_trylock when called
> from within sysfs.
> 
> As far as I could understand the net/core code, only the unregister
> case is the critical one, so the original bug should hopefully be
> fixed.
> ---
>  hard-interface.c |   24 ++++++++++++++++++++++--
>  soft-interface.c |   32 +++++++++++++++++++++++++++++---
>  types.h          |    6 ++++++
>  3 files changed, 57 insertions(+), 5 deletions(-)

Applied in revision a33c882.

Thanks,
Marek

      reply	other threads:[~2013-01-12 10:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-10 17:09 [B.A.T.M.A.N.] [PATCHv2] batman-adv: postpone sysfs removal when unregistering Simon Wunderlich
2013-01-10 17:16 ` Marek Lindner
2013-01-11  9:19 ` [B.A.T.M.A.N.] [PATCHv3] " Simon Wunderlich
2013-01-12 10:53   ` Marek Lindner [this message]

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=201301121853.25901.lindner_marek@yahoo.de \
    --to=lindner_marek@yahoo.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=siwu@hrz.tu-chemnitz.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