From: Marek Lindner <lindner_marek@yahoo.de>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org,
Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>,
Simon Wunderlich <siwu@hrz.tu-chemnitz.de>,
Sven Eckelmann <sven@narfation.org>,
Marek Lindner <lindner_marek@yahoo.de>
Subject: [PATCH 05/11] batman-adv: use unregister_netdevice() when softif_create fails
Date: Mon, 12 Dec 2011 19:31:49 +0800 [thread overview]
Message-ID: <1323689516-24427-6-git-send-email-lindner_marek@yahoo.de> (raw)
In-Reply-To: <1323689516-24427-1-git-send-email-lindner_marek@yahoo.de>
From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
When entering softif_create(), the rtnl lock has already been acquired
by store_mesh_iface().
(store_mesh_iface() -> hardif_enable_interface() -> softif_create)
In case of an error, we should therefore call unregister_netdevice()
instead of unregister_netdev().
unregister_netdev() tries to acquire the rtnl lock itself and deadlocks
in this situation. unregister_netdevice() assumes that the rtnl lock
is already been held.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
net/batman-adv/soft-interface.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index 45297c8..987c75a 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -874,7 +874,7 @@ unreg_debugfs:
unreg_sysfs:
sysfs_del_meshif(soft_iface);
unreg_soft_iface:
- unregister_netdev(soft_iface);
+ unregister_netdevice(soft_iface);
return NULL;
free_soft_iface:
--
1.7.5.4
next prev parent reply other threads:[~2011-12-12 11:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-12 11:31 pull request: batman-adv 2011-12-12 Marek Lindner
2011-12-12 11:31 ` [PATCH 01/11] batman-adv: report compat_version in version field in case of version mismatch Marek Lindner
2011-12-12 11:31 ` [PATCH 02/11] batman-adv: create a common substructure for tt_global/local_entry Marek Lindner
2011-12-12 11:31 ` [PATCH 03/11] batman-adv: generalise tt_local_reset_flags() Marek Lindner
2011-12-12 11:31 ` Marek Lindner [this message]
2011-12-12 11:31 ` [PATCH 06/11] batman-adv: readme update (mention ap isolation and new log level) Marek Lindner
2011-12-12 11:31 ` [PATCH 07/11] batman-adv: remove extra negation in gw_out_of_range() Marek Lindner
2011-12-12 11:31 ` [PATCH 08/11] batman-adv: format multi-line if in the correct way Marek Lindner
[not found] ` <1323689516-24427-1-git-send-email-lindner_marek-LWAfsSFWpa4@public.gmane.org>
2011-12-12 11:31 ` [PATCH 04/11] batman-adv: check return value for hash_add() Marek Lindner
2011-12-12 11:31 ` [PATCH 09/11] batman-adv: bat_socket_read missing checks Marek Lindner
2011-12-12 11:31 ` [PATCH 10/11] batman-adv: Directly check read of icmp packet in copy_from_user Marek Lindner
2011-12-12 11:31 ` [PATCH 11/11] batman-adv: Only write requested number of byte to user buffer Marek Lindner
2011-12-13 0:28 ` pull request: batman-adv 2011-12-12 David Miller
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=1323689516-24427-6-git-send-email-lindner_marek@yahoo.de \
--to=lindner_marek@yahoo.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=simon.wunderlich@s2003.tu-chemnitz.de \
--cc=siwu@hrz.tu-chemnitz.de \
--cc=sven@narfation.org \
/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